index.vue 134 KB

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