AddOrUpdate.vue 134 KB

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