AddOrUpdate.vue 156 KB

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