index.vue 164 KB

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