index.vue 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512
  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. <el-select
  136. v-model="queryParams.fWarehouseid"
  137. filterable
  138. :disabled="browseStatus"
  139. remote
  140. clearable
  141. style="width: 80%"
  142. :remote-method="warehouseRemoteMethod"
  143. @keyup.enter.native="handleQuery"
  144. placeholder="请选择仓库"
  145. >
  146. <el-option
  147. v-for="(dict, index) in warehouseOptions"
  148. :key="index.fId"
  149. :label="dict.fName"
  150. :value="dict.fId"
  151. ></el-option>
  152. </el-select>
  153. </el-form-item>
  154. <el-form-item label="唛头" prop="fMarks">
  155. <el-input
  156. v-model="queryParams.fMarks"
  157. placeholder="请输入唛头"
  158. clearable
  159. style="width: 80%"
  160. size="small"
  161. @keyup.enter.native="handleQuery"
  162. />
  163. </el-form-item>
  164. <el-form-item>
  165. <el-button
  166. type="cyan"
  167. icon="el-icon-search"
  168. size="mini"
  169. @click="handleQuery"
  170. >搜索
  171. </el-button>
  172. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  173. >重置
  174. </el-button>
  175. </el-form-item>
  176. </el-form>
  177. <el-row :gutter="10" class="mb8">
  178. <el-col :span="1.5">
  179. <el-button
  180. type="primary"
  181. icon="el-icon-plus"
  182. size="mini"
  183. @click="handleAdd"
  184. v-hasPermi="['warehouseBusiness:goodsTransfer:add']"
  185. >新增
  186. </el-button>
  187. </el-col>
  188. <el-col :span="1.5">
  189. <el-button
  190. type="success"
  191. icon="el-icon-edit"
  192. size="mini"
  193. :disabled="single"
  194. @click="handleUpdate"
  195. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  196. >修改
  197. </el-button>
  198. </el-col>
  199. <el-col :span="1.5">
  200. <el-button
  201. type="warning"
  202. icon="el-icon-download"
  203. size="mini"
  204. @click="handleExport"
  205. v-hasPermi="['warehouseBusiness:goodsTransfer:export']"
  206. >导出
  207. </el-button>
  208. </el-col>
  209. <right-toolbar
  210. :showSearch.sync="showSearch"
  211. @queryTable="getList"
  212. ></right-toolbar>
  213. </el-row>
  214. <el-table
  215. v-loading="loading"
  216. :data="goodsTransferList"
  217. @selection-change="handleSelectionChange"
  218. >
  219. <el-table-column type="selection" width="55" align="center"/>
  220. <el-table-column type="index" label="行号" align="center"/>
  221. <el-table-column
  222. :show-overflow-tooltip="true"
  223. label="货权方"
  224. align="center"
  225. prop="fCorpid"
  226. />
  227. <el-table-column
  228. :show-overflow-tooltip="true"
  229. label="转货权方"
  230. align="center"
  231. prop="fTocorpid"
  232. />
  233. <el-table-column label="提单号" align="center" prop="fMblno"/>
  234. <!-- <el-table-column :show-overflow-tooltip="true" label="经营单位" align="center" prop="fSbu" /> -->
  235. <el-table-column
  236. :show-overflow-tooltip="true"
  237. label="唛头"
  238. align="center"
  239. prop="fMarks"
  240. />
  241. <el-table-column
  242. :show-overflow-tooltip="true"
  243. label="业务编号"
  244. align="center"
  245. prop="fBillno"
  246. />
  247. <el-table-column
  248. label="货转日期"
  249. align="center"
  250. prop="fBsdate"
  251. width="180"
  252. >
  253. <template slot-scope="scope">
  254. <span>{{ parseTime(scope.row.fBsdate, '{y}-{m}-{d}') }}</span>
  255. </template>
  256. </el-table-column>
  257. <el-table-column
  258. label="贸易方式"
  259. align="center"
  260. prop="fTrademodeid"
  261. :formatter="fTrademodeidFormat"
  262. />
  263. <el-table-column label="仓库" align="center" prop="fWarehouseid"/>
  264. <el-table-column label="件数" align="center" prop="fQty"/>
  265. <el-table-column label="毛重" align="center" prop="fGrossweight"/>
  266. <el-table-column label="净重" align="center" prop="fNetweight"/>
  267. <el-table-column
  268. label="操作"
  269. align="center"
  270. class-name="small-padding fixed-width"
  271. width="100"
  272. >
  273. <template slot-scope="scope">
  274. <el-button
  275. size="mini"
  276. type="text"
  277. icon="el-icon-edit"
  278. v-if="scope.row.fBillstatus === 6"
  279. @click="handleUpdate(scope.row, true)"
  280. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  281. >查看
  282. </el-button>
  283. <el-button
  284. size="mini"
  285. type="text"
  286. icon="el-icon-edit"
  287. v-if="scope.row.fBillstatus !== 6"
  288. @click="handleUpdate(scope.row, false)"
  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 === 4 || scope.row.fBillstatus === 5"
  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-delete"
  305. v-if="scope.row.fBillstatus !== 6"
  306. @click="handleDelete(scope.row)"
  307. v-hasPermi="['warehouseBusiness:goodsTransfer:remove']"
  308. >删除
  309. </el-button>
  310. </template>
  311. </el-table-column>
  312. </el-table>
  313. <pagination
  314. v-show="total > 0"
  315. :total="total"
  316. :page.sync="queryParams.pageNum"
  317. :limit.sync="queryParams.pageSize"
  318. @pagination="getList"
  319. />
  320. <!-- 添加或修改仓库主(出入库)对话框 -->
  321. <el-dialog
  322. :title="title"
  323. :visible.sync="open"
  324. :close-on-click-modal="false"
  325. width="80%"
  326. append-to-body
  327. >
  328. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  329. <el-row>
  330. <el-col :span="8">
  331. <el-form-item label="货权方" prop="fCorpid">
  332. <el-select
  333. v-model="form.fCorpid"
  334. filterable
  335. remote
  336. :disabled="browseStatus || formBrowseStatus"
  337. style="width: 80%"
  338. :remote-method="corpsRemoteMethod"
  339. placeholder="请选择货权方"
  340. >
  341. <el-option
  342. v-for="(dict, index) in fMblnoOptions"
  343. :key="index.fId"
  344. :label="dict.fName"
  345. :value="dict.fId"
  346. ></el-option>
  347. </el-select>
  348. </el-form-item>
  349. </el-col>
  350. <el-col :span="8">
  351. <el-form-item label="新货权方" prop="fTocorpid">
  352. <el-select
  353. v-model="form.fTocorpid"
  354. filterable
  355. remote
  356. :disabled="browseStatus || formBrowseStatus"
  357. style="width: 80%"
  358. @change="changefCorpid(form)"
  359. :remote-method="corpsRemoteMethod"
  360. placeholder="请选择新货权方"
  361. >
  362. <el-option
  363. v-for="(dict, index) in fMblnoOptions"
  364. :key="index.fId"
  365. :label="dict.fName"
  366. :value="dict.fId"
  367. ></el-option>
  368. </el-select>
  369. </el-form-item>
  370. </el-col>
  371. <el-col :span="8">
  372. <el-form-item label="业务编号" prop="fBillno">
  373. <el-input
  374. v-model="form.fBillno"
  375. style="width: 80%"
  376. disabled
  377. placeholder="业务编号"
  378. />
  379. </el-form-item>
  380. </el-col>
  381. </el-row>
  382. <el-row>
  383. <el-col :span="8">
  384. <el-form-item label="货转日期" prop="fBsdate">
  385. <el-date-picker
  386. v-model="form.fBsdate"
  387. style="width: 80%"
  388. type="date"
  389. :disabled="browseStatus || formBrowseStatus"
  390. value-format="timestamp"
  391. placeholder="货转日期"
  392. >
  393. </el-date-picker>
  394. </el-form-item>
  395. </el-col>
  396. <el-col :span="8">
  397. <el-form-item label="仓储计费日期" prop="fChargedate">
  398. <el-date-picker
  399. v-model="form.fChargedate"
  400. style="width: 80%"
  401. type="date"
  402. :disabled="browseStatus || formBrowseStatus"
  403. value-format="timestamp"
  404. placeholder="仓储计费日期">
  405. </el-date-picker>
  406. </el-form-item>
  407. </el-col>
  408. <el-col :span="8">
  409. <el-form-item label="仓库" prop="fWarehouseid">
  410. <el-select
  411. v-model="form.fWarehouseid"
  412. filterable
  413. :disabled="browseStatus || formBrowseStatus"
  414. remote
  415. style="width: 80%"
  416. :remote-method="warehouseRemoteMethod"
  417. placeholder="请选择仓库">
  418. <el-option
  419. v-for="(dict, index) in warehouseOptions"
  420. :key="index.fId"
  421. :label="dict.fName"
  422. :value="dict.fId"
  423. ></el-option>
  424. </el-select>
  425. </el-form-item>
  426. </el-col>
  427. </el-row>
  428. <el-row>
  429. <el-col :span="8">
  430. <el-form-item label="结算方式" prop="fStltypeid">
  431. <el-select
  432. v-model="form.fStltypeid"
  433. placeholder="请选择结算方式"
  434. clearable
  435. :disabled="browseStatus || formBrowseStatus"
  436. style="width: 80%"
  437. >
  438. <el-option
  439. v-for="(dict, index) in fStltypeOptions"
  440. :key="index.dictValue"
  441. :label="dict.dictLabel"
  442. :value="dict.dictValue"
  443. />
  444. </el-select>
  445. </el-form-item>
  446. </el-col>
  447. <el-col :span="8">
  448. <el-form-item label="计费单位" prop="fFeetunit">
  449. <el-select
  450. v-model="form.fFeetunit"
  451. placeholder="请选择计费单位"
  452. clearable
  453. :disabled="browseStatus || formBrowseStatus"
  454. style="width: 80%"
  455. >
  456. <el-option
  457. v-for="(dict, index) in fFeetunitOptions"
  458. :key="index.dictValue"
  459. :label="dict.dictLabel"
  460. :value="dict.dictValue"
  461. />
  462. </el-select>
  463. </el-form-item>
  464. </el-col>
  465. <el-col :span="8">
  466. <el-form-item label="贸易方式" prop="fTrademodeid">
  467. <el-select
  468. v-model="form.fTrademodeid"
  469. placeholder="请选择贸易方式"
  470. clearable
  471. :disabled="browseStatus || formBrowseStatus"
  472. style="width: 80%"
  473. >
  474. <el-option
  475. v-for="(dict, index) in fTrademodeidOptions"
  476. :key="index.dictValue"
  477. :label="dict.dictLabel"
  478. :value="dict.dictValue"
  479. />
  480. </el-select>
  481. </el-form-item>
  482. </el-col>
  483. </el-row>
  484. <el-row>
  485. <el-col :span="8">
  486. <el-form-item label="提单号" prop="fMblno">
  487. <el-input
  488. v-model="form.fMblno"
  489. :disabled="browseStatus"
  490. style="width: 80%"
  491. placeholder="手工输入"
  492. />
  493. </el-form-item>
  494. </el-col>
  495. <el-col :span="8">
  496. <el-form-item label="原始入库单号" prop="fOriginalbillno">
  497. <el-input
  498. v-model="form.fOriginalbillno"
  499. style="width: 80%"
  500. :disabled="browseStatus"
  501. placeholder="原始入库单号"
  502. />
  503. </el-form-item>
  504. </el-col>
  505. <el-col :span="8">
  506. <el-form-item label="原始入库日期" prop="orgStorageDate">
  507. <el-date-picker
  508. v-model="orgStorageDate"
  509. type="daterange"
  510. value-format="yyyy-MM-dd"
  511. range-separator="至"
  512. style="width: 80%"
  513. :disabled="browseStatus"
  514. start-placeholder="开始日期"
  515. end-placeholder="结束日期"
  516. >
  517. </el-date-picker>
  518. </el-form-item>
  519. </el-col>
  520. </el-row>
  521. <el-row>
  522. <el-col :span="8">
  523. <el-form-item label="唛头" prop="fMarks">
  524. <el-input
  525. v-model="form.fMarks"
  526. style="width: 80%"
  527. disabled
  528. placeholder="唛头"
  529. />
  530. </el-form-item>
  531. </el-col>
  532. <el-col :span="8">
  533. <el-form-item label="品名" prop="fProductName">
  534. <el-input
  535. v-model="form.fProductName"
  536. style="width: 80%"
  537. disabled
  538. placeholder="品名"
  539. />
  540. </el-form-item>
  541. </el-col>
  542. <el-col :span="8">
  543. <el-form-item label="制单人" prop="createBy">
  544. <el-input
  545. disabled
  546. v-model="form.createBy"
  547. style="width: 80%"
  548. placeholder="制单人"
  549. />
  550. </el-form-item>
  551. </el-col>
  552. </el-row>
  553. <el-button type="primary" @click="saveForm">保 存</el-button>
  554. <el-button type="primary" @click="submitForm">请 核</el-button>
  555. </el-form>
  556. <div class="dialogTableTitle flex a-center jlr">
  557. <h3>货转明细</h3>
  558. <el-button :disabled="browseStatus" @click.prevent="addRelevant()"
  559. >新增
  560. </el-button
  561. >
  562. <el-button
  563. :disabled="dataListSelection.length <= 0"
  564. @click.prevent="creditClick()"
  565. >货转确认
  566. </el-button>
  567. <el-button
  568. :disabled="dataWithdrawList.length <= 0"
  569. @click.prevent="withdrawClick"
  570. >撤回货转
  571. </el-button
  572. >
  573. <el-button type="primary" @click="saveForm">保 存</el-button>
  574. </div>
  575. <el-table
  576. :data="dataList"
  577. ref="tableListRef"
  578. tooltip-effect="dark"
  579. border
  580. stripe
  581. :summary-method="getSummaries"
  582. @selection-change="Selectinventory"
  583. show-summary
  584. >
  585. <el-table-column type="selection" width="55" align="center"/>
  586. <el-table-column label="序号" type="index" width="80">
  587. </el-table-column>
  588. <el-table-column
  589. prop="fGoodsids"
  590. header-align="center"
  591. align="center"
  592. width="140px"
  593. label="品名"
  594. >
  595. </el-table-column>
  596. <el-table-column
  597. prop="fMarks"
  598. header-align="center"
  599. align="center"
  600. width="140px"
  601. label="唛头"
  602. >
  603. </el-table-column>
  604. <el-table-column
  605. prop="fMblno"
  606. header-align="center"
  607. align="center"
  608. width="140px"
  609. label="提单号"
  610. >
  611. </el-table-column>
  612. <el-table-column
  613. prop="fWarehouselocids"
  614. header-align="center"
  615. width="150px"
  616. align="center"
  617. label="*库区"
  618. >
  619. </el-table-column>
  620. <el-table-column
  621. prop="fOriginalbillno"
  622. header-align="center"
  623. align="center"
  624. width="140px"
  625. label="原始入库单号"
  626. >
  627. </el-table-column>
  628. <el-table-column
  629. prop="fPlanqty"
  630. header-align="center"
  631. align="center"
  632. width="180px"
  633. label="*库存件数"
  634. >
  635. <template slot-scope="scope">
  636. <el-input
  637. v-model="scope.row.fPlanqty"
  638. placeholder="库存件数"
  639. disabled
  640. show-word-limit
  641. />
  642. </template>
  643. </el-table-column>
  644. <el-table-column
  645. prop="fPlangrossweight"
  646. header-align="center"
  647. align="center"
  648. width="180px"
  649. label="*库存毛重"
  650. >
  651. <template slot-scope="scope">
  652. <el-input
  653. v-model="scope.row.fPlangrossweight"
  654. placeholder="库存毛重"
  655. disabled
  656. show-word-limit
  657. />
  658. </template>
  659. </el-table-column>
  660. <el-table-column
  661. prop="fPlannetweight"
  662. header-align="center"
  663. width="180px"
  664. align="center"
  665. label="*库存净重"
  666. >
  667. <template slot-scope="scope">
  668. <el-input
  669. v-model="scope.row.fPlannetweight"
  670. placeholder="库存净重"
  671. disabled
  672. show-word-limit
  673. />
  674. </template>
  675. </el-table-column>
  676. <el-table-column
  677. prop="fQty"
  678. header-align="center"
  679. width="180px"
  680. align="center"
  681. label="*货转件数"
  682. >
  683. <template slot-scope="scope">
  684. <el-input
  685. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  686. @change="qtyChange(scope.row)"
  687. v-model="scope.row.fQty"
  688. placeholder="*货转件数"
  689. :disabled="browseStatus || scope.row.fBillstatus === 6"
  690. show-word-limit
  691. />
  692. </template>
  693. </el-table-column>
  694. <el-table-column
  695. prop="fGrossweight"
  696. header-align="center"
  697. width="180px"
  698. align="center"
  699. label="*货转毛重"
  700. >
  701. <template slot-scope="scope">
  702. <el-input
  703. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
  704. v-model="scope.row.fGrossweight"
  705. placeholder="货转毛重"
  706. :disabled="browseStatus || scope.row.fBillstatus === 6"
  707. show-word-limit
  708. />
  709. </template>
  710. </el-table-column>
  711. <el-table-column
  712. prop="fNetweight"
  713. header-align="center"
  714. width="180px"
  715. align="center"
  716. label="*货转净重"
  717. >
  718. <template slot-scope="scope">
  719. <el-input
  720. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
  721. v-model="scope.row.fNetweight"
  722. placeholder="货转净重"
  723. :disabled="browseStatus || scope.row.fBillstatus === 6"
  724. show-word-limit
  725. />
  726. </template>
  727. </el-table-column>
  728. <el-table-column
  729. prop="fCntqty"
  730. header-align="center"
  731. width="180px"
  732. align="center"
  733. label="箱量"
  734. >
  735. <template slot-scope="scope">
  736. <el-input
  737. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  738. v-model="scope.row.fCntqty"
  739. placeholder="箱量"
  740. :disabled="browseStatus || scope.row.fBillstatus === 6"
  741. show-word-limit
  742. />
  743. </template>
  744. </el-table-column>
  745. <el-table-column
  746. prop="fPackagespecs"
  747. header-align="center"
  748. width="180px"
  749. align="center"
  750. label="*包装规格"
  751. >
  752. <template slot-scope="scope">
  753. <el-input
  754. v-model="scope.row.fPackagespecs"
  755. :disabled="browseStatus || scope.row.fBillstatus === 6"
  756. placeholder="包装规格"
  757. show-word-limit
  758. />
  759. </template>
  760. </el-table-column>
  761. <el-table-column
  762. prop="fGoodsval"
  763. header-align="center"
  764. width="150px"
  765. align="center"
  766. label="货值"
  767. >
  768. <template slot-scope="scope">
  769. <el-input
  770. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  771. v-model="scope.row.fGoodsval"
  772. placeholder="货值"
  773. :disabled="browseStatus || scope.row.fBillstatus === 6"
  774. show-word-limit
  775. />
  776. </template>
  777. </el-table-column>
  778. <el-table-column
  779. prop="remark"
  780. header-align="center"
  781. width="150px"
  782. align="center"
  783. label="备注"
  784. >
  785. <template slot-scope="scope">
  786. <el-input
  787. v-model="scope.row.remark"
  788. placeholder="备注"
  789. :disabled="browseStatus || scope.row.fBillstatus === 6"
  790. show-word-limit
  791. />
  792. </template>
  793. </el-table-column>
  794. <el-table-column
  795. prop="fBillstatus"
  796. header-align="center"
  797. width="150px"
  798. align="center"
  799. label="状态"
  800. >
  801. <template slot-scope="scope">
  802. <span v-if="scope.row.fBillstatus === 6">货转</span>
  803. <span v-else>录入</span>
  804. </template>
  805. </el-table-column>
  806. <el-table-column
  807. header-align="center"
  808. align="center"
  809. label="操作"
  810. width="130PX"
  811. >
  812. <template slot-scope="scope">
  813. <el-button
  814. :disabled="browseStatus || scope.row.fBillstatus === 6"
  815. @click.native.prevent="deleteRow(scope.$index, dataList)"
  816. size="small"
  817. >移除
  818. </el-button
  819. >
  820. </template>
  821. </el-table-column>
  822. </el-table>
  823. <div class="dialogTableTitle flex a-center jlr">
  824. <h3>附件上传</h3>
  825. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  826. >新增
  827. </el-button>
  828. <el-button type="primary" @click="saveForm">保 存</el-button>
  829. </div>
  830. <el-table
  831. :data="relevantAttachments"
  832. ref="attachTable"
  833. tooltip-effect="dark"
  834. border
  835. stripe
  836. style="width: 100%"
  837. height="150"
  838. >
  839. <el-table-column label="序号" type="index" width="80">
  840. </el-table-column>
  841. <el-table-column
  842. prop="fName"
  843. header-align="center"
  844. align="center"
  845. label="附件名称"
  846. >
  847. <template slot-scope="scope">
  848. <el-input
  849. v-model="scope.row.fName"
  850. :disabled="browseStatus"
  851. placeholder="附件名称"
  852. show-word-limit
  853. />
  854. </template>
  855. </el-table-column>
  856. <el-table-column
  857. prop="createBy"
  858. header-align="center"
  859. align="center"
  860. label="上传人"
  861. >
  862. <template slot-scope="scope">
  863. <el-input
  864. v-model="scope.row.createBy"
  865. :disabled="browseStatus"
  866. placeholder="上传人"
  867. show-word-limit
  868. />
  869. </template>
  870. </el-table-column>
  871. <el-table-column
  872. prop="createTime"
  873. header-align="center"
  874. align="center"
  875. label="上传时间"
  876. >
  877. <template slot-scope="scope">
  878. <el-date-picker
  879. v-model="scope.row.createTime"
  880. type="date"
  881. disabled
  882. placeholder="上传时间"
  883. format="yyyy-MM-dd HH:mm"
  884. value-format="timestamp"
  885. ></el-date-picker>
  886. </template>
  887. </el-table-column>
  888. <el-table-column
  889. prop="fUrl"
  890. header-align="center"
  891. align="center"
  892. width="80%"
  893. label="上传附件"
  894. >
  895. <template slot-scope="scope">
  896. <uploadFile @input="showFile" v-model="scope.row.fUrl"/>
  897. </template>
  898. </el-table-column>
  899. <el-table-column
  900. header-align="center"
  901. align="center"
  902. label="操作"
  903. width="130PX"
  904. >
  905. <template slot-scope="scope">
  906. <el-button
  907. @click.native.prevent="
  908. deleteRow(scope.$index, relevantAttachments)
  909. "
  910. :disabled="browseStatus"
  911. size="small"
  912. >移除
  913. </el-button>
  914. </template>
  915. </el-table-column>
  916. </el-table>
  917. <div class="dialogTableTitle flex a-center jlr">
  918. <h3>收款信息</h3>
  919. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  920. >新增
  921. </el-button>
  922. <el-button type="primary" @click="saveForm">保 存</el-button>
  923. </div>
  924. <el-table
  925. :data="warehouseDrList"
  926. ref="warehouseDr"
  927. tooltip-effect="dark"
  928. border
  929. stripe
  930. :summary-method="warehouseDrSummaries"
  931. show-summary
  932. >
  933. <el-table-column label="序号" type="index" width="80">
  934. </el-table-column>
  935. <el-table-column
  936. prop="fCorpid"
  937. header-align="center"
  938. align="center"
  939. width="180px"
  940. label="客户名称"
  941. >
  942. <template slot-scope="scope">
  943. <el-select
  944. v-model="scope.row.fCorpid"
  945. filterable
  946. remote
  947. :disabled="browseStatus"
  948. :remote-method="corpsRemoteMethod"
  949. placeholder="客户名称"
  950. >
  951. <el-option
  952. v-for="(dict, index) in KHblnoOptions"
  953. :key="index.fId"
  954. :label="dict.fName"
  955. :value="dict.fId"
  956. ></el-option>
  957. </el-select>
  958. </template>
  959. </el-table-column>
  960. <el-table-column
  961. prop="fFeeid"
  962. header-align="center"
  963. align="center"
  964. width="180px"
  965. label="费用名称"
  966. >
  967. <template slot-scope="scope">
  968. <el-select
  969. :disabled="browseStatus"
  970. v-model="scope.row.fFeeid"
  971. filterable
  972. remote
  973. :remote-method="fWRemoteMethod"
  974. placeholder="费用名称"
  975. >
  976. <el-option
  977. v-for="(dict, index) in fWbuOptions"
  978. :key="index.fId"
  979. :label="dict.fName"
  980. :value="dict.fId"
  981. ></el-option>
  982. </el-select>
  983. </template>
  984. </el-table-column>
  985. <el-table-column
  986. prop="fFeeunitid"
  987. header-align="center"
  988. align="center"
  989. width="180px"
  990. label="计价单位"
  991. >
  992. <template slot-scope="scope">
  993. <el-select
  994. v-model="scope.row.fFeeunitid"
  995. placeholder="请选择计价单位"
  996. :disabled="browseStatus"
  997. @change="changeFeeUnit(scope.row)"
  998. clearable
  999. >
  1000. <el-option
  1001. v-for="(dict, index) in fFeetunitOptions"
  1002. :key="index.dictValue"
  1003. :label="dict.dictLabel"
  1004. :value="dict.dictValue"
  1005. />
  1006. </el-select>
  1007. </template>
  1008. </el-table-column>
  1009. <el-table-column
  1010. prop="fQty"
  1011. header-align="center"
  1012. align="center"
  1013. width="150px"
  1014. label="数量"
  1015. >
  1016. <template slot-scope="scope">
  1017. <el-input
  1018. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1019. v-model="scope.row.fQty"
  1020. placeholder="数量"
  1021. :disabled="browseStatus"
  1022. @change="changeContractAmt(scope.row)"
  1023. show-word-limit
  1024. />
  1025. </template>
  1026. </el-table-column>
  1027. <el-table-column
  1028. prop="fUnitprice"
  1029. header-align="center"
  1030. align="center"
  1031. width="150px"
  1032. label="单价"
  1033. >
  1034. <template slot-scope="scope">
  1035. <el-input
  1036. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1037. v-model="scope.row.fUnitprice"
  1038. placeholder="单价"
  1039. :disabled="browseStatus"
  1040. @change="changeContractAmt(scope.row)"
  1041. show-word-limit
  1042. />
  1043. </template>
  1044. </el-table-column>
  1045. <el-table-column
  1046. prop="fAmount"
  1047. header-align="center"
  1048. align="center"
  1049. width="150px"
  1050. label="金额"
  1051. >
  1052. <template slot-scope="scope">
  1053. <el-input
  1054. disabled
  1055. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1056. v-model="scope.row.fAmount"
  1057. placeholder="金额"
  1058. show-word-limit
  1059. />
  1060. </template>
  1061. </el-table-column>
  1062. <el-table-column
  1063. prop="fCurrency"
  1064. header-align="center"
  1065. align="center"
  1066. width="150px"
  1067. label="币别"
  1068. >
  1069. <template slot-scope="scope">
  1070. <el-input
  1071. v-model="scope.row.fCurrency"
  1072. :disabled="browseStatus"
  1073. placeholder="币别"
  1074. show-word-limit
  1075. />
  1076. </template>
  1077. </el-table-column>
  1078. <el-table-column
  1079. prop="fExrate"
  1080. header-align="center"
  1081. align="center"
  1082. width="150px"
  1083. label="汇率"
  1084. >
  1085. <template slot-scope="scope">
  1086. <el-input
  1087. v-model="scope.row.fExrate"
  1088. :disabled="browseStatus"
  1089. placeholder="汇率"
  1090. show-word-limit
  1091. />
  1092. </template>
  1093. </el-table-column>
  1094. <el-table-column
  1095. prop="fTaxrate"
  1096. header-align="center"
  1097. align="center"
  1098. width="150px"
  1099. label="税率"
  1100. >
  1101. <template slot-scope="scope">
  1102. <el-input
  1103. v-model="scope.row.fTaxrate"
  1104. :disabled="browseStatus"
  1105. placeholder="税率"
  1106. show-word-limit
  1107. />
  1108. </template>
  1109. </el-table-column>
  1110. <el-table-column
  1111. prop="remarks"
  1112. header-align="center"
  1113. align="center"
  1114. width="150px"
  1115. label="备注"
  1116. >
  1117. <template slot-scope="scope">
  1118. <el-input
  1119. v-model="scope.row.remarks"
  1120. :disabled="browseStatus"
  1121. placeholder="备注"
  1122. show-word-limit
  1123. />
  1124. </template>
  1125. </el-table-column>
  1126. <el-table-column
  1127. header-align="center"
  1128. align="center"
  1129. label="操作"
  1130. width="150px"
  1131. >
  1132. <template slot-scope="scope">
  1133. <el-button size="small">审核费用</el-button>
  1134. <el-button
  1135. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1136. size="small"
  1137. >移除
  1138. </el-button
  1139. >
  1140. </template>
  1141. </el-table-column>
  1142. </el-table>
  1143. <div class="dialogTableTitle flex a-center jlr">
  1144. <h3>付款信息</h3>
  1145. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1146. >新增
  1147. </el-button>
  1148. <el-button type="primary" @click="saveForm">保 存</el-button>
  1149. </div>
  1150. <el-table
  1151. :data="warehouseCrList"
  1152. ref="warehouseCr"
  1153. tooltip-effect="dark"
  1154. border
  1155. stripe
  1156. :summary-method="warehouseDrSummaries"
  1157. show-summary
  1158. >
  1159. <el-table-column label="序号" type="index" width="80">
  1160. </el-table-column>
  1161. <el-table-column
  1162. prop="fCorpid"
  1163. header-align="center"
  1164. align="center"
  1165. width="180px"
  1166. label="客户名称"
  1167. >
  1168. <template slot-scope="scope">
  1169. <el-select
  1170. v-model="scope.row.fCorpid"
  1171. filterable
  1172. remote
  1173. :disabled="browseStatus"
  1174. :remote-method="corpsRemoteMethod"
  1175. placeholder="客户名称"
  1176. >
  1177. <el-option
  1178. v-for="(dict, index) in KHblnoOptions"
  1179. :key="index.fId"
  1180. :label="dict.fName"
  1181. :value="dict.fId"
  1182. ></el-option>
  1183. </el-select>
  1184. </template>
  1185. </el-table-column>
  1186. <el-table-column
  1187. prop="fFeeid"
  1188. header-align="center"
  1189. align="center"
  1190. width="180px"
  1191. label="费用名称"
  1192. >
  1193. <template slot-scope="scope">
  1194. <el-select
  1195. v-model="scope.row.fFeeid"
  1196. filterable
  1197. remote
  1198. :disabled="browseStatus"
  1199. :remote-method="fWRemoteMethod"
  1200. placeholder="费用名称"
  1201. >
  1202. <el-option
  1203. v-for="(dict, index) in fWbuOptions"
  1204. :key="index.fId"
  1205. :label="dict.fName"
  1206. :value="dict.fId"
  1207. ></el-option>
  1208. </el-select>
  1209. </template>
  1210. </el-table-column>
  1211. <el-table-column
  1212. prop="fFeeunitid"
  1213. header-align="center"
  1214. align="center"
  1215. width="180px"
  1216. label="计价单位"
  1217. >
  1218. <template slot-scope="scope">
  1219. <el-select
  1220. v-model="scope.row.fFeeunitid"
  1221. filterable
  1222. remote
  1223. :disabled="browseStatus"
  1224. @change="changeFeeUnit(scope.row)"
  1225. :remote-method="corpsRemoteMethod"
  1226. placeholder="计价单位"
  1227. >
  1228. <el-option
  1229. v-for="(dict, index) in fFeetunitOptions"
  1230. :key="index.dictValue"
  1231. :label="dict.dictLabel"
  1232. :value="dict.dictValue"
  1233. ></el-option>
  1234. </el-select>
  1235. </template>
  1236. </el-table-column>
  1237. <el-table-column
  1238. prop="fQty"
  1239. header-align="center"
  1240. align="center"
  1241. width="150px"
  1242. label="数量"
  1243. >
  1244. <template slot-scope="scope">
  1245. <el-input
  1246. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1247. v-model="scope.row.fQty"
  1248. :disabled="browseStatus"
  1249. @change="changeContractAmt(scope.row)"
  1250. placeholder="数量"
  1251. show-word-limit
  1252. />
  1253. </template>
  1254. </el-table-column>
  1255. <el-table-column
  1256. prop="fUnitprice"
  1257. header-align="center"
  1258. align="center"
  1259. width="150px"
  1260. label="单价"
  1261. >
  1262. <template slot-scope="scope">
  1263. <el-input
  1264. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1265. v-model="scope.row.fUnitprice"
  1266. :disabled="browseStatus"
  1267. @change="changeContractAmt(scope.row)"
  1268. placeholder="单价"
  1269. show-word-limit
  1270. />
  1271. </template>
  1272. </el-table-column>
  1273. <el-table-column
  1274. prop="fAmount"
  1275. header-align="center"
  1276. align="center"
  1277. width="150px"
  1278. label="金额"
  1279. >
  1280. <template slot-scope="scope">
  1281. <el-input
  1282. disabled
  1283. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1284. v-model="scope.row.fAmount"
  1285. placeholder="金额"
  1286. show-word-limit
  1287. />
  1288. </template>
  1289. </el-table-column>
  1290. <el-table-column
  1291. prop="fCurrency"
  1292. header-align="center"
  1293. align="center"
  1294. width="150px"
  1295. label="币别"
  1296. >
  1297. <template slot-scope="scope">
  1298. <el-input
  1299. v-model="scope.row.fCurrency"
  1300. :disabled="browseStatus"
  1301. placeholder="币别"
  1302. show-word-limit
  1303. />
  1304. </template>
  1305. </el-table-column>
  1306. <el-table-column
  1307. prop="fExrate"
  1308. header-align="center"
  1309. align="center"
  1310. width="150px"
  1311. label="汇率"
  1312. >
  1313. <template slot-scope="scope">
  1314. <el-input
  1315. v-model="scope.row.fExrate"
  1316. :disabled="browseStatus"
  1317. placeholder="汇率"
  1318. show-word-limit
  1319. />
  1320. </template>
  1321. </el-table-column>
  1322. <el-table-column
  1323. prop="fTaxrate"
  1324. header-align="center"
  1325. align="center"
  1326. width="150px"
  1327. label="税率"
  1328. >
  1329. <template slot-scope="scope">
  1330. <el-input
  1331. v-model="scope.row.fTaxrate"
  1332. :disabled="browseStatus"
  1333. placeholder="税率"
  1334. show-word-limit
  1335. />
  1336. </template>
  1337. </el-table-column>
  1338. <el-table-column
  1339. prop="remarks"
  1340. header-align="center"
  1341. align="center"
  1342. width="150px"
  1343. label="备注"
  1344. >
  1345. <template slot-scope="scope">
  1346. <el-input
  1347. v-model="scope.row.remarks"
  1348. :disabled="browseStatus"
  1349. placeholder="备注"
  1350. show-word-limit
  1351. />
  1352. </template>
  1353. </el-table-column>
  1354. <el-table-column
  1355. header-align="center"
  1356. align="center"
  1357. width="150px"
  1358. label="操作"
  1359. >
  1360. <template slot-scope="scope">
  1361. <el-button size="small">审核费用</el-button>
  1362. <el-button
  1363. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  1364. :disabled="browseStatus"
  1365. size="small"
  1366. >移除
  1367. </el-button
  1368. >
  1369. </template>
  1370. </el-table-column>
  1371. </el-table>
  1372. <div slot="footer" class="dialog-footer">
  1373. <el-button type="primary" @click="saveForm">保 存</el-button>
  1374. <el-button type="primary" @click="submitForm">提交审核</el-button>
  1375. <el-button @click="cancel">取 消</el-button>
  1376. </div>
  1377. <!-- 选择库存总账数据 -->
  1378. <el-dialog
  1379. title="库存总账"
  1380. :modal="false"
  1381. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1382. :visible.sync="whgenlegVisible"
  1383. width="70%"
  1384. >
  1385. <el-table
  1386. :data="whgenlegList"
  1387. ref="tableList"
  1388. tooltip-effect="dark"
  1389. width="100%"
  1390. border
  1391. stripe
  1392. @selection-change="whgenlegSelectionChange"
  1393. >
  1394. <el-table-column type="selection" width="55"></el-table-column>
  1395. <el-table-column
  1396. prop="fMblno"
  1397. header-align="center"
  1398. align="center"
  1399. label="提单号"
  1400. >
  1401. </el-table-column>
  1402. <el-table-column
  1403. prop="createTime"
  1404. header-align="center"
  1405. align="center"
  1406. width="180px"
  1407. label="入库日期"
  1408. >
  1409. </el-table-column>
  1410. <el-table-column
  1411. prop="fGoodsids"
  1412. header-align="center"
  1413. align="center"
  1414. label="品名"
  1415. >
  1416. </el-table-column>
  1417. <el-table-column
  1418. prop="fQtyblc"
  1419. header-align="center"
  1420. align="center"
  1421. label="结余数量"
  1422. >
  1423. </el-table-column>
  1424. <el-table-column
  1425. prop="fWarehouseLocationids"
  1426. header-align="center"
  1427. align="center"
  1428. label="库区"
  1429. >
  1430. </el-table-column>
  1431. </el-table>
  1432. <pagination
  1433. v-show="whgenlegTotal > 0"
  1434. :total="whgenlegTotal"
  1435. :page.sync="whgenlegParams.pageNum"
  1436. :limit.sync="whgenlegParams.pageSize"
  1437. @pagination="getWhgenlegList"
  1438. />
  1439. <div slot="footer" class="dialog-footer">
  1440. <el-button type="primary" @click="whgenlegData">导入</el-button>
  1441. <el-button @click="whgenlegVisible = false">取 消</el-button>
  1442. </div>
  1443. </el-dialog>
  1444. </el-dialog>
  1445. </div>
  1446. </template>
  1447. <script>
  1448. import print from 'print-js'
  1449. import {
  1450. addWhgenleg,
  1451. listGoodsTransfer,
  1452. getGoodsTransfer,
  1453. addGoodsTransfer,
  1454. warehouseSubmission,
  1455. delGoodsTransfer,
  1456. exportGoodsTransfer
  1457. } from '@/api/warehouseBusiness/goodsTransfer'
  1458. import { updateCredit } from '@/api/warehouseBusiness/goodsTransfer'
  1459. import { listCorps } from '@/api/basicdata/corps'
  1460. import { listFees } from '@/api/basicdata/fees'
  1461. import { listWarehouse } from '@/api/basicdata/warehouse'
  1462. import { listArea } from '@/api/basicdata/area'
  1463. import { listGoods } from '@/api/basicdata/goods'
  1464. import { listUser, queryUserVal } from '@/api/system/user'
  1465. import { listWhgenleg } from '@/api/reportManagement/whgenleg'
  1466. import UploadFile from '@/components/Uploadfile'
  1467. export default {
  1468. name: 'goodsTransfer',
  1469. components: {
  1470. UploadFile
  1471. },
  1472. data() {
  1473. return {
  1474. // 修改查看状态
  1475. browseStatus: false,
  1476. // 是否有明细入库
  1477. formBrowseStatus: false,
  1478. // 遮罩层
  1479. loading: true,
  1480. // 选中数组
  1481. ids: [],
  1482. userVal: {
  1483. userName: null,
  1484. nickName: null,
  1485. deptId: null
  1486. },
  1487. queryForm: {},
  1488. // 添加用户对话框
  1489. editDialogVisible_s: false,
  1490. editDialogVisible_ss: false,
  1491. editDialogClosed_ss: false,
  1492. dataList: [],
  1493. warehouseCrList: [],
  1494. warehouseDrList: [],
  1495. relevantAttachments: [],
  1496. fPlannetweight: '',
  1497. // 税率
  1498. fTaxrate: null,
  1499. // 非单个禁用
  1500. single: true,
  1501. // 非多个禁用
  1502. multiple: true,
  1503. // 显示搜索条件
  1504. showSearch: true,
  1505. // 总条数
  1506. total: 0,
  1507. // 仓库主(出入库)表格数据
  1508. goodsTransferList: [],
  1509. // 弹出层标题
  1510. title: '',
  1511. // 是否显示弹出层
  1512. open: false,
  1513. // 货权方(客户数据)
  1514. fMblnoOptions: [],
  1515. // 货权方(客户数据)
  1516. // 客户名称
  1517. KHblnoOptions: [],
  1518. fSbuOptions: [],
  1519. // 操作员
  1520. userOptions: [],
  1521. // 操作员
  1522. goodsOptions: [],
  1523. // 库存明细入账数组
  1524. dataListSelection: [],
  1525. // 库存明细撤回入账数组
  1526. dataWithdrawList: [],
  1527. // 仓库(仓库
  1528. warehouseOptions: [],
  1529. kqhouseOptions: [],
  1530. // 贸易方式(数据字典),对应t_trademodels 字典
  1531. fTrademodeidOptions: [],
  1532. // 计费单位(数据字典),下拉选择毛重或净重字典
  1533. fFeetunitOptions: [
  1534. { dictLabel: "件数", dictValue: 1 },
  1535. { dictLabel: "毛重", dictValue: 2 },
  1536. { dictLabel: "净重", dictValue: 3 },
  1537. { dictLabel: "尺码", dictValue: 4 },
  1538. { dictLabel: "固定", dictValue: 5 }
  1539. ],
  1540. // 结算方式(数据字典),下拉选择字典
  1541. fStltypeOptions: [],
  1542. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  1543. fIfweighOptions: [],
  1544. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  1545. fIfpledgeOptions: [],
  1546. // 是否破损(数据字典),默认F否则T字典
  1547. fIfdamageOptions: [],
  1548. // 单据类型(数据字典)SJRK字典
  1549. fBilltypeOptions: [],
  1550. // 状态(数据字典),N 入字典
  1551. fBillstatusOptions: [],
  1552. // 费用名称
  1553. fWbuOptions: [],
  1554. // 查询参数
  1555. queryParams: {
  1556. pageNum: 1,
  1557. pageSize: 10,
  1558. fBillno: null,
  1559. createBy: null,
  1560. createTime: null,
  1561. fCustomsdeclartion: null,
  1562. fOriginalbillno: null,
  1563. fDeptid: null,
  1564. fBsdeptid: null,
  1565. fContacts: null,
  1566. fTel: null,
  1567. fCorpid: null,
  1568. fTocorpid: null,
  1569. fStltypeid: null,
  1570. fBscorpno: null,
  1571. fWarehouseid: null,
  1572. fStorekeeper: null,
  1573. fBsdate: null,
  1574. fPlanqty: null,
  1575. fPlangrossweight: null,
  1576. fPlannetweight: null,
  1577. fPlanvolumn: null,
  1578. fQty: null,
  1579. fGrossweight: null,
  1580. fNetweight: null,
  1581. fVolumn: null,
  1582. fTrademodeid: null,
  1583. fSbu: null,
  1584. fFeetunit: null,
  1585. fMblno: null,
  1586. fVslvoy: null,
  1587. fEta: null,
  1588. fCustomno: null,
  1589. fIfweigh: null,
  1590. fIfpledge: null,
  1591. fIfdamage: null,
  1592. fBankcorpid: null,
  1593. fBilltype: null,
  1594. fBillstatus: null,
  1595. fCreateby: null,
  1596. fCreatetime: null,
  1597. fGoodsid: null,
  1598. fCntrtype: null,
  1599. fCntqty: null
  1600. },
  1601. // 日期区间
  1602. orgStorageDate: null,
  1603. // 表单参数
  1604. form: {},
  1605. // 库存总账参数
  1606. whgenlegParams: {
  1607. pageNum: 1,
  1608. pageSize: 10,
  1609. fMblno: null,
  1610. fCorpid: null,
  1611. fWarehouseid: null,
  1612. fTrademodeid: null,
  1613. orgStorageDate: null
  1614. },
  1615. // 库存总账表
  1616. whgenlegList: [],
  1617. whgenlegTotal: 0,
  1618. // 弹窗库存总账数据
  1619. dialogWhgenlegList: [],
  1620. // 库存总账对话框
  1621. whgenlegVisible: false,
  1622. // 表单校验
  1623. rules: {
  1624. fBsdeptid: [{ required: true, message: ' ', trigger: 'blur' }],
  1625. fCorpid: [{ required: true, message: ' ', trigger: 'blur' }],
  1626. fBsdate: [{ required: true, message: ' ', trigger: 'blur' }],
  1627. fFeetunit: [{ required: true, message: ' ', trigger: 'blur' }],
  1628. fChargedate: [{ required: true, message: ' ', trigger: 'blur' }],
  1629. fTrademodeid: [{ required: true, message: ' ', trigger: 'blur' }],
  1630. fSbu: [{ required: true, message: ' ', trigger: 'blur' }],
  1631. fStorekeeper: {
  1632. required: true,
  1633. message: ' ',
  1634. trigger: 'blur'
  1635. },
  1636. fWarehouseid: [{ required: true, message: ' ', trigger: 'blur' }],
  1637. fbillingway: [
  1638. {
  1639. required: true,
  1640. message: ' ',
  1641. trigger: 'blur'
  1642. }
  1643. ],
  1644. fTocorpid: [
  1645. {
  1646. required: true,
  1647. message: ' ',
  1648. trigger: 'blur'
  1649. }
  1650. ]
  1651. }
  1652. }
  1653. },
  1654. created() {
  1655. this.getList()
  1656. this.getDicts('tax_rate').then((response) => {
  1657. this.fTaxrate = response.data[0].dictValue
  1658. })
  1659. this.getDicts('data_trademodes').then((response) => {
  1660. this.fTrademodeidOptions = response.data
  1661. })
  1662. this.getDicts('data_stltype_type').then((response) => {
  1663. this.fStltypeOptions = response.data
  1664. })
  1665. this.getDicts('data_ifweigh_status').then((response) => {
  1666. this.fIfweighOptions = response.data
  1667. })
  1668. this.getDicts('data_ifpledge_status').then((response) => {
  1669. this.fIfpledgeOptions = response.data
  1670. })
  1671. this.getDicts('data_ifdamage_status').then((response) => {
  1672. this.fIfdamageOptions = response.data
  1673. })
  1674. this.getDicts('data_billtype_type').then((response) => {
  1675. this.fBilltypeOptions = response.data
  1676. })
  1677. this.getDicts('sys_common_status').then((response) => {
  1678. this.fBillstatusOptions = response.data
  1679. })
  1680. },
  1681. methods: {
  1682. // 上传成功返回数据
  1683. showFile(row) {
  1684. // this.$set(this.relevantAttachments[0], 'fName', row.fileName)
  1685. this.$set(this.relevantAttachments[0], 'fUrl', row.url)
  1686. },
  1687. printSomething() {
  1688. // 此处的style即为打印时的样式
  1689. const style =
  1690. '@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}'
  1691. print({
  1692. printable: 'print_area',
  1693. type: 'html',
  1694. style: style, // 亦可使用引入的外部css;
  1695. scanStyles: false
  1696. })
  1697. },
  1698. // 新增附件上传
  1699. addRelevt() {
  1700. this.relevantAttachments.push({
  1701. fUrl: null,
  1702. fName: null,
  1703. createBy: this.form.createBy,
  1704. createTime: Date.parse(new Date())
  1705. })
  1706. },
  1707. // 添加list
  1708. addRelevant() {
  1709. if (
  1710. !this.form.fCorpid ||
  1711. !this.form.fTrademodeid ||
  1712. !this.form.fWarehouseid
  1713. ) {
  1714. this.$message({
  1715. message: '请维护货权方、贸易方式、仓库',
  1716. type: 'warning'
  1717. })
  1718. return false
  1719. }
  1720. this.whgenlegList = []
  1721. this.dialogWhgenlegList = []
  1722. this.whgenlegTotal = 0
  1723. this.whgenlegVisible = true
  1724. this.getWhgenlegList()
  1725. },
  1726. // 查询库存总账信息
  1727. getWhgenlegList() {
  1728. this.whgenlegParams.fMblno = this.form.fMblno
  1729. this.whgenlegParams.fCorpid = this.form.fCorpid
  1730. this.whgenlegParams.fWarehouseid = this.form.fWarehouseid
  1731. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid
  1732. this.whgenlegParams.orgStorageDate = this.orgStorageDate
  1733. listWhgenleg(this.whgenlegParams).then((response) => {
  1734. this.whgenlegList = response.rows
  1735. this.whgenlegTotal = response.total
  1736. })
  1737. },
  1738. // 库存总账多选框
  1739. whgenlegSelectionChange(selection) {
  1740. this.dialogWhgenlegList = selection
  1741. },
  1742. // 库存总账导出数据
  1743. whgenlegData() {
  1744. if (this.dialogWhgenlegList.length === 0) {
  1745. this.$message({ message: '未勾选信息', type: 'warning' })
  1746. return false
  1747. }
  1748. setTimeout(() => {
  1749. for (let whgen in this.dialogWhgenlegList) {
  1750. this.dataList.push({
  1751. fId: null,
  1752. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  1753. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  1754. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  1755. fMarks: this.dialogWhgenlegList[whgen].fMarks,
  1756. fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
  1757. fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
  1758. fOriginalbilldate: this.dialogWhgenlegList[whgen].fOriginalbilldate,
  1759. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  1760. fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  1761. fPackagespecs: this.dialogWhgenlegList[whgen].fPackagespecs,
  1762. fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
  1763. fVolumn: this.dialogWhgenlegList[whgen].fVolumnblc,
  1764. fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
  1765. fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
  1766. fQty: 0,
  1767. fCntqty: 1,
  1768. remark: null,
  1769. fGoodsval: 0,
  1770. fNetweight: 0,
  1771. fBillstatus: 1,
  1772. fGrossweight: 0
  1773. })
  1774. }
  1775. }, 100);
  1776. setTimeout(() => {
  1777. this.updateDeduplication()
  1778. }, 300);
  1779. this.whgenlegVisible = false
  1780. },
  1781. // 更新主表唛头、品名并去重
  1782. updateDeduplication: function() {
  1783. if (this.dataList.length === 0) {
  1784. return false
  1785. }
  1786. let fMarks = []
  1787. let fProductName = []
  1788. for (let li in this.dataList) {
  1789. fMarks.push(this.dataList[li].fMarks)
  1790. fProductName.push(this.dataList[li].fProductName)
  1791. }
  1792. this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
  1793. this.$set(this.form, 'fProductName', Array.from(new Set(fProductName)).join(","))
  1794. },
  1795. // 收货单打印界面
  1796. showEditDialog_s() {
  1797. this.editDialogVisible_s = true
  1798. },
  1799. showEditDialog_ss() {
  1800. this.editDialogVisible_ss = true
  1801. },
  1802. // 收款信息
  1803. addCollection() {
  1804. this.warehouseDrList.push({
  1805. fCorpid: null,
  1806. fFeeid: null,
  1807. fFeeunitid: 1,
  1808. fQty: 0,
  1809. fUnitprice: 0,
  1810. fAmount: 0,
  1811. fCurrency: null,
  1812. fCxrate: null,
  1813. fTaxrate: this.fTaxrate,
  1814. fRate: null,
  1815. remarks: null
  1816. })
  1817. },
  1818. addpayment() {
  1819. this.warehouseCrList.push({
  1820. fCorpid: null,
  1821. fFeeid: null,
  1822. fFeeunitid: 1,
  1823. fQty: 0,
  1824. fUnitprice: 0,
  1825. fAmount: 0,
  1826. fCurrency: null,
  1827. fTaxrate: this.fTaxrate,
  1828. fCxrate: null,
  1829. fRate: null,
  1830. remarks: null
  1831. })
  1832. },
  1833. queryUser() {
  1834. queryUserVal().then((response) => {
  1835. if (response.user !== null) {
  1836. this.userVal = response.user
  1837. this.$set(this.form, 'fDeptid', this.userVal.deptId)
  1838. this.$set(this.form, 'createBy', this.userVal.userName)
  1839. this.$set(this.form, 'fTrademodeid', '1')
  1840. // this.$set(this.relevantAttachments, "opUserName", this.userVal.userName);
  1841. this.$set(this.form, 'createTime', Date.parse(new Date()))
  1842. }
  1843. })
  1844. },
  1845. /** 查询仓库主(出入库)列表 */
  1846. getList() {
  1847. this.loading = true
  1848. listGoodsTransfer(this.queryParams).then((response) => {
  1849. this.goodsTransferList = response.rows
  1850. this.total = response.total
  1851. this.loading = false
  1852. })
  1853. },
  1854. /* 远程模糊查询库区 */
  1855. kqhouseRemoteMethod(name) {
  1856. if (name == null || name === '') {
  1857. return false
  1858. }
  1859. if (!this.form.fWarehouseid) {
  1860. this.$message.error('请输入仓库!')
  1861. return false
  1862. }
  1863. let queryParams = {
  1864. pageNum: 1,
  1865. pageSize: 10,
  1866. fWarehouseid: this.form.fWarehouseid,
  1867. fName: name
  1868. }
  1869. listArea(queryParams).then((response) => {
  1870. this.kqhouseOptions = response.rows
  1871. })
  1872. },
  1873. // 贸易方式(数据字典),对���t_trademodels 字典翻译
  1874. fTrademodeidFormat(row, column) {
  1875. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid)
  1876. },
  1877. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  1878. fIfweighFormat(row, column) {
  1879. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh)
  1880. },
  1881. // 编号字典翻译
  1882. fStltypeidFormat(row, column) {
  1883. return this.selectDictLabel(this.fStltypeOptions, row.fStltypeid)
  1884. },
  1885. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  1886. fIfpledgeFormat(row, column) {
  1887. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge)
  1888. },
  1889. // 是否破损(数据字典),默认F否则T字典翻译
  1890. fIfdamageFormat(row, column) {
  1891. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage)
  1892. },
  1893. // 单据类型(数据字典)SJRK字典翻译
  1894. fBilltypeFormat(row, column) {
  1895. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype)
  1896. },
  1897. // 状态(数据字典),N 入字典翻译
  1898. fBillstatusFormat(row, column) {
  1899. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus)
  1900. },
  1901. // 取消按钮
  1902. cancel() {
  1903. this.reset()
  1904. this.open = false
  1905. },
  1906. // 表单重置
  1907. reset() {
  1908. this.dataList = []
  1909. this.fWbuOptions = []
  1910. this.fWbuOptions = []
  1911. this.resetForm('form')
  1912. this.fMblnoOptions = []
  1913. this.KHblnoOptions = []
  1914. this.KHblnoOptions = []
  1915. this.warehouseDrList = []
  1916. this.warehouseCrList = []
  1917. this.warehouseOptions = []
  1918. this.relevantAttachments = []
  1919. },
  1920. /** 搜索按钮操作 */
  1921. handleQuery() {
  1922. this.queryParams.pageNum = 1
  1923. this.getList()
  1924. },
  1925. /** 重置按钮操作 */
  1926. resetQuery() {
  1927. this.resetForm('queryForm')
  1928. this.handleQuery()
  1929. },
  1930. // 多选框选中数据
  1931. handleSelectionChange(selection) {
  1932. this.ids = selection.map((item) => item.fId)
  1933. this.single = selection.length !== 1
  1934. this.multiple = !selection.length
  1935. },
  1936. /** 新增按钮操作 */
  1937. handleAdd() {
  1938. this.reset()
  1939. this.queryUser()
  1940. this.open = true
  1941. this.dataList = []
  1942. this.warehouseCrList = []
  1943. this.warehouseDrList = []
  1944. this.relevantAttachments = []
  1945. this.title = '货权转移'
  1946. },
  1947. /** 修改按钮操作 */
  1948. handleUpdate(row, status) {
  1949. this.browseStatus = status
  1950. this.reset()
  1951. const fId = row.fId || this.ids
  1952. getGoodsTransfer(fId).then((response) => {
  1953. this.form = response.data.warehousebills
  1954. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  1955. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  1956. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  1957. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  1958. this.fMblnoOptions = response.data.corps
  1959. this.KHblnoOptions = response.data.corps
  1960. this.fWbuOptions = response.data.feesList
  1961. this.warehouseOptions = response.data.warehouse
  1962. this.dataList = response.data.warehouseBillsItem
  1963. for (let list in this.dataList) {
  1964. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  1965. this.formBrowseStatus = true
  1966. }
  1967. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  1968. }
  1969. this.goodsOptions = response.data.goodsList
  1970. if (response.data.warehousebillsfeesDr) {
  1971. this.warehouseDrList = response.data.warehousebillsfeesDr
  1972. }
  1973. if (response.data.warehousebillsfeesCr) {
  1974. this.warehouseCrList = response.data.warehousebillsfeesCr
  1975. }
  1976. if (response.data.enclosures) {
  1977. this.relevantAttachments = response.data.enclosures;
  1978. }
  1979. this.userOptions = response.data.sysUser
  1980. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  1981. this.open = true
  1982. this.title = '修改仓入库'
  1983. })
  1984. },
  1985. // 库存明细合计
  1986. getSummaries(param) {
  1987. const { columns, data } = param
  1988. const sums = []
  1989. var values = []
  1990. columns.forEach((column, index) => {
  1991. if (index === 0) {
  1992. sums[index] = ''
  1993. return
  1994. }
  1995. if (column.property === 'fPlanqty') {
  1996. values = data.map((item) => Number(item['fPlanqty']))
  1997. }
  1998. if (column.property === 'fNetweight') {
  1999. values = data.map((item) => Number(item['fPlannetweight']))
  2000. }
  2001. if (column.property === 'fPlannetweight') {
  2002. values = data.map((item) => Number(item['fPlannetweight']))
  2003. }
  2004. if (column.property === 'fQty') {
  2005. values = data.map((item) => Number(item['fQty']))
  2006. }
  2007. if (column.property === 'fGrossweight') {
  2008. values = data.map((item) => Number(item['fGrossweight']))
  2009. }
  2010. if (column.property === 'fCntqty') {
  2011. values = data.map((item) => Number(item['fCntqty']))
  2012. } // const values = data.map(item => Number(item[column.property]))
  2013. if (
  2014. column.property === 'fPlanqty' ||
  2015. column.property === 'fPlannetweight' ||
  2016. column.property === 'fQty' ||
  2017. column.property === 'fGrossweight' ||
  2018. column.property === 'fCntqty' ||
  2019. column.property === 'fPlannetweight'
  2020. ) {
  2021. sums[index] = values.reduce((prev, curr) => {
  2022. const value = Number(curr)
  2023. if (!isNaN(value)) {
  2024. if (column.property === 'fGrossweight') {
  2025. this.form.fGrossweight = prev + curr
  2026. }
  2027. if (column.property === 'fQty') {
  2028. this.form.fQty = prev + curr
  2029. }
  2030. if (column.property === 'fCntqty') {
  2031. this.form.fCntqty = prev + curr
  2032. }
  2033. if (column.property === 'fPlannetweight') {
  2034. this.form.fNetweight = prev + curr
  2035. }
  2036. return prev + curr
  2037. } else {
  2038. return prev
  2039. }
  2040. }, 0) // sums[index]
  2041. }
  2042. })
  2043. this.sums = sums
  2044. return sums
  2045. },
  2046. // 入账
  2047. creditClick() {
  2048. if (this.dataList.length === 0) {
  2049. this.$message({ message: '未找到货转明细', type: 'warning' })
  2050. return false
  2051. }
  2052. for (let dataSelection in this.dataListSelection) {
  2053. if (!this.dataListSelection[dataSelection].fId) {
  2054. this.$message({ message: '请先点击保存,在进行货转确认', type: 'warning' })
  2055. return false
  2056. }
  2057. }
  2058. this.$refs['form'].validate((valid) => {
  2059. if (valid) {
  2060. for (let li in this.dataList) {
  2061. if (!this.dataList[li].fWarehouselocids) {
  2062. this.$message({ message: '请维护第' + Number(li) + 1 + '行库区', type: 'warning' })
  2063. return false
  2064. }
  2065. if (!this.dataList[li].fQty) {
  2066. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转件数', type: 'warning' })
  2067. return false
  2068. }
  2069. if (!this.dataList[li].fGrossweight) {
  2070. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转毛重', type: 'warning' })
  2071. return false
  2072. }
  2073. if (!this.dataList[li].fNetweight) {
  2074. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转净重', type: 'warning' })
  2075. return false
  2076. }
  2077. if (!this.dataList[li].fPackagespecs) {
  2078. this.$message({ message: '请维护第' + Number(li) + 1 + '行货包装规格', type: 'warning' })
  2079. return false
  2080. }
  2081. }
  2082. let formData = new window.FormData()
  2083. formData.append("warehouseBills", JSON.stringify(this.form));
  2084. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2085. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  2086. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2087. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2088. addWhgenleg(formData).then((response) => {
  2089. this.$refs.tableListRef.clearSelection()
  2090. this.msgSuccess('入账成功')
  2091. let item = response.data.warehouseItem
  2092. for (let li in this.dataList) {
  2093. for (let ite in item) {
  2094. if (this.dataList[li].fId === item[ite].fId) {
  2095. this.$set(this.dataList[li], 'fBillstatus', 6)
  2096. }
  2097. }
  2098. }
  2099. this.formBrowseStatus = true
  2100. })
  2101. }
  2102. })
  2103. },
  2104. // 撤回货转
  2105. withdrawClick() {
  2106. // 撤回货转
  2107. let formData = new window.FormData()
  2108. let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
  2109. formData.append("warehouseBills", JSON.stringify(this.form));
  2110. formData.append("warehousebillsitems", JSON.stringify(withdrawList));
  2111. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2112. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2113. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2114. updateCredit(formData).then((response) => {
  2115. this.fid = response.data
  2116. this.formBrowseStatus = false
  2117. this.msgSuccess('撤销入账成功')
  2118. this.$refs.tableListRef.clearSelection()
  2119. let mun = 0;
  2120. for (let i in this.dataList) {
  2121. for (let li in withdrawList) {
  2122. if (withdrawList[li].fId === this.dataList[i].fId) {
  2123. this.$set(this.dataList[i], 'fBillstatus', 1)
  2124. }
  2125. }
  2126. if (this.dataList[i].fBillstatus && this.dataList[i].fBillstatus === 6) {
  2127. mun ++;
  2128. }
  2129. }
  2130. if (mun > 0) {
  2131. this.formBrowseStatus = true
  2132. } else {
  2133. this.formBrowseStatus = false
  2134. }
  2135. })
  2136. },
  2137. // 付款合计
  2138. warehouseDrSummaries(param) {
  2139. const { columns, data } = param
  2140. const sums = []
  2141. columns.forEach((column, index) => {
  2142. if (index === 0) {
  2143. sums[index] = '合计'
  2144. return
  2145. }
  2146. const values = data.map((item) => Number(item[column.property]))
  2147. if (
  2148. column.property === 'fUnitprice' ||
  2149. column.property === 'fAmount' ||
  2150. column.property === 'fQty' ||
  2151. column.property === 'fQty'
  2152. ) {
  2153. sums[index] = values.reduce((prev, curr) => {
  2154. const value = Number(curr)
  2155. if (!isNaN(value)) {
  2156. return prev + curr
  2157. } else {
  2158. return prev
  2159. }
  2160. }, 0) // sums[index]
  2161. }
  2162. })
  2163. return sums
  2164. },
  2165. // 数量计算
  2166. changeContractAmt(row) {
  2167. let fQty = 0
  2168. let fUnitprice = 0
  2169. if (row.fUnitprice) {
  2170. fUnitprice = row.fUnitprice
  2171. }
  2172. if (row.fQty) {
  2173. fQty = row.fQty
  2174. }
  2175. this.$set(row, 'fAmount', Number(fUnitprice) * Number(fQty)).toFixed(2)
  2176. },
  2177. changefBsdate(row) {
  2178. if (this.dataList.length > 0) {
  2179. for (var i = 0; i < this.dataList.length; i++) {
  2180. this.$set(this.dataList[i], 'fBsdate', row)
  2181. }
  2182. }
  2183. },
  2184. // 库存明细多选
  2185. Selectinventory(selection) {
  2186. this.dataWithdrawList = []
  2187. this.dataListSelection = []
  2188. if (!selection || selection.length === 0) {
  2189. return false
  2190. }
  2191. for (let se in selection) {
  2192. if (!selection[se].fBillstatus || selection[se].fBillstatus !== 6) {
  2193. this.dataListSelection.push(selection[se])
  2194. } else if (selection[se].fBillstatus && selection[se].fBillstatus === 6) {
  2195. this.dataWithdrawList.push(selection[se])
  2196. }
  2197. }
  2198. },
  2199. // 库存明细多选框结果
  2200. dataListChange(row) {
  2201. this.dataListSelection = row
  2202. },
  2203. saveForm() {
  2204. this.$refs['form'].validate((valid) => {
  2205. if (this.form.fCorpid === this.form.fTocorpid) {
  2206. this.$message.error('新货权方不得与货权方一致')
  2207. return false
  2208. }
  2209. if (this.dataList.length === 0) {
  2210. this.$message.error('请添加库存明细!')
  2211. return false
  2212. }
  2213. for (let list in this.dataList) {
  2214. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  2215. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  2216. return false
  2217. }
  2218. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  2219. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重!')
  2220. return false
  2221. }
  2222. }
  2223. if (valid) {
  2224. this.form.fBillstatus = 2
  2225. let formData = new window.FormData()
  2226. formData.append("warehouseBills", JSON.stringify(this.form));
  2227. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  2228. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2229. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2230. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2231. addGoodsTransfer(formData).then((response) => {
  2232. this.msgSuccess('保存成功')
  2233. this.form = response.data.warehouseBills
  2234. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2235. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2236. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2237. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2238. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2239. this.dataList = response.data.warehousebillsitems
  2240. })
  2241. }
  2242. })
  2243. },
  2244. /** 提交按钮 */
  2245. submitForm() {
  2246. this.$refs['form'].validate((valid) => {
  2247. if (this.form.fCorpid === this.form.fTocorpid) {
  2248. this.$message.error('新货权方不得与货权方一致')
  2249. return false
  2250. }
  2251. if (this.dataList.length === 0) {
  2252. this.$message.error('请添加库存明细!')
  2253. return false
  2254. }
  2255. for (let list in this.dataList) {
  2256. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  2257. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  2258. return false
  2259. }
  2260. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  2261. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重!')
  2262. return false
  2263. }
  2264. }
  2265. if (this.relevantAttachments.length !== 0) {
  2266. for (let relevant in this.relevantAttachments) {
  2267. if (!this.relevantAttachments[relevant].fName) {
  2268. this.$message.error('请输入附件名称!')
  2269. return false
  2270. }
  2271. }
  2272. }
  2273. if (this.warehouseDrList.length !== 0) {
  2274. for (let warehouseDr in this.warehouseDrList) {
  2275. if (!this.warehouseDrList[warehouseDr].fAmount) {
  2276. this.$message.error('收款信息序号为' + (Number(warehouseDr) + 1) + '的金额异常')
  2277. return false
  2278. }
  2279. }
  2280. }
  2281. if (this.warehouseDrList.length !== 0) {
  2282. for (let warehouseCr in this.warehouseCrList) {
  2283. if (!this.warehouseCrList[warehouseCr].fAmount) {
  2284. this.$message.error(
  2285. '付款信息序号为' + (Number(warehouseCr) + 1) + '的金额异常'
  2286. )
  2287. return false
  2288. }
  2289. }
  2290. }
  2291. if (valid) {
  2292. this.form.fBillstatus = 4
  2293. let formData = new window.FormData()
  2294. formData.append("warehouseBills", JSON.stringify(this.form));
  2295. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  2296. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2297. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2298. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2299. warehouseSubmission(formData).then((response) => {
  2300. this.msgSuccess('提交成功')
  2301. this.cancel()
  2302. this.getList()
  2303. })
  2304. }
  2305. })
  2306. },
  2307. /** 删除按钮操作 */
  2308. handleDelete(row) {
  2309. const fIds = row.fId || this.ids
  2310. this.$confirm(
  2311. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  2312. '警告',
  2313. {
  2314. confirmButtonText: '确定',
  2315. cancelButtonText: '取消',
  2316. type: 'warning'
  2317. }
  2318. )
  2319. .then(function() {
  2320. return delGoodsTransfer(fIds)
  2321. })
  2322. .then(() => {
  2323. this.getList()
  2324. this.msgSuccess('删除成功')
  2325. })
  2326. },
  2327. /** 导出按钮操作 */
  2328. handleExport() {
  2329. const queryParams = this.queryParams
  2330. this.$confirm('是否确认导出所有仓库主(出入库)数据项?', '警告', {
  2331. confirmButtonText: '确定',
  2332. cancelButtonText: '取消',
  2333. type: 'warning'
  2334. })
  2335. .then(function() {
  2336. return exportgoodsTransfer(queryParams)
  2337. })
  2338. .then((response) => {
  2339. this.download(response.msg)
  2340. })
  2341. },
  2342. // 货转件数的计算
  2343. qtyChange(row) {
  2344. if (!row.fQty || row.fQty === '') {
  2345. this.$set(row, 'fNetweight', 0)
  2346. this.$set(row, 'fGrossweight', 0)
  2347. return false
  2348. }
  2349. // 净重 fPlannetweight
  2350. // 毛重 fPlangrossweight
  2351. let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(6)
  2352. let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(6)
  2353. this.$set(row, 'fNetweight', parseFloat(Number(netweight) * Number(row.fQty)).toFixed(6))
  2354. this.$set(row, 'fGrossweight', parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(6))
  2355. },
  2356. deleteRow(index, rows) {
  2357. rows.splice(index, 1)
  2358. this.this.updateDeduplication()
  2359. },
  2360. // 变更计价单位
  2361. changeFeeUnit(row) {
  2362. if (!row.fFeeunitid) {
  2363. return false
  2364. }
  2365. let fQty = 0;
  2366. let fGrossweight = 0;
  2367. let fNetweight = 0;
  2368. let volumn = 0;
  2369. let fixed = 1;
  2370. for (let li in this.dataList) {
  2371. if (this.dataList[li].fQty) {
  2372. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  2373. }
  2374. if (this.dataList[li].fGrossweight) {
  2375. fGrossweight = parseFloat(Number(fGrossweight) + Number(this.dataList[li].fGrossweight)).toFixed(2)
  2376. }
  2377. if (this.dataList[li].fNetweight) {
  2378. fNetweight = parseFloat(Number(fNetweight) + Number(this.dataList[li].fNetweight)).toFixed(2)
  2379. }
  2380. if (this.dataList[li].volumn) {
  2381. volumn = parseFloat(Number(volumn) + Number(this.dataList[li].volumn)).toFixed(2)
  2382. }
  2383. }
  2384. if (row.fFeeunitid === 1) {
  2385. this.$set(row, 'fQty', fQty)
  2386. } else if (row.fFeeunitid === 2) {
  2387. this.$set(row, 'fQty', fGrossweight)
  2388. }else if (row.fFeeunitid === 3) {
  2389. this.$set(row, 'fQty', fNetweight)
  2390. }else if (row.fFeeunitid === 4) {
  2391. this.$set(row, 'fQty', volumn)
  2392. }else if (row.fFeeunitid === 5) {
  2393. this.$set(row, 'fQty', fixed)
  2394. }
  2395. if (row.fUnitprice) {
  2396. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  2397. }
  2398. },
  2399. // 选择新货权方自动带出结算方式
  2400. changefCorpid(row) {
  2401. this.$set(row, "fSbu", row.fCorpid);
  2402. for (let corp in this.fMblnoOptions) {
  2403. if (row.fTocorpid === this.fMblnoOptions[corp].fId) {
  2404. this.$set(this.form, "fStltypeid", this.fMblnoOptions[corp].fStltypeid + '');
  2405. }
  2406. }
  2407. },
  2408. /* 远程模糊查询用户 */
  2409. corpsRemoteMethod(name) {
  2410. if (name == null || name === '') {
  2411. return false
  2412. }
  2413. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2414. listCorps(queryParams).then((response) => {
  2415. this.fMblnoOptions = response.rows
  2416. this.KHblnoOptions = response.rows
  2417. })
  2418. },
  2419. /* 远程模糊查询商品 */
  2420. goodsRemoteMethod(name) {
  2421. if (name == null || name === '') {
  2422. return false
  2423. }
  2424. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2425. listGoods(queryParams).then((response) => {
  2426. this.goodsOptions = response.rows
  2427. })
  2428. },
  2429. // 远程模糊查询费用名称
  2430. fWRemoteMethod(name) {
  2431. if (name == null || name === '') {
  2432. return false
  2433. }
  2434. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2435. listFees(queryParams).then((response) => {
  2436. this.fWbuOptions = response.rows
  2437. })
  2438. },
  2439. /* 远程模糊查询经营单位 */
  2440. fSbuRemoteMethod(name) {
  2441. if (name == null || name === '') {
  2442. return false
  2443. }
  2444. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2445. listCorps(queryParams).then((response) => {
  2446. this.fSbuOptions = response.rows
  2447. })
  2448. },
  2449. /* 远程模糊查询仓库 */
  2450. warehouseRemoteMethod(name) {
  2451. if (name == null || name === '') {
  2452. return false
  2453. }
  2454. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2455. listWarehouse(queryParams).then((response) => {
  2456. this.warehouseOptions = response.rows
  2457. })
  2458. },
  2459. /* 远程模糊查询操作用户 */
  2460. userRemoteMethod(name) {
  2461. if (name == null || name === '') {
  2462. return false
  2463. }
  2464. let queryParams = { pageNum: 1, pageSize: 10, userName: name }
  2465. listUser(queryParams).then((response) => {
  2466. this.userOptions = response.rows
  2467. })
  2468. }
  2469. }
  2470. }
  2471. </script>
  2472. <style lang="scss">
  2473. .juzhong > th {
  2474. text-align: center;
  2475. }
  2476. .biaoge > tr > td {
  2477. height: 30px;
  2478. text-align: center;
  2479. border-right: 1px solid #dfe6ec !important;
  2480. order-bottom: 1px solid #dfe6ec !important;
  2481. border-bottom: 1px solid #dfe6ec !important;
  2482. }
  2483. .el-table thead th {
  2484. background: #1890ff;
  2485. color: #fff;
  2486. }
  2487. .upload-demo {
  2488. margin-left: 50px;
  2489. }
  2490. .el-form-item {
  2491. margin-bottom: 5px !important;
  2492. }
  2493. .el-form-item__label {
  2494. font-size: 12px !important;
  2495. }
  2496. </style>