AddOrUpdate.vue 162 KB

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