index.vue 76 KB

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