index.vue 143 KB

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