AddOrUpdate.vue 163 KB

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