AddOrUpdate.vue 176 KB

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