AddOrUpdate.vue 119 KB

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