AddOrUpdate.vue 189 KB

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