index.vue 202 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950
  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:200px"
  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:200px"
  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="fTrademodeid">
  39. <el-select
  40. v-model="queryParams.fTrademodeid"
  41. placeholder="请选择贸易方式"
  42. clearable
  43. style="width:200px"
  44. @keyup.enter.native="handleQuery"
  45. >
  46. <el-option
  47. v-for="(dict, index) in fTrademodeidOptions"
  48. :key="index.dictValue"
  49. :label="dict.dictLabel"
  50. :value="dict.dictValue"
  51. />
  52. </el-select>
  53. </el-form-item>
  54. <el-form-item label="货权方" prop="fCorpid">
  55. <el-select
  56. v-model="queryParams.fCorpid"
  57. filterable
  58. remote
  59. clearable
  60. style="width:200px"
  61. @keyup.enter.native="handleQuery"
  62. :remote-method="corpsRemoteMethod"
  63. placeholder="请选择货权方"
  64. >
  65. <el-option
  66. v-for="(dict, index) in fMblnoOptions"
  67. :key="index.fId"
  68. :label="dict.fName"
  69. :value="dict.fId"
  70. ></el-option>
  71. </el-select>
  72. </el-form-item>
  73. <el-form-item label="提单号" prop="fMblno">
  74. <el-input
  75. v-model="queryParams.fMblno"
  76. placeholder="请输入提单号"
  77. clearable
  78. style="width:200px"
  79. size="small"
  80. @keyup.enter.native="handleQuery"
  81. />
  82. </el-form-item>
  83. <el-form-item label="经营单位" prop="fSbu">
  84. <el-select
  85. v-model="queryParams.fSbu"
  86. filterable
  87. remote
  88. clearable
  89. :remote-method="fSbuRemoteMethod"
  90. @keyup.enter.native="handleQuery"
  91. style="width:200px"
  92. placeholder="请选择经营单位"
  93. >
  94. <el-option
  95. v-for="(dict, index) in fSbuOptions"
  96. :key="index.fId"
  97. :label="dict.fName"
  98. :value="dict.fId"
  99. ></el-option>
  100. </el-select>
  101. </el-form-item>
  102. <el-form-item label="货物名称" prop="fGoodsid">
  103. <el-select
  104. v-model="queryParams.fGoodsid"
  105. filterable
  106. remote
  107. clearable
  108. style="width:200px"
  109. :remote-method="goodsRemoteMethod"
  110. @keyup.enter.native="handleQuery"
  111. placeholder="请选择货物名称"
  112. >
  113. <el-option
  114. v-for="(dict, index) in goodsOptions"
  115. :key="index.fId"
  116. :label="dict.fName"
  117. :value="dict.fId"
  118. ></el-option>
  119. </el-select>
  120. </el-form-item>
  121. <el-form-item label="仓库" prop="fWarehouseid">
  122. <el-select
  123. v-model="queryParams.fWarehouseid"
  124. filterable
  125. remote
  126. @select="treeseLect"
  127. :disabled="browseStatus || formBrowseStatus"
  128. style="width:200px"
  129. @keyup.enter.native="handleQuery"
  130. placeholder="请选择"
  131. >
  132. <el-option
  133. v-for="(dict, index) in warehouseOptions"
  134. :key="index.fId"
  135. :label="dict.fName"
  136. :value="dict.fId"
  137. ></el-option>
  138. </el-select>
  139. </el-form-item>
  140. <el-form-item label="品牌" prop="fMarks">
  141. <el-input
  142. v-model="queryParams.fMarks"
  143. placeholder="请输入品牌"
  144. clearable
  145. size="small"
  146. style="width:200px"
  147. @keyup.enter.native="handleQuery"
  148. />
  149. </el-form-item>
  150. <el-form-item label="费用状态" prop="fBillstatus">
  151. <el-select
  152. style="width:200px"
  153. v-model="queryParams.fBillstatus"
  154. placeholder="请输入费用状态"
  155. >
  156. <el-option label="录入" value="1"></el-option>
  157. <el-option label="暂存" value="2"></el-option>
  158. <el-option label="驳回" value="3"></el-option>
  159. <el-option label="请核" value="4"></el-option>
  160. <el-option label="审核中" value="5"></el-option>
  161. <el-option label="全部入账" value="6"></el-option>
  162. </el-select>
  163. </el-form-item>
  164. <el-form-item label="调拨状态" prop="fItemsStatus">
  165. <el-select
  166. style="width:200px"
  167. v-model="queryParams.fItemsStatus"
  168. placeholder="请输出库状态"
  169. >
  170. <el-option label="计划" value="1"/>
  171. <el-option label="待调拨" value="2"/>
  172. <el-option label="调拨中" value="3"/>
  173. <el-option label="已调拨" value="4"/>
  174. </el-select>
  175. </el-form-item>
  176. <el-form-item label="调拨日期" prop="timeInterval">
  177. <el-date-picker
  178. v-model="queryParams.timeInterval"
  179. type="daterange"
  180. value-format="yyyy-MM-dd"
  181. clearable
  182. style="width: 240px"
  183. range-separator="至"
  184. start-placeholder="开始日期"
  185. end-placeholder="结束日期"
  186. @keyup.enter.native="handleQuery"
  187. >
  188. </el-date-picker>
  189. </el-form-item>
  190. <el-form-item>
  191. <el-button
  192. type="cyan"
  193. icon="el-icon-search"
  194. size="mini"
  195. @click="handleQuery"
  196. >搜索
  197. </el-button>
  198. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  199. >重置
  200. </el-button>
  201. </el-form-item>
  202. </el-form>
  203. <el-row :gutter="10" class="mb8">
  204. <el-col :span="1.5">
  205. <el-button
  206. type="primary"
  207. icon="el-icon-plus"
  208. size="mini"
  209. @click="handleAdd(false)"
  210. v-hasPermi="['warehouseBusiness:stockTransfer:add']"
  211. >新增
  212. </el-button>
  213. </el-col>
  214. <el-col :span="1.5">
  215. <el-button
  216. type="success"
  217. icon="el-icon-edit"
  218. size="mini"
  219. :disabled="single"
  220. @click="handleUpdate"
  221. v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
  222. >修改
  223. </el-button>
  224. </el-col>
  225. <el-col :span="1.5">
  226. <el-button
  227. type="warning"
  228. icon="el-icon-download"
  229. size="mini"
  230. @click="handleExport"
  231. v-hasPermi="['warehouseBusiness:stockTransfer:export']"
  232. >导出
  233. </el-button>
  234. </el-col>
  235. <el-col :span="1.5">
  236. <el-button
  237. type="warning"
  238. icon="el-icon-download"
  239. size="mini"
  240. @click="handleExport"
  241. :disabled="multiple"
  242. v-hasPermi="['warehouseBusiness:stockTransfer:export']"
  243. >导入
  244. </el-button>
  245. </el-col>
  246. <div class="tabSetting">
  247. <right-toolbar
  248. :showSearch.sync="showSearch"
  249. @queryTable="getList"
  250. ></right-toolbar>
  251. <div style="margin: 0 12px">
  252. <el-button
  253. icon="el-icon-setting"
  254. size="mini"
  255. circle
  256. @click="showSetting = !showSetting"
  257. ></el-button>
  258. </div>
  259. </div>
  260. </el-row>
  261. <el-dialog title="提示" :visible.sync="showSetting" width="700px" v-dialogDrag>
  262. <template slot="title">
  263. <div class="avue-crud__dialog__header">
  264. <span class="el-dialog__title">
  265. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
  266. </span>
  267. </div>
  268. </template>
  269. <div>配置排序列数据(拖动调整顺序)</div>
  270. <div style="margin-left: 17px">
  271. <el-checkbox
  272. v-model="allCheck"
  273. label="全选"
  274. @change="allChecked"
  275. ></el-checkbox>
  276. </div>
  277. <div style="padding: 4px; display: flex; justify-content: center">
  278. <draggable
  279. v-model="setRowList"
  280. group="site"
  281. animation="300"
  282. @start="onStart"
  283. @end="onEnd"
  284. handle=".indraggable"
  285. >
  286. <transition-group>
  287. <div
  288. v-for="item in setRowList"
  289. :key="item.surface"
  290. class="listStyle"
  291. >
  292. <div style="width: 500px" class="indraggable">
  293. <div class="progress" :style="{ width: item.width + 'px' }">
  294. <el-checkbox
  295. :label="item.name"
  296. v-model="item.checked"
  297. :true-label="0"
  298. :false-label="1"
  299. >{{ item.name }}
  300. </el-checkbox>
  301. </div>
  302. </div>
  303. <el-input-number
  304. v-model.number="item.width"
  305. controls-position="right"
  306. :min="1"
  307. :max="500"
  308. size="mini"
  309. ></el-input-number>
  310. </div>
  311. </transition-group>
  312. </draggable>
  313. </div>
  314. <span slot="footer" class="dialog-footer">
  315. <el-button @click="showSetting = false">取 消</el-button>
  316. <el-button type="primary" @click="save()">确 定</el-button>
  317. </span>
  318. </el-dialog>
  319. <el-table
  320. v-loading="loading"
  321. :data="warehousebillsList"
  322. show-summary :summary-method="getSum"
  323. @selection-change="handleSelectionChange"
  324. >
  325. <el-table-column type="selection" width="60" fixed align="center" />
  326. <el-table-column type="index" label="行号" fixed align="center" />
  327. <el-table-column
  328. v-for="(item, index) in getRowList"
  329. :key="index"
  330. :label="item.name"
  331. :width="item.width"
  332. :prop="item.label"
  333. align="center"
  334. />
  335. <!-- <el-table-column label="制单人" align="center" prop="createBy" fixed/>-->
  336. <!-- <el-table-column label="仓管员" width="100" align="center" sortable prop="fStorekeeper" fixed/>-->
  337. <!-- <el-table-column width="100" fixed sortable label="调拨状态" align="center" prop="fItemsStatus">-->
  338. <!-- <template slot-scope="scope">-->
  339. <!-- <span v-if="scope.row.fItemsStatus === 1">计划</span>-->
  340. <!-- <span v-if="scope.row.fItemsStatus === 2">待调拨</span>-->
  341. <!-- <span v-if="scope.row.fItemsStatus === 3">调拨中</span>-->
  342. <!-- <span v-if="scope.row.fItemsStatus === 4">已调拨</span>-->
  343. <!-- </template>-->
  344. <!-- </el-table-column>-->
  345. <!-- <el-table-column width="220" label="货权方" fixed sortable align="center" prop="fCorpid"/>-->
  346. <!-- <el-table-column label="提单号" sortable fixed width="216" align="center" prop="fMblno" show-overflow-tooltip/>-->
  347. <!-- <el-table-column label="品名" fixed :show-overflow-tooltip="true" align="ceter" prop="fProductName" />-->
  348. <!-- <el-table-column label="品牌" fixed align="center" prop="fMarks" />-->
  349. <!-- <el-table-column label="调拨日期" align="center" fixed sortable prop="createTime" width="100">-->
  350. <!-- <template slot-scope="scope">-->
  351. <!-- <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>-->
  352. <!-- </template>-->
  353. <!-- </el-table-column>-->
  354. <!-- <el-table-column label="调入仓库" sortable fixed align="center" prop="fWarehouseid" width="100"/>-->
  355. <!-- <el-table-column label="调出仓库" sortable fixed align="center" prop="fInwarehouseid" width="100"/>-->
  356. <!-- <el-table-column label="计划调拨件数" align="center" prop="fPlanqty" width="100"/>-->
  357. <!-- <el-table-column label="调拨件数" align="center" prop="fQty" />-->
  358. <!-- <el-table-column label="调拨毛重(kg)" align="center" prop="fGrossweight" width="100"/>-->
  359. <!-- <el-table-column label="调拨净重(kg)" align="center" prop="fNetweight" width="100"/>-->
  360. <!-- <el-table-column label="业务类别" align="center" prop="fBusinessType" :formatter="fBusinessTypeFormat"/>-->
  361. <!-- <el-table-column width="100" label="费用状态" align="center" prop="fBillstatus">-->
  362. <!-- <template slot-scope="scope">-->
  363. <!-- <span v-if="scope.row.fBillstatus === 1">录入</span>-->
  364. <!-- <span v-if="scope.row.fBillstatus === 2">暂存</span>-->
  365. <!-- <span v-if="scope.row.fBillstatus === 3">驳回</span>-->
  366. <!-- <span v-if="scope.row.fBillstatus === 4">请核</span>-->
  367. <!-- <span v-if="scope.row.fBillstatus === 5">审核中</span>-->
  368. <!-- <span v-if="scope.row.fBillstatus === 6">全部入账</span>-->
  369. <!-- </template>-->
  370. <!-- </el-table-column>-->
  371. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="180">
  372. <template slot-scope="scope">
  373. <el-button
  374. size="mini"
  375. type="text"
  376. icon="el-icon-edit"
  377. @click="check_s(scope.row, true)"
  378. v-hasPermi="['warehouseBusiness:stockTransfer:query']"
  379. >查看
  380. </el-button>
  381. <el-button
  382. size="mini"
  383. type="text"
  384. icon="el-icon-edit"
  385. v-if="scope.row.fBillstatus === 4 || scope.row.fBillstatus === 5"
  386. @click="check(scope.row, true)"
  387. v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
  388. >审批进度
  389. </el-button>
  390. <el-button
  391. size="mini"
  392. type="text"
  393. icon="el-icon-edit"
  394. v-if="scope.row.fBillstatus <= 3"
  395. @click="handleUpdate(scope.row, false)"
  396. v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
  397. >修改
  398. </el-button>
  399. <el-button
  400. size="mini"
  401. type="text"
  402. icon="el-icon-delete"
  403. @click="handleDelete(scope.row)"
  404. v-if="scope.row.fItemsStatus === 1"
  405. v-hasPermi="['warehouseBusiness:stockTransfer:remove']"
  406. >删除
  407. </el-button>
  408. </template>
  409. </el-table-column>
  410. </el-table>
  411. <pagination
  412. v-show="total > 0"
  413. :total="total"
  414. :page.sync="queryParams.pageNum"
  415. :limit.sync="queryParams.pageSize"
  416. @pagination="getList"
  417. />
  418. <!-- 新增或修改仓库主(出入库)对话框 -->
  419. <el-dialog
  420. v-dialogDrag
  421. :fullscreen="dialogFull"
  422. :visible.sync="open"
  423. :close-on-click-modal="false"
  424. @close='addCloseDialog'
  425. width="80%"
  426. append-to-body
  427. :show-close="colseButton"
  428. >
  429. <template slot="title">
  430. <div class="avue-crud__dialog__header">
  431. <span class="el-dialog__title">
  432. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
  433. </span>
  434. <div class="avue-crud__dialog__menu enlarge" @click="full">
  435. <i style="cursor: pointer;display: block;width:12px;height:12px;border:1px solid #909399;border-top:3px solid #909399;margin-top: -3px;"></i>
  436. </div>
  437. </div>
  438. </template>
  439. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  440. <el-row>
  441. <el-col :span="8">
  442. <el-form-item label="货权方" prop="fCorpid">
  443. <el-select
  444. v-model="form.fCorpid"
  445. filterable
  446. remote
  447. :disabled="browseStatus || formBrowseStatus"
  448. @change="changefCorpid(form)"
  449. style="width: 80%"
  450. :remote-method="corpsRemoteMethod"
  451. placeholder="请输入模糊查找"
  452. >
  453. <el-option
  454. v-for="(dict, index) in fMblnoOptions"
  455. :key="index.fId"
  456. :label="dict.fName"
  457. :value="dict.fId"
  458. ></el-option>
  459. </el-select>
  460. </el-form-item>
  461. </el-col>
  462. <el-col :span="8">
  463. <el-form-item label="结算方式" prop="fstltypeid">
  464. <el-select
  465. v-model="form.fStltypeid"
  466. placeholder="请选择结算方式"
  467. :disabled="browseStatus || formBrowseStatus"
  468. clearable
  469. style="width: 80%"
  470. >
  471. <el-option
  472. v-for="(dict, index) in fStltypeOptions"
  473. :key="index.dictValue"
  474. :label="dict.dictLabel"
  475. :value="dict.dictValue"
  476. />
  477. </el-select>
  478. </el-form-item>
  479. </el-col>
  480. <el-col :span="8">
  481. <el-form-item label="提单号" prop="fMblno">
  482. <el-input
  483. v-model="form.fMblno"
  484. style="width: 80%"
  485. disabled
  486. placeholder=""
  487. />
  488. </el-form-item>
  489. </el-col>
  490. </el-row>
  491. <el-row>
  492. <el-col :span="8">
  493. <el-form-item label="业务日期" prop="fBsdate">
  494. <el-date-picker
  495. v-model="form.fBsdate"
  496. style="width: 80%"
  497. type="date"
  498. :disabled="browseStatus || formBrowseStatus"
  499. @change="changefBsdate"
  500. value-format="timestamp"
  501. placeholder="业务日期"
  502. >
  503. </el-date-picker>
  504. </el-form-item>
  505. </el-col>
  506. <el-col :span="8">
  507. <el-form-item label="业务时间" prop="fBstime">
  508. <el-time-picker
  509. style="width: 80%"
  510. :disabled="browseStatus || formBrowseStatus"
  511. v-model="form.fBstime"
  512. :picker-options="{
  513. selectableRange: '00:00:01 - 23:59:59'
  514. }"
  515. placeholder="任意时间点">
  516. </el-time-picker>
  517. </el-form-item>
  518. </el-col>
  519. <el-col :span="8">
  520. <el-form-item label="仓管员" prop="fStorekeeper">
  521. <el-select
  522. v-model="form.fStorekeeper"
  523. filterable
  524. remote
  525. :disabled="browseStatus || formBrowseStatus"
  526. style="width: 80%"
  527. :remote-method="userRemoteMethod"
  528. placeholder="请输入模糊查找"
  529. >
  530. <el-option
  531. v-for="dict in userOptions"
  532. :key="dict.userName"
  533. :label="dict.nickName"
  534. :value="dict.userName"
  535. ></el-option>
  536. </el-select>
  537. </el-form-item>
  538. </el-col>
  539. <el-col :span="8">
  540. <el-form-item label="调入仓库" prop="fWarehouseid">
  541. <el-select
  542. v-model="form.fWarehouseid"
  543. filterable
  544. remote
  545. :disabled="browseStatus || formBrowseStatus"
  546. style="width: 80%"
  547. @keyup.enter.native="handleQuery"
  548. placeholder="请选择"
  549. >
  550. <el-option
  551. v-for="(dict, index) in warehouseOptions"
  552. :key="index.fId"
  553. :label="dict.fName"
  554. :value="dict.fId"
  555. ></el-option>
  556. </el-select>
  557. </el-form-item>
  558. </el-col>
  559. <el-col :span="8">
  560. <el-form-item label="调出仓库" prop="fInwarehouseid">
  561. <el-select
  562. v-model="form.fInwarehouseid"
  563. filterable
  564. remote
  565. @change="warwhouseTel"
  566. :disabled="browseStatus || formBrowseStatus"
  567. style="width: 80%"
  568. @keyup.enter.native="handleQuery"
  569. placeholder="请选择"
  570. >
  571. <el-option
  572. v-for="(dict, index) in warehouseOptions"
  573. :key="index.fId"
  574. :label="dict.fName"
  575. :value="dict.fId"
  576. ></el-option>
  577. </el-select>
  578. </el-form-item>
  579. </el-col>
  580. <el-col :span="8">
  581. <el-form-item label="单据编号" prop="fBillno">
  582. <el-input
  583. v-model="form.fBillno"
  584. style="width: 80%"
  585. disabled
  586. placeholder="单据编号"
  587. />
  588. </el-form-item>
  589. </el-col>
  590. <!-- <el-col :span="8">
  591. <el-form-item label="破损" prop="fifdamage">
  592. <el-select
  593. v-model="form.fIfdamage"
  594. placeholder="请选择是否破损"
  595. :disabled="browseStatus || formBrowseStatus"
  596. clearable
  597. style="width: 80%"
  598. >
  599. <el-option
  600. v-for="dict in fIfdamageOptions"
  601. :key="dict.dictValue"
  602. :label="dict.dictLabel"
  603. :value="dict.dictValue"
  604. />
  605. </el-select>
  606. </el-form-item>
  607. </el-col>
  608. <el-col :span="8">
  609. <el-form-item label="过磅" prop="fifweigh">
  610. <el-select
  611. v-model="form.fIfweigh"
  612. placeholder="请选择是否过磅"
  613. :disabled="browseStatus || formBrowseStatus"
  614. clearable
  615. style="width: 80%"
  616. >
  617. <el-option
  618. v-for="dict in fIfweighOptions"
  619. :key="dict.dictValue"
  620. :label="dict.dictLabel"
  621. :value="dict.dictValue"
  622. />
  623. </el-select>
  624. </el-form-item>
  625. </el-col>
  626. </el-row>
  627. <el-row>
  628. -->
  629. <el-col :span="8">
  630. <el-form-item label="计划调拨件数">
  631. <el-input
  632. v-model="form.fPlanqty"
  633. style="width: 80%"
  634. :disabled="browseStatus || Operator !== Lander"
  635. placeholder="请输入计划调拨件数"
  636. />
  637. </el-form-item>
  638. </el-col>
  639. <el-col :span="8">
  640. <el-form-item label="计划调拨净重(kg)">
  641. <el-input
  642. v-model="form.fPlannetweight"
  643. style="width: 80%"
  644. :disabled="browseStatus || Operator !== Lander"
  645. placeholder="请输入计划调拨净重"
  646. />
  647. </el-form-item>
  648. </el-col>
  649. <el-col :span="8">
  650. <el-form-item label="计划调拨毛重(kg)">
  651. <el-input
  652. v-model="form.fPlangrossweight"
  653. style="width: 80%"
  654. :disabled="browseStatus || Operator !== Lander"
  655. placeholder="请输入计划调拨毛重"
  656. />
  657. </el-form-item>
  658. </el-col>
  659. <el-col :span="8">
  660. <el-form-item label="车号">
  661. <el-input
  662. v-model="form.fTruckno"
  663. style="width: 80%"
  664. :disabled="browseStatus || formBrowseStatus"
  665. placeholder="车号"
  666. />
  667. </el-form-item>
  668. </el-col>
  669. <el-col :span="8">
  670. <el-form-item label="司机姓名">
  671. <el-input
  672. v-model="form.fDriverName"
  673. style="width: 80%"
  674. :disabled="browseStatus || formBrowseStatus"
  675. placeholder="司机姓名"
  676. />
  677. </el-form-item>
  678. </el-col>
  679. <el-col :span="8">
  680. <el-form-item label="司机身份证">
  681. <el-input
  682. v-model="form.fDriverIdCar"
  683. style="width: 80%"
  684. :disabled="browseStatus || formBrowseStatus"
  685. placeholder="司机身份证"
  686. />
  687. </el-form-item>
  688. </el-col>
  689. <el-col :span="8">
  690. <el-form-item label="司机电话">
  691. <el-input
  692. v-model="form.fDriverTel"
  693. style="width: 80%"
  694. :disabled="browseStatus || formBrowseStatus"
  695. placeholder="司机电话"
  696. />
  697. </el-form-item>
  698. </el-col>
  699. <el-col :span="8">
  700. <el-form-item label="作业类型" prop="fBusinessType">
  701. <el-select
  702. style="width: 80%"
  703. v-model="form.fBusinessType"
  704. filterable
  705. @change="educationChange"
  706. :disabled="contrOl"
  707. >
  708. <el-option
  709. v-for="(dict, index) in businessTypeOption"
  710. :key="dict.dictValue"
  711. :label="dict.dictLabel"
  712. :value="dict.dictValue"
  713. ></el-option>
  714. </el-select>
  715. </el-form-item>
  716. </el-col>
  717. <el-col :span="8">
  718. <el-form-item label="劳务公司" prop="fLabour" :rules="{
  719. required: isrequired_l === 1 ? true : false,
  720. message: '请选择',
  721. trigger: ['blur', 'change']
  722. }">
  723. <el-select
  724. style="width: 80%"
  725. v-model="form.fLabour"
  726. @keyup.enter.native="handleQuery"
  727. :remote-method="flabourRemoteMethod"
  728. remote
  729. filterable
  730. :disabled="contrOl"
  731. placeholder="请输入劳务公司"
  732. >
  733. <el-option
  734. v-for="(dict, index) in fCompanyOptIons"
  735. :key="index.fId"
  736. :label="dict.fName"
  737. :value="dict.fId"
  738. ></el-option>
  739. </el-select>
  740. </el-form-item>
  741. </el-col>
  742. <el-col :span="8">
  743. <el-form-item label="车队" prop="fFleet"
  744. :rules="{
  745. required: isrequired === 1 ? true : false,
  746. message: '请选择',
  747. trigger: ['blur', 'change']
  748. }"
  749. >
  750. <el-select
  751. style="width: 80%"
  752. v-model="form.fFleet"
  753. filterable
  754. remote
  755. :remote-method="fleetRemoteMethod"
  756. :disabled="contrOl"
  757. placeholder="请输入车队">
  758. <el-option
  759. v-for="(dict, index) in fleetOptions"
  760. :key="index.fId"
  761. :label="dict.fName"
  762. :value="dict.fId"
  763. ></el-option>
  764. </el-select>
  765. </el-form-item>
  766. </el-col>
  767. <el-col :span="8">
  768. <el-form-item label="原贸易方式" prop="fTrademodeid">
  769. <el-select
  770. v-model="form.fTrademodeid"
  771. placeholder=""
  772. :disabled="browseStatus || formBrowseStatus"
  773. clearable
  774. style="width: 80%"
  775. >
  776. <el-option
  777. v-for="dict in fTrademodeidOptions"
  778. :key="dict.dictValue"
  779. :label="dict.dictLabel"
  780. :value="dict.dictValue"
  781. />
  782. </el-select>
  783. </el-form-item>
  784. </el-col>
  785. <el-col :span="8">
  786. <el-form-item label="新贸易方式" prop="fNewTrademodeid">
  787. <el-select
  788. v-model="form.fNewTrademodeid"
  789. placeholder="请选择新贸易方式"
  790. :disabled="browseStatus || formBrowseStatus"
  791. clearable
  792. style="width: 80%"
  793. >
  794. <el-option
  795. v-for="dict in fTrademodeidOptions"
  796. :key="dict.dictValue"
  797. :label="dict.dictLabel"
  798. :value="dict.dictValue"
  799. />
  800. </el-select>
  801. </el-form-item>
  802. </el-col>
  803. </el-row>
  804. <el-row>
  805. <el-col :span="15">
  806. <el-form-item label="备注" prop="remark">
  807. <el-input
  808. v-model="form.remark"
  809. :disabled="browseStatus"
  810. type="textarea"
  811. placeholder="请输入内容"
  812. />
  813. </el-form-item>
  814. </el-col>
  815. <el-col :span="8">
  816. <el-form-item>
  817. <el-button @click="detailsHidden ? (detailsHidden = false) : (detailsHidden = true)">{{ detailsHidden ? '隐藏' : '展开' }}</el-button>
  818. </el-form-item>
  819. </el-col>
  820. </el-row>
  821. <div v-if="detailsHidden">
  822. <el-row style="margin-top: 30px">
  823. <el-col :span="8">
  824. <el-form-item label="仓库联系人" prop="fContacts">
  825. <el-input
  826. v-model="form.fContacts"
  827. :disabled="browseStatus || formBrowseStatus"
  828. style="width: 80%"
  829. placeholder="仓库联系人"
  830. />
  831. </el-form-item>
  832. </el-col>
  833. <el-col :span="8">
  834. <el-form-item label="仓库电话" prop="fTel">
  835. <el-input
  836. v-model="form.fTel"
  837. :disabled="browseStatus || formBrowseStatus"
  838. style="width: 80%"
  839. placeholder="请输仓库入电话"
  840. />
  841. </el-form-item>
  842. </el-col>
  843. </el-row>
  844. <el-row>
  845. <el-col :span="8">
  846. <el-form-item label="品牌" prop="fMarks">
  847. <el-input
  848. v-model="form.fMarks"
  849. style="width: 80%"
  850. disabled
  851. placeholder="品牌"
  852. />
  853. </el-form-item>
  854. </el-col>
  855. <el-col :span="8">
  856. <el-form-item label="品名" prop="fProductName">
  857. <el-input
  858. v-model="form.fProductName"
  859. style="width: 80%"
  860. disabled
  861. placeholder="品名"
  862. />
  863. </el-form-item>
  864. </el-col>
  865. </el-row>
  866. <el-row>
  867. <el-col :span="8">
  868. <el-form-item label="制单人" prop="createBy">
  869. <el-input
  870. disabled
  871. v-model="form.createBy"
  872. style="width: 80%"
  873. placeholder="制单人"
  874. />
  875. </el-form-item>
  876. </el-col>
  877. <el-col :span="8">
  878. <el-form-item label="制单部门" prop="fDeptid">
  879. <el-select
  880. v-model="form.fDeptid"
  881. filterable
  882. disabled
  883. style="width: 80%"
  884. remote
  885. >
  886. <el-option
  887. v-for="dict in deptOptions"
  888. :key="dict.deptId"
  889. :label="dict.deptName"
  890. :value="dict.deptId"
  891. ></el-option>
  892. </el-select>
  893. </el-form-item>
  894. </el-col>
  895. <el-col :span="8">
  896. <el-form-item disabled label="制单日期" prop="fbilldate">
  897. <el-date-picker
  898. v-model="form.createTime"
  899. size="large"
  900. type="date"
  901. disabled
  902. value-format="timestamp"
  903. placeholder="制单日期"
  904. >
  905. </el-date-picker>
  906. </el-form-item>
  907. </el-col>
  908. </el-row>
  909. </div>
  910. </el-form>
  911. <el-collapse v-model="activeNames">
  912. <el-collapse-item name="1">
  913. <template slot="title">
  914. <i class="el-icon-s-home"></i>调拨明细
  915. </template>
  916. <div style="
  917. display: flex;
  918. justify-content: space-between;
  919. align-items: center;
  920. margin: 10px 0;
  921. ">
  922. <div>
  923. <el-button
  924. type="primary"
  925. :disabled="browseStatus"
  926. @click.prevent="addRelevant"
  927. >新行
  928. </el-button>
  929. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  930. </div>
  931. <div style="display: flex">
  932. <el-button type="info" :disabled="printinglist.length <= 0 || browseStatus" prop="打印" @click="printJobSheet">作业单</el-button>
  933. <el-button :disabled="printinglist.length <= 0 || browseStatus " @click="discharge">叫车进场</el-button>
  934. <el-button
  935. :disabled="dataListSelection.length <= 0 || browseStatus"
  936. @click.prevent="creditClick"
  937. >调拨确认
  938. </el-button>
  939. <el-button
  940. :disabled="dataWithdrawList.length <= 0 || browseStatus"
  941. @click.prevent="withdrawClick"
  942. >撤回调拨
  943. </el-button
  944. >
  945. <el-button size="small" type="success" :disabled="browseStatus" prop="打印"
  946. >打印吊牌
  947. </el-button>
  948. <el-button size="small" type="success" :disabled="browseStatus" prop="打印" @click="showEditDialog_ss"
  949. >收货单
  950. </el-button>
  951. <el-button size="small" type="warning" :disabled="browseStatus" prop="打印" @click="showEditDialog_s"
  952. >入库单
  953. </el-button>
  954. <el-button
  955. style="background-color: #008000; color: #fff"
  956. @click="submitForm"
  957. :disabled="browseStatus"
  958. >请核
  959. </el-button
  960. >
  961. </div>
  962. <!--点击展开-->
  963. </div>
  964. <el-table
  965. :data="dataList"
  966. ref="tableList"
  967. tooltip-effect="dark"
  968. border
  969. stripe
  970. :summary-method="getSummaries"
  971. @selection-change="selectinventory"
  972. show-summary
  973. >
  974. <el-table-column type="selection" width="55" fixed align="center" />
  975. <el-table-column label="序号" type="index" fixed width="80"/>
  976. <el-table-column
  977. prop="fBillstatus"
  978. header-align="center"
  979. width="150px"
  980. fixed
  981. align="center"
  982. label="状态"
  983. >
  984. <template slot-scope="scope">
  985. <span v-if="scope.row.fBillstatus === 10">计划</span>
  986. <span v-if="scope.row.fBillstatus === 20">待入库</span>
  987. <span v-if="scope.row.fBillstatus === 30">入库中</span>
  988. <span v-if="scope.row.fBillstatus === 40">已入库</span>
  989. </template>
  990. </el-table-column>
  991. <el-table-column
  992. prop="fBsdate"
  993. header-align="center"
  994. align="center"
  995. width="150px"
  996. fixed
  997. label="入库日期"
  998. >
  999. <template slot-scope="scope">
  1000. <el-date-picker
  1001. v-model="scope.row.fBsdate"
  1002. style="width: 138px"
  1003. :disabled="
  1004. browseStatus ||
  1005. scope.row.fBillstatus === 20 ||
  1006. scope.row.fBillstatus === 30 ||
  1007. scope.row.fBillstatus === 40
  1008. "
  1009. type="date"
  1010. value-format="timestamp"
  1011. placeholder="入库日期"
  1012. >
  1013. </el-date-picker>
  1014. </template>
  1015. </el-table-column>
  1016. <el-table-column
  1017. prop="fMblno"
  1018. header-align="center"
  1019. align="center"
  1020. width="140px"
  1021. label="提单号"
  1022. >
  1023. </el-table-column>
  1024. <el-table-column
  1025. prop="fGoodsids"
  1026. header-align="center"
  1027. align="center"
  1028. width="140px"
  1029. label="*品名"
  1030. >
  1031. </el-table-column>
  1032. <el-table-column
  1033. prop="fBusinessType"
  1034. header-align="center"
  1035. width="140px"
  1036. align="center"
  1037. label="*货物属性"
  1038. >
  1039. <template slot-scope="scope">
  1040. <el-select v-model="scope.row.fBusinessType"
  1041. filterable
  1042. disabled
  1043. placeholder="请选择商品属性"
  1044. >
  1045. <el-option
  1046. v-for="(dict, index) in fStorageTypeOptions"
  1047. :key="index.dictValue"
  1048. :label="dict.dictLabel"
  1049. :value="dict.dictValue"
  1050. />
  1051. </el-select>
  1052. </template>
  1053. </el-table-column>
  1054. <el-table-column
  1055. prop="fMarks"
  1056. header-align="center"
  1057. align="center"
  1058. width="140px"
  1059. label="*属性详情"
  1060. >
  1061. </el-table-column>
  1062. <el-table-column
  1063. prop="fMblno"
  1064. header-align="center"
  1065. align="center"
  1066. width="140px"
  1067. label="提单号"
  1068. >
  1069. </el-table-column>
  1070. <el-table-column
  1071. prop="fOrgwarehouseInformation"
  1072. header-align="center"
  1073. align="center"
  1074. label="库位"
  1075. >
  1076. </el-table-column>
  1077. <el-table-column
  1078. prop="fTransferWarehouselocid"
  1079. header-align="center"
  1080. width="240px"
  1081. align="center"
  1082. label="*调入库位"
  1083. >
  1084. <template slot-scope="scope">
  1085. <el-input
  1086. placeholder="请选择"
  1087. :disabled="!form.fWarehouseid || browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
  1088. v-model="scope.row.fWarehouseInformation"
  1089. @focus="getTreeselect(scope)"
  1090. >
  1091. </el-input>
  1092. </template>
  1093. </el-table-column>
  1094. <el-table-column
  1095. prop="fPlanqty"
  1096. header-align="center"
  1097. align="center"
  1098. width="180px"
  1099. label="*结余库存"
  1100. >
  1101. </el-table-column>
  1102. <el-table-column
  1103. prop="fPlangrossweight"
  1104. header-align="center"
  1105. align="center"
  1106. width="180px"
  1107. label="*结余毛重(kg)"
  1108. >
  1109. </el-table-column>
  1110. <el-table-column
  1111. prop="fPlannetweight"
  1112. header-align="center"
  1113. align="center"
  1114. width="180px"
  1115. label="*结余净重(kg)"
  1116. >
  1117. </el-table-column>
  1118. <el-table-column
  1119. prop="fQty"
  1120. header-align="center"
  1121. width="180px"
  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).*$/, "")'
  1128. @change="qtyChange(scope.row)"
  1129. v-model="scope.row.fQty"
  1130. :disabled="browseStatus || scope.row.fBillstatus === 40"
  1131. placeholder="调拨件数"
  1132. show-word-limit
  1133. />
  1134. </template>
  1135. </el-table-column>
  1136. <el-table-column
  1137. prop="fGrossweight"
  1138. header-align="center"
  1139. width="180px"
  1140. align="center"
  1141. label="*调拨毛重(kg)"
  1142. >
  1143. <template slot-scope="scope">
  1144. <el-input
  1145. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1146. :disabled="browseStatus || scope.row.fBillstatus === 40"
  1147. v-model="scope.row.fGrossweight"
  1148. @change="changeStock(scope.row)"
  1149. placeholder="调拨毛重"
  1150. show-word-limit
  1151. />
  1152. </template>
  1153. </el-table-column>
  1154. <el-table-column
  1155. prop="fNetweight"
  1156. header-align="center"
  1157. width="180px"
  1158. align="center"
  1159. label="*调拨净重(kg)"
  1160. >
  1161. <template slot-scope="scope">
  1162. <el-input
  1163. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1164. :disabled="browseStatus || scope.row.fBillstatus > 20"
  1165. v-model="scope.row.fNetweight"
  1166. @change="changeStock(scope.row)"
  1167. placeholder="调拨净重"
  1168. show-word-limit
  1169. />
  1170. </template>
  1171. </el-table-column>
  1172. <el-table-column
  1173. prop="fPackagespecs"
  1174. header-align="center"
  1175. width="180px"
  1176. align="center"
  1177. label="*包装规格"
  1178. >
  1179. <template slot-scope="scope">
  1180. <el-input
  1181. v-model="scope.row.fPackagespecs"
  1182. :disabled=" browseStatus ||
  1183. scope.row.fBillstatus === 20 ||
  1184. scope.row.fBillstatus === 30 ||
  1185. scope.row.fBillstatus === 40"
  1186. placeholder="包装规格"
  1187. show-word-limit
  1188. />
  1189. </template>
  1190. </el-table-column>
  1191. <el-table-column
  1192. prop="fTruckno"
  1193. header-align="center"
  1194. width="130px"
  1195. align="center"
  1196. label="*车号"
  1197. >
  1198. <template slot-scope="scope">
  1199. <el-input
  1200. v-model="scope.row.fTruckno"
  1201. placeholder="*车号"
  1202. :disabled="
  1203. browseStatus ||
  1204. scope.row.fBillstatus === 20 ||
  1205. scope.row.fBillstatus === 30 ||
  1206. scope.row.fBillstatus === 40
  1207. "
  1208. show-word-limit
  1209. />
  1210. </template>
  1211. </el-table-column>
  1212. <el-table-column
  1213. prop="fDriverName"
  1214. header-align="center"
  1215. width="130px"
  1216. align="center"
  1217. label="*司机名"
  1218. >
  1219. <template slot-scope="scope">
  1220. <el-input
  1221. v-model="scope.row.fDriverName"
  1222. placeholder="司机名"
  1223. :disabled="
  1224. browseStatus ||
  1225. scope.row.fBillstatus === 20 ||
  1226. scope.row.fBillstatus === 30 ||
  1227. scope.row.fBillstatus === 40
  1228. "
  1229. show-word-limit
  1230. />
  1231. </template>
  1232. </el-table-column>
  1233. <el-table-column
  1234. prop="fDriverTel"
  1235. header-align="center"
  1236. width="200px"
  1237. align="center"
  1238. label="*司机电话"
  1239. >
  1240. <template slot-scope="scope">
  1241. <el-input
  1242. v-model="scope.row.fDriverTel"
  1243. placeholder="司机电话"
  1244. :disabled="
  1245. browseStatus ||
  1246. scope.row.fBillstatus === 20 ||
  1247. scope.row.fBillstatus === 30 ||
  1248. scope.row.fBillstatus === 40
  1249. "
  1250. show-word-limit
  1251. />
  1252. </template>
  1253. </el-table-column>
  1254. <el-table-column
  1255. prop="fDriverIdCar"
  1256. header-align="center"
  1257. width="200px"
  1258. align="center"
  1259. label="*司机身份证"
  1260. >
  1261. <template slot-scope="scope">
  1262. <el-input
  1263. v-model="scope.row.fDriverIdCar"
  1264. placeholder="司机身份证"
  1265. :disabled="
  1266. browseStatus ||
  1267. scope.row.fBillstatus === 20 ||
  1268. scope.row.fBillstatus === 30 ||
  1269. scope.row.fBillstatus === 40
  1270. "
  1271. show-word-limit
  1272. />
  1273. </template>
  1274. </el-table-column>
  1275. <el-table-column
  1276. prop="fCntrtype"
  1277. header-align="center"
  1278. align="center"
  1279. width="140px"
  1280. label="箱型"
  1281. >
  1282. <template slot-scope="scope">
  1283. <el-input
  1284. v-model="scope.row.fCntrtype"
  1285. :disabled=" browseStatus ||
  1286. scope.row.fBillstatus === 20 ||
  1287. scope.row.fBillstatus === 30 ||
  1288. scope.row.fBillstatus === 40"
  1289. placeholder="箱型"
  1290. show-word-limit
  1291. />
  1292. </template>
  1293. </el-table-column>
  1294. <el-table-column
  1295. prop="fCntqty"
  1296. header-align="center"
  1297. align="center"
  1298. width="140px"
  1299. label="箱量"
  1300. >
  1301. <template slot-scope="scope">
  1302. <el-input
  1303. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1304. v-model="scope.row.fCntqty"
  1305. placeholder="箱量"
  1306. :disabled=" browseStatus ||
  1307. scope.row.fBillstatus === 20 ||
  1308. scope.row.fBillstatus === 30 ||
  1309. scope.row.fBillstatus === 40"
  1310. show-word-limit
  1311. />
  1312. </template>
  1313. </el-table-column>
  1314. <el-table-column
  1315. prop="fCntrno"
  1316. header-align="center"
  1317. width="150px"
  1318. align="center"
  1319. label="箱号"
  1320. >
  1321. <template slot-scope="scope">
  1322. <el-input
  1323. v-model="scope.row.fCntrno"
  1324. placeholder="箱号"
  1325. :disabled=" browseStatus ||
  1326. scope.row.fBillstatus === 20 ||
  1327. scope.row.fBillstatus === 30 ||
  1328. scope.row.fBillstatus === 40"
  1329. show-word-limit
  1330. />
  1331. </template>
  1332. </el-table-column>
  1333. <el-table-column
  1334. prop="fGoodsval"
  1335. header-align="center"
  1336. width="150px"
  1337. align="center"
  1338. label="货值"
  1339. >
  1340. <template slot-scope="scope">
  1341. <el-input
  1342. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1343. v-model="scope.row.fGoodsval"
  1344. placeholder="货值"
  1345. :disabled=" browseStatus ||
  1346. scope.row.fBillstatus === 20 ||
  1347. scope.row.fBillstatus === 30 ||
  1348. scope.row.fBillstatus === 40"
  1349. show-word-limit
  1350. />
  1351. </template>
  1352. </el-table-column>
  1353. <el-table-column
  1354. prop="fSerialNumber"
  1355. header-align="center"
  1356. width="160px"
  1357. align="center"
  1358. label="流水号"
  1359. >
  1360. </el-table-column>
  1361. <el-table-column
  1362. prop="remark"
  1363. header-align="center"
  1364. width="150px"
  1365. align="center"
  1366. label="备注"
  1367. >
  1368. <template slot-scope="scope">
  1369. <el-input
  1370. v-model="scope.row.remark"
  1371. placeholder="备注"
  1372. :disabled="browseStatus"
  1373. show-word-limit
  1374. />
  1375. </template>
  1376. </el-table-column>
  1377. <el-table-column
  1378. header-align="center"
  1379. align="center"
  1380. label="操作"
  1381. width="130PX"
  1382. >
  1383. <template slot-scope="scope">
  1384. <el-button
  1385. @click.native.prevent="deleteRow(scope.$index, dataList)"
  1386. size="small"
  1387. :disabled="browseStatus || scope.row.fBillstatus === 20
  1388. || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
  1389. >移除
  1390. </el-button>
  1391. </template>
  1392. </el-table-column>
  1393. </el-table>
  1394. </el-collapse-item>
  1395. <el-collapse-item>
  1396. <template slot="title">
  1397. <i class="el-icon-s-order"></i>附件明细
  1398. </template>
  1399. <div class="dialogTableTitle flex a-center jlr"
  1400. style="display: flex;justify-content: space-between;align-items: center;margin: 10px 0;">
  1401. <div>
  1402. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  1403. >新行
  1404. </el-button>
  1405. </div>
  1406. </div>
  1407. <el-table
  1408. :data="relevantAttachments"
  1409. ref="table"
  1410. tooltip-effect="dark"
  1411. border
  1412. stripe
  1413. style="width: 100%"
  1414. height="150"
  1415. >
  1416. <el-table-column label="序号" type="index" width="80">
  1417. </el-table-column>
  1418. <el-table-column
  1419. prop="fName"
  1420. header-align="center"
  1421. align="center"
  1422. width="250px"
  1423. label="附件名称"
  1424. >
  1425. <template slot-scope="scope">
  1426. <el-input
  1427. v-model="scope.row.fName"
  1428. :disabled="browseStatus"
  1429. placeholder="附件名称"
  1430. show-word-limit
  1431. />
  1432. </template>
  1433. </el-table-column>
  1434. <el-table-column
  1435. prop="createBy"
  1436. header-align="center"
  1437. align="center"
  1438. width="250px"
  1439. label="上传人"
  1440. >
  1441. <template slot-scope="scope">
  1442. <el-input
  1443. v-model="scope.row.createBy"
  1444. disabled
  1445. placeholder="上传人"
  1446. show-word-limit
  1447. />
  1448. </template>
  1449. </el-table-column>
  1450. <el-table-column
  1451. prop="createTime"
  1452. header-align="center"
  1453. align="center"
  1454. width="200px"
  1455. label="上传时间"
  1456. >
  1457. <template slot-scope="scope">
  1458. <el-date-picker
  1459. v-model="scope.row.createTime"
  1460. type="date"
  1461. disabled
  1462. placeholder="上传时间"
  1463. format="yyyy-MM-dd HH:mm"
  1464. value-format="timestamp"
  1465. ></el-date-picker>
  1466. </template>
  1467. </el-table-column>
  1468. <el-table-column
  1469. prop="fUrl"
  1470. header-align="center"
  1471. align="center"
  1472. width="300px"
  1473. label="上传附件"
  1474. >
  1475. <template slot-scope="scope" >
  1476. <el-upload
  1477. class="upload-demo"
  1478. :action="uploadImgUrl"
  1479. :on-success="(res,file)=>{handleSucces(scope,res,file)}"
  1480. :headers="headers"
  1481. style="width:25%;float: left"
  1482. :disabled="browseStatus"
  1483. :show-file-list="false"
  1484. :limit="1"
  1485. >
  1486. <el-button size="small" type="primary" :disabled="browseStatus">点击上传</el-button>
  1487. </el-upload>
  1488. <el-button size="small" type="primary" @click="checkFile(scope)">查看</el-button>
  1489. <el-button size="small" type="primary" :disabled="browseStatus" @click="deleteFile(scope)">删除</el-button>
  1490. </template>
  1491. </el-table-column>
  1492. <el-table-column header-align="center" align="center" label="操作">
  1493. <template slot-scope="scope">
  1494. <el-button
  1495. @click.native.prevent="deleteRow(scope.$index, relevantAttachments)"
  1496. :disabled="browseStatus"
  1497. size="small"
  1498. >移除
  1499. </el-button>
  1500. </template>
  1501. </el-table-column>
  1502. </el-table>
  1503. </el-collapse-item>
  1504. <el-collapse-item>
  1505. <template slot="title">
  1506. <i class="el-icon-circle-plus"></i>收款信息
  1507. </template>
  1508. <div class="dialogTableTitle flex a-center jlr"
  1509. style="display: flex;justify-content: space-between;align-items: center;margin: 10px 0;">
  1510. <div>
  1511. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  1512. >新行
  1513. </el-button>
  1514. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1515. <el-button type="danger"
  1516. :disabled="browseStatus"
  1517. @click.prevent="addAgreement('Dr',3)"
  1518. >作业费协议</el-button
  1519. >
  1520. </div>
  1521. </div>
  1522. <el-table
  1523. :data="warehouseDrList"
  1524. ref="tableDr"
  1525. tooltip-effect="dark"
  1526. border
  1527. stripe
  1528. show-summary
  1529. @selection-change="collectionoptions"
  1530. :summary-method="warehouseDrSummaries"
  1531. >
  1532. <el-table-column type="selection" width="55" align="center" />
  1533. <el-table-column label="序号" type="index" width="80">
  1534. </el-table-column>
  1535. <el-table-column
  1536. prop="fCorpid"
  1537. header-align="center"
  1538. align="center"
  1539. width="180px"
  1540. label="客户名称"
  1541. >
  1542. <template slot-scope="scope">
  1543. <el-select
  1544. v-model="scope.row.fCorpid"
  1545. filterable
  1546. remote
  1547. :disabled="browseStatus"
  1548. :remote-method="corpsRemoteMethod"
  1549. placeholder="客户名称"
  1550. >
  1551. <el-option
  1552. v-for="(dict, index) in KHblnoOptions"
  1553. :key="index.fId"
  1554. :label="dict.fName"
  1555. :value="dict.fId"
  1556. ></el-option>
  1557. </el-select>
  1558. </template>
  1559. </el-table-column>
  1560. <el-table-column
  1561. prop="fFeeid"
  1562. header-align="center"
  1563. align="center"
  1564. width="180px"
  1565. label="费用名称"
  1566. >
  1567. <template slot-scope="scope">
  1568. <el-select
  1569. v-model="scope.row.fFeeid"
  1570. filterable
  1571. remote
  1572. :disabled="browseStatus"
  1573. :remote-method="fWRemoteMethod"
  1574. @change="changeFeeId(scope.row)"
  1575. placeholder="费用名称"
  1576. >
  1577. <el-option
  1578. v-for="(dict, index) in fDNameOptions"
  1579. :key="index.fId"
  1580. :label="dict.fName"
  1581. :value="dict.fId"
  1582. ></el-option>
  1583. </el-select>
  1584. </template>
  1585. </el-table-column>
  1586. <el-table-column
  1587. prop="fBusinessType"
  1588. header-align="center"
  1589. align="center"
  1590. width="180px"
  1591. label="作业类型"
  1592. >
  1593. <template slot-scope="scope">
  1594. <el-select
  1595. style="width: 80%"
  1596. v-model="scope.row.fBusinessType"
  1597. filterable
  1598. disabled
  1599. >
  1600. <el-option
  1601. v-for="(dict,index) in businessTypeOption"
  1602. :key="dict.dictValue"
  1603. :label="dict.dictLabel"
  1604. :value="dict.dictValue"
  1605. ></el-option>
  1606. </el-select>
  1607. </template>
  1608. </el-table-column>
  1609. <el-table-column
  1610. prop="fFeeunitid"
  1611. header-align="center"
  1612. align="center"
  1613. width="180px"
  1614. label="计价单位"
  1615. >
  1616. <template slot-scope="scope">
  1617. <el-select
  1618. v-model="scope.row.fFeeunitid"
  1619. placeholder="请选择计费单位"
  1620. @change="changeFeeUnit(scope.row)"
  1621. :disabled="browseStatus"
  1622. clearable
  1623. >
  1624. <el-option
  1625. v-for="(dict, index) in jFeetunitOptions"
  1626. :key="index.dictValue"
  1627. :label="dict.dictLabel"
  1628. :value="dict.dictValue"
  1629. />
  1630. </el-select>
  1631. </template>
  1632. </el-table-column>
  1633. <el-table-column
  1634. prop="fQty"
  1635. header-align="center"
  1636. align="center"
  1637. width="150px"
  1638. label="数量"
  1639. >
  1640. <template slot-scope="scope">
  1641. <el-input
  1642. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1643. v-model="scope.row.fQty"
  1644. placeholder="数量"
  1645. :disabled="browseStatus"
  1646. @change="changeContractAmt(scope.row)"
  1647. show-word-limit
  1648. />
  1649. </template>
  1650. </el-table-column>
  1651. <el-table-column
  1652. prop="funitprice"
  1653. header-align="center"
  1654. align="center"
  1655. width="150px"
  1656. label="单价"
  1657. >
  1658. <template slot-scope="scope">
  1659. <el-input
  1660. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1661. v-model="scope.row.fUnitprice"
  1662. placeholder="单价"
  1663. :disabled="browseStatus || scope.row.fSrcTypeId !== 0"
  1664. @change="changeContractAmt(scope.row)"
  1665. show-word-limit
  1666. />
  1667. </template>
  1668. </el-table-column>
  1669. <el-table-column
  1670. prop="fAmount"
  1671. header-align="center"
  1672. align="center"
  1673. width="150px"
  1674. label="金额"
  1675. >
  1676. <template slot-scope="scope">
  1677. <el-input
  1678. disabled
  1679. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1680. v-model="scope.row.fAmount"
  1681. placeholder="金额"
  1682. show-word-limit
  1683. />
  1684. </template>
  1685. </el-table-column>
  1686. <el-table-column
  1687. prop="fStltypeid"
  1688. header-align="center"
  1689. align="center"
  1690. width="130px"
  1691. label="结算方式"
  1692. >
  1693. <template slot-scope="scope">
  1694. <el-select
  1695. v-model="scope.row.fStltypeid"
  1696. placeholder="请选择结算表票结、月结"
  1697. :disabled="browseStatus"
  1698. >
  1699. <el-option
  1700. v-for="dict in fStltypeOptions"
  1701. :key="dict.dictValue"
  1702. :label="dict.dictLabel"
  1703. :value="parseInt(dict.dictValue)"
  1704. ></el-option>
  1705. </el-select>
  1706. </template>
  1707. </el-table-column>
  1708. <el-table-column
  1709. prop="fCurrency"
  1710. header-align="center"
  1711. align="center"
  1712. width="150px"
  1713. label="币别"
  1714. >
  1715. <template slot-scope="scope">
  1716. <el-input
  1717. v-model="scope.row.fCurrency"
  1718. :disabled="browseStatus"
  1719. placeholder="币别"
  1720. show-word-limit
  1721. />
  1722. </template>
  1723. </el-table-column>
  1724. <el-table-column
  1725. prop="fExrate"
  1726. header-align="center"
  1727. align="center"
  1728. width="150px"
  1729. label="汇率"
  1730. >
  1731. <template slot-scope="scope">
  1732. <el-input
  1733. v-model="scope.row.fExrate"
  1734. :disabled="browseStatus"
  1735. placeholder="汇率"
  1736. show-word-limit
  1737. />
  1738. </template>
  1739. </el-table-column>
  1740. <el-table-column
  1741. prop="fTaxrate"
  1742. header-align="center"
  1743. align="center"
  1744. width="150px"
  1745. label="税率"
  1746. >
  1747. <template slot-scope="scope">
  1748. <el-input
  1749. v-model="scope.row.fTaxrate"
  1750. :disabled="browseStatus"
  1751. placeholder="税率"
  1752. show-word-limit
  1753. />
  1754. </template>
  1755. </el-table-column>
  1756. <el-table-column
  1757. prop="fMblno"
  1758. header-align="center"
  1759. align="center"
  1760. width="130px"
  1761. label="提单号"
  1762. >
  1763. <template slot-scope="scope">
  1764. <el-input
  1765. v-model="scope.row.fMblno"
  1766. :disabled="browseStatus"
  1767. placeholder="提单号"
  1768. show-word-limit
  1769. />
  1770. </template>
  1771. </el-table-column>
  1772. <el-table-column
  1773. prop="fProductName"
  1774. header-align="center"
  1775. align="center"
  1776. width="140px"
  1777. label="品名"
  1778. >
  1779. <template slot-scope="scope">
  1780. <el-input
  1781. v-model="scope.row.fProductName"
  1782. :disabled="browseStatus"
  1783. placeholder="品名"
  1784. show-word-limit
  1785. />
  1786. </template>
  1787. </el-table-column>
  1788. <el-table-column
  1789. prop="fMarks"
  1790. header-align="center"
  1791. align="center"
  1792. width="130px"
  1793. label="品牌"
  1794. >
  1795. <template slot-scope="scope">
  1796. <el-input
  1797. v-model="scope.row.fMarks"
  1798. :disabled="browseStatus"
  1799. placeholder="品牌"
  1800. show-word-limit
  1801. />
  1802. </template>
  1803. </el-table-column>
  1804. <el-table-column
  1805. prop="fSrcTypeId"
  1806. header-align="center"
  1807. align="center"
  1808. width="130px"
  1809. label="来源"
  1810. >
  1811. <template slot-scope="scope">
  1812. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  1813. <span v-if="scope.row.fSrcTypeId !== 0">协议</span>
  1814. </template>
  1815. </el-table-column>
  1816. <el-table-column
  1817. prop="remarks"
  1818. header-align="center"
  1819. align="center"
  1820. width="150px"
  1821. label="备注"
  1822. >
  1823. <template slot-scope="scope">
  1824. <el-input
  1825. v-model="scope.row.remarks"
  1826. :disabled="browseStatus"
  1827. placeholder="备注"
  1828. show-word-limit
  1829. />
  1830. </template>
  1831. </el-table-column>
  1832. <el-table-column
  1833. header-align="center"
  1834. align="center"
  1835. label="操作"
  1836. width="200px"
  1837. >
  1838. <template slot-scope="scope">
  1839. <el-button
  1840. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1841. size="small"
  1842. :disabled="browseStatus"
  1843. >移除</el-button
  1844. >
  1845. </template>
  1846. </el-table-column>
  1847. </el-table>
  1848. </el-collapse-item>
  1849. <el-collapse-item>
  1850. <template slot="title">
  1851. <i class="el-icon-remove"></i>付款信息
  1852. </template>
  1853. <div class="dialogTableTitle flex a-center jlr"
  1854. style="display: flex;justify-content: space-between;align-items: center;margin: 10px 0;">
  1855. <div>
  1856. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1857. >新行
  1858. </el-button>
  1859. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1860. <el-button type="danger"
  1861. :disabled="browseStatus"
  1862. @click.prevent="addAgreement('Cr',1)"
  1863. >作业费协议</el-button>
  1864. </div>
  1865. </div>
  1866. <el-table
  1867. :data="warehouseCrList"
  1868. ref="table"
  1869. tooltip-effect="dark"
  1870. border
  1871. stripe
  1872. show-summary
  1873. @selection-change="collectionoptions"
  1874. :summary-method="warehouseDrSummaries"
  1875. >
  1876. <el-table-column type="selection" width="55" align="center" />
  1877. <el-table-column label="序号" type="index" width="80">
  1878. </el-table-column>
  1879. <el-table-column
  1880. prop="fCorpid"
  1881. header-align="center"
  1882. align="center"
  1883. width="180px"
  1884. label="客户名称"
  1885. >
  1886. <template slot-scope="scope">
  1887. <el-select
  1888. v-model="scope.row.fCorpid"
  1889. filterable
  1890. remote
  1891. :disabled="browseStatus"
  1892. :remote-method="corpsRemoteMethod"
  1893. placeholder="客户名称"
  1894. >
  1895. <el-option
  1896. v-for="(dict, index) in KHblnoOptions"
  1897. :key="index.fId"
  1898. :label="dict.fName"
  1899. :value="dict.fId"
  1900. ></el-option>
  1901. </el-select>
  1902. </template>
  1903. </el-table-column>
  1904. <el-table-column
  1905. prop="fFeeid"
  1906. header-align="center"
  1907. align="center"
  1908. width="180px"
  1909. label="费用名称"
  1910. >
  1911. <template slot-scope="scope">
  1912. <el-select
  1913. v-model="scope.row.fFeeid"
  1914. filterable
  1915. remote
  1916. :disabled="browseStatus"
  1917. :remote-method="fWRemoteMethod"
  1918. @change="changeFeeId(scope.row)"
  1919. placeholder="费用名称"
  1920. >
  1921. <el-option
  1922. v-for="(dict, index) in fCNameOptions"
  1923. :key="index.fId"
  1924. :label="dict.fName"
  1925. :value="dict.fId"
  1926. ></el-option>
  1927. </el-select>
  1928. </template>
  1929. </el-table-column>
  1930. <el-table-column
  1931. prop="fBusinessType"
  1932. header-align="center"
  1933. align="center"
  1934. width="180px"
  1935. label="作业类型"
  1936. >
  1937. <template slot-scope="scope">
  1938. <el-select
  1939. style="width: 80%"
  1940. v-model="scope.row.fBusinessType"
  1941. filterable
  1942. disabled
  1943. >
  1944. <el-option
  1945. v-for="(dict,index) in businessTypeOption"
  1946. :key="dict.dictValue"
  1947. :label="dict.dictLabel"
  1948. :value="dict.dictValue"
  1949. ></el-option>
  1950. </el-select>
  1951. </template>
  1952. </el-table-column>
  1953. <el-table-column
  1954. prop="fFeeunitid"
  1955. header-align="center"
  1956. align="center"
  1957. width="180px"
  1958. label="计价单位"
  1959. >
  1960. <template slot-scope="scope">
  1961. <el-select
  1962. v-model="scope.row.fFeeunitid"
  1963. placeholder="请选择计费单位"
  1964. @change="changeFeeUnit(scope.row)"
  1965. :disabled="browseStatus"
  1966. clearable
  1967. >
  1968. <el-option
  1969. v-for="(dict, index) in jFeetunitOptions"
  1970. :key="index.dictValue"
  1971. :label="dict.dictLabel"
  1972. :value="dict.dictValue"
  1973. ></el-option>
  1974. </el-select>
  1975. </template>
  1976. </el-table-column>
  1977. <el-table-column
  1978. prop="fQty"
  1979. header-align="center"
  1980. align="center"
  1981. width="150px"
  1982. label="数量"
  1983. >
  1984. <template slot-scope="scope">
  1985. <el-input
  1986. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1987. v-model="scope.row.fQty"
  1988. @change="changeContractAmt(scope.row)"
  1989. :disabled="browseStatus"
  1990. placeholder="数量"
  1991. show-word-limit
  1992. />
  1993. </template>
  1994. </el-table-column>
  1995. <el-table-column
  1996. prop="funitprice"
  1997. header-align="center"
  1998. align="center"
  1999. width="150px"
  2000. label="单价"
  2001. >
  2002. <template slot-scope="scope">
  2003. <el-input
  2004. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  2005. v-model="scope.row.fUnitprice"
  2006. @change="changeContractAmt(scope.row)"
  2007. :disabled="browseStatus || scope.row.fSrcTypeId !== 0"
  2008. placeholder="单价"
  2009. show-word-limit
  2010. />
  2011. </template>
  2012. </el-table-column>
  2013. <el-table-column
  2014. prop="fAmount"
  2015. header-align="center"
  2016. align="center"
  2017. width="150px"
  2018. label="金额"
  2019. >
  2020. <template slot-scope="scope">
  2021. <el-input
  2022. disabled
  2023. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  2024. v-model="scope.row.fAmount"
  2025. placeholder="金额"
  2026. show-word-limit
  2027. />
  2028. </template>
  2029. </el-table-column>
  2030. <el-table-column
  2031. prop="fStltypeid"
  2032. header-align="center"
  2033. align="center"
  2034. width="130px"
  2035. label="结算方式"
  2036. >
  2037. <template slot-scope="scope">
  2038. <el-select
  2039. v-model="scope.row.fStltypeid"
  2040. placeholder="请选择结算表票结、月结"
  2041. :disabled="browseStatus"
  2042. >
  2043. <el-option
  2044. v-for="dict in fStltypeOptions"
  2045. :key="dict.dictValue"
  2046. :label="dict.dictLabel"
  2047. :value="parseInt(dict.dictValue)"
  2048. ></el-option>
  2049. </el-select>
  2050. </template>
  2051. </el-table-column>
  2052. <el-table-column
  2053. prop="fCurrency"
  2054. header-align="center"
  2055. align="center"
  2056. width="150px"
  2057. label="币别"
  2058. >
  2059. <template slot-scope="scope">
  2060. <el-input
  2061. v-model="scope.row.fCurrency"
  2062. :disabled="browseStatus"
  2063. placeholder="币别"
  2064. show-word-limit
  2065. />
  2066. </template>
  2067. </el-table-column>
  2068. <el-table-column
  2069. prop="fExrate"
  2070. header-align="center"
  2071. align="center"
  2072. width="150px"
  2073. label="汇率"
  2074. >
  2075. <template slot-scope="scope">
  2076. <el-input
  2077. v-model="scope.row.fExrate"
  2078. :disabled="browseStatus"
  2079. placeholder="汇率"
  2080. show-word-limit
  2081. />
  2082. </template>
  2083. </el-table-column>
  2084. <el-table-column
  2085. prop="fTaxrate"
  2086. header-align="center"
  2087. align="center"
  2088. width="150px"
  2089. label="税率"
  2090. >
  2091. <template slot-scope="scope">
  2092. <el-input
  2093. v-model="scope.row.fTaxrate"
  2094. :disabled="browseStatus"
  2095. placeholder="税率"
  2096. show-word-limit
  2097. />
  2098. </template>
  2099. </el-table-column>
  2100. <el-table-column
  2101. prop="fMblno"
  2102. header-align="center"
  2103. align="center"
  2104. width="130px"
  2105. label="提单号"
  2106. >
  2107. <template slot-scope="scope">
  2108. <el-input
  2109. v-model="scope.row.fMblno"
  2110. :disabled="browseStatus"
  2111. placeholder="提单号"
  2112. show-word-limit
  2113. />
  2114. </template>
  2115. </el-table-column>
  2116. <el-table-column
  2117. prop="fProductName"
  2118. header-align="center"
  2119. align="center"
  2120. width="140px"
  2121. label="品名"
  2122. >
  2123. <template slot-scope="scope">
  2124. <el-input
  2125. v-model="scope.row.fProductName"
  2126. :disabled="browseStatus"
  2127. placeholder="品名"
  2128. show-word-limit
  2129. />
  2130. </template>
  2131. </el-table-column>
  2132. <el-table-column
  2133. prop="fMarks"
  2134. header-align="center"
  2135. align="center"
  2136. width="130px"
  2137. label="品牌"
  2138. >
  2139. <template slot-scope="scope">
  2140. <el-input
  2141. v-model="scope.row.fMarks"
  2142. :disabled="browseStatus"
  2143. placeholder="品牌"
  2144. show-word-limit
  2145. />
  2146. </template>
  2147. </el-table-column>
  2148. <el-table-column
  2149. prop="fSrcTypeId"
  2150. header-align="center"
  2151. align="center"
  2152. width="130px"
  2153. label="来源"
  2154. >
  2155. <template slot-scope="scope">
  2156. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  2157. <span v-if="scope.row.fSrcTypeId !== 0">协议</span>
  2158. </template>
  2159. </el-table-column>
  2160. <el-table-column
  2161. prop="remarks"
  2162. header-align="center"
  2163. align="center"
  2164. width="150px"
  2165. label="备注"
  2166. >
  2167. <template slot-scope="scope">
  2168. <el-input
  2169. v-model="scope.row.remarks"
  2170. :disabled="browseStatus"
  2171. placeholder="备注"
  2172. show-word-limit
  2173. />
  2174. </template>
  2175. </el-table-column>
  2176. <el-table-column
  2177. header-align="center"
  2178. align="center"
  2179. width="200px"
  2180. label="操作"
  2181. >
  2182. <template slot-scope="scope">
  2183. <el-button
  2184. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  2185. size="small"
  2186. :disabled="browseStatus"
  2187. >移除</el-button
  2188. >
  2189. </template>
  2190. </el-table-column>
  2191. </el-table>
  2192. </el-collapse-item>
  2193. </el-collapse>
  2194. <div slot="footer" class="dialog-footer">
  2195. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  2196. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
  2197. <el-button type="primary" :disabled="approvalStatus" v-if="form.fBillstatus > 3" @click="addOrUpdateHandle()">查看审批流</el-button>
  2198. <el-button v-if="approve === true" @click="goApproval">审批</el-button>
  2199. <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @click="backApproval">撤销审批</el-button>
  2200. <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
  2201. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  2202. <el-button
  2203. style="background-color: #008000; color: #fff"
  2204. @click="submitForm"
  2205. :disabled="browseStatus"
  2206. >请核</el-button
  2207. >
  2208. <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
  2209. <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
  2210. </div>
  2211. <!-- 选择库存总账数据 -->
  2212. <el-dialog
  2213. title="库存总账"
  2214. :modal="false"
  2215. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2216. :visible.sync="whgenlegVisible"
  2217. width="70%"
  2218. >
  2219. <el-table
  2220. :data="whgenlegList"
  2221. ref="table"
  2222. tooltip-effect="dark"
  2223. width="100%"
  2224. border
  2225. stripe
  2226. @selection-change="whgenlegSelectionChange"
  2227. >
  2228. <el-table-column type="selection" width="55"> </el-table-column>
  2229. <el-table-column
  2230. prop="fMblno"
  2231. header-align="center"
  2232. align="center"
  2233. label="提单号"
  2234. >
  2235. </el-table-column>
  2236. <el-table-column
  2237. prop="createTime"
  2238. header-align="center"
  2239. align="center"
  2240. width="180px"
  2241. label="入库日期"
  2242. >
  2243. </el-table-column>
  2244. <el-table-column
  2245. prop="fGoodsids"
  2246. header-align="center"
  2247. align="center"
  2248. label="品名"
  2249. >
  2250. </el-table-column>
  2251. <el-table-column
  2252. prop="fQtyblc"
  2253. header-align="center"
  2254. align="center"
  2255. label="结余数量"
  2256. >
  2257. </el-table-column>
  2258. <el-table-column
  2259. prop="fWarehouseids"
  2260. header-align="center"
  2261. align="center"
  2262. label="仓库"
  2263. >
  2264. </el-table-column>
  2265. <el-table-column
  2266. prop="fMarks"
  2267. header-align="center"
  2268. align="center"
  2269. label="品牌"
  2270. >
  2271. </el-table-column>
  2272. </el-table>
  2273. <pagination
  2274. v-show="whgenlegTotal > 0"
  2275. :total="whgenlegTotal"
  2276. :page.sync="whgenlegParams.pageNum"
  2277. :limit.sync="whgenlegParams.pageSize"
  2278. @pagination="getWhgenlegList"
  2279. />
  2280. <div slot="footer" class="dialog-footer">
  2281. <el-button type="primary" @click="whgenlegData">导入库存总账</el-button>
  2282. <el-button @click="whgenlegVisible = false">取 消</el-button>
  2283. </div>
  2284. </el-dialog>
  2285. <!-- 选择作业费协议数据 -->
  2286. <el-dialog
  2287. title="作业费协议"
  2288. :modal="false"
  2289. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2290. :visible.sync="warehousingagreements"
  2291. width="70%"
  2292. v-dialogDrag
  2293. >
  2294. <template slot="作业费协议">
  2295. <div class="avue-crud__dialog__header">
  2296. <span class="el-dialog__title">
  2297. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
  2298. </span>
  2299. </div>
  2300. </template>
  2301. <el-menu :default-active="activeIndex" v-if="Navigation === true" class="el-menu-demo" mode="horizontal" @select="handleSelect">
  2302. <el-menu-item index="1">车队作业费</el-menu-item>
  2303. <el-menu-item index="2">劳务作业费</el-menu-item>
  2304. </el-menu>
  2305. <el-table
  2306. :data="tasklegList"
  2307. ref="table"
  2308. tooltip-effect="dark"
  2309. width="100%"
  2310. border
  2311. stripe
  2312. @selection-change="whgenlegSelectionChange"
  2313. >
  2314. <el-table-column type="selection" width="55"> </el-table-column>
  2315. <el-table-column label="行号" type="index" width="80">
  2316. </el-table-column>
  2317. <el-table-column
  2318. prop="fCorpname"
  2319. header-align="center"
  2320. align="center"
  2321. label="客户名称"
  2322. >
  2323. </el-table-column>
  2324. <el-table-column
  2325. prop="fName"
  2326. header-align="center"
  2327. align="center"
  2328. width="180px"
  2329. label="费用名称"
  2330. >
  2331. </el-table-column>
  2332. <el-table-column
  2333. prop="fFeeUnitid"
  2334. header-align="center"
  2335. align="center"
  2336. label="计价单位"
  2337. >
  2338. <template slot-scope="scope">
  2339. <span v-if="scope.row.fFeeUnitid === 1">件数</span>
  2340. <span v-if="scope.row.fFeeUnitid === 2">毛重</span>
  2341. <span v-if="scope.row.fFeeUnitid === 3">净重</span>
  2342. <span v-if="scope.row.fFeeUnitid === 4">尺码</span>
  2343. <span v-if="scope.row.fFeeUnitid === 5">固定</span>
  2344. <span v-if="scope.row.fFeeUnitid === 6">其它</span>
  2345. <span v-if="scope.row.fFeeUnitid === 7">箱量</span>
  2346. </template>
  2347. </el-table-column>
  2348. <el-table-column
  2349. prop="fPrice"
  2350. header-align="center"
  2351. align="center"
  2352. label="单价"
  2353. >
  2354. </el-table-column>
  2355. </el-table>
  2356. <pagination
  2357. v-show="whgenlegTotal > 0"
  2358. :total="whgenlegTotal"
  2359. :page.sync="queryParams.pageNum"
  2360. :limit.sync="queryParams.pageSize"
  2361. :page-sizes="[100, 200, 300, 400]"
  2362. @pagination="getWhgenlegList"
  2363. />
  2364. <div slot="footer" class="dialog-footer">
  2365. <el-button type="primary" @click="zhgenlegData">导入作业费</el-button>
  2366. <el-button @click="warehousingagreements = false;Navigation = false">取 消</el-button>
  2367. </div>
  2368. </el-dialog>
  2369. <el-dialog
  2370. title="调拨作业单打印"
  2371. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2372. :visible.sync="openPrintJobSheet"
  2373. :close-on-click-modal="false"
  2374. width="70%"
  2375. :modal="false"
  2376. >
  2377. <table
  2378. id="print_area1"
  2379. class="biaoge zzss"
  2380. border="1"
  2381. style="border-collapse: collapse; border: none"
  2382. >
  2383. <tr>
  2384. <td
  2385. width="1400"
  2386. colspan="6"
  2387. class="zzss"
  2388. style="font-size: 20px; font-weight: bold; border: none"
  2389. >
  2390. {{company}}有限公司作业单
  2391. </td>
  2392. </tr>
  2393. <tr>
  2394. <td colspan="5"
  2395. style="font-size: 20px; font-weight: bold; border: none"
  2396. ></td>
  2397. <td v-if="!fSerialNumber"
  2398. style="font-size: 20px; font-weight: bold; border: none"
  2399. >流水号:</td>
  2400. <td v-else
  2401. style="font-size: 20px; font-weight: bold; border: none"
  2402. >流水号:{{fSerialNumber.slice(8,11)}}</td>
  2403. </tr>
  2404. <tr>
  2405. <td
  2406. width="900"
  2407. colspan="4"
  2408. class="zzss"
  2409. style="padding: 6px;font-weight: bold"
  2410. >
  2411. 作业类型:{{businessType}}
  2412. </td>
  2413. <td width="500"v-if="this.printinglist.length === 0 || !fBstime" colspan="2" style="padding-bottom: 0; font-weight: bold;">入库时间:111</td>
  2414. <td
  2415. v-else
  2416. width="500"
  2417. colspan="2"
  2418. style="padding: 6px; font-weight: bold;"
  2419. class="zzss"
  2420. >
  2421. 调拨日期:{{ parseTime(this.printinglist[0].fBsdate,"{y}-{m}-{d}") }} {{ fBstime.slice(11,19) }}
  2422. </td>
  2423. </tr>
  2424. <!-- <tr v-for="(item, index) in printinglist" :key="index">-->
  2425. <!-- <td width="200">车号</td>-->
  2426. <!-- <td width="200">{{ item.fTruckno }}</td>-->
  2427. <!-- <td width="200">货物品名</td>-->
  2428. <!-- <td width="200" class="zzss">-->
  2429. <!-- {{ item.fGoodsids }}-->
  2430. <!-- </td>-->
  2431. <!-- <td width="200">{{item.fBusinessTypes}}</td>-->
  2432. <!-- <td width="200">{{item.fMarks}}</td>-->
  2433. <!-- </tr>-->
  2434. <tr>
  2435. <td width="200">车号</td>
  2436. <td width="200">货物品名</td>
  2437. <td width="200">提单号</td>
  2438. <td width="200">品牌/规格/产地</td>
  2439. <td width="200">净重(kg)</td>
  2440. <td width="200">件数/规格</td>
  2441. </tr>
  2442. <tr v-for="(item, index) in printinglist" :key="index">
  2443. <td width="200">{{ item.fTruckno }}</td>
  2444. <td width="200">{{ item.fGoodsids }}</td>
  2445. <td width="200">{{ item.fMblno }}</td>
  2446. <td width="200">{{item.fBusinessTypes}}/{{item.fMarks}}</td>
  2447. <td width="200">{{item.fNetweight}}</td>
  2448. <td width="200">{{ item.fQty }}/{{item.fPackagespecs}}</td>
  2449. </tr>
  2450. <tr>
  2451. <td width="1400" colspan="6">&nbsp;</td>
  2452. </tr>
  2453. <tr>
  2454. <td>备注:</td>
  2455. <td colspan="5">{{ form.remark }}</td>
  2456. </tr>
  2457. <tr v-for="(item, indexe) in collectionoptionss" :key="indexe + 'index'">
  2458. <td>收费</td>
  2459. <td>{{ item.fFeeids }}</td>
  2460. <td>{{ item.fAmount }} 元</td>
  2461. <!-- <td colspan="4">办单费:5元,过磅费自理</td> -->
  2462. </tr>
  2463. <tr>
  2464. <td>司机签字:</td>
  2465. <td></td>
  2466. <td>电话</td>
  2467. <td>{{ form.fDriverTel }}</td>
  2468. <td colspan="2" rowspan="2">
  2469. 确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
  2470. </td>
  2471. </tr>
  2472. <tr>
  2473. <td>制表:</td>
  2474. <td>{{ form.createBy }}</td>
  2475. <td>机械/人工:</td>
  2476. <td></td>
  2477. </tr>
  2478. <!-- <tr>-->
  2479. <!-- <td colspan="6" class="zzss">&nbsp;</td>-->
  2480. <!-- </tr>-->
  2481. <tr>
  2482. <td width="290" class="zzss" colspan="2">地址:{{ fAddr }}</td>
  2483. <td width="290" class="zzss" colspan="2">电话:{{ form.fTel }}</td>
  2484. <td width="280" class="zzss"></td>
  2485. <td width="280" class="zzss"></td>
  2486. </tr>
  2487. </table>
  2488. <div>
  2489. <el-button
  2490. type="primary"
  2491. :disabled="browseStatus"
  2492. @click="addList">打印作业费
  2493. </el-button>
  2494. <el-button @click="openPrintJobSheet = false">取消 </el-button>
  2495. </div>
  2496. </el-dialog>
  2497. </el-dialog>
  2498. <el-dialog
  2499. title="调拨收货单打印"
  2500. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2501. :visible.sync="editDialogVisible_ss"
  2502. :close-on-click-modal="false"
  2503. width="70%"
  2504. :modal="false"
  2505. >
  2506. <table
  2507. id="print_area3"
  2508. class="biaoge zzss"
  2509. border="1"
  2510. style="border-collapse: collapse; border: none;"
  2511. >
  2512. <tr>
  2513. <td
  2514. width="1400"
  2515. colspan="6"
  2516. class="zzss"
  2517. style="font-size: 26px; font-weight: bold; border: none"
  2518. >
  2519. {{company}}有限公司收货单
  2520. </td>
  2521. </tr>
  2522. <!-- <div v-for="{{}}" :key="index"> -->
  2523. <tr>
  2524. <td width="400">车号:</td>
  2525. <td width="400" v-if="printinglist.length === 0"></td>
  2526. <td width="400" v-else>{{ printinglist[0].fTruckno }}</td>
  2527. <td
  2528. width="500"
  2529. colspan="4"
  2530. style="padding-bottom: 0px; font-weight: bold;"
  2531. class="zzss"
  2532. v-if="this.printinglist.length === 0"
  2533. >
  2534. 日期:11
  2535. </td>
  2536. <td
  2537. width="500"
  2538. colspan="4"
  2539. style="padding-bottom: 0px; font-weight: bold;"
  2540. class="zzss"
  2541. v-else
  2542. >
  2543. 日期:{{ parseTime(this.printinglist[0].fBsdate,"{y}-{m}-{d}") }} {{ fBstime.slice(11,19) }}
  2544. </td>
  2545. <!-- <td
  2546. width="500"
  2547. colspan="2"
  2548. style="padding-bottom: 0px; font-weight: bold; border: none"
  2549. class="zzss"
  2550. >
  2551. </td> -->
  2552. </tr>
  2553. <tr v-for="(item, index) in printinglist" :key="index">
  2554. <td width="250">货物品名:</td>
  2555. <td width="200" colspan="">{{ item.fGoodsids }}</td>
  2556. <!-- <td width="200" colspan="2">件数: 161件</td> -->
  2557. <!-- <td width="200"></td> -->
  2558. <td width="200" colspan="4" class="zzss">
  2559. 件数: {{ item.fQty }}件
  2560. </td>
  2561. </tr>
  2562. <!-- <tr>
  2563. <td width="1400" colspan="6">&nbsp;</td>
  2564. </tr> -->
  2565. <tr>
  2566. <td>备注:</td>
  2567. <td colspan="5">{{ form.remark }}</td>
  2568. </tr>
  2569. <tr>
  2570. <td>司机签字:</td>
  2571. <td></td>
  2572. <td colspan="2">司机电话:</td>
  2573. <td colspan="2" v-if="dataList.length !== 0">{{ dataList[0].fDriverTel }}</td>
  2574. <td colspan="2" v-else>1</td>
  2575. </tr>
  2576. <tr>
  2577. <td>制单人:</td>
  2578. <td>{{ form.createBy }}</td>
  2579. <td colspan="2">收货人:</td>
  2580. <td colspan="2">{{ form.fContacts }}</td>
  2581. </tr>
  2582. <!-- <tr>
  2583. <td colspan="6" class="zzss">&nbsp;</td>
  2584. </tr> -->
  2585. <tr>
  2586. <td width="280" class="zzss"></td>
  2587. <td width="280" class="zzss"></td>
  2588. <td width="280" class="zzss"></td>
  2589. <td width="280" class="zzss"></td>
  2590. <td width="290" class="zzss">地址:{{ fAddr }}</td>
  2591. <td width="290" class="zzss">电话:{{ form.fTel }}</td>
  2592. </tr>
  2593. <!-- </div> -->
  2594. </table>
  2595. <el-button @click="printSomething2">打印</el-button>
  2596. <el-button @click="editDialogVisible_ss = false">取消 </el-button>
  2597. </el-dialog>
  2598. <el-dialog
  2599. title="调拨进仓单打印"
  2600. :modal="false"
  2601. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2602. :visible.sync="editDialogVisible_s"
  2603. :close-on-click-modal="false"
  2604. @close="closeDialog"
  2605. width="70%"
  2606. >
  2607. <table
  2608. id="print_area2"
  2609. class="biaoge zzss"
  2610. border="1"
  2611. style="border-collapse: collapse; border: none"
  2612. >
  2613. <tr>
  2614. <td
  2615. width="100"
  2616. colspan="7"
  2617. class="zzss"
  2618. style="font-size: 28px; font-weight: bold; border: none"
  2619. >
  2620. {{company}}进仓单
  2621. </td>
  2622. </tr>
  2623. <tr>
  2624. <td
  2625. width="100"
  2626. colspan="7"
  2627. class="zzss"
  2628. style="font-size: 28px; font-weight: bold; border: none"
  2629. >
  2630. &nbsp;
  2631. </td>
  2632. </tr>
  2633. <tr>
  2634. <td width="450" colspan="2" class="zzss">
  2635. 货权方:{{ form.fCorpidName }}
  2636. </td>
  2637. <td width="450" colspan="2" class="zzss">
  2638. 仓库:{{ form.fWarehouseid }}
  2639. </td>
  2640. <td width="450" colspan="3" class="zzss">地址:{{ fAddr }}</td>
  2641. </tr>
  2642. <tr>
  2643. <td width="200" colspan="2" class="zzss">保管方:{{company}}有限公司</td>
  2644. <td width="200" colspan="2" class="zzss">
  2645. 联系人:{{ form.fContacts }}
  2646. </td>
  2647. <td width="200" colspan="3" class="zzss">电话:{{ form.fTel }}</td>
  2648. </tr>
  2649. <tr>
  2650. <td width="100" border="1">提单号</td>
  2651. <td width="100">品名</td>
  2652. <td width="100">箱型</td>
  2653. <td width="100">品牌</td>
  2654. <td width="100">件数</td>
  2655. <td width="100">重量</td>
  2656. <td width="100">包装规格</td>
  2657. </tr>
  2658. <tr>
  2659. <td width="100">{{ form.fMblno }}</td>
  2660. <td width="100">{{ form.fProductName }}</td>
  2661. <td width="100">{{ fCntrtype }}</td>
  2662. <td width="100">{{ form.fMarks }}</td>
  2663. <td width="100">包</td>
  2664. <td width="100">吨</td>
  2665. <td width="100">{{ fPackagespecs }}</td>
  2666. </tr>
  2667. <tr>
  2668. <td width="100">序号</td>
  2669. <td width="100">入货日期</td>
  2670. <td width="100">箱量(20GP)</td>
  2671. <td width="100">重量</td>
  2672. <td width="100">件数</td>
  2673. <td width="100">入库重量</td>
  2674. <td width="100">入库件数</td>
  2675. </tr>
  2676. <tr v-for="(item, indexx) in printinglist" :key="indexx">
  2677. <td width="100">{{ indexx + 1 }}</td>
  2678. <td width="100">{{ item.fBsdate }}</td>
  2679. <td width="100">{{ item.fCntqty }}</td>
  2680. <td width="100">{{ (item.fGrossweight / 1000).toFixed(2) }}</td>
  2681. <td width="100">{{ item.fPlanqty }}</td>
  2682. <td width="100">{{ (item.fNetweight / 1000).toFixed(2) }}</td>
  2683. <td width="100">{{ item.fQty }}</td>
  2684. </tr>
  2685. <tr>
  2686. <td width="100" colspan="2">合计:</td>
  2687. <td width="100">{{ fCntqty }}</td>
  2688. <td width="100">{{ form.sumFGrossweight }}</td>
  2689. <td width="100">{{ fPlanqty }}</td>
  2690. <td width="100">{{ form.sumFNetweight}}</td>
  2691. <td width="100">{{ fQty }}</td>
  2692. </tr>
  2693. <tr>
  2694. <td width="100">备注:</td>
  2695. <td width="100" colspan="6"></td>
  2696. </tr>
  2697. <tr>
  2698. <td width="100" colspan="7" class="zzss">
  2699. 本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
  2700. </td>
  2701. </tr>
  2702. <tr style="border: none">
  2703. <td width="100" colspan="2" class="zzss" style="border: none">
  2704. 开单员:
  2705. </td>
  2706. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  2707. <td width="100" colspan="2" class="zzss" style="border: none">
  2708. 仓管员:
  2709. </td>
  2710. </tr>
  2711. <tr style="border: none">
  2712. <td width="100" colspan="2" class="zzss" style="border: none">
  2713. 开单时间:
  2714. </td>
  2715. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  2716. <td width="100" colspan="2" class="zzss" style="border: none">
  2717. (盖章)
  2718. </td>
  2719. </tr>
  2720. </table>
  2721. <el-button @click="printSomething1">打印</el-button>
  2722. <el-button @click="editDialogVisible_s = false">取消 </el-button>
  2723. </el-dialog>
  2724. <el-dialog
  2725. title="选择库位"
  2726. :data="treeselectList"
  2727. :visible.sync="choiceWarehouse"
  2728. width="30%"
  2729. :before-close="hanDleclose">
  2730. <treeselect v-model="treeselectList.fWarehouselocid" @select="getAlltree" :options="fWarehouseidOptions" :show-count="true" :disable-branch-nodes="true" placeholder="请选择归属库区" />
  2731. <div>{{Warehouse}}</div>
  2732. <span slot="footer" class="dialog-footer">
  2733. <el-button @click="choiceWarehouse = false">取 消</el-button>
  2734. <el-button type="primary" @click="confirm">确 定</el-button>
  2735. </span>
  2736. </el-dialog>
  2737. </div>
  2738. </template>
  2739. <script>
  2740. import print from "print-js";
  2741. import {
  2742. backFee,
  2743. RevocationApproval,
  2744. addWhgenleg,
  2745. getStockTransferList,
  2746. getStockTransfer,
  2747. delStockTransfer,
  2748. updateCredit,
  2749. addJoblist,
  2750. disChargelist,
  2751. addStockTransfer,
  2752. warehouseSubmission,
  2753. updateStockTransfer,
  2754. exportStockTransfer,
  2755. delstockTransfer_s,
  2756. serialNumber
  2757. } from "@/api/warehouseBusiness/stockTransfer";
  2758. import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
  2759. import { listAgreements } from "@/api/warehouseBusiness/agreement";
  2760. import { listCorps } from "@/api/basicdata/corps";
  2761. import { listFees, getFees } from "@/api/basicdata/fees";
  2762. import { listWarehouse, listWarehousesss, treeselect } from '@/api/basicdata/warehouse'
  2763. import { listArea } from "@/api/basicdata/area";
  2764. import { listGoods } from "@/api/basicdata/goods";
  2765. import { listUser, queryUserVal } from "@/api/system/user";
  2766. import UploadFile from "@/components/Uploadfile";
  2767. import { listWhgenleg } from "@/api/reportManagement/whgenleg";
  2768. import Global from '@/layout/components/global'
  2769. import AddOrUpdate from '@/views/viewApproval'
  2770. import ApprovalComments from '@/views/startApproval'
  2771. import Treeselect from '@riophae/vue-treeselect'
  2772. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  2773. import { getToken } from '@/utils/auth'
  2774. import Cookies from 'js-cookie'
  2775. import { addSet, select } from '@/api/system/set'
  2776. import draggable from "vuedraggable";
  2777. import Vue from 'vue'
  2778. Vue.directive('dialogDrag', {
  2779. bind(el, binding, vnode, oldVnode) {
  2780. const dialogHeaderEl = el.querySelector('.el-dialog__header')
  2781. const dragDom = el.querySelector('.el-dialog')
  2782. const enlarge = el.querySelector('.enlarge')
  2783. dialogHeaderEl.style.cursor = 'move'
  2784. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  2785. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
  2786. if(enlarge){
  2787. enlarge.onclick = (e) => {
  2788. dragDom.style.top = '0px'
  2789. dragDom.style.left = '0px'
  2790. }
  2791. }
  2792. dialogHeaderEl.onmousedown = (e) => {
  2793. // 鼠标按下,计算当前元素距离可视区的距离
  2794. const disX = e.clientX - dialogHeaderEl.offsetLeft
  2795. const disY = e.clientY - dialogHeaderEl.offsetTop
  2796. // 获取到的值带px 正则匹配替换
  2797. let styL, styT
  2798. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  2799. if (sty.left.includes('%')) {
  2800. styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
  2801. styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
  2802. } else {
  2803. styL = +sty.left.replace(/\px/g, '')
  2804. styT = +sty.top.replace(/\px/g, '')
  2805. }
  2806. document.onmousemove = function(e) {
  2807. // 通过事件委托,计算移动的距离
  2808. const l = e.clientX - disX
  2809. const t = e.clientY - disY
  2810. // 移动当前元素
  2811. if ((t + styT) >= 0){
  2812. dragDom.style.top = `${t + styT}px`
  2813. }
  2814. dragDom.style.left = `${l + styL}px`
  2815. // 将此时的位置传出去
  2816. // binding.value({x:e.pageX,y:e.pageY})
  2817. }
  2818. document.onmouseup = function(e) {
  2819. document.onmousemove = null
  2820. document.onmouseup = null
  2821. }
  2822. }
  2823. }
  2824. })
  2825. export default {
  2826. name: "Warehousebills",
  2827. components: {
  2828. draggable,
  2829. UploadFile,
  2830. AddOrUpdate,
  2831. ApprovalComments,
  2832. Treeselect
  2833. },
  2834. data() {
  2835. return {
  2836. //全屏放大
  2837. dialogFull:false,
  2838. drag: false,
  2839. setRowList: [
  2840. {
  2841. surface: "1",
  2842. label: "createBy",
  2843. name: "制单人",
  2844. checked: 0,
  2845. width: 100,
  2846. },
  2847. {
  2848. surface: "2",
  2849. label: "fStorekeeper",
  2850. name: "仓管员",
  2851. checked: 0,
  2852. width: 100,
  2853. },
  2854. {
  2855. surface: "3",
  2856. label: "fItemsStatus",
  2857. name: "调拨状态",
  2858. checked: 0,
  2859. width: 100,
  2860. },
  2861. {
  2862. surface: "4",
  2863. label: "fCorpid",
  2864. name: "货权方",
  2865. checked: 0,
  2866. width: 100,
  2867. },
  2868. {
  2869. surface: "5",
  2870. label: "fMblno",
  2871. name: "提单号",
  2872. checked: 0,
  2873. width: 100,
  2874. },
  2875. {
  2876. surface: "6",
  2877. label: "fProductName",
  2878. name: "品名",
  2879. checked: 0,
  2880. width: 100,
  2881. },
  2882. {
  2883. surface: "7",
  2884. label: "fMarks",
  2885. name: "品牌",
  2886. checked: 0,
  2887. width: 100,
  2888. },
  2889. {
  2890. surface: "8",
  2891. label: "createTime",
  2892. name: "调拨日期",
  2893. checked: 0,
  2894. width: 100,
  2895. },
  2896. {
  2897. surface: "9",
  2898. label: "fWarehouseid",
  2899. name: "调入仓库",
  2900. checked: 0,
  2901. width: 100,
  2902. },
  2903. {
  2904. surface: "10",
  2905. label: "fInwarehouseid",
  2906. name: "调出仓库",
  2907. checked: 0,
  2908. width: 100,
  2909. },
  2910. {
  2911. surface: "11",
  2912. label: "fPlanqty",
  2913. name: "计划调拨件数",
  2914. checked: 0,
  2915. width: 100,
  2916. },
  2917. {
  2918. surface: "12",
  2919. label: "fQty",
  2920. name: "调拨件数",
  2921. checked: 0,
  2922. width: 100,
  2923. },
  2924. {
  2925. surface: "13",
  2926. label: "fGrossweight",
  2927. name: "调拨毛重(KG)",
  2928. checked: 0,
  2929. width: 100,
  2930. },
  2931. {
  2932. surface: "14",
  2933. label: "fNetweight",
  2934. name: "调拨净重(kg)",
  2935. checked: 0,
  2936. width: 100,
  2937. },
  2938. {
  2939. surface: "15",
  2940. label: "fBusinessType",
  2941. name: "业务类别",
  2942. checked: 0,
  2943. width: 100,
  2944. },
  2945. {
  2946. surface: "16",
  2947. label: "fBillstatus",
  2948. name: "费用状态",
  2949. checked: 0,
  2950. width: 100,
  2951. },
  2952. ],
  2953. getRowList: [
  2954. {
  2955. surface: "1",
  2956. label: "createBy",
  2957. name: "制单人",
  2958. checked: 0,
  2959. width: 100,
  2960. },
  2961. {
  2962. surface: "2",
  2963. label: "fStorekeeper",
  2964. name: "仓管员",
  2965. checked: 0,
  2966. width: 100,
  2967. },
  2968. {
  2969. surface: "3",
  2970. label: "fItemsStatus",
  2971. name: "调拨状态",
  2972. checked: 0,
  2973. width: 100,
  2974. },
  2975. {
  2976. surface: "4",
  2977. label: "fCorpid",
  2978. name: "货权方",
  2979. checked: 0,
  2980. width: 100,
  2981. },
  2982. {
  2983. surface: "5",
  2984. label: "fMblno",
  2985. name: "提单号",
  2986. checked: 0,
  2987. width: 100,
  2988. },
  2989. {
  2990. surface: "6",
  2991. label: "fProductName",
  2992. name: "品名",
  2993. checked: 0,
  2994. width: 100,
  2995. },
  2996. {
  2997. surface: "7",
  2998. label: "fMarks",
  2999. name: "品牌",
  3000. checked: 0,
  3001. width: 100,
  3002. },
  3003. {
  3004. surface: "8",
  3005. label: "createTime",
  3006. name: "调拨日期",
  3007. checked: 0,
  3008. width: 100,
  3009. },
  3010. {
  3011. surface: "9",
  3012. label: "fWarehouseid",
  3013. name: "调入仓库",
  3014. checked: 0,
  3015. width: 100,
  3016. },
  3017. {
  3018. surface: "10",
  3019. label: "fInwarehouseid",
  3020. name: "调出仓库",
  3021. checked: 0,
  3022. width: 100,
  3023. },
  3024. {
  3025. surface: "11",
  3026. label: "fPlanqty",
  3027. name: "计划调拨件数",
  3028. checked: 0,
  3029. width: 100,
  3030. },
  3031. {
  3032. surface: "12",
  3033. label: "fQty",
  3034. name: "调拨件数",
  3035. checked: 0,
  3036. width: 100,
  3037. },
  3038. {
  3039. surface: "13",
  3040. label: "fGrossweight",
  3041. name: "调拨毛重(KG)",
  3042. checked: 0,
  3043. width: 100,
  3044. },
  3045. {
  3046. surface: "14",
  3047. label: "fNetweight",
  3048. name: "调拨净重(kg)",
  3049. checked: 0,
  3050. width: 100,
  3051. },
  3052. {
  3053. surface: "15",
  3054. label: "fBusinessType",
  3055. name: "业务类别",
  3056. checked: 0,
  3057. width: 100,
  3058. },
  3059. {
  3060. surface: "16",
  3061. label: "fBillstatus",
  3062. name: "费用状态",
  3063. checked: 0,
  3064. width: 100,
  3065. },
  3066. ],
  3067. allCheck: false,
  3068. showSetting:false,
  3069. headers: {
  3070. Authorization: 'Bearer ' + getToken()
  3071. },
  3072. uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
  3073. company:'',
  3074. fSerialNumber:'',
  3075. fCNameOptions:[],
  3076. fDNameOptions:[],
  3077. businessType:'',
  3078. fBstime:'',
  3079. fPackagespecs: "",
  3080. editDialogVisible_s: false,
  3081. editDialogVisible_ss: false,
  3082. fCompanyOptIons:[],
  3083. fleetOptions:[],
  3084. activeIndex: '1',
  3085. activeIndex2: '1',
  3086. //控制选择库位弹出
  3087. choiceWarehouse:false,
  3088. information:'',
  3089. informationId:'',
  3090. inDex:'',
  3091. Warehouse:'',
  3092. //树状下来库位表
  3093. treeselectList:{
  3094. fWarehouselocid:null
  3095. },
  3096. //仓库树状图
  3097. fWarehouseidOptions:[],
  3098. fWarehouseidOption:[],
  3099. activeNames:['1'],
  3100. //作业类型校验
  3101. isrequired:2,
  3102. Navigation:false,
  3103. isrequired_s:2,
  3104. isrequired_l:2,
  3105. contrOl:false,
  3106. //作业类型字典表
  3107. businessTypeOption:[],
  3108. approvalStatus:false,
  3109. Lander:'',
  3110. Operator:'',
  3111. cancelButton:true,
  3112. approve:false,
  3113. disappear:false,
  3114. colseButton:true,
  3115. addOrUpdateVisible: false,
  3116. addOrUpdateVisib:false,
  3117. stockTransferId:160,
  3118. notChange:false,
  3119. index: 0,
  3120. fFeeUnitid: null,
  3121. fFeeUnitids: null,
  3122. formBrowseStatus: false,
  3123. detailsHidden: false,
  3124. warehousingagreements: false,
  3125. fTruckno: null,
  3126. fBsdate: null,
  3127. fCntrtype: null,
  3128. fGoodsids: null,
  3129. fPlanqty: null,
  3130. fPlannetweight: null,
  3131. fPlanvolumn: null,
  3132. fGrossweight: 0,
  3133. fCntqty: 0,
  3134. fNetweight: 0,
  3135. fVolumn: 0,
  3136. fid: 0,
  3137. fQty: 0,
  3138. fSbu: 0,
  3139. // 遮罩层
  3140. loading: true,
  3141. // 打印地址
  3142. fAddr: "",
  3143. // 税率
  3144. fTaxrate: null,
  3145. // 选中数组
  3146. ids: [],
  3147. // userVal: {
  3148. // userName: null,
  3149. // nickName: null,
  3150. // deptId: null,
  3151. // },
  3152. queryForm: {},
  3153. // 费用状态
  3154. costStatus: 'Dr',
  3155. // 库存总账表
  3156. whgenlegList: [],
  3157. whgenlegTotal: 0,
  3158. // 弹窗库存总账数据
  3159. dialogWhgenlegList: [],
  3160. // 库存总账对话框
  3161. whgenlegVisible: false,
  3162. // 收费多选框
  3163. feelDrSelection: [],
  3164. openPrintJobSheet: false,
  3165. editDialogClosed_ss: false,
  3166. dataList: [],
  3167. warehouseCrList: [],
  3168. warehouseDrList: [],
  3169. printinglist: [],
  3170. browseStatus: false,
  3171. collectionoptionss: [],
  3172. relevantAttachments: [],
  3173. // 非单个禁用
  3174. single: true,
  3175. // 非多个禁用
  3176. multiple: true,
  3177. // 显示搜索条件
  3178. showSearch: true,
  3179. // 总条数
  3180. total: 0,
  3181. // 仓库主(出入库)表格数据
  3182. warehousebillsList: [],
  3183. // 弹出层标题
  3184. title: "",
  3185. // 是否显示弹出层
  3186. open: false,
  3187. // 货权方(客户数据)
  3188. fMblnoOptions: [],
  3189. // 货权方(客户数据)
  3190. // 客户名称
  3191. KHblnoOptions: [],
  3192. // 作业费协议
  3193. tasklegList: [],
  3194. fSbuOptions: [],
  3195. // 操作员
  3196. userOptions: [],
  3197. // 操作员
  3198. goodsOptions: [],
  3199. // 制单部门
  3200. deptOptions: [],
  3201. // 仓库(仓库数据)
  3202. warehouseOptions: [],
  3203. // 库存明细入账数组
  3204. dataListSelection: [],
  3205. // 库存明细撤回入账数组
  3206. dataWithdrawList: [],
  3207. kqhouseOptions: [],
  3208. // 贸易方式(数据字典),对应t_trademodels 字典
  3209. fTrademodeidOptions: [],
  3210. // 结算方式(数据字典),下拉选择字典
  3211. fStltypeOptions: [],
  3212. // 仓储类型 入库时选择 产地 规格 品牌 所用,对应storage_type 字典
  3213. fStorageTypeOptions: [],
  3214. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  3215. fIfweighOptions: [],
  3216. // 是否破损(数据字典),默认F否则T字典
  3217. fIfdamageOptions: [],
  3218. // 单据类型(数据字典)SJRK字典
  3219. fBilltypeOptions: [],
  3220. // 状态(数据字典),N 入字典
  3221. fBillstatusOptions: [],
  3222. //结算方式对应字典表
  3223. fStltypeidOptions:[],
  3224. // 费用名称
  3225. fWbuOptions: [],
  3226. // 计价单位
  3227. jFeetunitOptions: [
  3228. /*{dictLabel: "件数",dictValue: 1},
  3229. {dictLabel: "毛重",dictValue: 2},
  3230. {dictLabel: "净重",dictValue: 3},
  3231. {dictLabel: "尺码",dictValue: 4},
  3232. {dictLabel: "固定",dictValue: 5},*/
  3233. ],
  3234. // 查询参数
  3235. queryParams: {
  3236. pageNum: 1,
  3237. pageSize: 50,
  3238. type:2,
  3239. fBillno: null,
  3240. createBy: null,
  3241. createTime: null,
  3242. fCustomsdeclartion: null,
  3243. fOriginalbillno: null,
  3244. fDeptid: null,
  3245. fBsdeptid: null,
  3246. fContacts: null,
  3247. fTel: null,
  3248. fCorpid: null,
  3249. fTocorpid: null,
  3250. fStltypeid: null,
  3251. fBscorpno: null,
  3252. fWarehouseid: null,
  3253. fStorekeeper: null,
  3254. fBsdate: null,
  3255. fPlanqty: null,
  3256. fPlangrossweight: null,
  3257. fPlannetweight: null,
  3258. fPlanvolumn: null,
  3259. fQty: null,
  3260. fGrossweight: null,
  3261. fNetweight: null,
  3262. fVolumn: null,
  3263. fTrademodeid: null,
  3264. fSbu: null,
  3265. fFeetunit: null,
  3266. fMblno: null,
  3267. fVslvoy: null,
  3268. fEta: null,
  3269. fCustomno: null,
  3270. fIfweigh: null,
  3271. fIfpledge: null,
  3272. fIfdamage: null,
  3273. fBankcorpid: null,
  3274. fBilltype: null,
  3275. fBillstatus: null,
  3276. fCreateby: null,
  3277. fCreatetime: null,
  3278. fGoodsid: null,
  3279. fCntrtype: null,
  3280. fCntqty: null,
  3281. },
  3282. // 库存总账参数
  3283. whgenlegParams: {
  3284. pageNum: 1,
  3285. pageSize: 10,
  3286. fMblno: null,
  3287. fCorpid: null,
  3288. fWarehouseid: null,
  3289. fInwarehouseid:null,
  3290. },
  3291. // 表单参数
  3292. form: {
  3293. fMblno: null,
  3294. fCorpid: null,
  3295. fBsdate: null,
  3296. fBsdates: null,
  3297. fTrademodeid: null,
  3298. fWarehouseid: null,
  3299. fBstime:'',
  3300. },
  3301. // 表单校验
  3302. rules: {
  3303. fDeptid: [{ required: true, message: " ", trigger: "blur" }],
  3304. fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
  3305. fCorpid: [{ required: true, message: " ", trigger: "blur"},],
  3306. fPlanqty: [{ required: true, message: " ", trigger: "blur"},],
  3307. fFeeUnitid: [{ required: true, message: " ", trigger: "blur" }],
  3308. fChargedate: [{ required: true, message: " ", trigger: "blur" }],
  3309. fBillingway: [{ required: true, message: " ", trigger: "blur" }],
  3310. fBsdate: [{ required: true, message: " ", trigger: "blur" }],
  3311. fNewTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  3312. fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  3313. fSbu: [{ required: true, message: " ", trigger: "blur" }],
  3314. fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
  3315. fPlannetweight: [{ required: true, message: " ", trigger: "blur"},],
  3316. fPlangrossweight: [{ required: true, message: " ", trigger: "blur"},],
  3317. fBusinessType: [{ required: true, message: " ", trigger: "blur"},],
  3318. fInwarehouseid: [{ required: true, message: " ", trigger: "blur"},],
  3319. fbillingway: [
  3320. {
  3321. required: true,
  3322. message: " ",
  3323. trigger: "blur",
  3324. },
  3325. ],
  3326. fTocorpid: [
  3327. {
  3328. required: true,
  3329. message: " ",
  3330. trigger: "blur",
  3331. },
  3332. ],
  3333. },
  3334. };
  3335. },
  3336. created() {
  3337. this.getList();
  3338. this.getDicts("data_trademodes").then((response) => {
  3339. this.fTrademodeidOptions = response.data;
  3340. });
  3341. this.getDicts("data_stltype_type").then((response) => {
  3342. this.fStltypeOptions = response.data;
  3343. });
  3344. this.getDicts("storage_type").then((response) => {
  3345. this.fStorageTypeOptions = response.data;
  3346. });
  3347. this.getDicts("tax_rate").then((response) => {
  3348. this.fTaxrate = response.data[0].dictValue
  3349. });
  3350. this.getDicts("data_ifweigh_status").then((response) => {
  3351. this.fIfweighOptions = response.data;
  3352. });
  3353. this.getDicts("data_ifdamage_status").then((response) => {
  3354. this.fIfdamageOptions = response.data;
  3355. });
  3356. this.getDicts("data_billtype_type").then((response) => {
  3357. this.fBilltypeOptions = response.data;
  3358. });
  3359. this.getDicts("sys_common_status").then((response) => {
  3360. this.fBillstatusOptions = response.data;
  3361. });
  3362. this.getDicts("data_unitfees").then((response) => {
  3363. this.jFeetunitOptions = response.data;
  3364. });
  3365. this.getDicts("st_trans_type").then((response) => {
  3366. console.log(response)
  3367. this.businessTypeOption = response.data;
  3368. });
  3369. treeselect().then(response => {
  3370. this.warehouseOptions = response.data
  3371. })
  3372. this.warehousesssMethod()
  3373. this.register()
  3374. this.company = localStorage.getItem('companyName')
  3375. this.getRow();
  3376. },
  3377. activated(){
  3378. this.Jump()
  3379. },
  3380. methods: {
  3381. //全屏放大
  3382. full(){
  3383. this.dialogFull = !this.dialogFull
  3384. },
  3385. //列设置全选
  3386. allChecked() {
  3387. if (this.allCheck == true) {
  3388. this.setRowList.map((e) => {
  3389. return (e.checked = 0);
  3390. });
  3391. } else {
  3392. this.setRowList.map((e) => {
  3393. return (e.checked = 1);
  3394. });
  3395. }
  3396. },
  3397. //查询列数据
  3398. getRow() {
  3399. let that = this;
  3400. this.data = {
  3401. tableName: "调拨",
  3402. userId: Cookies.get("userName"),
  3403. };
  3404. select(this.data).then((res) => {
  3405. if (res.data.length != 0) {
  3406. this.getRowList = res.data.filter((e) => e.checked == 0);
  3407. this.setRowList = res.data;
  3408. this.setRowList = this.setRowList.reduce((res, item) => {
  3409. res.push({
  3410. surface: item.surface,
  3411. label: item.label,
  3412. name: item.name,
  3413. checked: item.checked,
  3414. width: item.width,
  3415. fixed: item.fixed,
  3416. });
  3417. return res;
  3418. }, []);
  3419. }
  3420. });
  3421. },
  3422. //保存列设置
  3423. save() {
  3424. this.showSetting = false;
  3425. this.data = {
  3426. tableName: "货物通关",
  3427. userId: Cookies.get("userName"),
  3428. sysTableSetList: this.setRowList,
  3429. };
  3430. addSet(this.data).then((res) => {
  3431. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  3432. });
  3433. },
  3434. //开始拖拽事件
  3435. onStart() {
  3436. this.drag = true;
  3437. },
  3438. //拖拽结束事件
  3439. onEnd() {
  3440. this.drag = false;
  3441. },
  3442. //附件删除
  3443. deleteFile(scope){
  3444. this.relevantAttachments[scope.$index].fName = ''
  3445. this.relevantAttachments[scope.$index].fUrl = ''
  3446. if(this.relevantAttachments[scope.$index].fUrl === ''){
  3447. this.$message.success("删除成功")
  3448. }else{
  3449. this.$message.error("未知错误,删除失败")
  3450. }
  3451. },
  3452. //附件查看
  3453. checkFile(scope){
  3454. if(this.relevantAttachments[scope.$index].fUrl){
  3455. window.open(this.relevantAttachments[scope.$index].fUrl)
  3456. }else{
  3457. this.$message.error("请上传附件")
  3458. }
  3459. },
  3460. //上传附件
  3461. handleSucces(scope,res,file){
  3462. this.relevantAttachments[scope.$index].fName = res.fileName
  3463. this.relevantAttachments[scope.$index].fUrl = res.url
  3464. if(this.relevantAttachments[scope.$index].fUrl === ''){
  3465. this.$message.error('上传失败')
  3466. }{
  3467. this.$message.success("上传成功")
  3468. }
  3469. },
  3470. //合计
  3471. getSum(param){
  3472. const { columns, data } = param
  3473. const sums = []
  3474. columns.forEach((column, index) => {
  3475. if (index === 0) {
  3476. sums[index] = '总计'
  3477. } else if (index ===13 || index ===14 || index ===11 || index ===12 ) {
  3478. const values = data.map(item => Number(item[column.property]))
  3479. if (!values.every(value => isNaN(value))) {
  3480. sums[index] = values.reduce((prev, curr) => {
  3481. const value = Number(curr)
  3482. if (!isNaN(value)) {
  3483. return prev + curr
  3484. } else {
  3485. return prev
  3486. }
  3487. }, 0)
  3488. if(index ===13 || index ===14){
  3489. sums[index] = (sums[index]/1000).toFixed(2) + '(吨)'
  3490. }
  3491. }
  3492. }
  3493. })
  3494. return sums
  3495. },
  3496. closeDialog() {
  3497. for (let aorp in this.Printinglist) {
  3498. this.$set(
  3499. this.Printinglist[aorp],
  3500. "fBsdate",
  3501. Date.parse(this.Printinglist[aorp].fBsdate)
  3502. );
  3503. }
  3504. },
  3505. //入库单打印
  3506. showEditDialog_s() {
  3507. if (this.printinglist.length > 0) {
  3508. this.editDialogVisible_s = true;
  3509. let sumFNetweight = 0
  3510. let sumFGrossweight = 0
  3511. for (let aorp in this.printinglist) {
  3512. sumFNetweight = Number(sumFNetweight) + Number(this.printinglist[aorp].fNetweight)
  3513. sumFGrossweight = Number(sumFGrossweight) + Number(this.printinglist[aorp].fGrossweight)
  3514. var date = new Date(this.printinglist[aorp].fBsdate);
  3515. var Y = date.getFullYear() + "-";
  3516. var M =
  3517. (date.getMonth() + 1 < 10
  3518. ? "0" + (date.getMonth() + 1)
  3519. : date.getMonth() + 1) + "-";
  3520. var D =
  3521. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  3522. this.$set(this.printinglist[aorp], "fBsdate", Y + M + D);
  3523. }
  3524. this.fCntrtype = this.printinglist[0].fCntrtype
  3525. this.$set(this.form , 'sumFNetweight', parseFloat(Number(sumFNetweight) / 1000).toFixed(2))
  3526. this.$set(this.form , 'sumFGrossweight', parseFloat(Number(sumFGrossweight) / 1000).toFixed(2))
  3527. for (let corp in this.fMblnoOptions) {
  3528. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  3529. this.$set(this.form, "fCorpidName", this.fMblnoOptions[corp].fName);
  3530. }
  3531. }
  3532. for (let sorp in this.warehouseOptions) {
  3533. if (this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
  3534. this.$set(this.form, "fWarehouseid", this.warehouseOptions[sorp].fName);
  3535. }
  3536. }
  3537. } else {
  3538. this.$message.error("请选择需要打印的明细!");
  3539. }
  3540. },
  3541. printSomething1() {
  3542. // 此处的style即为打印时的样式
  3543. const style =
  3544. "@media print { .print-div{ border:none;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
  3545. print({
  3546. printable: "print_area2",
  3547. type: "html",
  3548. style: style, // 亦可使用引入的外部css;
  3549. scanStyles: false,
  3550. });
  3551. },
  3552. //收货单打印
  3553. showEditDialog_ss() {
  3554. if (this.printinglist.length > 0) {
  3555. for (let warehouseCr in this.printinglist) {
  3556. if (!this.printinglist[warehouseCr].fWarehouseInformation) {
  3557. this.$message.error('请选择调入库位')
  3558. return false
  3559. // } else if (!this.printinglist[warehouseCr].fDriverName || this.printinglist[warehouseCr].fDriverName !== this.printinglist[0].fDriverName) {
  3560. // this.$message.error('请选择相同司机名')
  3561. // return false
  3562. // } else if (!this.printinglist[warehouseCr].fDriverTel || this.printinglist[warehouseCr].fDriverTel !== this.printinglist[0].fDriverTel) {
  3563. // this.$message.error('请选择相同司机电话')
  3564. // return false
  3565. } else if (!this.printinglist[warehouseCr].fTruckno || this.printinglist[warehouseCr].fTruckno !== this.printinglist[0].fTruckno) {
  3566. this.$message.error('请选择相同车号')
  3567. return false
  3568. }
  3569. this.fBstime = this.form.fBstime
  3570. }
  3571. this.editDialogVisible_ss = true
  3572. } else {
  3573. this.$message.error('请选择需要打印的明细!')
  3574. }
  3575. },
  3576. printSomething2() {
  3577. // 此处的style即为打印时的样式
  3578. const style =
  3579. "@media print { .print-div{ border:none;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
  3580. print({
  3581. printable: "print_area3",
  3582. type: "html",
  3583. style: style, // 亦可使用引入的外部css;
  3584. scanStyles: false,
  3585. });
  3586. },
  3587. //仓库电话、仓库联系人带入
  3588. warwhouseTel(){
  3589. for(let item in this.warehouseOptions){
  3590. if(this.form.fInwarehouseid == this.warehouseOptions[item].fId){
  3591. this.form.fTel = this.warehouseOptions[item].fTel
  3592. this.form.fContacts = this.warehouseOptions[item].fContacts
  3593. }
  3594. }
  3595. },
  3596. handleSelect(key, keyPath) {
  3597. this.addAgreements(key)
  3598. this.getWhgenlegListt(key)
  3599. },
  3600. // 新增付款作业费协议
  3601. addAgreements(kye) {
  3602. if (!this.form.fCorpid) {
  3603. this.$message({
  3604. message: "请维护货权方",
  3605. type: "warning",
  3606. });
  3607. }else if(this.form.fProductName == undefined) {
  3608. this.$message({
  3609. message: "请维护入库明细品名",
  3610. type: "warning",
  3611. });
  3612. } else {
  3613. this.whgenlegList = [];
  3614. this.dialogWhgenlegList = [];
  3615. this.whgenlegTotal = 0;
  3616. this.warehousingagreements = true;
  3617. this.getWhgenlegList(kye);
  3618. }
  3619. },
  3620. /** 查询部门下拉树结构 */
  3621. treeseLect(tree){
  3622. this.queryParams.fWarehouselocid = tree.id
  3623. },
  3624. getTreeselect(row) {
  3625. this.treeselectList.fWarehouselocid = null
  3626. this.inDex = row.$index
  3627. this.choiceWarehouse = true
  3628. treeselect(this.form.fWarehouseid).then(response => {
  3629. this.fWarehouseidOptions = response.data;
  3630. // this.dataList[this.inDex].fTransferWarehouselocid
  3631. })
  3632. this.Warehouse = this.dataList[this.inDex].fWarehouseInformation
  3633. },
  3634. getAlltree(tree){
  3635. this.information = tree.fWarehouseInformation
  3636. this.informationId = tree.id
  3637. },
  3638. confirm(){
  3639. this.$set(this.dataList[this.inDex], 'fWarehouseInformation', this.information)
  3640. this.$set(this.dataList[this.inDex], 'fTransferWarehouselocid', this.informationId)
  3641. this.choiceWarehouse = false
  3642. this.dataList.fTransferWarehouselocid = this.informationId
  3643. },
  3644. // 撤销审核
  3645. backrRconciliation(){
  3646. this.form.fBillstatus = '1'
  3647. backFee(this.form.fId).then(response=>{
  3648. this.msgSuccess("撤回成功")
  3649. this.getList()
  3650. this.open = false
  3651. })
  3652. this.getList()
  3653. },
  3654. // 默认录入人
  3655. register() {
  3656. queryUserVal().then((response)=>{
  3657. this.Lander = response.user.userName
  3658. })
  3659. },
  3660. // 审批按钮
  3661. goApproval(){
  3662. this.addOrUpdateVisib = true
  3663. this.$nextTick(() => {
  3664. this.$refs.ApprovalComments.init(this.form.fId,this.stockTransferId)
  3665. })
  3666. },
  3667. Jump(){
  3668. this.approval = this.$route.query.data
  3669. if(this.approval){
  3670. let queryParams = { pageNum: 1, fDc:'C'};
  3671. listFees(queryParams).then((response) => {
  3672. this.fCNameOptions = response.rows;
  3673. });
  3674. let query = { pageNum: 1, fDc:'D'};
  3675. listFees(query).then((response) => {
  3676. this.fDNameOptions = response.rows;
  3677. });
  3678. this.reset()
  3679. this.colseButton = false
  3680. this.approval = JSON.parse(this.approval)
  3681. this.hide = false
  3682. this.open = true
  3683. this.browseStatus = true
  3684. this.contrOl = true
  3685. this.notChange = true
  3686. this.approve = true
  3687. this.disappear = true
  3688. this.cancelButton = false
  3689. getStockTransfer(this.approval.billId).then((response) => {
  3690. if (response.data.warehousebills) {
  3691. this.form = response.data.warehousebills;
  3692. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  3693. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  3694. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  3695. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  3696. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  3697. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  3698. }
  3699. if (response.data.corps) {
  3700. this.fMblnoOptions = response.data.corps;
  3701. this.KHblnoOptions = response.data.corps;
  3702. this.fCompanyOptIons = response.data.corps;
  3703. }
  3704. if (response.data.feesList) {
  3705. this.fWbuOptions = response.data.feesList;
  3706. }
  3707. if (response.data.warehouse) {
  3708. this.warehouseOptions = response.data.warehouse;
  3709. }
  3710. if (response.data.warehouseBillsItem) {
  3711. this.dataList = response.data.warehouseBillsItem;
  3712. for (let list in this.dataList) {
  3713. if (!this.form.fMblno) {
  3714. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  3715. }
  3716. if (this.dataList[list].fBillstatus >= 6) {
  3717. this.formBrowseStatus = true;
  3718. }
  3719. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  3720. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  3721. }
  3722. }
  3723. if (response.data.enclosures) {
  3724. this.relevantAttachments = response.data.enclosures;
  3725. }
  3726. if (response.data.warehouse) {
  3727. this.warehouseDrList = response.data.warehousebillsfeesDr;
  3728. }
  3729. if (response.data.warehousebillsfeesDr) {
  3730. this.warehouseDrList = response.data.warehousebillsfeesDr;
  3731. for (let dr in this.warehouseDrList) {
  3732. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  3733. }
  3734. }
  3735. if (response.data.warehousebillsfeesCr) {
  3736. this.warehouseCrList = response.data.warehousebillsfeesCr;
  3737. for (let cr in this.warehouseCrList) {
  3738. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
  3739. }
  3740. }
  3741. // if (response.data.sysUser) {
  3742. // // this.userVal = response.data.sysUser
  3743. // this.userOptions = response.data.sysUser;
  3744. // }
  3745. if (response.data.dept) {
  3746. this.deptOptions = []
  3747. this.deptOptions.push(response.data.dept)
  3748. }
  3749. if (response.data.feesList) {
  3750. this.fWbuOptions = response.data.feesList;
  3751. }
  3752. if (response.data.goodsList) {
  3753. this.goodsOptions = response.data.goodsList;
  3754. }
  3755. if (response.data.warehouse) {
  3756. this.warehouseOptions = response.data.warehouse;
  3757. }
  3758. if (response.data.warehouseAreas) {
  3759. this.kqhouseOptions = response.data.warehouseAreas;
  3760. }
  3761. this.open = true;
  3762. this.title = "修改调拨";
  3763. });
  3764. }
  3765. },
  3766. //树状库位下拉关闭询问
  3767. hanDleclose(done){
  3768. this.$confirm('确认关闭?')
  3769. .then(_ => {
  3770. done();
  3771. })
  3772. .catch(_ => {});
  3773. },
  3774. homepaGe(){
  3775. let view = {
  3776. fullPath: "/business/cargoClearance",
  3777. hash: "",
  3778. matched: Array(2),
  3779. meta: Object,
  3780. name: "CargoClearance",
  3781. params: Object,
  3782. path: "/business/cargoClearance",
  3783. query: Object,
  3784. title: "货物通关"
  3785. }
  3786. this.$router.push({ path: '/index'})
  3787. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  3788. if (this.isActive(view)) {
  3789. this.toLastView(visitedViews, view)
  3790. }
  3791. })
  3792. Global.$emit("removeCache", "closeSelectedTag", view);
  3793. },
  3794. homePage() {
  3795. this.open = false
  3796. let view = {
  3797. fullPath: "/business/cargoClearance",
  3798. hash: "",
  3799. matched: Array(2),
  3800. meta: Object,
  3801. name: "CargoClearance",
  3802. params: Object,
  3803. path: "/business/cargoClearance",
  3804. query: Object,
  3805. title: "货物通关"
  3806. }
  3807. this.$router.push({ path: '/index' })
  3808. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  3809. if (this.isActive(view)) {
  3810. this.toLastView(visitedViews, view)
  3811. }
  3812. })
  3813. Global.$emit("removeCache", "closeSelectedTag", view);
  3814. },
  3815. // 撤销审批
  3816. backApproval(){
  3817. let data = {
  3818. id:this.form.fId,
  3819. actId:this.stockTransferId,
  3820. billId:this.form.fId
  3821. }
  3822. RevocationApproval(data).then(response => {
  3823. this.msgSuccess("撤销审批成功")
  3824. this.disappear = true
  3825. this.open = false
  3826. this.getList()
  3827. })
  3828. },
  3829. returnData(){
  3830. this.addOrUpdateVisib = false
  3831. this.open = false
  3832. this.homepaGe()
  3833. },
  3834. getDataList(){
  3835. this.addOrUpdateVisible = false
  3836. },
  3837. // 查看审批流
  3838. addOrUpdateHandle(){
  3839. this.approvalStatus = false
  3840. this.addOrUpdateVisible = true
  3841. this.addOrUpdateVisib = false
  3842. let id = '448'
  3843. let actId = '110'
  3844. this.$nextTick(() => {
  3845. this.$refs.addOrUpdate.init(this.form.fId,this.stockTransferId)
  3846. })
  3847. },
  3848. //关闭弹框的事件
  3849. addCloseDialog(){
  3850. this.getList()
  3851. },
  3852. // 上传成功返回数据
  3853. showFile(row) {
  3854. for(let list in this.relevantAttachments) {
  3855. this.$set(this.relevantAttachments[list], "fUrl", row.url);
  3856. this.$set(this.relevantAttachments[list], "fName", row.fileName);
  3857. }
  3858. },
  3859. // 打印作业费
  3860. printSomething() {
  3861. // 此处的style即为打印时的样式
  3862. const style =
  3863. "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
  3864. print({
  3865. printable: "print_area1",
  3866. type: "html",
  3867. style: style, // 亦可使用引入的外部css;
  3868. scanStyles: false,
  3869. });
  3870. this.openPrintJobSheet = false;
  3871. },
  3872. // 新增附件上传
  3873. addRelevt() {
  3874. this.relevantAttachments.push({
  3875. fUrl: null,
  3876. fName: null,
  3877. createBy: this.form.createBy,
  3878. createTime: Date.parse(new Date()),
  3879. });
  3880. },
  3881. // 新增作业费协议
  3882. addAgreement(status,kye) {
  3883. this.costStatus = status
  3884. if (this.dataList.length === 0 || !this.dataList[0].fGoodsid) {
  3885. this.$message({ message: "请维护库存明细,或第一行品名", type: "warning", });
  3886. return false
  3887. }
  3888. if (!this.form.fCorpid) {
  3889. this.$message({ message: "请维护货权方", type: "warning", });
  3890. return false
  3891. }
  3892. this.whgenlegList = []
  3893. this.dialogWhgenlegList = []
  3894. this.whgenlegTotal = 0
  3895. this.warehousingagreements = true
  3896. this.getWhgenlegListt(kye)
  3897. },
  3898. // 新增仓储费协议
  3899. addStorages() {
  3900. if (!this.form.fCorpid) {
  3901. this.$message({ message: "请维护货权方", type: "warning", });
  3902. return false
  3903. }
  3904. this.whgenlegList = [];
  3905. this.dialogWhgenlegList = [];
  3906. this.whgenlegTotal = 0;
  3907. this.storageAgreements = true;
  3908. this.getAgreement();
  3909. },
  3910. // 查询仓储费协议
  3911. getAgreement() {
  3912. this.queryParams.fCorpid = this.form.fCorpid;
  3913. listAgreements(this.queryParams).then((response) => {
  3914. this.tasklegList = response.rows;
  3915. this.whgenlegTotal = response.total;
  3916. });
  3917. },
  3918. // 查询作业费信息
  3919. getWhgenlegListt(kye) {
  3920. let daTa = []
  3921. let fTaskType = kye
  3922. if (kye == 2){
  3923. this.Navigation = true
  3924. daTa = {
  3925. pageNum:1,
  3926. pageSize:10,
  3927. fTaskType:Number(fTaskType),
  3928. fLabour:this.form.fLabour
  3929. }
  3930. this.ueryTO(daTa)
  3931. }else if (kye == 1) {
  3932. this.Navigation = true
  3933. daTa = {
  3934. pageNum:1,
  3935. pageSize:10,
  3936. fTaskType:Number(fTaskType),
  3937. fFleet:this.form.fFleet,
  3938. fBilltype:'CKDB'
  3939. }
  3940. this.ueryTO(daTa)
  3941. }else {
  3942. this.Navigation = false
  3943. daTa = {
  3944. pageNum:1,
  3945. pageSize:10,
  3946. fCorpid:this.form.fCorpid
  3947. }
  3948. this.ueryTO(daTa)
  3949. }
  3950. },
  3951. ueryTO(daTa){
  3952. operationAgreement(daTa).then((response) => {
  3953. this.tasklegList = response.rows;
  3954. this.whgenlegTotal = response.total;
  3955. });
  3956. },
  3957. // 导入付款信息
  3958. whgenlegDatas() {
  3959. if (this.dialogWhgenlegList.length === 0) {
  3960. this.$message({
  3961. message: "请选择需要导入的数据",
  3962. type: "warning",
  3963. });
  3964. } else {
  3965. for (let whgen in this.dialogWhgenlegList) {
  3966. let feeId = this.dialogWhgenlegList[whgen].feeFId;
  3967. getFees(feeId).then((response) => {
  3968. this.fWbuOptions.push(response.data);
  3969. });
  3970. this.warehouseDrList.push({
  3971. fCorpid: this.dialogWhgenlegList[whgen].fCorpid,
  3972. fFeeid: feeId,
  3973. fFeeUnitid: this.dialogWhgenlegList[whgen].fFeeUnitid + "",
  3974. fUnitprice: this.dialogWhgenlegList[whgen].fPrice,
  3975. fCurrency: "RMB",
  3976. fExrate: 1,
  3977. fTaxrate: this.fTaxrate
  3978. });
  3979. }
  3980. this.warehousingagreements = false;
  3981. }
  3982. },
  3983. // 导出作业费
  3984. zhgenlegData() {
  3985. if (this.dialogWhgenlegList.length === 0) {
  3986. this.$message({ message: "请选择需要导入的数据", type: "warning", });
  3987. return false
  3988. }
  3989. for (let zhgen in this.dialogWhgenlegList) {
  3990. let haveGoods = false
  3991. let feeId = this.dialogWhgenlegList[zhgen].feeFId
  3992. if (this.fWbuOptions.length !== 0) {
  3993. for (let wbu in this.fWbuOptions) {
  3994. if (this.fWbuOptions[wbu].fId === feeId) {
  3995. haveGoods = true
  3996. break
  3997. }
  3998. }
  3999. }
  4000. getFees(feeId).then((response) => {
  4001. this.fWbuOptions = []
  4002. let queryParams = { pageNum: 1,};
  4003. listFees(queryParams).then((response) => {
  4004. this.fWbuOptions = response.rows;
  4005. });
  4006. })
  4007. // if (!haveGoods) {
  4008. // getFees(feeId).then((response) => {
  4009. // this.fWbuOptions.push(response.data)
  4010. // })
  4011. // }
  4012. let qty = 1;
  4013. if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 1) {
  4014. qty = this.fQty
  4015. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 2) {
  4016. qty = (this.fGrossweight/1000).toFixed(2)
  4017. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 3) {
  4018. qty = (this.fNetweight/1000).toFixed(2)
  4019. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 4) {
  4020. qty = this.fVolumn
  4021. }
  4022. // qty=(qty/1000).toFixed(2);
  4023. let fAmount = parseFloat(Number(this.dialogWhgenlegList[zhgen].fPrice) * Number(qty)).toFixed(2)
  4024. if (this.costStatus === 'Cr') {
  4025. this.warehouseCrList.push({
  4026. fQty: qty,
  4027. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  4028. fFeeid: feeId,
  4029. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid + '',
  4030. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  4031. fCurrency: 'RMB',
  4032. fExrate: 1,
  4033. fAmount: fAmount,
  4034. fTaxrate: this.fTaxrate,
  4035. fMblno:this.form.fMblno,
  4036. fProductName:this.form.fProductName,
  4037. fMarks:this.form.fMarks,
  4038. fBusinessType:this.$set(this.warehouseCrList,'fBusinessType',this.form.fBusinessType),
  4039. fSrcTypeId:this.dialogWhgenlegList[zhgen].fId
  4040. })
  4041. let queryParams = { pageNum: 1, fDc:'C'};
  4042. listFees(queryParams).then((response) => {
  4043. this.fCNameOptions = response.rows;
  4044. });
  4045. } else {
  4046. this.warehouseDrList.push({
  4047. fQty: qty,
  4048. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  4049. fFeeid: feeId,
  4050. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid + '',
  4051. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  4052. fCurrency: 'RMB',
  4053. fExrate: 1,
  4054. fAmount: fAmount,
  4055. fTaxrate: this.fTaxrate,
  4056. fMblno:this.form.fMblno,
  4057. fProductName:this.form.fProductName,
  4058. fMarks:this.form.fMarks,
  4059. fBusinessType:this.$set(this.warehouseDrList,'fBusinessType',this.form.fBusinessType),
  4060. fSrcTypeId:this.dialogWhgenlegList[zhgen].fId
  4061. })
  4062. let queryParams = { pageNum: 1, fDc:'D'};
  4063. listFees(queryParams).then((response) => {
  4064. this.fDNameOptions = response.rows;
  4065. });
  4066. }
  4067. }
  4068. this.warehousingagreements = false
  4069. },
  4070. // 新增list
  4071. addRelevant() {
  4072. this.$refs['form'].validate((valid) => {
  4073. if (valid) {
  4074. this.whgenlegList = [];
  4075. this.dialogWhgenlegList = [];
  4076. this.whgenlegTotal = 0;
  4077. this.whgenlegVisible = true;
  4078. this.getWhgenlegList();
  4079. }
  4080. })
  4081. },
  4082. // 库存总账导出数据
  4083. whgenlegData() {
  4084. if (this.dialogWhgenlegList.length === 0) {
  4085. this.$message({ message: "未勾选信息", type: "warning" });
  4086. return false;
  4087. }
  4088. for (let whgen in this.dialogWhgenlegList) {
  4089. if (!this.form.fMblno || this.form.fMblno === "") {
  4090. this.$set(this.form, "fMblno", this.dialogWhgenlegList[whgen].fMblno);
  4091. }
  4092. let fTruckno = null
  4093. let fDriverTel = null
  4094. let fDriverName = null
  4095. let fDriverIdCar = null
  4096. if (this.form.fTruckno) {
  4097. fTruckno = this.form.fTruckno
  4098. }
  4099. if (this.form.fDriverTel) {
  4100. fDriverTel = this.form.fDriverTel
  4101. }
  4102. if (this.form.fDriverName) {
  4103. fDriverName = this.form.fDriverName
  4104. }
  4105. if (this.form.fDriverIdCar) {
  4106. fDriverIdCar = this.form.fDriverIdCar
  4107. }
  4108. this.dataList.push({
  4109. fBsdate: this.form.fBsdate,
  4110. fId: null,
  4111. fCntrtype: null,
  4112. fGrossweight: 0,
  4113. fNetweight: 0,
  4114. fQty: 0,
  4115. fCntqty: 1,
  4116. fIsPass: 'F',
  4117. fGoodsval: null,
  4118. fBillstatus: 10,
  4119. fTruckno: fTruckno,
  4120. fDriverTel: fDriverTel,
  4121. fDriverName: fDriverName,
  4122. fDriverIdCar: fDriverIdCar,
  4123. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  4124. fMarks: this.dialogWhgenlegList[whgen].fMarks,
  4125. fCntrno: this.dialogWhgenlegList[whgen].fCntrno,
  4126. fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
  4127. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  4128. fVolumn: this.dialogWhgenlegList[whgen].fVolumnblc,
  4129. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  4130. fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
  4131. fChargedate: this.dialogWhgenlegList[whgen].fChargedate,
  4132. fOrgwarehouseInformation: this.dialogWhgenlegList[whgen].fWarehouseids,
  4133. fPackagespecs: this.dialogWhgenlegList[whgen].fPackagespecs,
  4134. fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
  4135. fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
  4136. fBusinessType: this.dialogWhgenlegList[whgen].fBusinessType + '',
  4137. fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
  4138. fOriginalbilldate: this.dialogWhgenlegList[whgen].fOriginalbilldate,
  4139. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  4140. fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  4141. fWarehouseLocationids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  4142. fTransferWarehouselocid: null,
  4143. remark: null,
  4144. });
  4145. }
  4146. this.updateDeduplication()
  4147. this.whgenlegVisible = false;
  4148. },
  4149. // 作业单打印
  4150. printJobSheet() {
  4151. if (this.printinglist.length <= 0) {
  4152. this.$message.error("请维护出库明细!");
  4153. return false;
  4154. }
  4155. let fTruckno = this.printinglist[0].fTruckno
  4156. let fDriverName = this.printinglist[0].fDriverName
  4157. for (let warehouseCr in this.printinglist) {
  4158. if(!this.printinglist[warehouseCr].fId) {
  4159. this.$message.error("请先保存!");
  4160. return false;
  4161. } else if (this.printinglist[warehouseCr].fTransferWarehouselocid === this.printinglist[warehouseCr].fWarehouselocid) {
  4162. this.$message.error('调拨库区不得与原库区相同')
  4163. return false
  4164. } else if (!this.printinglist[warehouseCr].fTruckno || this.printinglist[warehouseCr].fTruckno !== fTruckno) {
  4165. this.$message.error('请填写车号或选择车相同车号')
  4166. return false
  4167. // } else if (!this.printinglist[warehouseCr].fDriverName || this.printinglist[warehouseCr].fDriverName !== fDriverName) {
  4168. // this.$message.error('请填写司机姓名选择相同司机姓名')
  4169. // return false
  4170. // } else if (!this.printinglist[warehouseCr].fDriverTel) {
  4171. // this.$message.error('请选填写司机电话')
  4172. // return false
  4173. // } else if (!this.printinglist[warehouseCr].fDriverIdCar) {
  4174. // this.$message.error('请选填写司机身份证')
  4175. // return false
  4176. } else if (!this.printinglist[warehouseCr].fTransferWarehouselocid) {
  4177. this.$message.error('请输入调入库位')
  4178. return false
  4179. }
  4180. for (let opt in this.fStorageTypeOptions) {
  4181. if (this.fStorageTypeOptions[opt].dictValue === this.printinglist[warehouseCr].fBusinessType) {
  4182. this.$set(this.printinglist[warehouseCr], 'fBusinessTypes', this.fStorageTypeOptions[opt].dictLabel)
  4183. break
  4184. }
  4185. }
  4186. }
  4187. if (this.dataWithdrawList.length > 0 || this.dataListSelection.length > 0) {
  4188. for (let item in this.warehouseOptions) {
  4189. if (this.form.fInwarehouseid == this.warehouseOptions[item].fId) {
  4190. this.fAddr = this.warehouseOptions[item].fAddr
  4191. }
  4192. }
  4193. }
  4194. // 获取业务日期
  4195. var date = new Date(this.form.fBsdate)
  4196. var Y = date.getFullYear() + '-'
  4197. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
  4198. var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
  4199. this.form.fBsdates = Y + M + D
  4200. if (this.feelDrSelection.length !== 0) {
  4201. for (let dr in this.feelDrSelection) {
  4202. for (let opt in this.fWbuOptions) {
  4203. if (this.fWbuOptions[opt].fId === this.feelDrSelection[dr].fFeeid) {
  4204. this.$set(this.feelDrSelection[dr], 'fFeeName', this.fWbuOptions[opt].fName)
  4205. break
  4206. }
  4207. }
  4208. }
  4209. }
  4210. setTimeout(() => {
  4211. this.openPrintJobSheet = true
  4212. this.fBstime = this.form.fBstime
  4213. }, 200);
  4214. for(let item in this.businessTypeOption){
  4215. if(this.form.fBusinessType == this.businessTypeOption[item].dictValue){
  4216. this.businessType = this.businessTypeOption[item].dictLabel
  4217. }
  4218. }
  4219. this.fSerialNumber = this.printinglist[0].fSerialNumber
  4220. },
  4221. // 收款信息
  4222. addCollection() {
  4223. this.$refs['form'].validate((valid) => {
  4224. if (valid) {
  4225. if (this.form.fBusinessType == null) {
  4226. this.$message.error("请维护作业类型")
  4227. return false
  4228. } else {
  4229. this.warehouseDrList.push({
  4230. fcorpid: this.form.fCorpid,
  4231. ffeeid: null,
  4232. fFeeunitid: '',
  4233. fQty: '',
  4234. funitprice: '',
  4235. fAmount: 0,
  4236. fCurrency: "RMB",
  4237. fExrate: 1,
  4238. fTaxrate: this.fTaxrate,
  4239. remarks: null,
  4240. fMblno: this.form.fMblno,
  4241. fProductName: this.form.fProductName,
  4242. fMarks: this.form.fMarks,
  4243. fBusinessType: this.form.fBusinessType,
  4244. fSrcTypeId: 0
  4245. });
  4246. this.fWbuOptions = []
  4247. let queryParams = { pageNum: 1, fDc: 'D' };
  4248. listFees(queryParams).then((response) => {
  4249. this.fDNameOptions = response.rows;
  4250. });
  4251. }
  4252. }
  4253. })
  4254. },
  4255. addpayment() {
  4256. this.$refs['form'].validate((valid) => {
  4257. if (valid) {
  4258. if (this.form.fBusinessType == null) {
  4259. this.$message.error("请维护作业类型")
  4260. return false
  4261. } else {
  4262. this.warehouseCrList.push({
  4263. fcorpid: this.form.fCorpid,
  4264. ffeeid: null,
  4265. fFeeunitid: '',
  4266. fQty: '',
  4267. funitprice: '',
  4268. fAmount: 0,
  4269. fCurrency: "RMB",
  4270. fExrate: 1,
  4271. fTaxrate: this.fTaxrate,
  4272. remarks: null,
  4273. fMblno: this.form.fMblno,
  4274. fProductName: this.form.fProductName,
  4275. fMarks: this.form.fMarks,
  4276. fBusinessType: this.form.fBusinessType,
  4277. fSrcTypeId: 0
  4278. });
  4279. this.fWbuOptions = []
  4280. let queryParams = { pageNum: 1, fDc: 'C' };
  4281. listFees(queryParams).then((response) => {
  4282. this.fCNameOptions = response.rows;
  4283. });
  4284. }
  4285. }
  4286. })
  4287. },
  4288. queryUser() {
  4289. queryUserVal().then((response) => {
  4290. if (response.user !== null) {
  4291. this.userVal = response.user;
  4292. this.$set(this.form, "fDeptid", this.userVal.deptId);
  4293. this.$set(this.form, "createBy", this.userVal.userName);
  4294. this.$set(this.form,"fStorekeeper",this.userVal.nickName)
  4295. this.$set(this.form, "fIfdamage", "1");
  4296. this.$set(this.form, "fIfweigh", "1");
  4297. // this.$set(this.form, "fTrademodeid", "1");
  4298. this.$set(this.form, "createTime", Date.parse(new Date()));
  4299. }
  4300. if (response.dept !== null) {
  4301. this.deptOptions = [];
  4302. this.deptOptions.push(response.dept);
  4303. }
  4304. });
  4305. },
  4306. /** 查询仓库主(出入库)列表 */
  4307. getList() {
  4308. let queryParams = { pageNum: 1, fTypeid: 6}
  4309. listCorps(queryParams).then((response) => {
  4310. this.fCompanyOptIons = response.rows;
  4311. });
  4312. let params = { pageNum: 1, fTypeid: 2}
  4313. listCorps(params).then((response) => {
  4314. this.fleetOptions = response.rows;
  4315. });
  4316. this.loading = true;
  4317. getStockTransferList(this.queryParams).then((response) => {
  4318. this.warehousebillsList = response.rows;
  4319. this.total = response.total;
  4320. this.loading = false;
  4321. });
  4322. },
  4323. // 查询库存总账信息
  4324. getWhgenlegList() {
  4325. this.whgenlegParams.fMblno = this.form.fMblno;
  4326. this.whgenlegParams.fCorpid = this.form.fCorpid;
  4327. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
  4328. this.whgenlegParams.fWarehouseid = this.form.fInwarehouseid
  4329. listWhgenleg(this.whgenlegParams).then((response) => {
  4330. this.whgenlegList = response.rows;
  4331. this.whgenlegTotal = response.total;
  4332. });
  4333. },
  4334. // 作业类型(数据字典),对应st_in_type 字典翻译
  4335. fBusinessTypeFormat(row,column){
  4336. return this.selectDictLabel(this.businessTypeOption, row.fBusinessType);
  4337. },
  4338. // 贸易方式(数据字典),对应t_trademodels 字典翻译
  4339. fTrademodeidFormat(row, column) {
  4340. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  4341. },
  4342. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  4343. fIfweighFormat(row, column) {
  4344. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  4345. },
  4346. // 是否破损(数据字典),默认F否则T字典翻译
  4347. fIfdamageFormat(row, column) {
  4348. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  4349. },
  4350. // 单据类型(数据字典)SJRK字典翻译
  4351. fBilltypeFormat(row, column) {
  4352. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  4353. },
  4354. // 状态(数据字典),N 入字典翻译
  4355. fBillstatusFormat(row, column) {
  4356. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  4357. },
  4358. // 取消按钮
  4359. cancel() {
  4360. this.open = false;
  4361. this.reset();
  4362. },
  4363. // 表单重置
  4364. reset() {
  4365. this.form = {
  4366. fId: null,
  4367. fBillno: null,
  4368. fCustomsdeclartion: null,
  4369. fOriginalbillno: null,
  4370. fDeptid: null,
  4371. fBsdeptid: null,
  4372. fContacts: null,
  4373. fTel: null,
  4374. fCorpid: null,
  4375. fTocorpid: null,
  4376. fStltypeid: null,
  4377. fBscorpno: null,
  4378. fWarehouseid: null,
  4379. fStorekeeper: null,
  4380. fBsdate: null,
  4381. fPlanqty: null,
  4382. fPlangrossweight: null,
  4383. fPlannetweight: null,
  4384. fPlanvolumn: null,
  4385. fQty: null,
  4386. fGrossweight: null,
  4387. fNetweight: null,
  4388. fVolumn: null,
  4389. fTrademodeid: null,
  4390. fNewTrademodeid:null,
  4391. fSbu: null,
  4392. fFeetunit: null,
  4393. fMblno: null,
  4394. fVslvoy: null,
  4395. fEta: null,
  4396. fCustomno: null,
  4397. fIfweigh: null,
  4398. fIfpledge: null,
  4399. fIfdamage: null,
  4400. fBankcorpid: null,
  4401. fBilltype: null,
  4402. fBillstatus: null,
  4403. delFlag: null,
  4404. createBy: null,
  4405. createTime: null,
  4406. updateBy: null,
  4407. updateTime: null,
  4408. remark: null,
  4409. fCreateby: null,
  4410. fCreatetime: null,
  4411. fGoodsid: null,
  4412. fCntrtype: null,
  4413. fCntqty: null,
  4414. };
  4415. this.deptOptions = [];
  4416. this.userOptions = [];
  4417. this.fSbuOptions = [];
  4418. this.fWbuOptions = [];
  4419. this.goodsOptions = [];
  4420. this.KHblnoOptions = [];
  4421. this.fMblnoOptions = [];
  4422. this.kqhouseOptions = [];
  4423. this.approve = false
  4424. this.disappear = false
  4425. this.addOrUpdateVisible = false
  4426. this.addOrUpdateVisib = false
  4427. this.formBrowseStatus = false
  4428. this.detailsHidden = false
  4429. this.warehousingagreements = false
  4430. this.browseStatus = false
  4431. this.editDialogClosed_ss = false
  4432. this.openPrintJobSheet = false
  4433. this.whgenlegVisible = false
  4434. this.resetForm("form");
  4435. },
  4436. /** 搜索按钮操作 */
  4437. handleQuery() {
  4438. this.queryParams.pageNum = 1;
  4439. this.getList();
  4440. },
  4441. /** 重置按钮操作 */
  4442. resetQuery() {
  4443. this.queryParams = {
  4444. fBillno:null,
  4445. createBy:null,
  4446. timeInterval:null,
  4447. fTrademodeid:null,
  4448. fNewTrademodeid:null,
  4449. fCorpid:null,
  4450. fMblno:null,
  4451. fSbu:null,
  4452. fGoodsid:null,
  4453. fWarehouseid:null,
  4454. fMarks:null,
  4455. fBillstatus:null
  4456. }
  4457. this.resetForm("queryForm");
  4458. this.handleQuery();
  4459. },
  4460. // 多选框选中数据
  4461. handleSelectionChange(selection) {
  4462. this.ids = selection;
  4463. // this.ids = selection.map((item) => item.fId);
  4464. this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6 || selection.map((item) => item.fBillstatus) == 4;
  4465. this.multiple = !selection.length;
  4466. },
  4467. // 库存总账多选框
  4468. whgenlegSelectionChange(selection) {
  4469. this.dialogWhgenlegList = selection;
  4470. },
  4471. /** 新增按钮操作 */
  4472. handleAdd(status) {
  4473. this.Operator = ''
  4474. this.Lander = ''
  4475. this.warehousesssMethod()
  4476. this.reset();
  4477. this.browseStatus = status;
  4478. this.contrOl = status;
  4479. this.notChange = false
  4480. this.queryUser();
  4481. this.open = true;
  4482. this.detailsHidden = false;
  4483. this.dataList = [];
  4484. this.warehouseCrList = [];
  4485. this.warehouseDrList = [];
  4486. this.relevantAttachments = [];
  4487. this.title = "调拨单";
  4488. this.formBrowseStatus = false;
  4489. this.form = {
  4490. fBstime:new Date(),
  4491. type:2
  4492. }
  4493. console.log(this.Operator,this.Lander)
  4494. },
  4495. check_s(row,status){
  4496. let queryParams = { pageNum: 1, fDc:'C'};
  4497. listFees(queryParams).then((response) => {
  4498. this.fCNameOptions = response.rows;
  4499. });
  4500. let query = { pageNum: 1, fDc:'D'};
  4501. listFees(query).then((response) => {
  4502. this.fDNameOptions = response.rows;
  4503. });
  4504. // this.disappear = true
  4505. // this.notChange = true
  4506. this.reset();
  4507. this.contrOl = true
  4508. this.browseStatus = status;
  4509. this.detailsHidden = false;
  4510. let data = row || this.ids;
  4511. getStockTransfer(data.fId).then((response) => {
  4512. this.Operator = response.data.corps[0].createBy
  4513. if (response.data.warehousebills) {
  4514. this.form = response.data.warehousebills;
  4515. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  4516. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  4517. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  4518. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  4519. this.$set(this.form, "fNewTrademodeid", this.form.fNewTrademodeid + '');
  4520. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  4521. }
  4522. if (response.data.corps) {
  4523. this.fMblnoOptions = response.data.corps;
  4524. this.KHblnoOptions = response.data.corps;
  4525. this.fSbuOptions = response.data.corps;
  4526. }
  4527. if (response.data.feesList) {
  4528. this.fWbuOptions = response.data.feesList;
  4529. }
  4530. if (response.data.warehouse) {
  4531. this.warehouseOptions = response.data.warehouse;
  4532. }
  4533. if (response.data.warehouseBillsItem) {
  4534. this.dataList = response.data.warehouseBillsItem;
  4535. for (let list in this.dataList) {
  4536. if (!this.form.fMblno) {
  4537. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  4538. }
  4539. if (this.dataList[list].fBillstatus >= 6) {
  4540. this.formBrowseStatus = true;
  4541. }
  4542. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  4543. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  4544. }
  4545. }
  4546. if (response.data.enclosures) {
  4547. this.relevantAttachments = response.data.enclosures;
  4548. }
  4549. if (response.data.warehouse) {
  4550. this.warehouseDrList = response.data.warehousebillsfeesDr;
  4551. for (let dr in this.warehouseDrList) {
  4552. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  4553. }
  4554. }
  4555. if (response.data.warehousebillsfeesCr) {
  4556. this.warehouseCrList = response.data.warehousebillsfeesCr;
  4557. for (let cr in this.warehouseCrList) {
  4558. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  4559. }
  4560. }
  4561. // if (response.data.sysUser) {
  4562. // // this.userVal = response.data.sysUser
  4563. // this.userOptions = response.data.sysUser;
  4564. // console.log(response.data.sysUser)
  4565. // console.log(response.data.sysUser)
  4566. // }
  4567. if (response.data.dept) {
  4568. this.deptOptions = []
  4569. this.deptOptions.push(response.data.dept)
  4570. }
  4571. if (response.data.feesList) {
  4572. this.fWbuOptions = response.data.feesList;
  4573. }
  4574. if (response.data.goodsList) {
  4575. this.goodsOptions = response.data.goodsList;
  4576. }
  4577. if (response.data.warehouse) {
  4578. this.warehouseOptions = response.data.warehouse;
  4579. }
  4580. if (response.data.warehouseAreas) {
  4581. this.kqhouseOptions = response.data.warehouseAreas;
  4582. }
  4583. this.open = true;
  4584. this.title = "修改调拨";
  4585. });
  4586. },
  4587. check(row,status,res){
  4588. let queryParams = { pageNum: 1, fDc:'C'};
  4589. listFees(queryParams).then((response) => {
  4590. this.fCNameOptions = response.rows;
  4591. });
  4592. let query = { pageNum: 1, fDc:'D'};
  4593. listFees(query).then((response) => {
  4594. this.fDNameOptions = response.rows;
  4595. });
  4596. this.reset();
  4597. this.contrOl = true
  4598. this.disappear = false
  4599. this.notChange = true
  4600. this.browseStatus = status;
  4601. this.detailsHidden = false;
  4602. let data = row || this.ids;
  4603. getStockTransfer(data.fId).then((response) => {
  4604. this.Operator = response.data.corps[0].createBy
  4605. if (response.data.warehousebills) {
  4606. this.form = response.data.warehousebills;
  4607. if (this.form.fBillstatus > 2) {
  4608. this.approvalStatus = false;
  4609. }
  4610. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  4611. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  4612. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  4613. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  4614. this.$set(this.form, "fNewTrademodeid", this.form.fNewTrademodeid + '');
  4615. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  4616. }
  4617. if (response.data.corps) {
  4618. this.fMblnoOptions = response.data.corps;
  4619. this.KHblnoOptions = response.data.corps;
  4620. this.fSbuOptions = response.data.corps;
  4621. }
  4622. if (response.data.feesList) {
  4623. this.fWbuOptions = response.data.feesList;
  4624. }
  4625. if (response.data.warehouse) {
  4626. this.warehouseOptions = response.data.warehouse;
  4627. }
  4628. if (response.data.warehouseBillsItem) {
  4629. this.dataList = response.data.warehouseBillsItem;
  4630. for (let list in this.dataList) {
  4631. if (!this.form.fMblno) {
  4632. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  4633. }
  4634. if (this.dataList[list].fBillstatus >= 6) {
  4635. this.formBrowseStatus = true;
  4636. }
  4637. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  4638. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  4639. }
  4640. }
  4641. if (response.data.enclosures) {
  4642. this.relevantAttachments = response.data.enclosures;
  4643. }
  4644. if (response.data.warehouse) {
  4645. this.warehouseDrList = response.data.warehousebillsfeesDr;
  4646. }
  4647. if (response.data.warehousebillsfeesDr) {
  4648. this.warehouseDrList = response.data.warehousebillsfeesDr;
  4649. for (let dr in this.warehouseDrList) {
  4650. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  4651. }
  4652. }
  4653. if (response.data.warehousebillsfeesCr) {
  4654. this.warehouseCrList = response.data.warehousebillsfeesCr;
  4655. for (let cr in this.warehouseCrList) {
  4656. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
  4657. }
  4658. }
  4659. if (response.data.sysUser) {
  4660. this.userVal = response.data.sysUser
  4661. // this.userOptions = response.data.sysUser;
  4662. }
  4663. if (response.data.dept) {
  4664. this.deptOptions = []
  4665. this.deptOptions.push(response.data.dept)
  4666. }
  4667. if (response.data.feesList) {
  4668. this.fWbuOptions = response.data.feesList;
  4669. }
  4670. if (response.data.goodsList) {
  4671. this.goodsOptions = response.data.goodsList;
  4672. }
  4673. if (response.data.warehouse) {
  4674. this.warehouseOptions = response.data.warehouse;
  4675. }
  4676. if (response.data.warehouseAreas) {
  4677. this.kqhouseOptions = response.data.warehouseAreas;
  4678. }
  4679. this.open = true;
  4680. this.title = "修改调拨";
  4681. });
  4682. },
  4683. /** 修改按钮操作 */
  4684. handleUpdate(row, status) {
  4685. let queryParams = { pageNum: 1, fDc:'C'};
  4686. listFees(queryParams).then((response) => {
  4687. this.fCNameOptions = response.rows;
  4688. });
  4689. let query = { pageNum: 1, fDc:'D'};
  4690. listFees(query).then((response) => {
  4691. this.fDNameOptions = response.rows;
  4692. });
  4693. this.reset();
  4694. this.browseStatus = status;
  4695. this.contrOl = status
  4696. this.detailsHidden = false;
  4697. this.formBrowseStatus = false;
  4698. let fId = row.fId || this.ids;
  4699. if (fId.length === 1){
  4700. fId = fId[0].fId
  4701. }
  4702. this.dataList = [];
  4703. getStockTransfer(fId).then((response) => {
  4704. console.log(response)
  4705. if (response.data.warehousebills) {
  4706. this.form = response.data.warehousebills;
  4707. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  4708. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  4709. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  4710. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  4711. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  4712. this.$set(this.form, "fNewTrademodeid",this.form.fNewTrademodeid + '');
  4713. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  4714. if(this.form.fBillstatus > 2){
  4715. this.approvalStatus = false
  4716. }else{
  4717. this.approvalStatus = true
  4718. }
  4719. }
  4720. if (response.data.corps) {
  4721. this.flabourOptions = response.data.corps;
  4722. this.fMblnoOptions = response.data.corps;
  4723. this.KHblnoOptions = response.data.corps;
  4724. this.fCompanyOptIons = response.data.corps;
  4725. this.fleetOptions = response.data.corps;
  4726. this.Operator = response.data.corps[0].createBy
  4727. }
  4728. if (response.data.feesList) {
  4729. this.fWbuOptions = response.data.feesList;
  4730. }
  4731. if (response.data.warehouse) {
  4732. this.warehouseOptions = response.data.warehouse;
  4733. }
  4734. if (response.data.warehouseBillsItem) {
  4735. this.dataList = response.data.warehouseBillsItem;
  4736. for (let list in this.dataList) {
  4737. if (!this.form.fMblno) {
  4738. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  4739. }
  4740. if (this.dataList[list].fBillstatus > 10) {
  4741. this.formBrowseStatus = true;
  4742. }
  4743. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  4744. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  4745. }
  4746. }
  4747. if (response.data.enclosures) {
  4748. this.relevantAttachments = response.data.enclosures;
  4749. }
  4750. if (response.data.warehouse) {
  4751. this.warehouseDrList = response.data.warehousebillsfeesDr;
  4752. }
  4753. if (response.data.warehousebillsfeesDr) {
  4754. this.warehouseDrList = response.data.warehousebillsfeesDr;
  4755. for (let dr in this.warehouseDrList) {
  4756. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  4757. }
  4758. }
  4759. if (response.data.warehousebillsfeesCr) {
  4760. this.warehouseCrList = response.data.warehousebillsfeesCr;
  4761. for (let cr in this.warehouseCrList) {
  4762. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
  4763. }
  4764. }
  4765. // if (response.data.sysUser) {
  4766. // // this.userVal = response.data.sysUser
  4767. // this.userOptions = response.data.sysUser;
  4768. //
  4769. // }
  4770. if (response.data.dept) {
  4771. this.deptOptions = []
  4772. this.deptOptions.push(response.data.dept)
  4773. }
  4774. if (response.data.feesList) {
  4775. this.fWbuOptions = response.data.feesList;
  4776. }
  4777. if (response.data.goodsList) {
  4778. this.goodsOptions = response.data.goodsList;
  4779. }
  4780. if (response.data.warehouse) {
  4781. this.warehouseOptions = response.data.warehouse;
  4782. }
  4783. if (response.data.warehouseAreas) {
  4784. this.kqhouseOptions = response.data.warehouseAreas;
  4785. }
  4786. this.open = true;
  4787. this.title = "修改调拨";
  4788. this.warehousesssMethod()
  4789. this.fWbuOptions = []
  4790. let queryParams = { pageNum: 1, };
  4791. listFees(queryParams).then((response) => {
  4792. this.fWbuOptions = response.rows;
  4793. });
  4794. this.register()
  4795. });
  4796. },
  4797. // 数量计算
  4798. changeContractAmt(row) {
  4799. let fQty = 0
  4800. let fUnitprice = 0
  4801. if (row.fUnitprice) {
  4802. fUnitprice = row.fUnitprice
  4803. }
  4804. if (row.fQty) {
  4805. fQty = row.fQty
  4806. }
  4807. this.$set(row, 'fAmount', parseFloat(Number(fUnitprice) * Number(fQty)).toFixed(2))
  4808. },
  4809. changefBsdate(row) {
  4810. if (this.dataList.length > 0) {
  4811. for (var i = 0; i < this.dataList.length; i++) {
  4812. this.$set(this.dataList[i], "fBsdate", row);
  4813. }
  4814. }
  4815. },
  4816. // change仓库
  4817. changefWarehouseid(row) {
  4818. for (let corp in this.warehouseOptions) {
  4819. if (row.fWarehouseid === this.warehouseOptions[corp].fId) {
  4820. this.fAddr = this.warehouseOptions[corp].fAddr;
  4821. this.$set(this.form, "fTel", this.warehouseOptions[corp].fTel);
  4822. this.$set(this.form, "fContacts", this.warehouseOptions[corp].fContacts);
  4823. }
  4824. }
  4825. },
  4826. // 选择按钮
  4827. collectionoptions(selection) {
  4828. this.feelDrSelection = selection
  4829. },
  4830. changefCorpid(row) {
  4831. this.$set(row, "fSbu", row.fCorpid);
  4832. for (let corp in this.fMblnoOptions) {
  4833. if (row.fCorpid === this.fMblnoOptions[corp].fId) {
  4834. this.$set(this.form, "fStltypeid", this.fMblnoOptions[corp].fStltypeid + "");
  4835. }
  4836. }
  4837. },
  4838. // 合计
  4839. getSummaries(param) {
  4840. const { columns, data } = param;
  4841. const sums = [];
  4842. var values = [];
  4843. columns.forEach((column, index) => {
  4844. if (index === 0) {
  4845. sums[index] = "合计";
  4846. return;
  4847. }
  4848. if (column.property === "fGrossweight") {
  4849. values = data.map((item) => Number(item["fGrossweight"]));
  4850. }
  4851. if (column.property === "fNetweight") {
  4852. values = data.map((item) => Number(item["fNetweight"]));
  4853. }
  4854. if (column.property === "fQty") {
  4855. values = data.map((item) => Number(item["fQty"]));
  4856. }
  4857. if (column.property === "fCntqty") {
  4858. values = data.map((item) => Number(item["fCntqty"]));
  4859. } // const values = data.map(item => Number(item[column.property]))
  4860. if (
  4861. column.property === "fGrossweight" ||
  4862. column.property === "fNetweight" ||
  4863. column.property === "fQty" ||
  4864. column.property === "fCntqty"
  4865. ) {
  4866. sums[index] = values.reduce((prev, curr) => {
  4867. const value = Number(curr);
  4868. if (!isNaN(value)) {
  4869. if (column.property === "fGrossweight") {
  4870. this.form.fGrossweight = prev + curr;
  4871. this.fGrossweight = prev + curr;
  4872. }
  4873. if (column.property === "fNetweight") {
  4874. this.form.fNetweight = prev + curr;
  4875. this.fNetweight = prev + curr;
  4876. }
  4877. if (column.property === "fVolumn") {
  4878. this.fVolumn = prev + curr;
  4879. }
  4880. if (column.property === "fQty") {
  4881. this.form.fQty = prev + curr;
  4882. this.fQty = prev + curr;
  4883. }
  4884. if (column.property === "fCntqty") {
  4885. this.fCntqty = prev + curr;
  4886. }
  4887. return prev + curr;
  4888. } else {
  4889. return prev;
  4890. }
  4891. }, 0);
  4892. sums[index] = sums[index].toFixed(2);
  4893. }
  4894. });
  4895. this.sums = sums;
  4896. return sums;
  4897. },
  4898. // 付款合计
  4899. warehouseDrSummaries(param) {
  4900. const { columns, data } = param;
  4901. const sums = [];
  4902. columns.forEach((column, index) => {
  4903. if (index === 0) {
  4904. sums[index] = "合计";
  4905. return;
  4906. }
  4907. const values = data.map((item) => Number(item[column.property]));
  4908. if (
  4909. column.property === "fUnitprice" ||
  4910. column.property === "fAmount" ||
  4911. column.property === "fQty" ||
  4912. column.property === "fQty"
  4913. ) {
  4914. sums[index] = values.reduce((prev, curr) => {
  4915. const value = Number(curr);
  4916. if (!isNaN(value)) {
  4917. return prev + curr;
  4918. } else {
  4919. return prev;
  4920. }
  4921. }, 0); // sums[index]
  4922. sums[index] = sums[index].toFixed(2);
  4923. }
  4924. });
  4925. return sums;
  4926. },
  4927. // 库存明细多选框结果
  4928. dataListChange(row) {
  4929. this.dataListSelection = row;
  4930. },
  4931. // 变更计价单位
  4932. changeFeeUnit(row) {
  4933. if (!row.fFeeunitid) {
  4934. return false
  4935. }
  4936. let fQty = 0;
  4937. let fGrossweight = 0;
  4938. let fNetweight = 0;
  4939. let fCntqty = 0;
  4940. let fixed = 1;
  4941. for (let li in this.dataList) {
  4942. if (this.dataList[li].fQty) {
  4943. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  4944. }
  4945. if (this.dataList[li].fGrossweight) {
  4946. fGrossweight = parseFloat(Number(fGrossweight) + Number(this.dataList[li].fGrossweight)).toFixed(2)
  4947. }
  4948. if (this.dataList[li].fNetweight) {
  4949. fNetweight = parseFloat(Number(fNetweight) + Number(this.dataList[li].fNetweight)).toFixed(2)
  4950. }
  4951. if (this.dataList[li].fCntqty) {
  4952. fCntqty = parseFloat(Number(fCntqty) + Number(this.dataList[li].fCntqty)).toFixed(2)
  4953. }
  4954. }
  4955. if (row.fFeeunitid == "1") {
  4956. this.$set(row, 'fQty', fQty)
  4957. } else if (row.fFeeunitid == "2") {
  4958. this.$set(row, 'fQty', (fNetweight/1000).toFixed(2))
  4959. }else if (row.fFeeunitid == "3") {
  4960. this.$set(row, 'fQty', (fGrossweight/1000).toFixed(2))
  4961. }else if (row.fFeeunitid == "7") {
  4962. this.$set(row, 'fQty', fCntqty)
  4963. }else {
  4964. this.$set(row, "fQty", 0);
  4965. }
  4966. if (row.fUnitprice) {
  4967. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  4968. }
  4969. },
  4970. // 调拨确认
  4971. creditClick() {
  4972. this.$refs["form"].validate((valid) => {
  4973. for (let warehouse in this.dataListSelection) {
  4974. if (!this.dataListSelection[warehouse].fId) {
  4975. this.$message.error("请先保存");
  4976. return false;
  4977. }
  4978. if (!this.dataListSelection[warehouse].fGrossweight) {
  4979. this.$message.error("请选择调拨毛重(kg)");
  4980. return false;
  4981. } else if (!this.dataListSelection[warehouse].fWarehouseInformation) {
  4982. this.$message.error("请选择调入库位");
  4983. return false;
  4984. } else if (this.dataListSelection[warehouse].fWarehouseInformation === this.dataListSelection[warehouse].fWarehouselocids) {
  4985. this.$message.error("调拨库区不得与原库区相同");
  4986. return false;
  4987. } else if (!this.dataListSelection[warehouse].fNetweight) {
  4988. this.$message.error("请选择调拨净重(kg)");
  4989. return false;
  4990. }
  4991. // else if (!this.dataListSelection[warehouse].fQty) {
  4992. // this.$message.error("请维护调拨件数");
  4993. // return false;
  4994. // }
  4995. }
  4996. if (valid) {
  4997. let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
  4998. let formData = new window.FormData();
  4999. formData.append("type", '2');
  5000. formData.append("warehouseBills", JSON.stringify(this.form));
  5001. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5002. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  5003. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5004. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5005. addWhgenleg(formData).then((response) => {
  5006. this.fid = response.data.fPid
  5007. this.dataWithdrawList = []
  5008. this.dataListSelection = []
  5009. this.msgSuccess('调拨成功')
  5010. this.$refs.tableList.clearSelection()
  5011. this.formBrowseStatus = true
  5012. for (let li in listSelection) {
  5013. for (let i in this.dataList) {
  5014. if (listSelection[li].fId === this.dataList[i].fId) {
  5015. this.$set(this.dataList[i], 'fBillstatus', 40)
  5016. break
  5017. }
  5018. }
  5019. }
  5020. getStockTransfer(this.form.fId).then((response) => {
  5021. if (response.data.warehousebills) {
  5022. this.form = response.data.warehousebills;
  5023. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  5024. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  5025. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  5026. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  5027. this.$set(this.form, "fNewTrademodeid", this.form.fNewTrademodeid + '');
  5028. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  5029. if(this.form.fBillstatus > 2){
  5030. this.approvalStatus = false
  5031. }else{
  5032. this.approvalStatus = true
  5033. }
  5034. }
  5035. if (response.data.corps) {
  5036. this.flabourOptions = response.data.corps;
  5037. this.fMblnoOptions = response.data.corps;
  5038. this.KHblnoOptions = response.data.corps;
  5039. this.fCompanyOptIons = response.data.corps;
  5040. this.fleetOptions = response.data.corps;
  5041. }
  5042. if (response.data.feesList) {
  5043. this.fWbuOptions = response.data.feesList;
  5044. }
  5045. if (response.data.warehouse) {
  5046. this.warehouseOptions = response.data.warehouse;
  5047. }
  5048. if (response.data.warehouseBillsItem) {
  5049. this.dataList = response.data.warehouseBillsItem;
  5050. for (let list in this.dataList) {
  5051. if (!this.form.fMblno) {
  5052. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  5053. }
  5054. if (this.dataList[list].fBillstatus > 10) {
  5055. this.formBrowseStatus = true;
  5056. }
  5057. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  5058. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  5059. }
  5060. }
  5061. if (response.data.enclosures) {
  5062. this.relevantAttachments = response.data.enclosures;
  5063. }
  5064. if (response.data.warehouse) {
  5065. this.warehouseDrList = response.data.warehousebillsfeesDr;
  5066. }
  5067. if (response.data.warehousebillsfeesDr) {
  5068. this.warehouseDrList = response.data.warehousebillsfeesDr;
  5069. for (let dr in this.warehouseDrList) {
  5070. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  5071. }
  5072. }
  5073. if (response.data.warehousebillsfeesCr) {
  5074. this.warehouseCrList = response.data.warehousebillsfeesCr;
  5075. for (let cr in this.warehouseCrList) {
  5076. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
  5077. }
  5078. }
  5079. // if (response.data.sysUser) {
  5080. // // this.userVal = response.data.sysUser
  5081. // this.userOptions = response.data.sysUser;
  5082. // }
  5083. if (response.data.dept) {
  5084. this.deptOptions = []
  5085. this.deptOptions.push(response.data.dept)
  5086. }
  5087. if (response.data.feesList) {
  5088. this.fWbuOptions = response.data.feesList;
  5089. }
  5090. if (response.data.goodsList) {
  5091. this.goodsOptions = response.data.goodsList;
  5092. }
  5093. if (response.data.warehouse) {
  5094. this.warehouseOptions = response.data.warehouse;
  5095. }
  5096. if (response.data.warehouseAreas) {
  5097. this.kqhouseOptions = response.data.warehouseAreas;
  5098. }
  5099. this.open = true;
  5100. this.title = "修改调拨";
  5101. this.warehousesssMethod()
  5102. });
  5103. //保存
  5104. this.$refs['form'].validate((valid) => {
  5105. // if (this.dataList.length === 0) {
  5106. // this.$message.error('请添加库存明细!')
  5107. // return false
  5108. // }
  5109. for (let list in this.dataList) {
  5110. this.changeStock(this.dataList[list])
  5111. }
  5112. if (valid) {
  5113. setTimeout(() => {
  5114. let formData = new window.FormData()
  5115. this.form.fItemsStatus = 4
  5116. formData.append("type", '2');
  5117. // this.dataList.fTransferWarehouselocid = this.treeselectList.fWarehouselocid
  5118. formData.append("warehouseBills", JSON.stringify(this.form));
  5119. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  5120. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5121. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5122. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5123. addStockTransfer(formData).then((response) => {
  5124. this.form = response.data.warehouseBills
  5125. this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
  5126. this.$set(this.form, 'fNewTrademodeid', this.form.fNewTrademodeid + '')
  5127. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  5128. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  5129. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  5130. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  5131. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  5132. this.dataList = response.data.warehousebillsitems
  5133. for (let li in this.dataList) {
  5134. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  5135. this.$set(this.dataList[li], 'fBusinessType', this.dataList[li].fBusinessType + '')
  5136. }
  5137. })
  5138. }, 200);
  5139. }
  5140. })
  5141. })
  5142. }
  5143. });
  5144. },
  5145. // 打印作业单
  5146. addList() {
  5147. this.$refs["form"].validate((valid) => {
  5148. if (valid) {
  5149. let dataList = []
  5150. for (let se in this.dataListSelection) {
  5151. if (Number(this.dataListSelection[se].fBillstatus) <= 10) {
  5152. dataList.push(this.dataListSelection[se])
  5153. }
  5154. }
  5155. if (dataList.length !== 0) {
  5156. let formData = new window.FormData();
  5157. formData.append("type", "2");
  5158. formData.append("warehouseBills", JSON.stringify(this.form));
  5159. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5160. formData.append("warehousebillsitems", JSON.stringify(dataList));
  5161. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5162. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5163. addJoblist(formData).then((response) => {
  5164. if (response.code == 200){
  5165. for (let li in response.data.warehousebillsitems) {
  5166. for (let item in this.printinglist) {
  5167. // if (this.Printinglist[item].fId == response.data.warehousebillsitems[li].fId) {
  5168. // this.Printinglist[item] = response.data.warehousebillsitems[li]
  5169. // }
  5170. if (!this.printinglist[0].fSerialNumber){
  5171. this.fSerialNumber = response.data.warehousebillsitems[0].fSerialNumber
  5172. }else {
  5173. this.fSerialNumber = this.printinglist[0].fSerialNumber
  5174. }
  5175. }
  5176. for(let index in this.dataList){
  5177. if(response.data.warehousebillsitems[li].fId == this.dataList[index].fId){
  5178. this.dataList[index].fSerialNumber = response.data.warehousebillsitems[li].fSerialNumber
  5179. this.dataList[index].fBillstatus = response.data.warehousebillsitems[li].fBillstatus
  5180. }
  5181. }
  5182. }
  5183. setTimeout(function(){
  5184. const style =
  5185. "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
  5186. print({
  5187. printable: "print_area1",
  5188. type: "html",
  5189. style: style, // 亦可使用引入的外部css;
  5190. scanStyles: false,
  5191. });
  5192. this.openPrintJobSheet = false;
  5193. },100);
  5194. }else {
  5195. return
  5196. }
  5197. })
  5198. }else {
  5199. this.printSomething()
  5200. }
  5201. }
  5202. });
  5203. },
  5204. // 撤回调拨
  5205. withdrawClick() {
  5206. for (let li in this.dataWithdrawList) {
  5207. if (this.dataWithdrawList[li].fBillstatus < 6) {
  5208. this.$message.error("所选信息中存在未调拨数据!");
  5209. return false
  5210. }
  5211. }
  5212. let formData = new window.FormData();
  5213. let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
  5214. formData.append("type","2");
  5215. formData.append("warehouseBills", JSON.stringify(this.form));
  5216. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5217. formData.append("warehousebillsitems", JSON.stringify(this.dataWithdrawList));
  5218. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5219. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5220. updateCredit(formData).then((response) => {
  5221. this.fid = response.data;
  5222. this.formBrowseStatus = false;
  5223. this.msgSuccess("撤销入账成功");
  5224. this.$refs.tableList.clearSelection();
  5225. let mun = 0;
  5226. for (let i in this.dataList) {
  5227. for (let li in withdrawList) {
  5228. if (withdrawList[li].fId === this.dataList[i].fId) {
  5229. this.$set(this.dataList[i], 'fBillstatus', 10)
  5230. }
  5231. }
  5232. if (this.dataList[i].fBillstatus && this.dataList[i].fBillstatus > 10) {
  5233. mun ++;
  5234. }
  5235. }
  5236. if (mun > 0) {
  5237. this.formBrowseStatus = true
  5238. } else {
  5239. this.formBrowseStatus = false
  5240. }
  5241. });
  5242. },
  5243. // 装货按钮
  5244. discharge() {
  5245. if (this.printinglist.length <= 0) {
  5246. this.$message.error("请选择需要装货的明细!");
  5247. return false
  5248. }
  5249. if(this.printinglist.length > 0){
  5250. if(this.dataListSelection) {
  5251. for (let li in this.dataListSelection) {
  5252. if (!this.dataListSelection[li].fId) {
  5253. this.$message.error('请先保存!')
  5254. return false
  5255. } else if (this.dataListSelection[li].fBillstatus === 10) {
  5256. this.$message.error('请先打印')
  5257. return false
  5258. }
  5259. if (this.dataListSelection[li].fBillstatus >= 30) {
  5260. this.$message.error('请勿重复装货')
  5261. return false
  5262. }
  5263. }
  5264. }
  5265. if(this.dataWithdrawList){
  5266. for(let li in this.dataWithdrawList){
  5267. if (this.dataWithdrawList[li].fBillstatus >= 30) {
  5268. this.$message.error('请勿重复装货')
  5269. return false
  5270. }
  5271. }
  5272. }
  5273. }
  5274. this.$refs['form'].validate((valid) => {
  5275. if (valid) {
  5276. let withdrawList = JSON.parse(JSON.stringify(this.dataListSelection))
  5277. let formData = new window.FormData()
  5278. formData.append("warehouseBills", JSON.stringify(this.form));
  5279. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5280. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  5281. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5282. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5283. for (let li in this.dataListSelection) {
  5284. this.dataListSelection[li].fBillstatus = 30
  5285. }
  5286. this.formBrowseStatus = true
  5287. this.$refs.tableList.clearSelection()
  5288. disChargelist(formData).then((response) => {
  5289. for (let li in withdrawList) {
  5290. for (let i in this.dataList) {
  5291. if (withdrawList[li].fId === this.dataList[i].fId) {
  5292. this.$set(this.dataList[i], 'fBillstatus', 30)
  5293. break
  5294. }
  5295. }
  5296. }
  5297. this.msgSuccess('装货成功')
  5298. })
  5299. }
  5300. })
  5301. },
  5302. // 付款信息计价单位合计
  5303. getwarehouseCrList(param) {
  5304. const { columns, data } = param
  5305. const sums = []
  5306. var values = []
  5307. columns.forEach((column, index) => {
  5308. if (index === 0) {
  5309. sums[index] = "合计";
  5310. return;
  5311. }
  5312. if (index === 3) {
  5313. // values = data.map((item) => Number(item["fFeeUnitid"]));
  5314. sums[index] = this.fFeeUnitids;
  5315. return;
  5316. }
  5317. });
  5318. this.sums = sums;
  5319. return sums;
  5320. },
  5321. // 库存明细多选
  5322. selectinventory(selection) {
  5323. for(let item in selection){
  5324. if(selection[item].fBillstatus > '20'){
  5325. this.browseStatu = true
  5326. }else{
  5327. this.browseStatu = false
  5328. }
  5329. }
  5330. this.dataWithdrawList = [];
  5331. this.dataListSelection = [];
  5332. this.printinglist = selection;
  5333. if (!selection || selection.length === 0) {
  5334. return false
  5335. }
  5336. for (let se in selection) {
  5337. if (!selection[se].fBillstatus || selection[se].fBillstatus !== 40) {
  5338. this.dataListSelection.push(selection[se])
  5339. } else if (selection[se].fBillstatus && selection[se].fBillstatus === 40) {
  5340. this.dataWithdrawList.push(selection[se])
  5341. }
  5342. }
  5343. this.fTruckno = selection[0].fTruckno
  5344. this.fCntrtype = selection[0].fCntrtype
  5345. this.fGoodsids = selection[0].fGoodsids
  5346. },
  5347. // 更新主表品名并去重
  5348. updateDeduplication: function() {
  5349. if (this.dataList.length === 0) {
  5350. return false
  5351. }
  5352. let fMarks = []
  5353. let fProductName = []
  5354. let fMblno = []
  5355. for (let li in this.dataList) {
  5356. fMarks.push(this.dataList[li].fMarks)
  5357. fProductName.push(this.dataList[li].fGoodsids)
  5358. fMblno.push(this.dataList[li].fMblno)
  5359. }
  5360. this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
  5361. this.$set(this.form, 'fProductName', Array.from(new Set(fProductName)).join(","))
  5362. this.$set(this.form, 'fMblno', Array.from(new Set(fMblno)).join(","))
  5363. this.form.fMblno = this.form.fMblno.substring(0,this.form.fMblno.length-1)
  5364. console.log(this.form.fMblno)
  5365. },
  5366. // 保存
  5367. saveForm () {
  5368. this.updateDeduplication()
  5369. this.$refs['form'].validate((valid) => {
  5370. // if (this.dataList.length === 0) {
  5371. // this.$message.error('请添加库存明细!')
  5372. // return false
  5373. // }
  5374. for (let list in this.dataList) {
  5375. this.changeStock(this.dataList[list])
  5376. }
  5377. if (valid) {
  5378. if(this.form.fTrademodeid === this.form.fNewTrademodeid){
  5379. this.$message.error("原贸易方式不能与新贸易方式相同")
  5380. return false
  5381. }
  5382. setTimeout(() => {
  5383. this.form.fBillstatus = 2
  5384. console.log(this.dataList)
  5385. let formData = new window.FormData()
  5386. // this.dataList.fTransferWarehouselocid = this.treeselectList.fWarehouselocid
  5387. formData.append("type", '2');
  5388. formData.append("warehouseBills", JSON.stringify(this.form));
  5389. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  5390. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5391. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5392. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5393. addStockTransfer(formData).then((response) => {
  5394. this.msgSuccess('保存成功')
  5395. this.form = response.data.warehouseBills
  5396. this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
  5397. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  5398. this.$set(this.form, 'fNewTrademodeid', this.form.fNewTrademodeid + '')
  5399. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  5400. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  5401. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  5402. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  5403. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  5404. this.dataList = response.data.warehousebillsitems
  5405. console.log(response.data.warehousebillsitems)
  5406. for (let li in this.dataList) {
  5407. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  5408. this.$set(this.dataList[li], 'fBusinessType', this.dataList[li].fBusinessType + '')
  5409. console.log(this.dataList[li].fMblno)
  5410. }
  5411. })
  5412. }, 200);
  5413. }
  5414. })
  5415. },
  5416. //作业类型校验
  5417. educationChange() {
  5418. if (this.form.fBusinessType === '0') {
  5419. this.isrequired = 1
  5420. this.isrequired_l = 2
  5421. }else if(this.form.fBusinessType === '1' || this.form.fBusinessType === '3'){
  5422. this.isrequired_l = 1
  5423. this.isrequired = 2
  5424. }else if(this.form.fBusinessType === '2'){
  5425. this.isrequired_l = 1
  5426. this.isrequired = 1
  5427. }
  5428. },
  5429. /** 提交按钮 */
  5430. submitForm() {
  5431. this.$refs['form'].validate((valid) => {
  5432. if (this.dataList.length === 0) {
  5433. this.$message.error('请新增库存明细!')
  5434. return false
  5435. }
  5436. for (let list in this.dataList) {
  5437. this.changeStock(this.dataList[list])
  5438. if (!this.dataList[list].fQty || this.dataList[list].fQty === 0) {
  5439. this.$message.error('请输入调拨件数!')
  5440. return false
  5441. }
  5442. if (!this.dataList[list].fNetweight || this.dataList[list].fNetweight === 0) {
  5443. this.$message.error('请输入调拨净重!')
  5444. return false
  5445. }
  5446. if (!this.dataList[list].fGrossweight || this.dataList[list].fGrossweight === 0) {
  5447. this.$message.error('请输入调拨毛重!')
  5448. return false
  5449. }
  5450. if (!this.dataList[list].fWarehouseInformation || this.dataList[list].fWarehouseInformation === 0) {
  5451. this.$message.error('请选择调拨仓库!')
  5452. return false
  5453. }
  5454. if (this.dataList[list].fBillstatus !== 40) {
  5455. this.$message.error('请入账库存明细!')
  5456. return false
  5457. }
  5458. }
  5459. for(let item in this.warehouseDrList) {
  5460. if (!this.warehouseDrList[item].fCorpid) {
  5461. if (item === 'fBusinessType') {
  5462. } else {
  5463. this.$message.error("请维护收款信息第" + (Number(item) + 1) + "行客户名称")
  5464. return false
  5465. }
  5466. }
  5467. if (!this.warehouseDrList[item].fFeeid) {
  5468. if (item === 'fBusinessType') {
  5469. } else {
  5470. this.$message.error("请维护收款信息第" + (Number(item) + 1) + "行费用名称")
  5471. return false
  5472. }
  5473. }
  5474. if (!this.warehouseDrList[item].fFeeunitid) {
  5475. if (item === 'fBusinessType') {
  5476. } else {
  5477. this.$message.error("请维护收款信息第" + (Number(item) + 1) + "行计价单位")
  5478. return false
  5479. }
  5480. }
  5481. }
  5482. for(let item in this.warehouseCrList) {
  5483. if (!this.warehouseCrList[item].fCorpid) {
  5484. if (item === 'fBusinessType') {
  5485. } else {
  5486. this.$message.error("请维护付款信息第" + (Number(item) + 1) + "行客户名称")
  5487. return false
  5488. }
  5489. }
  5490. if (!this.warehouseCrList[item].fFeeid) {
  5491. if (item === 'fBusinessType') {
  5492. } else {
  5493. this.$message.error("请维护付款信息第" + (Number(item) + 1) + "行费用名称")
  5494. return false
  5495. }
  5496. }
  5497. if (!this.warehouseCrList[item].fFeeunitid) {
  5498. if (item === 'fBusinessType') {
  5499. } else {
  5500. this.$message.error("请维护付款信息第" + (Number(item) + 1) + "行计价单位")
  5501. return false
  5502. }
  5503. }
  5504. }
  5505. if (valid) {
  5506. setTimeout(() => {
  5507. this.form.fBillstatus = status
  5508. this.form.fNetweight = this.fNetweight
  5509. this.form.fPlangrossweight = this.fPlangrossweight
  5510. this.form.fPlannetweight = this.fPlannetweight
  5511. this.form.fPlanvolumn = this.fPlanvolumn
  5512. this.form.fPlanqty = this.fPlanqty
  5513. this.form.fGrossweight = this.fGrossweight
  5514. this.form.fQty = this.fQty
  5515. if (!this.form.fId) {
  5516. this.form.fId = this.fid
  5517. }
  5518. let formData = new window.FormData()
  5519. formData.append("type", '2');
  5520. formData.append("warehouseBills", JSON.stringify(this.form));
  5521. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  5522. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5523. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5524. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5525. warehouseSubmission(formData).then((response) => {
  5526. this.msgSuccess('提交成功')
  5527. this.cancel()
  5528. this.getList()
  5529. })
  5530. }, 200);
  5531. }
  5532. })
  5533. },
  5534. /** 删除按钮操作 */
  5535. handleDelete(row) {
  5536. const fIds = row.fId || this.ids.fId;
  5537. let tips = ''
  5538. delstockTransfer_s(fIds).then( data =>{
  5539. switch (data.msg) {
  5540. case '0': {
  5541. this.$message.error('当前数据已被其他操作员操作请刷新页面')
  5542. break
  5543. }
  5544. case '1': {
  5545. tips = '当前主表有数据从表无数据是否删除'
  5546. this.delete_S(fIds, tips)
  5547. break
  5548. }
  5549. case '2': {
  5550. tips = '当前主表有数据从表有数据是否删除'
  5551. this.delete_S(fIds, tips)
  5552. break
  5553. }
  5554. default:{
  5555. return this.$message.error('未知错误,无状态')
  5556. }
  5557. }
  5558. })
  5559. },
  5560. delete_S(fIds, tips){
  5561. this.$confirm(
  5562. tips,
  5563. "警告",
  5564. {
  5565. confirmButtonText: "确定",
  5566. cancelButtonText: "取消",
  5567. type: "warning",
  5568. }
  5569. )
  5570. .then(function () {
  5571. return delStockTransfer(fIds);
  5572. })
  5573. .then(() => {
  5574. this.getList();
  5575. this.msgSuccess("删除成功");
  5576. });
  5577. },
  5578. /** 导出按钮操作 */
  5579. handleExport() {
  5580. const queryParams = this.queryParams;
  5581. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  5582. confirmButtonText: "确定",
  5583. cancelButtonText: "取消",
  5584. type: "warning",
  5585. })
  5586. .then(function () {
  5587. return exportStockTransfer(queryParams);
  5588. })
  5589. .then((response) => {
  5590. this.download(response.msg);
  5591. });
  5592. },
  5593. // 修改毛重净重
  5594. changeStock (row) {
  5595. let fNetweight = 0;
  5596. let fGrossweight = 0;
  5597. if (row.fNetweight) {
  5598. fNetweight = row.fNetweight
  5599. }
  5600. if (row.fGrossweight) {
  5601. fGrossweight = row.fGrossweight
  5602. }
  5603. if (row.fPlannetweight < fNetweight) {
  5604. this.$message({ message: '调拨净重超出结余净重', type: 'warning' })
  5605. return false
  5606. }
  5607. if (row.fPlangrossweight < fGrossweight) {
  5608. this.$message({ message: '调拨毛重超出结余毛重', type: 'warning' })
  5609. return false
  5610. }
  5611. },
  5612. // 调拨件数的计算
  5613. qtyChange(row) {
  5614. if (!row.fQty || row.fQty === "") {
  5615. this.$set(row, "fNetweight", 0);
  5616. this.$set(row, "fGrossweight", 0);
  5617. return false;
  5618. }
  5619. if (row.fPlanqty < row.fQty) {
  5620. this.$message.error("出库件数超出结余件数!");
  5621. this.$set(row, 'fQty', 0)
  5622. this.$set(row, 'fNetweight', 0)
  5623. this.$set(row, 'fGrossweight', 0)
  5624. return false;
  5625. }
  5626. let fVolumn = parseFloat(Number(row.fVolumn) / Number(row.fPlanqty)).toFixed(2);
  5627. let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(2);
  5628. let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(2);
  5629. this.$set(row, "fVolumn", parseFloat(Number(fVolumn) * Number(row.fQty)).toFixed(2));
  5630. this.$set(row, "fNetweight", parseFloat(Number(netweight) * Number(row.fQty)).toFixed(2));
  5631. this.$set(row, "fGrossweight", parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(2));
  5632. },
  5633. deleteRow(index, rows) {
  5634. rows.splice(index, 1);
  5635. if (this.dataList.length === 0) {
  5636. this.form.fMblno = ''
  5637. this.formBrowseStatus = false
  5638. return false
  5639. }else {
  5640. let fMblno = []
  5641. for(let item in this.dataList){
  5642. fMblno.push(this.dataList[item].fMblno)
  5643. this.$set(this.form,'fMblno',Array.from(new Set(fMblno)).join(","))
  5644. this.form.fMblno = this.form.fMblno.substring(0,this.form.fMblno.length-1)
  5645. }
  5646. }
  5647. let sum = 0
  5648. for (let li in this.dataList) {
  5649. if (this.dataList[li].fBillstatus > 10) {
  5650. this.formBrowseStatus = true
  5651. return false
  5652. }
  5653. }
  5654. },
  5655. /* 获取所有仓库信息 */
  5656. warehousesssMethod() {
  5657. let queryParams = { pageNum: 1, fStatus: 0, delFlag: 0 };
  5658. listWarehousesss(queryParams).then((response) => {
  5659. this.warehouseOptions = response.rows;
  5660. });
  5661. },
  5662. /* 远程模糊查询劳务公司 */
  5663. flabourRemoteMethod(name) {
  5664. if (name == null || name === "") {
  5665. return false;
  5666. }
  5667. let queryParams = { pageNum: 1, fName: name, fTypeid: 6};
  5668. listCorps(queryParams).then((response) => {
  5669. this.fCompanyOptIons = response.rows;
  5670. });
  5671. },
  5672. /* 远程模糊查询车队 */
  5673. fleetRemoteMethod(name) {
  5674. if (name == null || name === "") {
  5675. return false;
  5676. }
  5677. let queryParams = { pageNum: 1, fName: name, fTypeid: 2 };
  5678. listCorps(queryParams).then((response) => {
  5679. this.fleetOptions = response.rows;
  5680. });
  5681. },
  5682. /* 远程模糊查询用户 */
  5683. corpsRemoteMethod(name) {
  5684. if (name == null || name === "") {
  5685. return false;
  5686. }
  5687. let queryParams = { pageNum: 1, fName: name };
  5688. listCorps(queryParams).then((response) => {
  5689. this.fMblnoOptions = response.rows;
  5690. this.KHblnoOptions = response.rows;
  5691. });
  5692. },
  5693. /* 远程模糊查询商品 */
  5694. goodsRemoteMethod(name) {
  5695. if (name == null || name === "") {
  5696. return false;
  5697. }
  5698. let queryParams = { pageNum: 1, fName: name };
  5699. listGoods(queryParams).then((response) => {
  5700. this.goodsOptions = response.rows;
  5701. });
  5702. },
  5703. // 选择费用信息时获取计价单位
  5704. changeFeeId (row) {
  5705. for (let li in this.fWbuOptions) {
  5706. if (row.fFeeid === this.fWbuOptions[li].fId) {
  5707. this.$set(row, 'fFeeUnitid', this.fWbuOptions[li].fFeeunitid + '')
  5708. this.changeFeeUnit(row)
  5709. break
  5710. }
  5711. }
  5712. },
  5713. // 远程模糊查询费用名称
  5714. fWRemoteMethod(name) {
  5715. if (name == null || name === "") {
  5716. return false;
  5717. }
  5718. let queryParams = { pageNum: 1, fName: name };
  5719. listFees(queryParams).then((response) => {
  5720. this.fWbuOptions = response.rows;
  5721. this.fCNameOptions = response.rows;
  5722. this.fDNameOptions = response.rows;
  5723. });
  5724. },
  5725. /* 远程模糊查询经营单位 */
  5726. fSbuRemoteMethod(name) {
  5727. if (name == null || name === "") {
  5728. return false;
  5729. }
  5730. let queryParams = { pageNum: 1, fName: name };
  5731. listCorps(queryParams).then((response) => {
  5732. this.fSbuOptions = response.rows;
  5733. });
  5734. },
  5735. /* 远程模糊查询仓库 */
  5736. warehouseRemoteMethod(name) {
  5737. if (!name) {
  5738. return false;
  5739. }
  5740. let queryParams = { pageNum: 1, fName: name };
  5741. listWarehouse(queryParams).then((response) => {
  5742. this.warehouseOptions = response.rows;
  5743. });
  5744. },
  5745. /* 远程模糊查询库区 */
  5746. kqhouseRemoteMethod(name) {
  5747. if (!name) {
  5748. return false;
  5749. }
  5750. let queryParams = {
  5751. pageNum: 1,
  5752. fWarehouseid: this.form.fWarehouseid,
  5753. fName: name
  5754. };
  5755. listArea(queryParams).then((response) => {
  5756. this.kqhouseOptions = response.rows;
  5757. });
  5758. },
  5759. /* 远程模糊查询操作用户 */
  5760. userRemoteMethod(name) {
  5761. if (name == null || name === "") {
  5762. return false;
  5763. }
  5764. let queryParams = { pageNum: 1, userName: name };
  5765. listUser(queryParams).then((response) => {
  5766. this.userOptions = response.rows;
  5767. });
  5768. },
  5769. },
  5770. };
  5771. </script>
  5772. <style lang="scss">
  5773. .juzhong > th {
  5774. text-align: center;
  5775. }
  5776. .biaoge > tr > td {
  5777. height: 50px;
  5778. text-align: center;
  5779. border-right: 1px solid #dfe6ec !important;
  5780. order-bottom: 1px solid #dfe6ec !important;
  5781. border-bottom: 1px solid #dfe6ec !important;
  5782. }
  5783. .el-table thead th {
  5784. background: #1890ff;
  5785. color: #fff;
  5786. }
  5787. .upload-demo {
  5788. margin-left: 50px;
  5789. }
  5790. .el-form-item {
  5791. margin-bottom: 5px !important;
  5792. }
  5793. .el-form-item__label {
  5794. font-size: 12px !important;
  5795. }
  5796. .el-collapse-item__header{
  5797. font-size: 16px;
  5798. font-weight: bolder;
  5799. padding-left: 5px;
  5800. }
  5801. .el-icon-s-home,.el-icon-s-order,.el-icon-circle-plus,.el-icon-remove{
  5802. padding-right: 5px;
  5803. }
  5804. .el-table {
  5805. .el-table__body-wrapper {
  5806. z-index: 2;
  5807. }
  5808. }
  5809. .avue-crud__dialog__header {
  5810. display: -webkit-box;
  5811. display: -ms-flexbox;
  5812. display: flex;
  5813. -webkit-box-align: center;
  5814. -ms-flex-align: center;
  5815. align-items: center;
  5816. -webkit-box-pack: justify;
  5817. -ms-flex-pack: justify;
  5818. justify-content: space-between;
  5819. }
  5820. .el-dialog__title {
  5821. color: rgba(0,0,0,.85);
  5822. font-weight: 500;
  5823. word-wrap: break-word;
  5824. }
  5825. .tabSetting {
  5826. display: flex;
  5827. justify-content: flex-end;
  5828. }
  5829. .listStyle {
  5830. display: flex;
  5831. border-top: 1px solid #dcdfe6;
  5832. border-left: 1px solid #dcdfe6;
  5833. border-right: 1px solid #dcdfe6;
  5834. }
  5835. .listStyle:last-child {
  5836. border-bottom: 1px solid #dcdfe6;
  5837. }
  5838. .progress {
  5839. display: flex;
  5840. align-items: center;
  5841. padding: 2px;
  5842. background-color: rgba(0, 0, 0, 0.05);
  5843. height: 100%;
  5844. }
  5845. .avue-crud__dialog__header {
  5846. display: -webkit-box;
  5847. display: -ms-flexbox;
  5848. display: flex;
  5849. -webkit-box-align: center;
  5850. -ms-flex-align: center;
  5851. align-items: center;
  5852. -webkit-box-pack: justify;
  5853. -ms-flex-pack: justify;
  5854. justify-content: space-between;
  5855. }
  5856. .el-dialog__title {
  5857. color: rgba(0,0,0,.85);
  5858. font-weight: 500;
  5859. word-wrap: break-word;
  5860. }
  5861. .avue-crud__dialog__menu {
  5862. padding-right: 20px;
  5863. float: left;
  5864. }
  5865. .avue-crud__dialog__menu i {
  5866. color: #909399;
  5867. font-size: 15px;
  5868. }
  5869. .el-icon-full-screen{
  5870. cursor: pointer;
  5871. }
  5872. .el-icon-full-screen:before {
  5873. content: "\e719";
  5874. }
  5875. </style>