index.vue 126 KB

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