index.vue 105 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172
  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="fBsdate">
  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. style="width: 80%"
  92. clearable
  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. <treeselect style="width:160px"
  136. v-model="queryParams.fWarehouselocid"
  137. :options="fWarehouseidOption"
  138. @select="treeseLect"
  139. :show-count="true"
  140. :disable-branch-nodes="true"
  141. placeholder="请选择归属库区" />
  142. </el-form-item>
  143. <el-form-item label="品牌" prop="fMarks">
  144. <el-input
  145. v-model="queryParams.fMarks"
  146. placeholder="请输入品牌"
  147. clearable
  148. style="width: 80%"
  149. size="small"
  150. @keyup.enter.native="handleQuery"
  151. />
  152. </el-form-item>
  153. <el-form-item>
  154. <el-button
  155. type="cyan"
  156. icon="el-icon-search"
  157. size="mini"
  158. @click="handleQuery"
  159. >搜索
  160. </el-button>
  161. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  162. >重置
  163. </el-button>
  164. </el-form-item>
  165. </el-form>
  166. <el-row :gutter="10" class="mb8">
  167. <el-col :span="1.5">
  168. <el-button
  169. type="primary"
  170. icon="el-icon-plus"
  171. size="mini"
  172. @click="handleAdd"
  173. v-hasPermi="['warehouseBusiness:goodsTransfer:add']"
  174. >新增
  175. </el-button>
  176. </el-col>
  177. <el-col :span="1.5">
  178. <el-button
  179. type="success"
  180. icon="el-icon-edit"
  181. size="mini"
  182. :disabled="single"
  183. @click="handleUpdate"
  184. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  185. >修改
  186. </el-button>
  187. </el-col>
  188. <el-col :span="1.5">
  189. <el-button
  190. type="warning"
  191. icon="el-icon-download"
  192. size="mini"
  193. @click="handleExport"
  194. v-hasPermi="['warehouseBusiness:goodsTransfer:export']"
  195. >导出
  196. </el-button>
  197. </el-col>
  198. <right-toolbar
  199. :showSearch.sync="showSearch"
  200. @queryTable="getList"
  201. ></right-toolbar>
  202. </el-row>
  203. <el-table
  204. v-loading="loading"
  205. :data="goodsTransferList"
  206. @selection-change="handleSelectionChange"
  207. >
  208. <el-table-column type="selection" width="55" align="center"/>
  209. <el-table-column type="index" label="行号" align="center"/>
  210. <el-table-column
  211. :show-overflow-tooltip="true"
  212. label="货权方"
  213. align="center"
  214. prop="fCorpid"
  215. />
  216. <el-table-column
  217. :show-overflow-tooltip="true"
  218. label="转货权方"
  219. align="center"
  220. prop="fTocorpid"
  221. />
  222. <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
  223. <el-table-column
  224. :show-overflow-tooltip="true"
  225. label="品牌"
  226. align="center"
  227. prop="fMarks"
  228. />
  229. <el-table-column
  230. :show-overflow-tooltip="true"
  231. label="业务编号"
  232. align="center"
  233. prop="fBillno"
  234. />
  235. <el-table-column
  236. label="货转日期"
  237. align="center"
  238. prop="fBsdate"
  239. width="180"
  240. >
  241. <template slot-scope="scope">
  242. <span>{{ parseTime(scope.row.fBsdate, '{y}-{m}-{d}') }}</span>
  243. </template>
  244. </el-table-column>
  245. <el-table-column
  246. label="贸易方式"
  247. align="center"
  248. prop="fTrademodeid"
  249. :formatter="fTrademodeidFormat"
  250. />
  251. <el-table-column label="仓库" align="center" prop="fWarehouseid"/>
  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 === 6">已货转</span>
  265. </template>
  266. </el-table-column>
  267. <el-table-column label="费用状态" align="center" prop="fBillstatus" width="120">
  268. <template slot-scope="scope">
  269. <span v-if="scope.row.fBillstatus == '1'">保存</span>
  270. <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>
  271. <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>
  272. <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>
  273. <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>
  274. <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>
  275. </template>
  276. </el-table-column>
  277. <el-table-column
  278. label="操作"
  279. align="center"
  280. class-name="small-padding fixed-width"
  281. width="100"
  282. >
  283. <template slot-scope="scope">
  284. <el-button
  285. size="mini"
  286. type="text"
  287. icon="el-icon-edit"
  288. @click="check_s(scope.row,0)"
  289. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  290. >查看
  291. </el-button>
  292. <el-button
  293. size="mini"
  294. type="text"
  295. icon="el-icon-edit"
  296. v-if="scope.row.fBillstatus <= 3"
  297. @click="handleUpdate(scope.row, false)"
  298. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  299. >修改
  300. </el-button>
  301. <el-button
  302. size="mini"
  303. type="text"
  304. icon="el-icon-edit"
  305. v-if="scope.row.fBillstatus === 4 || scope.row.fBillstatus === 5"
  306. @click="check(scope.row)"
  307. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  308. >审批进度
  309. </el-button>
  310. <el-button
  311. size="mini"
  312. type="text"
  313. icon="el-icon-delete"
  314. v-if="scope.row.fItemsStatus === 1"
  315. @click="handleDelete(scope.row)"
  316. v-hasPermi="['warehouseBusiness:goodsTransfer:remove']"
  317. >删除
  318. </el-button>
  319. </template>
  320. </el-table-column>
  321. </el-table>
  322. <pagination
  323. v-show="total > 0"
  324. :total="total"
  325. :page.sync="queryParams.pageNum"
  326. :limit.sync="queryParams.pageSize"
  327. @pagination="getList"
  328. />
  329. <!-- 添加或修改仓库主(出入库)对话框 -->
  330. <el-dialog
  331. :title="title"
  332. :visible.sync="open"
  333. :close-on-click-modal="false"
  334. width="80%"
  335. append-to-body
  336. :show-close="colseButton"
  337. >
  338. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  339. <el-row>
  340. <el-col :span="8">
  341. <el-form-item label="货权方" prop="fCorpid">
  342. <el-select
  343. v-model="form.fCorpid"
  344. filterable
  345. remote
  346. :disabled="notChange || formBrowseStatus"
  347. style="width: 80%"
  348. :remote-method="corpsRemoteMethod"
  349. placeholder="请选择货权方"
  350. >
  351. <el-option
  352. v-for="(dict, index) in fMblnoOptions"
  353. :key="index.fId"
  354. :label="dict.fName"
  355. :value="dict.fId"
  356. ></el-option>
  357. </el-select>
  358. </el-form-item>
  359. </el-col>
  360. <el-col :span="8">
  361. <el-form-item label="新货权方" prop="fTocorpid">
  362. <el-select
  363. v-model="form.fTocorpid"
  364. filterable
  365. remote
  366. :disabled="notChange || formBrowseStatus"
  367. style="width: 80%"
  368. @change="changefCorpid(form)"
  369. :remote-method="corpsRemoteMethod"
  370. placeholder="请选择新货权方"
  371. >
  372. <el-option
  373. v-for="(dict, index) in fMblnoOptions"
  374. :key="index.fId"
  375. :label="dict.fName"
  376. :value="dict.fId"
  377. ></el-option>
  378. </el-select>
  379. </el-form-item>
  380. </el-col>
  381. <el-col :span="8">
  382. <el-form-item label="业务编号" prop="fBillno">
  383. <el-input
  384. v-model="form.fBillno"
  385. style="width: 80%"
  386. disabled
  387. placeholder="业务编号"
  388. />
  389. </el-form-item>
  390. </el-col>
  391. </el-row>
  392. <el-row>
  393. <el-col :span="8">
  394. <el-form-item label="货转日期" prop="fBsdate">
  395. <el-date-picker
  396. v-model="form.fBsdate"
  397. style="width: 80%"
  398. type="date"
  399. :disabled="notChange || formBrowseStatus"
  400. value-format="timestamp"
  401. placeholder="货转日期"
  402. >
  403. </el-date-picker>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="8">
  407. <el-form-item label="仓储计费日期" prop="fChargedate">
  408. <el-date-picker
  409. v-model="form.fChargedate"
  410. style="width: 80%"
  411. type="date"
  412. :disabled="notChange || formBrowseStatus"
  413. value-format="timestamp"
  414. placeholder="仓储计费日期">
  415. </el-date-picker>
  416. </el-form-item>
  417. </el-col>
  418. <el-col :span="8">
  419. <el-form-item label="仓库" prop="fWarehouseid">
  420. <el-select
  421. v-model="form.fWarehouseid"
  422. filterable
  423. remote
  424. :disabled="browseStatus || formBrowseStatus"
  425. style="width: 80%"
  426. @keyup.enter.native="handleQuery"
  427. placeholder="请选择"
  428. >
  429. <el-option
  430. v-for="(dict, index) in warehouseOptions"
  431. :key="index.fId"
  432. :label="dict.fName"
  433. :value="dict.fId"
  434. ></el-option>
  435. </el-select>
  436. </el-form-item>
  437. </el-col>
  438. </el-row>
  439. <el-row>
  440. <el-col :span="8">
  441. <el-form-item label="结算方式" prop="fStltypeid">
  442. <el-select
  443. v-model="form.fStltypeid"
  444. placeholder="请选择结算方式"
  445. clearable
  446. :disabled="notChange || formBrowseStatus"
  447. style="width: 80%"
  448. >
  449. <el-option
  450. v-for="(dict, index) in fStltypeOptions"
  451. :key="index.dictValue"
  452. :label="dict.dictLabel"
  453. :value="dict.dictValue"
  454. />
  455. </el-select>
  456. </el-form-item>
  457. </el-col>
  458. <el-col :span="8">
  459. <el-form-item label="计费单位" prop="fFeetunit">
  460. <el-select
  461. v-model="form.fFeetunit"
  462. placeholder="请选择计费单位"
  463. clearable
  464. :disabled="notChange || formBrowseStatus"
  465. style="width: 80%"
  466. >
  467. <el-option
  468. v-for="(dict, index) in fFeetunitOptions"
  469. :key="index.dictValue"
  470. :label="dict.dictLabel"
  471. :value="dict.dictValue"
  472. />
  473. </el-select>
  474. </el-form-item>
  475. </el-col>
  476. <el-col :span="8">
  477. <el-form-item label="贸易方式" prop="fTrademodeid">
  478. <el-select
  479. v-model="form.fTrademodeid"
  480. placeholder="请选择贸易方式"
  481. clearable
  482. :disabled="notChange || formBrowseStatus"
  483. style="width: 80%"
  484. >
  485. <el-option
  486. v-for="(dict, index) in fTrademodeidOptions"
  487. :key="index.dictValue"
  488. :label="dict.dictLabel"
  489. :value="dict.dictValue"
  490. />
  491. </el-select>
  492. </el-form-item>
  493. </el-col>
  494. </el-row>
  495. <el-row>
  496. <el-col :span="8">
  497. <el-form-item label="提单号" prop="fMblno">
  498. <el-input
  499. v-model="form.fMblno"
  500. disabled
  501. style="width: 80%"
  502. placeholder=""
  503. />
  504. </el-form-item>
  505. </el-col>
  506. <el-col :span="8">
  507. <el-form-item label="原始入库单号" prop="fOriginalbillno">
  508. <el-input
  509. v-model="form.fOriginalbillno"
  510. style="width: 80%"
  511. :disabled="notChange"
  512. placeholder="原始入库单号"
  513. />
  514. </el-form-item>
  515. </el-col>
  516. <el-col :span="8">
  517. <el-form-item label="原始入库日期" prop="orgStorageDate">
  518. <el-date-picker
  519. v-model="orgStorageDate"
  520. type="daterange"
  521. value-format="yyyy-MM-dd"
  522. range-separator="至"
  523. style="width: 80%"
  524. :disabled="notChange"
  525. start-placeholder="开始日期"
  526. end-placeholder="结束日期"
  527. >
  528. </el-date-picker>
  529. </el-form-item>
  530. </el-col>
  531. </el-row>
  532. <el-row>
  533. <el-col :span="8">
  534. <el-form-item label="品牌" prop="fMarks">
  535. <el-input
  536. v-model="form.fMarks"
  537. style="width: 80%"
  538. disabled
  539. placeholder="品牌"
  540. />
  541. </el-form-item>
  542. </el-col>
  543. <el-col :span="8">
  544. <el-form-item label="品名" prop="fProductName">
  545. <el-input
  546. v-model="form.fProductName"
  547. style="width: 80%"
  548. disabled
  549. placeholder="品名"
  550. />
  551. </el-form-item>
  552. </el-col>
  553. <el-col :span="8">
  554. <el-form-item label="制单人" prop="createBy">
  555. <el-input
  556. disabled
  557. v-model="form.createBy"
  558. style="width: 80%"
  559. placeholder="制单人"
  560. />
  561. </el-form-item>
  562. </el-col>
  563. </el-row>
  564. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  565. <el-button type="primary" :disabled="notChange" @click="submitForm">请 核</el-button>
  566. </el-form>
  567. <el-collapse v-model="activeNames">
  568. <el-collapse-item name="1">
  569. <template slot="title">
  570. <i class="el-icon-s-home"></i>货转明细
  571. </template>
  572. <div class="dialogTableTitle flex a-center jlr">
  573. <el-button :disabled="browseStatus" @click.prevent="addRelevant()"
  574. >新增
  575. </el-button
  576. >
  577. <el-button
  578. :disabled="dataListSelection.length <= 0 || browseStatus"
  579. @click.prevent="creditClick()"
  580. >货转确认
  581. </el-button>
  582. <el-button
  583. :disabled="dataWithdrawList.length <= 0 || browseStatus"
  584. @click.prevent="withdrawClick"
  585. >撤回货转
  586. </el-button
  587. >
  588. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  589. </div>
  590. <el-table
  591. :data="dataList"
  592. ref="tableListRef"
  593. tooltip-effect="dark"
  594. border
  595. stripe
  596. :summary-method="getSummaries"
  597. @selection-change="Selectinventory"
  598. show-summary
  599. >
  600. <el-table-column type="selection" width="55" align="center"/>
  601. <el-table-column label="序号" type="index" width="80">
  602. </el-table-column>
  603. <el-table-column
  604. prop="fGoodsids"
  605. header-align="center"
  606. align="center"
  607. width="140px"
  608. label="品名"
  609. >
  610. </el-table-column>
  611. <el-table-column
  612. prop="fBsdate"
  613. header-align="center"
  614. align="center"
  615. width="150px"
  616. label="货转日期"
  617. >
  618. <template slot-scope="scope">
  619. <el-date-picker
  620. v-model="scope.row.fBsdate"
  621. style="width: 138px"
  622. :disabled="
  623. browseStatus ||
  624. scope.row.fBillstatus === 20 ||
  625. scope.row.fBillstatus === 30 ||
  626. scope.row.fBillstatus === 40
  627. "
  628. type="date"
  629. value-format="timestamp"
  630. placeholder="货转日期"
  631. >
  632. </el-date-picker>
  633. </template>
  634. </el-table-column>
  635. <el-table-column
  636. prop="fMarks"
  637. header-align="center"
  638. align="center"
  639. width="140px"
  640. label="品牌"
  641. >
  642. </el-table-column>
  643. <el-table-column
  644. prop="fBusinessType"
  645. header-align="center"
  646. width="140px"
  647. align="center"
  648. label="*货物属性"
  649. >
  650. <template slot-scope="scope">
  651. <el-select v-model="scope.row.fBusinessType"
  652. filterable
  653. disabled
  654. placeholder="请选择商品属性"
  655. >
  656. <el-option
  657. v-for="(dict, index) in fStorageTypeOptions"
  658. :key="index.dictValue"
  659. :label="dict.dictLabel"
  660. :value="dict.dictValue"
  661. />
  662. </el-select>
  663. </template>
  664. </el-table-column>
  665. <el-table-column
  666. prop="fMarks"
  667. header-align="center"
  668. align="center"
  669. width="140px"
  670. label="*属性详情"
  671. >
  672. </el-table-column>
  673. <el-table-column
  674. prop="fMblno"
  675. header-align="center"
  676. align="center"
  677. width="140px"
  678. label="提单号"
  679. >
  680. </el-table-column>
  681. <el-table-column
  682. prop="fWarehouseids"
  683. header-align="center"
  684. width="150px"
  685. align="center"
  686. label="*库位"
  687. >
  688. </el-table-column>
  689. <el-table-column
  690. prop="fOriginalbillno"
  691. header-align="center"
  692. align="center"
  693. width="140px"
  694. label="原始入库单号"
  695. >
  696. </el-table-column>
  697. <el-table-column
  698. prop="fPlanqty"
  699. header-align="center"
  700. align="center"
  701. width="180px"
  702. label="*结余件数"
  703. >
  704. </el-table-column>
  705. <el-table-column
  706. prop="fPlangrossweight"
  707. header-align="center"
  708. align="center"
  709. width="180px"
  710. label="*库存毛重"
  711. >
  712. </el-table-column>
  713. <el-table-column
  714. prop="fPlannetweight"
  715. header-align="center"
  716. width="180px"
  717. align="center"
  718. label="*库存净重"
  719. >
  720. </el-table-column>
  721. <el-table-column
  722. prop="fQty"
  723. header-align="center"
  724. width="180px"
  725. align="center"
  726. label="*货转件数"
  727. >
  728. <template slot-scope="scope">
  729. <el-input
  730. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  731. @change="qtyChange(scope.row)"
  732. v-model="scope.row.fQty"
  733. placeholder="*货转件数"
  734. :disabled="browseStatus || scope.row.fBillstatus === 6"
  735. show-word-limit
  736. />
  737. </template>
  738. </el-table-column>
  739. <el-table-column
  740. prop="fGrossweight"
  741. header-align="center"
  742. width="180px"
  743. align="center"
  744. label="*货转毛重"
  745. >
  746. <template slot-scope="scope">
  747. <el-input
  748. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
  749. :disabled="browseStatus || scope.row.fBillstatus === 6"
  750. @change="changeTransfer(scope.row)"
  751. v-model="scope.row.fGrossweight"
  752. placeholder="货转毛重"
  753. show-word-limit
  754. />
  755. </template>
  756. </el-table-column>
  757. <el-table-column
  758. prop="fNetweight"
  759. header-align="center"
  760. width="180px"
  761. align="center"
  762. label="*货转净重"
  763. >
  764. <template slot-scope="scope">
  765. <el-input
  766. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
  767. :disabled="browseStatus || scope.row.fBillstatus === 6"
  768. v-model="scope.row.fNetweight"
  769. @change="changeTransfer(scope.row)"
  770. placeholder="货转净重"
  771. show-word-limit
  772. />
  773. </template>
  774. </el-table-column>
  775. <el-table-column
  776. prop="fCntqty"
  777. header-align="center"
  778. width="180px"
  779. align="center"
  780. label="箱量"
  781. >
  782. <template slot-scope="scope">
  783. <el-input
  784. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  785. v-model="scope.row.fCntqty"
  786. placeholder="箱量"
  787. :disabled="browseStatus || scope.row.fBillstatus === 6"
  788. show-word-limit
  789. />
  790. </template>
  791. </el-table-column>
  792. <el-table-column
  793. prop="fPackagespecs"
  794. header-align="center"
  795. width="180px"
  796. align="center"
  797. label="*包装规格"
  798. >
  799. <template slot-scope="scope">
  800. <el-input
  801. v-model="scope.row.fPackagespecs"
  802. :disabled="browseStatus || scope.row.fBillstatus === 6"
  803. placeholder="包装规格"
  804. show-word-limit
  805. />
  806. </template>
  807. </el-table-column>
  808. <el-table-column
  809. prop="fGoodsval"
  810. header-align="center"
  811. width="150px"
  812. align="center"
  813. label="货值"
  814. >
  815. <template slot-scope="scope">
  816. <el-input
  817. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  818. v-model="scope.row.fGoodsval"
  819. placeholder="货值"
  820. :disabled="browseStatus || scope.row.fBillstatus === 6"
  821. show-word-limit
  822. />
  823. </template>
  824. </el-table-column>
  825. <el-table-column
  826. prop="remark"
  827. header-align="center"
  828. width="150px"
  829. align="center"
  830. label="备注"
  831. >
  832. <template slot-scope="scope">
  833. <el-input
  834. v-model="scope.row.remark"
  835. placeholder="备注"
  836. :disabled="browseStatus"
  837. show-word-limit
  838. />
  839. </template>
  840. </el-table-column>
  841. <el-table-column
  842. prop="fBillstatus"
  843. header-align="center"
  844. width="150px"
  845. align="center"
  846. label="状态"
  847. >
  848. <template slot-scope="scope">
  849. <span v-if="scope.row.fBillstatus === 6">货转</span>
  850. <span v-else>录入</span>
  851. </template>
  852. </el-table-column>
  853. <el-table-column
  854. header-align="center"
  855. align="center"
  856. label="操作"
  857. width="130PX"
  858. >
  859. <template slot-scope="scope">
  860. <el-button
  861. :disabled="browseStatus"
  862. @click.native.prevent="deleteRow(scope.$index, dataList)"
  863. size="small"
  864. >移除
  865. </el-button
  866. >
  867. </template>
  868. </el-table-column>
  869. </el-table>
  870. </el-collapse-item>
  871. <el-collapse-item>
  872. <template slot="title">
  873. <i class="el-icon-s-order"></i>附件上传
  874. </template>
  875. <div class="dialogTableTitle flex a-center jlr">
  876. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  877. >新增
  878. </el-button>
  879. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  880. </div>
  881. <el-table
  882. :data="relevantAttachments"
  883. ref="attachTable"
  884. tooltip-effect="dark"
  885. border
  886. stripe
  887. style="width: 100%"
  888. height="150"
  889. >
  890. <el-table-column label="序号" type="index" width="80">
  891. </el-table-column>
  892. <el-table-column
  893. prop="fName"
  894. header-align="center"
  895. align="center"
  896. label="附件名称"
  897. >
  898. <template slot-scope="scope">
  899. <el-input
  900. v-model="scope.row.fName"
  901. :disabled="browseStatus"
  902. placeholder="附件名称"
  903. show-word-limit
  904. />
  905. </template>
  906. </el-table-column>
  907. <el-table-column
  908. prop="createBy"
  909. header-align="center"
  910. align="center"
  911. label="上传人"
  912. >
  913. <template slot-scope="scope">
  914. <el-input
  915. v-model="scope.row.createBy"
  916. :disabled="browseStatus"
  917. placeholder="上传人"
  918. show-word-limit
  919. />
  920. </template>
  921. </el-table-column>
  922. <el-table-column
  923. prop="createTime"
  924. header-align="center"
  925. align="center"
  926. label="上传时间"
  927. >
  928. <template slot-scope="scope">
  929. <el-date-picker
  930. v-model="scope.row.createTime"
  931. type="date"
  932. disabled
  933. placeholder="上传时间"
  934. format="yyyy-MM-dd HH:mm"
  935. value-format="timestamp"
  936. ></el-date-picker>
  937. </template>
  938. </el-table-column>
  939. <el-table-column
  940. prop="fUrl"
  941. header-align="center"
  942. align="center"
  943. width="80%"
  944. label="上传附件"
  945. >
  946. <template slot-scope="scope">
  947. <uploadFile @input="showFile" v-model="scope.row.fUrl"/>
  948. </template>
  949. </el-table-column>
  950. <el-table-column
  951. header-align="center"
  952. align="center"
  953. label="操作"
  954. width="130PX"
  955. >
  956. <template slot-scope="scope">
  957. <el-button
  958. @click.native.prevent="
  959. deleteRow(scope.$index, relevantAttachments)
  960. "
  961. :disabled="browseStatus"
  962. size="small"
  963. >移除
  964. </el-button>
  965. </template>
  966. </el-table-column>
  967. </el-table>
  968. </el-collapse-item>
  969. <el-collapse-item>
  970. <template slot="title">
  971. <i class="el-icon-circle-plus"></i>收款信息
  972. </template>
  973. <div class="dialogTableTitle flex a-center jlr">
  974. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  975. >新增
  976. </el-button>
  977. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  978. </div>
  979. <el-table
  980. :data="warehouseDrList"
  981. ref="warehouseDr"
  982. tooltip-effect="dark"
  983. border
  984. stripe
  985. :summary-method="warehouseDrSummaries"
  986. show-summary
  987. >
  988. <el-table-column label="序号" type="index" width="80">
  989. </el-table-column>
  990. <el-table-column
  991. prop="fCorpid"
  992. header-align="center"
  993. align="center"
  994. width="180px"
  995. label="客户名称"
  996. >
  997. <template slot-scope="scope">
  998. <el-select
  999. v-model="scope.row.fCorpid"
  1000. filterable
  1001. remote
  1002. :disabled="browseStatus"
  1003. :remote-method="corpsRemoteMethod"
  1004. placeholder="客户名称"
  1005. >
  1006. <el-option
  1007. v-for="(dict, index) in KHblnoOptions"
  1008. :key="index.fId"
  1009. :label="dict.fName"
  1010. :value="dict.fId"
  1011. ></el-option>
  1012. </el-select>
  1013. </template>
  1014. </el-table-column>
  1015. <el-table-column
  1016. prop="fFeeid"
  1017. header-align="center"
  1018. align="center"
  1019. width="180px"
  1020. label="费用名称"
  1021. >
  1022. <template slot-scope="scope">
  1023. <el-select
  1024. :disabled="browseStatus"
  1025. v-model="scope.row.fFeeid"
  1026. filterable
  1027. remote
  1028. :remote-method="fWRemoteMethod"
  1029. @change="changeFeeId(scope.row)"
  1030. placeholder="费用名称"
  1031. >
  1032. <el-option
  1033. v-for="(dict, index) in fWbuOptions"
  1034. :key="index.fId"
  1035. :label="dict.fName"
  1036. :value="dict.fId"
  1037. ></el-option>
  1038. </el-select>
  1039. </template>
  1040. </el-table-column>
  1041. <el-table-column
  1042. prop="fStltypeid"
  1043. header-align="center"
  1044. align="center"
  1045. width="130px"
  1046. label="结算方式"
  1047. >
  1048. <template slot-scope="scope">
  1049. <el-select
  1050. v-model="scope.row.fStltypeid"
  1051. placeholder="请选择结算表票结、月结"
  1052. :disabled="browseStatus"
  1053. >
  1054. <el-option
  1055. v-for="dict in fStltypeidOptions"
  1056. :key="dict.dictValue"
  1057. :label="dict.dictLabel"
  1058. :value="parseInt(dict.dictValue)"
  1059. ></el-option>
  1060. </el-select>
  1061. </template>
  1062. </el-table-column>
  1063. <el-table-column
  1064. prop="fFeeunitid"
  1065. header-align="center"
  1066. align="center"
  1067. width="180px"
  1068. label="计价单位"
  1069. >
  1070. <template slot-scope="scope">
  1071. <el-select
  1072. v-model="scope.row.fFeeunitid"
  1073. placeholder="请选择计价单位"
  1074. :disabled="browseStatus"
  1075. @change="changeFeeUnit(scope.row)"
  1076. clearable
  1077. >
  1078. <el-option
  1079. v-for="(dict, index) in fFeetunitOptions"
  1080. :key="index.dictValue"
  1081. :label="dict.dictLabel"
  1082. :value="dict.dictValue"
  1083. />
  1084. </el-select>
  1085. </template>
  1086. </el-table-column>
  1087. <el-table-column
  1088. prop="fQty"
  1089. header-align="center"
  1090. align="center"
  1091. width="150px"
  1092. label="数量"
  1093. >
  1094. <template slot-scope="scope">
  1095. <el-input
  1096. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1097. v-model="scope.row.fQty"
  1098. placeholder="数量"
  1099. :disabled="browseStatus"
  1100. @change="changeContractAmt(scope.row)"
  1101. show-word-limit
  1102. />
  1103. </template>
  1104. </el-table-column>
  1105. <el-table-column
  1106. prop="fUnitprice"
  1107. header-align="center"
  1108. align="center"
  1109. width="150px"
  1110. label="单价"
  1111. >
  1112. <template slot-scope="scope">
  1113. <el-input
  1114. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1115. v-model="scope.row.fUnitprice"
  1116. placeholder="单价"
  1117. :disabled="browseStatus"
  1118. @change="changeContractAmt(scope.row)"
  1119. show-word-limit
  1120. />
  1121. </template>
  1122. </el-table-column>
  1123. <el-table-column
  1124. prop="fAmount"
  1125. header-align="center"
  1126. align="center"
  1127. width="150px"
  1128. label="金额"
  1129. >
  1130. <template slot-scope="scope">
  1131. <el-input
  1132. disabled
  1133. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1134. v-model="scope.row.fAmount"
  1135. placeholder="金额"
  1136. show-word-limit
  1137. />
  1138. </template>
  1139. </el-table-column>
  1140. <el-table-column
  1141. prop="fCurrency"
  1142. header-align="center"
  1143. align="center"
  1144. width="150px"
  1145. label="币别"
  1146. >
  1147. <template slot-scope="scope">
  1148. <el-input
  1149. v-model="scope.row.fCurrency"
  1150. :disabled="browseStatus"
  1151. placeholder="币别"
  1152. show-word-limit
  1153. />
  1154. </template>
  1155. </el-table-column>
  1156. <el-table-column
  1157. prop="fExrate"
  1158. header-align="center"
  1159. align="center"
  1160. width="150px"
  1161. label="汇率"
  1162. >
  1163. <template slot-scope="scope">
  1164. <el-input
  1165. v-model="scope.row.fExrate"
  1166. :disabled="browseStatus"
  1167. placeholder="汇率"
  1168. show-word-limit
  1169. />
  1170. </template>
  1171. </el-table-column>
  1172. <el-table-column
  1173. prop="fTaxrate"
  1174. header-align="center"
  1175. align="center"
  1176. width="150px"
  1177. label="税率"
  1178. >
  1179. <template slot-scope="scope">
  1180. <el-input
  1181. v-model="scope.row.fTaxrate"
  1182. :disabled="browseStatus"
  1183. placeholder="税率"
  1184. show-word-limit
  1185. />
  1186. </template>
  1187. </el-table-column>
  1188. <el-table-column
  1189. prop="fMblno"
  1190. header-align="center"
  1191. align="center"
  1192. width="130px"
  1193. label="提单号"
  1194. >
  1195. <template slot-scope="scope">
  1196. <el-input
  1197. v-model="scope.row.fMblno"
  1198. :disabled="browseStatus"
  1199. placeholder="提单号"
  1200. show-word-limit
  1201. />
  1202. </template>
  1203. </el-table-column>
  1204. <el-table-column
  1205. prop="fProductName"
  1206. header-align="center"
  1207. align="center"
  1208. width="140px"
  1209. label="品名"
  1210. >
  1211. <template slot-scope="scope">
  1212. <el-input
  1213. v-model="scope.row.fProductName"
  1214. :disabled="browseStatus"
  1215. placeholder="品名"
  1216. show-word-limit
  1217. />
  1218. </template>
  1219. </el-table-column>
  1220. <el-table-column
  1221. prop="fMarks"
  1222. header-align="center"
  1223. align="center"
  1224. width="130px"
  1225. label="品牌"
  1226. >
  1227. <template slot-scope="scope">
  1228. <el-input
  1229. v-model="scope.row.fMarks"
  1230. :disabled="browseStatus"
  1231. placeholder="品牌"
  1232. show-word-limit
  1233. />
  1234. </template>
  1235. </el-table-column>
  1236. <el-table-column
  1237. prop="remarks"
  1238. header-align="center"
  1239. align="center"
  1240. width="150px"
  1241. label="备注"
  1242. >
  1243. <template slot-scope="scope">
  1244. <el-input
  1245. v-model="scope.row.remarks"
  1246. :disabled="browseStatus"
  1247. placeholder="备注"
  1248. show-word-limit
  1249. />
  1250. </template>
  1251. </el-table-column>
  1252. <el-table-column
  1253. header-align="center"
  1254. align="center"
  1255. label="操作"
  1256. width="150px"
  1257. >
  1258. <template slot-scope="scope">
  1259. <el-button size="small" :disabled="browseStatus">审核费用</el-button>
  1260. <el-button
  1261. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1262. size="small"
  1263. :disabled="browseStatus"
  1264. >移除
  1265. </el-button
  1266. >
  1267. </template>
  1268. </el-table-column>
  1269. </el-table>
  1270. </el-collapse-item>
  1271. <el-collapse-item>
  1272. <template slot="title">
  1273. <i class="el-icon-remove"></i>付款信息
  1274. </template>
  1275. <div class="dialogTableTitle flex a-center jlr">
  1276. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1277. >新增
  1278. </el-button>
  1279. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1280. </div>
  1281. <el-table
  1282. :data="warehouseCrList"
  1283. ref="warehouseCr"
  1284. tooltip-effect="dark"
  1285. border
  1286. stripe
  1287. :summary-method="warehouseDrSummaries"
  1288. show-summary
  1289. >
  1290. <el-table-column label="序号" type="index" width="80">
  1291. </el-table-column>
  1292. <el-table-column
  1293. prop="fCorpid"
  1294. header-align="center"
  1295. align="center"
  1296. width="180px"
  1297. label="客户名称"
  1298. >
  1299. <template slot-scope="scope">
  1300. <el-select
  1301. v-model="scope.row.fCorpid"
  1302. filterable
  1303. remote
  1304. :disabled="browseStatus"
  1305. :remote-method="corpsRemoteMethod"
  1306. placeholder="客户名称"
  1307. >
  1308. <el-option
  1309. v-for="(dict, index) in KHblnoOptions"
  1310. :key="index.fId"
  1311. :label="dict.fName"
  1312. :value="dict.fId"
  1313. ></el-option>
  1314. </el-select>
  1315. </template>
  1316. </el-table-column>
  1317. <el-table-column
  1318. prop="fFeeid"
  1319. header-align="center"
  1320. align="center"
  1321. width="180px"
  1322. label="费用名称"
  1323. >
  1324. <template slot-scope="scope">
  1325. <el-select
  1326. v-model="scope.row.fFeeid"
  1327. filterable
  1328. remote
  1329. :disabled="browseStatus"
  1330. :remote-method="fWRemoteMethod"
  1331. @change="changeFeeId(scope.row)"
  1332. placeholder="费用名称"
  1333. >
  1334. <el-option
  1335. v-for="(dict, index) in fWbuOptions"
  1336. :key="index.fId"
  1337. :label="dict.fName"
  1338. :value="dict.fId"
  1339. ></el-option>
  1340. </el-select>
  1341. </template>
  1342. </el-table-column>
  1343. <el-table-column
  1344. prop="fStltypeid"
  1345. header-align="center"
  1346. align="center"
  1347. width="130px"
  1348. label="结算方式"
  1349. >
  1350. <template slot-scope="scope">
  1351. <el-select
  1352. v-model="scope.row.fStltypeid"
  1353. placeholder="请选择结算表票结、月结"
  1354. :disabled="browseStatus"
  1355. >
  1356. <el-option
  1357. v-for="dict in fStltypeidOptions"
  1358. :key="dict.dictValue"
  1359. :label="dict.dictLabel"
  1360. :value="parseInt(dict.dictValue)"
  1361. ></el-option>
  1362. </el-select>
  1363. </template>
  1364. </el-table-column>
  1365. <el-table-column
  1366. prop="fFeeunitid"
  1367. header-align="center"
  1368. align="center"
  1369. width="180px"
  1370. label="计价单位"
  1371. >
  1372. <template slot-scope="scope">
  1373. <el-select
  1374. v-model="scope.row.fFeeunitid"
  1375. filterable
  1376. remote
  1377. :disabled="browseStatus"
  1378. @change="changeFeeUnit(scope.row)"
  1379. :remote-method="corpsRemoteMethod"
  1380. placeholder="计价单位"
  1381. >
  1382. <el-option
  1383. v-for="(dict, index) in fFeetunitOptions"
  1384. :key="index.dictValue"
  1385. :label="dict.dictLabel"
  1386. :value="dict.dictValue"
  1387. ></el-option>
  1388. </el-select>
  1389. </template>
  1390. </el-table-column>
  1391. <el-table-column
  1392. prop="fQty"
  1393. header-align="center"
  1394. align="center"
  1395. width="150px"
  1396. label="数量"
  1397. >
  1398. <template slot-scope="scope">
  1399. <el-input
  1400. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1401. v-model="scope.row.fQty"
  1402. :disabled="browseStatus"
  1403. @change="changeContractAmt(scope.row)"
  1404. placeholder="数量"
  1405. show-word-limit
  1406. />
  1407. </template>
  1408. </el-table-column>
  1409. <el-table-column
  1410. prop="fUnitprice"
  1411. header-align="center"
  1412. align="center"
  1413. width="150px"
  1414. label="单价"
  1415. >
  1416. <template slot-scope="scope">
  1417. <el-input
  1418. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1419. v-model="scope.row.fUnitprice"
  1420. :disabled="browseStatus"
  1421. @change="changeContractAmt(scope.row)"
  1422. placeholder="单价"
  1423. show-word-limit
  1424. />
  1425. </template>
  1426. </el-table-column>
  1427. <el-table-column
  1428. prop="fAmount"
  1429. header-align="center"
  1430. align="center"
  1431. width="150px"
  1432. label="金额"
  1433. >
  1434. <template slot-scope="scope">
  1435. <el-input
  1436. disabled
  1437. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1438. v-model="scope.row.fAmount"
  1439. placeholder="金额"
  1440. show-word-limit
  1441. />
  1442. </template>
  1443. </el-table-column>
  1444. <el-table-column
  1445. prop="fCurrency"
  1446. header-align="center"
  1447. align="center"
  1448. width="150px"
  1449. label="币别"
  1450. >
  1451. <template slot-scope="scope">
  1452. <el-input
  1453. v-model="scope.row.fCurrency"
  1454. :disabled="browseStatus"
  1455. placeholder="币别"
  1456. show-word-limit
  1457. />
  1458. </template>
  1459. </el-table-column>
  1460. <el-table-column
  1461. prop="fExrate"
  1462. header-align="center"
  1463. align="center"
  1464. width="150px"
  1465. label="汇率"
  1466. >
  1467. <template slot-scope="scope">
  1468. <el-input
  1469. v-model="scope.row.fExrate"
  1470. :disabled="browseStatus"
  1471. placeholder="汇率"
  1472. show-word-limit
  1473. />
  1474. </template>
  1475. </el-table-column>
  1476. <el-table-column
  1477. prop="fTaxrate"
  1478. header-align="center"
  1479. align="center"
  1480. width="150px"
  1481. label="税率"
  1482. >
  1483. <template slot-scope="scope">
  1484. <el-input
  1485. v-model="scope.row.fTaxrate"
  1486. :disabled="browseStatus"
  1487. placeholder="税率"
  1488. show-word-limit
  1489. />
  1490. </template>
  1491. </el-table-column>
  1492. <el-table-column
  1493. prop="fMblno"
  1494. header-align="center"
  1495. align="center"
  1496. width="130px"
  1497. label="提单号"
  1498. >
  1499. <template slot-scope="scope">
  1500. <el-input
  1501. v-model="scope.row.fMblno"
  1502. :disabled="browseStatus"
  1503. placeholder="提单号"
  1504. show-word-limit
  1505. />
  1506. </template>
  1507. </el-table-column>
  1508. <el-table-column
  1509. prop="fProductName"
  1510. header-align="center"
  1511. align="center"
  1512. width="140px"
  1513. label="品名"
  1514. >
  1515. <template slot-scope="scope">
  1516. <el-input
  1517. v-model="scope.row.fProductName"
  1518. :disabled="browseStatus"
  1519. placeholder="品名"
  1520. show-word-limit
  1521. />
  1522. </template>
  1523. </el-table-column>
  1524. <el-table-column
  1525. prop="fMarks"
  1526. header-align="center"
  1527. align="center"
  1528. width="130px"
  1529. label="品牌"
  1530. >
  1531. <template slot-scope="scope">
  1532. <el-input
  1533. v-model="scope.row.fMarks"
  1534. :disabled="browseStatus"
  1535. placeholder="品牌"
  1536. show-word-limit
  1537. />
  1538. </template>
  1539. </el-table-column>
  1540. <el-table-column
  1541. prop="remarks"
  1542. header-align="center"
  1543. align="center"
  1544. width="150px"
  1545. label="备注"
  1546. >
  1547. <template slot-scope="scope">
  1548. <el-input
  1549. v-model="scope.row.remarks"
  1550. :disabled="browseStatus"
  1551. placeholder="备注"
  1552. show-word-limit
  1553. />
  1554. </template>
  1555. </el-table-column>
  1556. <el-table-column
  1557. header-align="center"
  1558. align="center"
  1559. width="150px"
  1560. label="操作"
  1561. >
  1562. <template slot-scope="scope">
  1563. <el-button size="small">审核费用</el-button>
  1564. <el-button
  1565. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  1566. :disabled="browseStatus"
  1567. size="small"
  1568. >移除
  1569. </el-button
  1570. >
  1571. </template>
  1572. </el-table-column>
  1573. </el-table>
  1574. </el-collapse-item>
  1575. </el-collapse>
  1576. <div slot="footer" class="dialog-footer">
  1577. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  1578. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
  1579. <el-button type="primary" :disabled="notChange" @click="saveForm">保 存</el-button>
  1580. <el-button v-if="approve === true" @click="goApproval">审批</el-button>
  1581. <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
  1582. <el-button type="primary" :disabled="approvalStatus" v-if="form.fBillstatus > 3" @click="addOrUpdateHandle()">查看审批流</el-button>
  1583. <el-button type="primary" :disabled="notChange" @click="submitForm">提交审核</el-button>
  1584. <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @click="backApproval">撤销审批</el-button>
  1585. <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
  1586. <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
  1587. </div>
  1588. <!-- 选择库存总账数据 -->
  1589. <el-dialog
  1590. title="库存总账"
  1591. :modal="false"
  1592. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1593. :visible.sync="whgenlegVisible"
  1594. :close-on-click-modal="false"
  1595. width="70%"
  1596. >
  1597. <el-table
  1598. :data="whgenlegList"
  1599. ref="tableList"
  1600. tooltip-effect="dark"
  1601. width="100%"
  1602. border
  1603. stripe
  1604. @selection-change="whgenlegSelectionChange"
  1605. >
  1606. <el-table-column type="selection" width="55"></el-table-column>
  1607. <el-table-column
  1608. prop="fMblno"
  1609. header-align="center"
  1610. align="center"
  1611. label="提单号"
  1612. >
  1613. </el-table-column>
  1614. <el-table-column
  1615. prop="createTime"
  1616. header-align="center"
  1617. align="center"
  1618. width="180px"
  1619. label="入库日期"
  1620. >
  1621. </el-table-column>
  1622. <el-table-column
  1623. prop="fGoodsids"
  1624. header-align="center"
  1625. align="center"
  1626. label="品名"
  1627. >
  1628. </el-table-column>
  1629. <el-table-column
  1630. prop="fQtyblc"
  1631. header-align="center"
  1632. align="center"
  1633. label="结余数量"
  1634. >
  1635. </el-table-column>
  1636. <el-table-column
  1637. prop="fWarehouseids"
  1638. header-align="center"
  1639. align="center"
  1640. label="库位"
  1641. >
  1642. </el-table-column>
  1643. <!-- <el-table-column-->
  1644. <!-- prop="fWarehouseLocationids"-->
  1645. <!-- header-align="center"-->
  1646. <!-- align="center"-->
  1647. <!-- label="库区"-->
  1648. <!-- >-->
  1649. <!-- </el-table-column>-->
  1650. </el-table>
  1651. <pagination
  1652. v-show="whgenlegTotal > 0"
  1653. :total="whgenlegTotal"
  1654. :page.sync="whgenlegParams.pageNum"
  1655. :limit.sync="whgenlegParams.pageSize"
  1656. @pagination="getWhgenlegList"
  1657. />
  1658. <div slot="footer" class="dialog-footer">
  1659. <el-button type="primary" @click="whgenlegData">导入</el-button>
  1660. <el-button @click="whgenlegVisible = false">取 消</el-button>
  1661. </div>
  1662. </el-dialog>
  1663. </el-dialog>
  1664. </div>
  1665. </template>
  1666. <script>
  1667. import print from 'print-js'
  1668. import {
  1669. backFee,
  1670. RevocationApproval,
  1671. addWhgenleg,
  1672. listGoodsTransfer,
  1673. getGoodsTransfer,
  1674. addGoodsTransfer,
  1675. warehouseSubmission,
  1676. delGoodsTransfer,
  1677. exportGoodsTransfer
  1678. } from '@/api/warehouseBusiness/goodsTransfer'
  1679. import { updateCredit } from '@/api/warehouseBusiness/goodsTransfer'
  1680. import { listCorps } from '@/api/basicdata/corps'
  1681. import { listFees } from '@/api/basicdata/fees'
  1682. import { listWarehouse, listWarehousesss, treeselect } from '@/api/basicdata/warehouse'
  1683. import { listArea } from '@/api/basicdata/area'
  1684. import { listGoods } from '@/api/basicdata/goods'
  1685. import { listUser, queryUserVal } from '@/api/system/user'
  1686. import { listWhgenleg } from '@/api/reportManagement/whgenleg'
  1687. import UploadFile from '@/components/Uploadfile'
  1688. import AddOrUpdate from '@/views/viewApproval'
  1689. import ApprovalComments from '@/views/startApproval'
  1690. import Global from '@/layout/components/global'
  1691. import { getAgreement } from '@/api/warehouseBusiness/agreement'
  1692. import Treeselect from '@riophae/vue-treeselect'
  1693. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  1694. export default {
  1695. name: 'goodsTransfer',
  1696. components: {
  1697. UploadFile,
  1698. AddOrUpdate,
  1699. ApprovalComments,
  1700. Treeselect
  1701. },
  1702. data() {
  1703. return {
  1704. activeNames:['1'],
  1705. //仓库树状图
  1706. warehousesOptions:[],
  1707. fWarehouseidOption:[],
  1708. Lander:'',
  1709. Operator:'',
  1710. colseButton:true,
  1711. cancelButton:true,
  1712. disappear:false,
  1713. goodsTransferId:130,
  1714. addOrUpdateVisible: false,
  1715. addOrUpdateVisib:false,
  1716. approvalStatus: false,
  1717. // 审批状态
  1718. approve:false,
  1719. notChange:false,
  1720. // 修改查看状态
  1721. browseStatus: false,
  1722. // 是否有明细入库
  1723. formBrowseStatus: false,
  1724. // 遮罩层
  1725. loading: true,
  1726. // 选中数组
  1727. ids: [],
  1728. userVal: {
  1729. userName: null,
  1730. nickName: null,
  1731. deptId: null
  1732. },
  1733. queryForm: {},
  1734. // 添加用户对话框
  1735. editDialogVisible_s: false,
  1736. editDialogVisible_ss: false,
  1737. editDialogClosed_ss: false,
  1738. dataList: [],
  1739. warehouseCrList: [],
  1740. warehouseDrList: [],
  1741. relevantAttachments: [],
  1742. fPlannetweight: '',
  1743. // 税率
  1744. fTaxrate: null,
  1745. // 非单个禁用
  1746. single: true,
  1747. // 非多个禁用
  1748. multiple: true,
  1749. // 显示搜索条件
  1750. showSearch: true,
  1751. // 总条数
  1752. total: 0,
  1753. // 仓库主(出入库)表格数据
  1754. goodsTransferList: [],
  1755. // 弹出层标题
  1756. title: '',
  1757. // 是否显示弹出层
  1758. open: false,
  1759. // 货权方(客户数据)
  1760. fMblnoOptions: [],
  1761. // 货权方(客户数据)
  1762. // 客户名称
  1763. KHblnoOptions: [],
  1764. fSbuOptions: [],
  1765. // 操作员
  1766. userOptions: [],
  1767. // 操作员
  1768. goodsOptions: [],
  1769. // 库存明细入账数组
  1770. dataListSelection: [],
  1771. // 库存明细撤回入账数组
  1772. dataWithdrawList: [],
  1773. // 仓库(仓库
  1774. warehouseOptions: [],
  1775. // 仓储类型 入库时选择 产地 规格 品牌 所用,对应storage_type 字典
  1776. fStorageTypeOptions: [],
  1777. kqhouseOptions: [],
  1778. // 贸易方式(数据字典),对应t_trademodels 字典
  1779. fTrademodeidOptions: [],
  1780. // 计费单位(数据字典),下拉选择毛重或净重字典
  1781. fFeetunitOptions: [],
  1782. // 结算方式(数据字典),下拉选择字典
  1783. fStltypeOptions: [],
  1784. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  1785. fIfweighOptions: [],
  1786. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  1787. fIfpledgeOptions: [],
  1788. // 是否破损(数据字典),默认F否则T字典
  1789. fIfdamageOptions: [],
  1790. // 单据类型(数据字典)SJRK字典
  1791. fBilltypeOptions: [],
  1792. // 状态(数据字典),N 入字典
  1793. fBillstatusOptions: [],
  1794. //结算方式对应字典表
  1795. fStltypeidOptions:[],
  1796. // 费用名称
  1797. fWbuOptions: [],
  1798. // 查询参数
  1799. queryParams: {
  1800. pageNum: 1,
  1801. pageSize: 10,
  1802. fBillno: null,
  1803. createBy: null,
  1804. createTime: null,
  1805. fCustomsdeclartion: null,
  1806. fOriginalbillno: null,
  1807. fDeptid: null,
  1808. fBsdeptid: null,
  1809. fContacts: null,
  1810. fTel: null,
  1811. fCorpid: null,
  1812. fTocorpid: null,
  1813. fStltypeid: null,
  1814. fBscorpno: null,
  1815. fWarehouseid: null,
  1816. fStorekeeper: null,
  1817. fBsdate: null,
  1818. fPlanqty: null,
  1819. fPlangrossweight: null,
  1820. fPlannetweight: null,
  1821. fPlanvolumn: null,
  1822. fQty: null,
  1823. fGrossweight: null,
  1824. fNetweight: null,
  1825. fVolumn: null,
  1826. fTrademodeid: null,
  1827. fSbu: null,
  1828. fFeetunit: null,
  1829. fMblno: null,
  1830. fVslvoy: null,
  1831. fEta: null,
  1832. fCustomno: null,
  1833. fIfweigh: null,
  1834. fIfpledge: null,
  1835. fIfdamage: null,
  1836. fBankcorpid: null,
  1837. fBilltype: null,
  1838. fBillstatus: null,
  1839. fCreateby: null,
  1840. fCreatetime: null,
  1841. fGoodsid: null,
  1842. fCntrtype: null,
  1843. fCntqty: null
  1844. },
  1845. // 日期区间
  1846. orgStorageDate: null,
  1847. // 表单参数
  1848. form: {
  1849. fFeetunit:"2"
  1850. },
  1851. // 库存总账参数
  1852. whgenlegParams: {
  1853. pageNum: 1,
  1854. pageSize: 10,
  1855. fMblno: null,
  1856. fCorpid: null,
  1857. fWarehouseid: null,
  1858. fTrademodeid: null,
  1859. orgStorageDate: null
  1860. },
  1861. // 库存总账表
  1862. whgenlegList: [],
  1863. whgenlegTotal: 0,
  1864. // 弹窗库存总账数据
  1865. dialogWhgenlegList: [],
  1866. // 库存总账对话框
  1867. whgenlegVisible: false,
  1868. // 表单校验
  1869. rules: {
  1870. fBsdeptid: [{ required: true, message: ' ', trigger: 'blur' }],
  1871. fCorpid: [{ required: true, message: ' ', trigger: 'blur' }],
  1872. fBsdate: [{ required: true, message: ' ', trigger: 'blur' }],
  1873. fFeetunit: [{ required: true, message: ' ', trigger: 'blur' }],
  1874. fChargedate: [{ required: true, message: ' ', trigger: 'blur' }],
  1875. fTrademodeid: [{ required: true, message: ' ', trigger: 'blur' }],
  1876. fSbu: [{ required: true, message: ' ', trigger: 'blur' }],
  1877. fStorekeeper: {
  1878. required: true,
  1879. message: ' ',
  1880. trigger: 'blur'
  1881. },
  1882. fWarehouseid: [{ required: true, message: ' ', trigger: 'blur' }],
  1883. fbillingway: [
  1884. {
  1885. required: true,
  1886. message: ' ',
  1887. trigger: 'blur'
  1888. }
  1889. ],
  1890. fTocorpid: [
  1891. {
  1892. required: true,
  1893. message: ' ',
  1894. trigger: 'blur'
  1895. }
  1896. ]
  1897. }
  1898. }
  1899. },
  1900. created() {
  1901. this.getList()
  1902. this.getDicts('tax_rate').then((response) => {
  1903. this.fTaxrate = response.data[0].dictValue
  1904. })
  1905. this.getDicts('data_trademodes').then((response) => {
  1906. this.fTrademodeidOptions = response.data
  1907. })
  1908. this.getDicts("storage_type").then((response) => {
  1909. this.fStorageTypeOptions = response.data;
  1910. });
  1911. this.getDicts('data_stltype_type').then((response) => {
  1912. this.fStltypeOptions = response.data
  1913. })
  1914. this.getDicts('data_ifweigh_status').then((response) => {
  1915. this.fIfweighOptions = response.data
  1916. })
  1917. this.getDicts('data_ifpledge_status').then((response) => {
  1918. this.fIfpledgeOptions = response.data
  1919. })
  1920. this.getDicts('data_ifdamage_status').then((response) => {
  1921. this.fIfdamageOptions = response.data
  1922. })
  1923. this.getDicts('data_billtype_type').then((response) => {
  1924. this.fBilltypeOptions = response.data
  1925. })
  1926. this.getDicts('sys_common_status').then((response) => {
  1927. this.fBillstatusOptions = response.data
  1928. })
  1929. this.getDicts('data_unitfees').then((response) => {
  1930. this.fFeetunitOptions = response.data
  1931. })
  1932. this.getDicts("data_stltype_type").then(response => {
  1933. this.fStltypeidOptions = response.data;
  1934. });
  1935. treeselect().then(response => {
  1936. this.fWarehouseidOption = response.data
  1937. })
  1938. this.register()
  1939. },
  1940. activated(){
  1941. this.Jump()
  1942. },
  1943. methods: {
  1944. /** 查询部门下拉树结构 */
  1945. treeseLect(tree){
  1946. this.queryParams.fWarehouselocid = tree.id
  1947. },
  1948. getTreeselect() {
  1949. treeselect().then(response => {
  1950. this.warehousesOptions = response.data;
  1951. });
  1952. },
  1953. // 撤销审核
  1954. backrRconciliation(){
  1955. this.form.fBillstatus = '1'
  1956. backFee(this.form.fId).then(response=>{
  1957. this.msgSuccess("撤回成功")
  1958. this.getList()
  1959. this.open = false
  1960. this.getList()
  1961. })
  1962. },
  1963. // 默认录入人
  1964. register() {
  1965. queryUserVal().then((response)=>{
  1966. this.Lander = response.user.userName
  1967. })
  1968. },
  1969. // 审批按钮
  1970. goApproval(){
  1971. this.addOrUpdateVisib = true
  1972. this.$nextTick(() => {
  1973. this.$refs.ApprovalComments.init(this.form.fId,this.goodsTransferId)
  1974. })
  1975. },
  1976. Jump(){
  1977. this.approval = this.$route.query.data
  1978. if(this.approval){
  1979. this.getTreeselect()
  1980. this.reset()
  1981. this.colseButton = false
  1982. this.approval = JSON.parse(this.approval)
  1983. this.hide = false
  1984. this.open = true
  1985. this.browseStatus = true
  1986. this.notChange = true
  1987. this.approve = true
  1988. this.disappear = true
  1989. this.cancelButton = false
  1990. getGoodsTransfer(this.approval.billId).then((response) => {
  1991. if (response.data.warehousebills) {
  1992. this.form = response.data.warehousebills;
  1993. if (this.form.fBillstatus > 2) {
  1994. this.approvalStatus = false;
  1995. } else {
  1996. this.approvalStatus = true;
  1997. }
  1998. }
  1999. this.form = response.data.warehousebills
  2000. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2001. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2002. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2003. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2004. this.fMblnoOptions = response.data.corps
  2005. this.KHblnoOptions = response.data.corps
  2006. this.fWbuOptions = response.data.feesList
  2007. this.warehouseOptions = response.data.warehouse
  2008. this.dataList = response.data.warehouseBillsItem
  2009. for (let list in this.dataList) {
  2010. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  2011. this.formBrowseStatus = true
  2012. }
  2013. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2014. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  2015. }
  2016. this.goodsOptions = response.data.goodsList
  2017. if (response.data.warehousebillsfeesDr) {
  2018. this.warehouseDrList = response.data.warehousebillsfeesDr
  2019. for (let dr in this.warehouseDrList) {
  2020. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  2021. }
  2022. }
  2023. if (response.data.warehousebillsfeesCr) {
  2024. this.warehouseCrList = response.data.warehousebillsfeesCr
  2025. for (let cr in this.warehouseCrList) {
  2026. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  2027. }
  2028. }
  2029. if (response.data.enclosures) {
  2030. this.relevantAttachments = response.data.enclosures;
  2031. }
  2032. this.userOptions = response.data.sysUser
  2033. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2034. this.open = true
  2035. this.title = '修改货存转移'
  2036. })
  2037. }
  2038. },
  2039. homepaGe(){
  2040. let view = {
  2041. fullPath: "/business/goodsTransfer",
  2042. hash: "",
  2043. matched: Array(2),
  2044. meta: Object,
  2045. name: "GoodsTransfer",
  2046. params: Object,
  2047. path: "/business/goodsTransfer",
  2048. query: Object,
  2049. title: "货转"
  2050. }
  2051. this.$router.push({ path: '/index'})
  2052. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  2053. if (this.isActive(view)) {
  2054. this.toLastView(visitedViews, view)
  2055. }
  2056. })
  2057. Global.$emit("removeCache", "closeSelectedTag", view);
  2058. },
  2059. homePage() {
  2060. this.open = false
  2061. let view = {
  2062. fullPath: "/business/goodsTransfer",
  2063. hash: "",
  2064. matched: Array(2),
  2065. meta: Object,
  2066. name: "GoodsTransfer",
  2067. params: Object,
  2068. path: "/business/goodsTransfer",
  2069. query: Object,
  2070. title: "货转"
  2071. }
  2072. this.$router.push({ path: '/index' })
  2073. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  2074. if (this.isActive(view)) {
  2075. this.toLastView(visitedViews, view)
  2076. }
  2077. })
  2078. Global.$emit("removeCache", "closeSelectedTag", view);
  2079. },
  2080. // 撤销审批
  2081. backApproval(){
  2082. let data = {
  2083. id:this.form.fId,
  2084. actId:this.goodsTransferId,
  2085. billId:this.form.fId
  2086. }
  2087. RevocationApproval(data).then(response => {
  2088. this.msgSuccess("撤销审批成功")
  2089. this.disappear = true
  2090. this.open = false
  2091. this.getList()
  2092. })
  2093. },
  2094. returnData(){
  2095. this.addOrUpdateVisib = false
  2096. this.open = false
  2097. this.homepaGe()
  2098. },
  2099. getDataList(){
  2100. this.addOrUpdateVisible = false
  2101. },
  2102. // 查看审批流
  2103. addOrUpdateHandle(){
  2104. this.addOrUpdateVisible = true
  2105. this.addOrUpdateVisib = false
  2106. let id = '448'
  2107. let actId = '110'
  2108. this.$nextTick(() => {
  2109. this.$refs.addOrUpdate.init(this.form.fId,this.goodsTransferId)
  2110. })
  2111. },
  2112. // 上传成功返回数据
  2113. showFile(row) {
  2114. // this.$set(this.relevantAttachments[0], 'fName', row.fileName)
  2115. this.$set(this.relevantAttachments[0], 'fUrl', row.url)
  2116. },
  2117. printSomething() {
  2118. // 此处的style即为打印时的样式
  2119. const style =
  2120. '@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}'
  2121. print({
  2122. printable: 'print_area',
  2123. type: 'html',
  2124. style: style, // 亦可使用引入的外部css;
  2125. scanStyles: false
  2126. })
  2127. },
  2128. // 新增附件上传
  2129. addRelevt() {
  2130. this.relevantAttachments.push({
  2131. fUrl: null,
  2132. fName: null,
  2133. createBy: this.form.createBy,
  2134. createTime: Date.parse(new Date())
  2135. })
  2136. },
  2137. // 添加list
  2138. addRelevant() {
  2139. if (!this.form.fCorpid || !this.form.fTrademodeid || !this.form.fWarehouseid) {
  2140. this.$message({ message: '请维护货权方、贸易方式、仓库', type: 'warning' })
  2141. return false
  2142. }
  2143. this.whgenlegList = []
  2144. this.dialogWhgenlegList = []
  2145. this.whgenlegTotal = 0
  2146. this.whgenlegVisible = true
  2147. this.getWhgenlegList()
  2148. },
  2149. // 查询库存总账信息
  2150. getWhgenlegList() {
  2151. this.whgenlegParams.fMblno = this.form.fMblno
  2152. this.whgenlegParams.fCorpid = this.form.fCorpid
  2153. this.whgenlegParams.fWarehouseid = this.form.fWarehouseid
  2154. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid
  2155. this.whgenlegParams.orgStorageDate = this.orgStorageDate
  2156. listWhgenleg(this.whgenlegParams).then((response) => {
  2157. this.whgenlegList = response.rows
  2158. this.whgenlegTotal = response.total
  2159. })
  2160. },
  2161. // 库存总账多选框
  2162. whgenlegSelectionChange(selection) {
  2163. this.dialogWhgenlegList = selection
  2164. },
  2165. // 库存总账导出数据
  2166. whgenlegData() {
  2167. if (this.dialogWhgenlegList.length === 0) {
  2168. this.$message({ message: '未勾选信息', type: 'warning' })
  2169. return false
  2170. }
  2171. setTimeout(() => {
  2172. for (let whgen in this.dialogWhgenlegList) {
  2173. this.dataList.push({
  2174. fBsdate:this.form.fBsdate,
  2175. fId: null,
  2176. fQty: 0,
  2177. fCntqty: 1,
  2178. remark: null,
  2179. fGoodsval: 0,
  2180. fNetweight: 0,
  2181. fBillstatus: 1,
  2182. fGrossweight: 0,
  2183. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  2184. fMarks: this.dialogWhgenlegList[whgen].fMarks,
  2185. fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
  2186. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  2187. fVolumn: this.dialogWhgenlegList[whgen].fVolumnblc,
  2188. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  2189. fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
  2190. fWarehouseids: this.dialogWhgenlegList[whgen].fWarehouseids,
  2191. fPackagespecs: this.dialogWhgenlegList[whgen].fPackagespecs,
  2192. fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
  2193. fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
  2194. fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
  2195. fBusinessType: this.dialogWhgenlegList[whgen].fBusinessType + '',
  2196. fOriginalbilldate: this.dialogWhgenlegList[whgen].fOriginalbilldate,
  2197. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  2198. fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids
  2199. })
  2200. }
  2201. }, 100)
  2202. setTimeout(() => {
  2203. this.updateDeduplication()
  2204. }, 300)
  2205. this.whgenlegVisible = false
  2206. },
  2207. // 更新主表品牌、品名并去重
  2208. updateDeduplication: function() {
  2209. if (this.dataList.length === 0) {
  2210. return false
  2211. }
  2212. let fMarks = []
  2213. let fProductName = []
  2214. let fMblno = []
  2215. for (let li in this.dataList) {
  2216. fMarks.push(this.dataList[li].fMarks)
  2217. fProductName.push(this.dataList[li].fGoodsids)
  2218. fMblno.push(this.dataList[li].fMblno)
  2219. }
  2220. this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
  2221. this.$set(this.form, 'fProductName', Array.from(new Set(fProductName)).join(","))
  2222. this.$set(this.form, 'fMblno', Array.from(new Set(fMblno)).join(","))
  2223. },
  2224. // 收货单打印界面
  2225. showEditDialog_s() {
  2226. this.editDialogVisible_s = true
  2227. },
  2228. showEditDialog_ss() {
  2229. this.editDialogVisible_ss = true
  2230. },
  2231. // 收款信息
  2232. addCollection() {
  2233. // 获取明细件数
  2234. let fQty = 0;
  2235. for (let li in this.dataList) {
  2236. if (this.dataList[li].fQty) {
  2237. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  2238. }
  2239. }
  2240. this.warehouseDrList.push({
  2241. fCorpid: null,
  2242. fFeeid: null,
  2243. fFeeunitid: "1",
  2244. fQty: fQty,
  2245. fUnitprice: 0,
  2246. fAmount: 0,
  2247. fCurrency: null,
  2248. fCxrate: null,
  2249. fTaxrate: this.fTaxrate,
  2250. fRate: null,
  2251. remarks: null,
  2252. fMblno:this.form.fMblno,
  2253. fProductName:this.form.fProductName,
  2254. fMarks:this.form.fMarks
  2255. })
  2256. },
  2257. addpayment() {
  2258. // 获取明细件数
  2259. let fQty = 0;
  2260. for (let li in this.dataList) {
  2261. if (this.dataList[li].fQty) {
  2262. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  2263. }
  2264. }
  2265. this.warehouseCrList.push({
  2266. fCorpid: null,
  2267. fFeeid: null,
  2268. fFeeunitid: "1",
  2269. fQty: fQty,
  2270. fUnitprice: 0,
  2271. fAmount: 0,
  2272. fCurrency: null,
  2273. fTaxrate: this.fTaxrate,
  2274. fCxrate: null,
  2275. fRate: null,
  2276. remarks: null,
  2277. fMblno:this.form.fMblno,
  2278. fProductName:this.form.fProductName,
  2279. fMarks:this.form.fMarks
  2280. })
  2281. },
  2282. queryUser() {
  2283. queryUserVal().then((response) => {
  2284. if (response.user !== null) {
  2285. this.userVal = response.user
  2286. this.$set(this.form, 'fDeptid', this.userVal.deptId)
  2287. this.$set(this.form, 'createBy', this.userVal.userName)
  2288. this.$set(this.form,"fStorekeeper",this.userVal.userName)
  2289. this.$set(this.form, 'fTrademodeid', '1')
  2290. // this.$set(this.relevantAttachments, "opUserName", this.userVal.userName);
  2291. this.$set(this.form, 'createTime', Date.parse(new Date()))
  2292. }
  2293. })
  2294. },
  2295. /** 查询仓库主(出入库)列表 */
  2296. getList() {
  2297. this.loading = true
  2298. listGoodsTransfer(this.queryParams).then((response) => {
  2299. this.goodsTransferList = response.rows
  2300. this.total = response.total
  2301. this.loading = false
  2302. })
  2303. },
  2304. /* 获取所有仓库信息 */
  2305. warehousesssMethod() {
  2306. let queryParams = { pageNum: 1, pageSize: 10, fStatus: 0, delFlag: 0 };
  2307. listWarehousesss(queryParams).then((response) => {
  2308. this.warehouseOptions = response.rows;
  2309. });
  2310. },
  2311. /* 远程模糊查询库区 */
  2312. kqhouseRemoteMethod(name) {
  2313. if (name == null || name === '') {
  2314. return false
  2315. }
  2316. if (!this.form.fWarehouseid) {
  2317. this.$message.error('请输入仓库!')
  2318. return false
  2319. }
  2320. let queryParams = {
  2321. pageNum: 1,
  2322. pageSize: 10,
  2323. fWarehouseid: this.form.fWarehouseid,
  2324. fName: name
  2325. }
  2326. listArea(queryParams).then((response) => {
  2327. this.kqhouseOptions = response.rows
  2328. })
  2329. },
  2330. // 贸易方式(数据字典),对���t_trademodels 字典翻译
  2331. fTrademodeidFormat(row, column) {
  2332. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid)
  2333. },
  2334. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  2335. fIfweighFormat(row, column) {
  2336. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh)
  2337. },
  2338. // 编号字典翻译
  2339. fStltypeidFormat(row, column) {
  2340. return this.selectDictLabel(this.fStltypeOptions, row.fStltypeid)
  2341. },
  2342. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  2343. fIfpledgeFormat(row, column) {
  2344. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge)
  2345. },
  2346. // 是否破损(数据字典),默认F否则T字典翻译
  2347. fIfdamageFormat(row, column) {
  2348. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage)
  2349. },
  2350. // 单据类型(数据字典)SJRK字典翻译
  2351. fBilltypeFormat(row, column) {
  2352. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype)
  2353. },
  2354. // 状态(数据字典),N 入字典翻译
  2355. fBillstatusFormat(row, column) {
  2356. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus)
  2357. },
  2358. // 取消按钮
  2359. cancel() {
  2360. this.reset()
  2361. this.open = false
  2362. this.getList()
  2363. },
  2364. // 表单重置
  2365. reset() {
  2366. this.disappear = false
  2367. this.addOrUpdateVisible = false
  2368. this.addOrUpdateVisib = false
  2369. this.approve = false
  2370. this.formBrowseStatus = false
  2371. this.detailsHidden = false
  2372. this.notChange = false
  2373. this.browseStatus = false
  2374. this.whgenlegVisible = false
  2375. this.editDialogVisible_ss = false
  2376. this.editDialogVisible_s = false
  2377. this.dataList = []
  2378. this.fWbuOptions = []
  2379. this.fWbuOptions = []
  2380. this.resetForm('form')
  2381. this.fMblnoOptions = []
  2382. this.KHblnoOptions = []
  2383. this.KHblnoOptions = []
  2384. this.warehouseDrList = []
  2385. this.warehouseCrList = []
  2386. this.warehouseOptions = []
  2387. this.relevantAttachments = []
  2388. },
  2389. /** 搜索按钮操作 */
  2390. handleQuery() {
  2391. this.queryParams.pageNum = 1
  2392. this.getList()
  2393. },
  2394. /** 重置按钮操作 */
  2395. resetQuery() {
  2396. this.resetForm('queryForm')
  2397. this.handleQuery()
  2398. },
  2399. // 多选框选中数据
  2400. handleSelectionChange(selection) {
  2401. this.ids = selection.map((item) => item.fId)
  2402. this.single = selection.length !== 1
  2403. this.multiple = !selection.length
  2404. },
  2405. /** 新增按钮操作 */
  2406. handleAdd() {
  2407. this.reset()
  2408. this.notChange = false
  2409. this.browseStatus = false
  2410. this.queryUser()
  2411. this.warehousesssMethod()
  2412. this.open = true
  2413. this.dataList = []
  2414. this.warehouseCrList = []
  2415. this.warehouseDrList = []
  2416. this.relevantAttachments = []
  2417. this.title = '货权转移'
  2418. },
  2419. check_s(row) {
  2420. this.disappear = true
  2421. this.notChange = true
  2422. this.browseStatus = true
  2423. const fId = row.fId || this.ids
  2424. getGoodsTransfer(fId).then((response) => {
  2425. this.Operator = response.data.corps[0].createBy
  2426. this.form = response.data.warehousebills
  2427. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2428. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2429. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2430. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2431. this.fMblnoOptions = response.data.corps
  2432. this.KHblnoOptions = response.data.corps
  2433. this.fWbuOptions = response.data.feesList
  2434. this.warehouseOptions = response.data.warehouse
  2435. this.dataList = response.data.warehouseBillsItem
  2436. for (let list in this.dataList) {
  2437. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  2438. this.formBrowseStatus = true
  2439. }
  2440. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2441. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  2442. }
  2443. this.goodsOptions = response.data.goodsList
  2444. if (response.data.warehousebillsfeesDr) {
  2445. this.warehouseDrList = response.data.warehousebillsfeesDr
  2446. for (let dr in this.warehouseDrList) {
  2447. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  2448. }
  2449. }
  2450. if (response.data.warehousebillsfeesCr) {
  2451. this.warehouseCrList = response.data.warehousebillsfeesCr
  2452. for (let cr in this.warehouseCrList) {
  2453. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  2454. }
  2455. }
  2456. if (response.data.enclosures) {
  2457. this.relevantAttachments = response.data.enclosures;
  2458. }
  2459. this.userOptions = response.data.sysUser
  2460. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2461. this.open = true
  2462. this.title = '修改货存转移'
  2463. console.log(this.Operator)
  2464. console.log(this.Lander)
  2465. })
  2466. },
  2467. // 查看按钮
  2468. check(row) {
  2469. this.disappear = false
  2470. this.notChange = true
  2471. this.browseStatus = true
  2472. const fId = row.fId || this.ids
  2473. getGoodsTransfer(fId).then((response) => {
  2474. console.log(response.data.corps[0].createBy)
  2475. this.Operator = response.data.corps[0].createBy
  2476. this.form = response.data.warehousebills
  2477. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2478. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2479. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2480. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2481. this.fMblnoOptions = response.data.corps
  2482. this.KHblnoOptions = response.data.corps
  2483. this.fWbuOptions = response.data.feesList
  2484. this.warehouseOptions = response.data.warehouse
  2485. this.dataList = response.data.warehouseBillsItem
  2486. for (let list in this.dataList) {
  2487. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  2488. this.formBrowseStatus = true
  2489. }
  2490. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2491. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  2492. }
  2493. this.goodsOptions = response.data.goodsList
  2494. if (response.data.warehousebillsfeesDr) {
  2495. this.warehouseDrList = response.data.warehousebillsfeesDr
  2496. for (let dr in this.warehouseDrList) {
  2497. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  2498. }
  2499. }
  2500. if (response.data.warehousebillsfeesCr) {
  2501. this.warehouseCrList = response.data.warehousebillsfeesCr
  2502. for (let cr in this.warehouseCrList) {
  2503. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  2504. }
  2505. }
  2506. if (response.data.enclosures) {
  2507. this.relevantAttachments = response.data.enclosures;
  2508. }
  2509. this.userOptions = response.data.sysUser
  2510. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2511. this.open = true
  2512. this.title = '修改货存转移'
  2513. console.log(this.Operator)
  2514. console.log(this.Lander)
  2515. })
  2516. },
  2517. /** 修改按钮操作 */
  2518. handleUpdate(row, status) {
  2519. this.reset()
  2520. this.notChange = false
  2521. this.browseStatus = status
  2522. const fId = row.fId || this.ids
  2523. getGoodsTransfer(fId).then((response) => {
  2524. this.form = response.data.warehousebills
  2525. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2526. this.$set(this.form, 'fFeetunit', this.form.fFeetunit + '')
  2527. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2528. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2529. this.fMblnoOptions = response.data.corps
  2530. this.KHblnoOptions = response.data.corps
  2531. this.fWbuOptions = response.data.feesList
  2532. this.warehouseOptions = response.data.warehouse
  2533. this.dataList = response.data.warehouseBillsItem
  2534. for (let list in this.dataList) {
  2535. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  2536. this.formBrowseStatus = true
  2537. }
  2538. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2539. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  2540. }
  2541. this.goodsOptions = response.data.goodsList
  2542. if (response.data.warehousebillsfeesDr) {
  2543. this.warehouseDrList = response.data.warehousebillsfeesDr
  2544. for (let dr in this.warehouseDrList) {
  2545. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  2546. }
  2547. }
  2548. if (response.data.warehousebillsfeesCr) {
  2549. this.warehouseCrList = response.data.warehousebillsfeesCr
  2550. for (let cr in this.warehouseCrList) {
  2551. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  2552. }
  2553. }
  2554. if (response.data.enclosures) {
  2555. this.relevantAttachments = response.data.enclosures;
  2556. }
  2557. this.userOptions = response.data.sysUser
  2558. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2559. this.open = true
  2560. this.title = '修改货存转移'
  2561. })
  2562. },
  2563. // 库存明细合计
  2564. getSummaries(param) {
  2565. const { columns, data } = param
  2566. const sums = []
  2567. var values = []
  2568. columns.forEach((column, index) => {
  2569. if (index === 0) {
  2570. sums[index] = ''
  2571. return
  2572. }
  2573. if (column.property === 'fPlanqty') {
  2574. values = data.map((item) => Number(item['fPlanqty']))
  2575. }
  2576. if (column.property === 'fNetweight') {
  2577. values = data.map((item) => Number(item['fPlannetweight']))
  2578. }
  2579. if (column.property === 'fPlannetweight') {
  2580. values = data.map((item) => Number(item['fPlannetweight']))
  2581. }
  2582. if (column.property === 'fQty') {
  2583. values = data.map((item) => Number(item['fQty']))
  2584. }
  2585. if (column.property === 'fGrossweight') {
  2586. values = data.map((item) => Number(item['fGrossweight']))
  2587. }
  2588. if (column.property === 'fCntqty') {
  2589. values = data.map((item) => Number(item['fCntqty']))
  2590. } // const values = data.map(item => Number(item[column.property]))
  2591. if (
  2592. column.property === 'fPlanqty' ||
  2593. column.property === 'fPlannetweight' ||
  2594. column.property === 'fQty' ||
  2595. column.property === 'fGrossweight' ||
  2596. column.property === 'fCntqty' ||
  2597. column.property === 'fPlannetweight'
  2598. ) {
  2599. sums[index] = values.reduce((prev, curr) => {
  2600. const value = Number(curr)
  2601. if (!isNaN(value)) {
  2602. if (column.property === 'fGrossweight') {
  2603. this.form.fGrossweight = prev + curr
  2604. }
  2605. if (column.property === 'fQty') {
  2606. this.form.fQty = prev + curr
  2607. }
  2608. if (column.property === 'fCntqty') {
  2609. this.form.fCntqty = prev + curr
  2610. }
  2611. if (column.property === 'fPlannetweight') {
  2612. this.form.fNetweight = prev + curr
  2613. }
  2614. return prev + curr
  2615. } else {
  2616. return prev
  2617. }
  2618. }, 0) // sums[index]
  2619. }
  2620. })
  2621. this.sums = sums
  2622. return sums
  2623. },
  2624. // 入账
  2625. creditClick() {
  2626. if (this.dataList.length === 0) {
  2627. this.$message({ message: '未找到货转明细', type: 'warning' })
  2628. return false
  2629. }
  2630. for (let dataSelection in this.dataListSelection) {
  2631. if (!this.dataListSelection[dataSelection].fId) {
  2632. this.$message({ message: '请先点击保存,在进行货转确认', type: 'warning' })
  2633. return false
  2634. }
  2635. }
  2636. this.$refs['form'].validate((valid) => {
  2637. if (valid) {
  2638. for (let li in this.dataList) {
  2639. if(this.form.fFeetunit > 3){
  2640. this.$message.error('请维护主表计费单位为件数、毛重或净重')
  2641. return false
  2642. }
  2643. if (!this.dataList[li].fWarehouselocids) {
  2644. this.$message({ message: '请维护第' + Number(li) + 1 + '行库区', type: 'warning' })
  2645. return false
  2646. }
  2647. if (!this.dataList[li].fQty) {
  2648. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转件数', type: 'warning' })
  2649. return false
  2650. }
  2651. if (!this.dataList[li].fGrossweight) {
  2652. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转毛重', type: 'warning' })
  2653. return false
  2654. }
  2655. if (!this.dataList[li].fNetweight) {
  2656. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转净重', type: 'warning' })
  2657. return false
  2658. }
  2659. if (!this.dataList[li].fPackagespecs) {
  2660. this.$message({ message: '请维护第' + Number(li) + 1 + '行货包装规格', type: 'warning' })
  2661. return false
  2662. }
  2663. }
  2664. let formData = new window.FormData()
  2665. formData.append("warehouseBills", JSON.stringify(this.form));
  2666. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2667. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  2668. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2669. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2670. addWhgenleg(formData).then((response) => {
  2671. this.$refs.tableListRef.clearSelection()
  2672. this.msgSuccess('入账成功')
  2673. let item = response.data.warehouseItem
  2674. for (let li in this.dataList) {
  2675. for (let ite in item) {
  2676. if (this.dataList[li].fId === item[ite].fId) {
  2677. this.$set(this.dataList[li], 'fBillstatus', 6)
  2678. }
  2679. }
  2680. }
  2681. this.formBrowseStatus = true
  2682. })
  2683. }
  2684. })
  2685. },
  2686. // 撤回货转
  2687. withdrawClick() {
  2688. // 撤回货转
  2689. let formData = new window.FormData()
  2690. let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
  2691. formData.append("warehouseBills", JSON.stringify(this.form));
  2692. formData.append("warehousebillsitems", JSON.stringify(withdrawList));
  2693. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2694. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2695. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2696. updateCredit(formData).then((response) => {
  2697. this.fid = response.data
  2698. this.formBrowseStatus = false
  2699. this.msgSuccess('撤销入账成功')
  2700. this.$refs.tableListRef.clearSelection()
  2701. let mun = 0;
  2702. for (let i in this.dataList) {
  2703. for (let li in withdrawList) {
  2704. if (withdrawList[li].fId === this.dataList[i].fId) {
  2705. this.$set(this.dataList[i], 'fBillstatus', 1)
  2706. }
  2707. }
  2708. if (this.dataList[i].fBillstatus && this.dataList[i].fBillstatus === 6) {
  2709. mun ++;
  2710. }
  2711. }
  2712. if (mun > 0) {
  2713. this.formBrowseStatus = true
  2714. } else {
  2715. this.formBrowseStatus = false
  2716. }
  2717. })
  2718. },
  2719. // 付款合计
  2720. warehouseDrSummaries(param) {
  2721. const { columns, data } = param
  2722. const sums = []
  2723. columns.forEach((column, index) => {
  2724. if (index === 0) {
  2725. sums[index] = '合计'
  2726. return
  2727. }
  2728. const values = data.map((item) => Number(item[column.property]))
  2729. if (
  2730. column.property === 'fUnitprice' ||
  2731. column.property === 'fAmount' ||
  2732. column.property === 'fQty' ||
  2733. column.property === 'fQty'
  2734. ) {
  2735. sums[index] = values.reduce((prev, curr) => {
  2736. const value = Number(curr)
  2737. if (!isNaN(value)) {
  2738. return prev + curr
  2739. } else {
  2740. return prev
  2741. }
  2742. }, 0) // sums[index]
  2743. sums[index] = sums[index].toFixed(2);
  2744. }
  2745. })
  2746. return sums
  2747. },
  2748. // 数量计算
  2749. changeContractAmt(row) {
  2750. let fQty = 0
  2751. let fUnitprice = 0
  2752. if (row.fUnitprice) {
  2753. fUnitprice = row.fUnitprice
  2754. }
  2755. if (row.fQty) {
  2756. fQty = row.fQty
  2757. }
  2758. this.$set(row, 'fAmount', Number(fUnitprice) * Number(fQty)).toFixed(2)
  2759. },
  2760. changefBsdate(row) {
  2761. if (this.dataList.length > 0) {
  2762. for (var i = 0; i < this.dataList.length; i++) {
  2763. this.$set(this.dataList[i], 'fBsdate', row)
  2764. }
  2765. }
  2766. },
  2767. // 库存明细多选
  2768. Selectinventory(selection) {
  2769. this.dataWithdrawList = []
  2770. this.dataListSelection = []
  2771. if (!selection || selection.length === 0) {
  2772. return false
  2773. }
  2774. for (let se in selection) {
  2775. if (!selection[se].fBillstatus || selection[se].fBillstatus !== 6) {
  2776. this.dataListSelection.push(selection[se])
  2777. } else if (selection[se].fBillstatus && selection[se].fBillstatus === 6) {
  2778. this.dataWithdrawList.push(selection[se])
  2779. }
  2780. }
  2781. },
  2782. // 库存明细多选框结果
  2783. dataListChange(row) {
  2784. this.dataListSelection = row
  2785. },
  2786. saveForm() {
  2787. this.updateDeduplication()
  2788. this.$refs['form'].validate((valid) => {
  2789. if (this.form.fCorpid === this.form.fTocorpid) {
  2790. this.$message.error('新货权方不得与货权方一致')
  2791. return false
  2792. }
  2793. if (this.dataList.length === 0) {
  2794. this.$message.error('请添加库存明细!')
  2795. return false
  2796. }
  2797. this.updateDeduplication()
  2798. for (let list in this.dataList) {
  2799. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  2800. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  2801. return false
  2802. }
  2803. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  2804. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重!')
  2805. return false
  2806. }
  2807. }
  2808. if (valid) {
  2809. this.form.fBillstatus = 2
  2810. let formData = new window.FormData()
  2811. formData.append("warehouseBills", JSON.stringify(this.form));
  2812. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  2813. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2814. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2815. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2816. addGoodsTransfer(formData).then((response) => {
  2817. this.msgSuccess('保存成功')
  2818. this.form = response.data.warehouseBills
  2819. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2820. this.$set(this.form, 'fFeetunit',this.form.fFeetunit + '')
  2821. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2822. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2823. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2824. this.dataList = response.data.warehousebillsitems
  2825. for (let li in this.dataList) {
  2826. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  2827. this.$set(this.dataList[li], 'fBusinessType', this.dataList[li].fBusinessType + '')
  2828. }
  2829. })
  2830. }
  2831. })
  2832. },
  2833. /** 提交按钮 */
  2834. submitForm() {
  2835. this.$refs['form'].validate((valid) => {
  2836. if (this.form.fCorpid === this.form.fTocorpid) {
  2837. this.$message.error('新货权方不得与货权方一致')
  2838. return false
  2839. }
  2840. if (this.dataList.length === 0) {
  2841. this.$message.error('请添加库存明细!')
  2842. return false
  2843. }
  2844. for (let list in this.dataList) {
  2845. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  2846. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  2847. return false
  2848. }
  2849. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  2850. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重!')
  2851. return false
  2852. }
  2853. }
  2854. if (this.relevantAttachments.length !== 0) {
  2855. for (let relevant in this.relevantAttachments) {
  2856. if (!this.relevantAttachments[relevant].fName) {
  2857. this.$message.error('请输入附件名称!')
  2858. return false
  2859. }
  2860. }
  2861. }
  2862. if (this.warehouseDrList.length !== 0) {
  2863. for (let warehouseDr in this.warehouseDrList) {
  2864. if (!this.warehouseDrList[warehouseDr].fAmount) {
  2865. this.$message.error('收款信息序号为' + (Number(warehouseDr) + 1) + '的金额异常')
  2866. return false
  2867. }
  2868. }
  2869. }
  2870. if (this.warehouseDrList.length !== 0) {
  2871. for (let warehouseCr in this.warehouseCrList) {
  2872. if (!this.warehouseCrList[warehouseCr].fAmount) {
  2873. this.$message.error(
  2874. '付款信息序号为' + (Number(warehouseCr) + 1) + '的金额异常'
  2875. )
  2876. return false
  2877. }
  2878. }
  2879. }
  2880. if (valid) {
  2881. // this.form.fBillstatus = 4
  2882. let formData = new window.FormData()
  2883. formData.append("warehouseBills", JSON.stringify(this.form));
  2884. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  2885. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2886. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2887. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2888. warehouseSubmission(formData).then((response) => {
  2889. this.msgSuccess('提交成功')
  2890. // this.browseStatus = true
  2891. // this.notChange = true
  2892. this.cancel()
  2893. this.getList()
  2894. })
  2895. }
  2896. })
  2897. },
  2898. /** 删除按钮操作 */
  2899. handleDelete(row) {
  2900. const fIds = row.fId || this.ids
  2901. this.$confirm(
  2902. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  2903. '警告',
  2904. {
  2905. confirmButtonText: '确定',
  2906. cancelButtonText: '取消',
  2907. type: 'warning'
  2908. }
  2909. )
  2910. .then(function() {
  2911. return delGoodsTransfer(fIds)
  2912. })
  2913. .then(() => {
  2914. this.getList()
  2915. this.msgSuccess('删除成功')
  2916. })
  2917. },
  2918. /** 导出按钮操作 */
  2919. handleExport() {
  2920. const queryParams = this.queryParams
  2921. this.$confirm('是否确认导出所有仓库主(出入库)数据项?', '警告', {
  2922. confirmButtonText: '确定',
  2923. cancelButtonText: '取消',
  2924. type: 'warning'
  2925. })
  2926. .then(function() {
  2927. return exportgoodsTransfer(queryParams)
  2928. })
  2929. .then((response) => {
  2930. this.download(response.msg)
  2931. })
  2932. },
  2933. // 货转件数的计算
  2934. qtyChange(row) {
  2935. if (!row.fQty || row.fQty === '') {
  2936. this.$set(row, 'fNetweight', 0)
  2937. this.$set(row, 'fGrossweight', 0)
  2938. return false
  2939. }
  2940. if (row.fPlanqty < row.fQty) {
  2941. this.$message.error("货转件数超出结余件数!");
  2942. this.$set(row, 'fQty', 0)
  2943. this.$set(row, 'fNetweight', 0)
  2944. this.$set(row, 'fGrossweight', 0)
  2945. return false;
  2946. }
  2947. let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(2)
  2948. let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(2)
  2949. this.$set(row, 'fNetweight', parseFloat(Number(netweight) * Number(row.fQty)).toFixed(2))
  2950. this.$set(row, 'fGrossweight', parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(2))
  2951. },
  2952. // 修改毛重净重
  2953. changeTransfer (row) {
  2954. let fNetweight = 0;
  2955. let fGrossweight = 0;
  2956. if (row.fNetweight) {
  2957. fNetweight = row.fNetweight
  2958. }
  2959. if (row.fGrossweight) {
  2960. fGrossweight = row.fGrossweight
  2961. }
  2962. if (row.fPlannetweight < fNetweight) {
  2963. this.$message({ message: '货转净重超出结余净重', type: 'warning' })
  2964. return false
  2965. }
  2966. if (row.fPlangrossweight < fGrossweight) {
  2967. this.$message({ message: '货转毛重超出结余毛重', type: 'warning' })
  2968. return false
  2969. }
  2970. },
  2971. deleteRow(index, rows) {
  2972. rows.splice(index, 1)
  2973. this.updateDeduplication()
  2974. },
  2975. // 变更计价单位
  2976. changeFeeUnit(row) {
  2977. if (!row.fFeeunitid) {
  2978. return false
  2979. }
  2980. let fQty = 0;
  2981. let fGrossweight = 0;
  2982. let fNetweight = 0;
  2983. let volumn = 0;
  2984. let fixed = 1;
  2985. for (let li in this.dataList) {
  2986. if (this.dataList[li].fQty) {
  2987. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  2988. }
  2989. if (this.dataList[li].fGrossweight) {
  2990. fGrossweight = parseFloat(Number(fGrossweight) + Number(this.dataList[li].fGrossweight)).toFixed(2)
  2991. }
  2992. if (this.dataList[li].fNetweight) {
  2993. fNetweight = parseFloat(Number(fNetweight) + Number(this.dataList[li].fNetweight)).toFixed(2)
  2994. }
  2995. if (this.dataList[li].volumn) {
  2996. volumn = parseFloat(Number(volumn) + Number(this.dataList[li].volumn)).toFixed(2)
  2997. }
  2998. }
  2999. if (row.fFeeunitid === "1") {
  3000. this.$set(row, "fQty", fQty);
  3001. } else if (row.fFeeunitid === "2") {
  3002. this.$set(row, 'fQty', (fGrossweight/1000).toFixed(2))
  3003. }else if (row.fFeeunitid === "3") {
  3004. this.$set(row, 'fQty', (fNetweight/1000).toFixed(2))
  3005. }else if (row.fFeeunitid === "4") {
  3006. this.$set(row, 'fQty', (volumn/1000).toFixed(2))
  3007. }else if (row.fFeeunitid === "5") {
  3008. this.$set(row, 'fQty', (fixed/1000).toFixed(2))
  3009. }
  3010. if (row.fUnitprice) {
  3011. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  3012. }
  3013. },
  3014. // 选择新货权方自动带出结算方式
  3015. changefCorpid(row) {
  3016. this.$set(row, "fSbu", row.fCorpid);
  3017. for (let corp in this.fMblnoOptions) {
  3018. if (row.fTocorpid === this.fMblnoOptions[corp].fId) {
  3019. this.$set(this.form, "fStltypeid", this.fMblnoOptions[corp].fStltypeid + '');
  3020. }
  3021. }
  3022. },
  3023. /* 远程模糊查询用户 */
  3024. corpsRemoteMethod(name) {
  3025. if (name == null || name === '') {
  3026. return false
  3027. }
  3028. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  3029. listCorps(queryParams).then((response) => {
  3030. this.fMblnoOptions = response.rows
  3031. this.KHblnoOptions = response.rows
  3032. })
  3033. },
  3034. /* 远程模糊查询商品 */
  3035. goodsRemoteMethod(name) {
  3036. if (name == null || name === '') {
  3037. return false
  3038. }
  3039. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  3040. listGoods(queryParams).then((response) => {
  3041. this.goodsOptions = response.rows
  3042. })
  3043. },
  3044. // 选择费用信息时获取计价单位
  3045. changeFeeId (row) {
  3046. for (let li in this.fWbuOptions) {
  3047. if (row.fFeeid === this.fWbuOptions[li].fId) {
  3048. this.$set(row, 'fFeeUnitid', this.fWbuOptions[li].fFeeunitid + '')
  3049. this.changeFeeUnit(row)
  3050. break
  3051. }
  3052. }
  3053. },
  3054. // 远程模糊查询费用名称
  3055. fWRemoteMethod(name) {
  3056. if (name == null || name === '') {
  3057. return false
  3058. }
  3059. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  3060. listFees(queryParams).then((response) => {
  3061. this.fWbuOptions = response.rows
  3062. })
  3063. },
  3064. /* 远程模糊查询经营单位 */
  3065. fSbuRemoteMethod(name) {
  3066. if (name == null || name === '') {
  3067. return false
  3068. }
  3069. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  3070. listCorps(queryParams).then((response) => {
  3071. this.fSbuOptions = response.rows
  3072. })
  3073. },
  3074. /* 远程模糊查询仓库 */
  3075. warehouseRemoteMethod(name) {
  3076. if (name == null || name === '') {
  3077. return false
  3078. }
  3079. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  3080. listWarehouse(queryParams).then((response) => {
  3081. this.warehouseOptions = response.rows
  3082. })
  3083. },
  3084. /* 远程模糊查询操作用户 */
  3085. userRemoteMethod(name) {
  3086. if (name == null || name === '') {
  3087. return false
  3088. }
  3089. let queryParams = { pageNum: 1, pageSize: 10, userName: name }
  3090. listUser(queryParams).then((response) => {
  3091. this.userOptions = response.rows
  3092. })
  3093. }
  3094. }
  3095. }
  3096. </script>
  3097. <style lang="scss">
  3098. .juzhong > th {
  3099. text-align: center;
  3100. }
  3101. .biaoge > tr > td {
  3102. height: 30px;
  3103. text-align: center;
  3104. border-right: 1px solid #dfe6ec !important;
  3105. order-bottom: 1px solid #dfe6ec !important;
  3106. border-bottom: 1px solid #dfe6ec !important;
  3107. }
  3108. .el-table thead th {
  3109. background: #1890ff;
  3110. color: #fff;
  3111. }
  3112. .upload-demo {
  3113. margin-left: 50px;
  3114. }
  3115. .el-form-item {
  3116. margin-bottom: 5px !important;
  3117. }
  3118. .el-form-item__label {
  3119. font-size: 12px !important;
  3120. }
  3121. .el-collapse-item__header{
  3122. font-size: 16px;
  3123. font-weight: bolder;
  3124. padding-left: 5px;
  3125. }
  3126. .el-icon-s-home,.el-icon-s-order,.el-icon-circle-plus,.el-icon-remove{
  3127. padding-right: 5px;
  3128. }
  3129. </style>