AddOrUpdate.vue 168 KB

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