AddOrUpdate.vue 166 KB

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