AddOrUpdate.vue 123 KB

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