index.vue 142 KB

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