index.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009
  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="68px"
  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="fCreateby">
  20. <el-input
  21. v-model="queryParams.fCreateby"
  22. placeholder="请输入制单人"
  23. clearable
  24. size="small"
  25. @keyup.enter.native="handleQuery"
  26. />
  27. </el-form-item>
  28. <el-form-item label="制单日期" prop="fCreatetime">
  29. <el-date-picker
  30. clearable
  31. size="small"
  32. style="width: 200px"
  33. v-model="queryParams.fCreatetime"
  34. type="date"
  35. value-format="yyyy-MM-dd"
  36. placeholder="选择制单日期"
  37. >
  38. </el-date-picker>
  39. </el-form-item>
  40. <el-form-item label="贸易方式" prop="fTrademodeid">
  41. <el-input
  42. v-model="queryParams.fTrademodeid"
  43. placeholder="请输入贸易方式"
  44. clearable
  45. size="small"
  46. @keyup.enter.native="handleQuery"
  47. />
  48. </el-form-item>
  49. <el-form-item label="客户名称" prop="fCorpid">
  50. <el-input
  51. v-model="queryParams.fCorpid"
  52. placeholder="请输入客户名称"
  53. clearable
  54. size="small"
  55. @keyup.enter.native="handleQuery"
  56. />
  57. </el-form-item>
  58. <el-form-item label="经营单位" prop="fSbu">
  59. <el-input
  60. v-model="queryParams.fSbu"
  61. placeholder="请输入经营单位"
  62. clearable
  63. size="small"
  64. @keyup.enter.native="handleQuery"
  65. />
  66. </el-form-item>
  67. <el-form-item label="提单号" prop="fMblno">
  68. <el-input
  69. v-model="queryParams.fMblno"
  70. placeholder="请输入提单号"
  71. clearable
  72. size="small"
  73. @keyup.enter.native="handleQuery"
  74. />
  75. </el-form-item>
  76. <el-form-item label="报关单号" prop="fCustomsdeclartion">
  77. <el-input
  78. v-model="queryParams.fCustomsdeclartion"
  79. placeholder="请输入报关单号"
  80. clearable
  81. size="small"
  82. @keyup.enter.native="handleQuery"
  83. />
  84. </el-form-item>
  85. <el-form-item label="货物名称" prop="fGoodsid">
  86. <el-select v-model="queryParams.fGoodsid" placeholder="请选择货物名称" clearable size="small">
  87. <el-option label="请选择字典生成" value="" />
  88. </el-select>
  89. </el-form-item>
  90. <el-form-item label="箱型" prop="fCntrtype">
  91. <el-select
  92. v-model="queryParams.fCntrtype"
  93. placeholder="请选择箱型"
  94. clearable
  95. size="small"
  96. >
  97. <el-option label="请选择字典生成" value="" />
  98. </el-select>
  99. </el-form-item>
  100. <el-form-item label="箱量" prop="fCntqty">
  101. <el-input
  102. v-model="queryParams.fCntqty"
  103. placeholder="请输入箱量"
  104. clearable
  105. size="small"
  106. @keyup.enter.native="handleQuery"
  107. />
  108. </el-form-item>
  109. <el-form-item label="仓库" prop="fWarehouseid">
  110. <el-input
  111. v-model="queryParams.fWarehouseid"
  112. placeholder="请输入仓库"
  113. clearable
  114. size="small"
  115. @keyup.enter.native="handleQuery"
  116. />
  117. </el-form-item>
  118. <el-form-item>
  119. <el-button
  120. type="cyan"
  121. icon="el-icon-search"
  122. size="mini"
  123. @click="handleQuery"
  124. >搜索</el-button
  125. >
  126. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  127. >重置</el-button
  128. >
  129. </el-form-item>
  130. </el-form>
  131. <el-row :gutter="10" class="mb8">
  132. <el-col :span="1.5">
  133. <el-button
  134. type="primary"
  135. icon="el-icon-plus"
  136. size="mini"
  137. @click="handleAdd"
  138. v-hasPermi="['warehouseBusiness:warehousebills:add']"
  139. >新增</el-button
  140. >
  141. </el-col>
  142. <el-col :span="1.5">
  143. <el-button
  144. type="success"
  145. icon="el-icon-edit"
  146. size="mini"
  147. :disabled="single"
  148. @click="handleUpdate"
  149. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  150. >修改</el-button
  151. >
  152. </el-col>
  153. <el-col :span="1.5">
  154. <el-button
  155. type="danger"
  156. icon="el-icon-delete"
  157. size="mini"
  158. :disabled="multiple"
  159. @click="handleDelete"
  160. v-hasPermi="['warehouseBusiness:warehousebills:remove']"
  161. >删除</el-button
  162. >
  163. </el-col>
  164. <el-col :span="1.5">
  165. <el-button
  166. type="warning"
  167. icon="el-icon-download"
  168. size="mini"
  169. @click="handleExport"
  170. v-hasPermi="['warehouseBusiness:warehousebills:export']"
  171. >导出</el-button
  172. >
  173. </el-col>
  174. <right-toolbar
  175. :showSearch.sync="showSearch"
  176. @queryTable="getList"
  177. ></right-toolbar>
  178. </el-row>
  179. <el-table
  180. v-loading="loading"
  181. :data="warehousebillsList"
  182. @selection-change="handleSelectionChange"
  183. >
  184. <el-table-column type="selection" width="55" align="center" />
  185. <el-table-column v-if="false" align="center" prop="fId" />
  186. <el-table-column label="入库日期" align="center" prop="fBsdate" width="180">
  187. <template slot-scope="scope">
  188. <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
  189. </template>
  190. </el-table-column>
  191. <el-table-column
  192. label="件数"
  193. align="center"
  194. prop="fQty"
  195. />
  196. <el-table-column
  197. label="毛重"
  198. align="center"
  199. prop="fGrossweight"
  200. />
  201. <el-table-column
  202. label="净重"
  203. align="center"
  204. prop="fNetweight"
  205. />
  206. <el-table-column
  207. label="状态"
  208. align="center"
  209. prop="fBillstatus"
  210. :formatter="fBillstatusFormat"
  211. />
  212. <el-table-column
  213. label="是否质押"
  214. align="center"
  215. prop="fIfpledge"
  216. :formatter="fIfpledgeFormat"
  217. />
  218. <el-table-column
  219. label="银行名称"
  220. align="center"
  221. prop="fBankcorpid"
  222. />
  223. <el-table-column
  224. label="业务编号,格式RK+YYYY+YY+NNN,编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用删除单据号,每月从001开始。RK CK DB HZ "
  225. align="center"
  226. prop="fBillno"
  227. />
  228. <el-table-column
  229. label="报关号"
  230. align="center"
  231. prop="fCustomsdeclartion"
  232. />
  233. <el-table-column
  234. label="原始业务编号,入库时和f_billno 相同,出库 取入库的f_originalbillno"
  235. align="center"
  236. prop="fOriginalbillno"
  237. />
  238. <el-table-column label="制单部门" align="center" prop="fDeptid" />
  239. <el-table-column label="业务所属部门" align="center" prop="fBsdeptid" />
  240. <el-table-column label="联系人" align="center" prop="fContacts" />
  241. <el-table-column label="电话" align="center" prop="fTel" />
  242. <el-table-column
  243. label="客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name"
  244. align="center"
  245. prop="fCorpid"
  246. />
  247. <el-table-column
  248. label="货转客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name,自有在货权转移是该字段有效"
  249. align="center"
  250. prop="fTocorpid"
  251. />
  252. <el-table-column
  253. label="结算方式,默认提取corps中stltypeid 也可以从表t_stltypes中下拉选择,存储id,显示name"
  254. align="center"
  255. prop="fStltypeid"
  256. />
  257. <el-table-column
  258. label="客户存货编号,格式编号客户编号+YYYY +NNNN,
  259. 编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用,每年从001开始"
  260. align="center"
  261. prop="fBscorpno"
  262. />
  263. <el-table-column label="仓库" align="center" prop="fWarehouseid" />
  264. <el-table-column label="仓管人" align="center" prop="fStorekeeper" />
  265. <el-table-column
  266. label="计划件数,由明细表自动合计生成"
  267. align="center"
  268. prop="fPlanqty"
  269. />
  270. <el-table-column
  271. label="计划毛重,由明细表自动合计生成"
  272. align="center"
  273. prop="fPlangrossweight"
  274. />
  275. <el-table-column
  276. label="计划净重,由明细表自动合计生成"
  277. align="center"
  278. prop="fPlannetweight"
  279. />
  280. <el-table-column
  281. label="计划尺码,由明细表自动合计生成"
  282. align="center"
  283. prop="fPlanvolumn"
  284. />
  285. <el-table-column
  286. label="尺码,由明细表自动合计生成"
  287. align="center"
  288. prop="fVolumn"
  289. />
  290. <el-table-column
  291. label="贸易方式(数据字典),对应t_trademodels "
  292. align="center"
  293. prop="fTrademodeid"
  294. :formatter="fTrademodeidFormat"
  295. />
  296. <el-table-column label="经营单位(客户列表)" align="center" prop="fSbu" />
  297. <el-table-column
  298. label="计费单位(数据字典),下拉选择毛重或净重"
  299. align="center"
  300. prop="fFeetunit"
  301. :formatter="fFeetunitFormat"
  302. />
  303. <el-table-column label="提单号" align="center" prop="fMblno" />
  304. <el-table-column
  305. label="船名航次,CMA/A0001"
  306. align="center"
  307. prop="fVslvoy"
  308. />
  309. <el-table-column label="到港日期" align="center" prop="fEta" width="180">
  310. <template slot-scope="scope">
  311. <span>{{ parseTime(scope.row.fEta, "{y}-{m}-{d}") }}</span>
  312. </template>
  313. </el-table-column>
  314. <el-table-column label="报关单号" align="center" prop="fCustomno" />
  315. <el-table-column
  316. label="是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择"
  317. align="center"
  318. prop="fIfweigh"
  319. :formatter="fIfweighFormat"
  320. />
  321. <el-table-column
  322. label="单据类型(数据字典)SJRK"
  323. align="center"
  324. prop="fBilltype"
  325. :formatter="fBilltypeFormat"
  326. />
  327. <el-table-column label="备注" align="center" prop="remark" />
  328. <el-table-column
  329. label="操作"
  330. align="center"
  331. class-name="small-padding fixed-width"
  332. >
  333. <template slot-scope="scope">
  334. <el-button
  335. size="mini"
  336. type="text"
  337. icon="el-icon-edit"
  338. @click="handleUpdate(scope.row)"
  339. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  340. >修改</el-button
  341. >
  342. <el-button
  343. size="mini"
  344. type="text"
  345. icon="el-icon-delete"
  346. @click="handleDelete(scope.row)"
  347. v-hasPermi="['warehouseBusiness:warehousebills:remove']"
  348. >删除</el-button
  349. >
  350. </template>
  351. </el-table-column>
  352. </el-table>
  353. <pagination
  354. v-show="total > 0"
  355. :total="total"
  356. :page.sync="queryParams.pageNum"
  357. :limit.sync="queryParams.pageSize"
  358. @pagination="getList"
  359. />
  360. <!-- 添加或修改仓库主(出入库)对话框 -->
  361. <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
  362. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  363. <el-form-item
  364. label="业务编号,格式RK+YYYY+YY+NNN,编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用删除单据号,每月从001开始。
  365. RK CK DB HZ
  366. "
  367. prop="fBillno"
  368. >
  369. <el-input
  370. v-model="form.fBillno"
  371. placeholder="请输入业务编号,格式RK+YYYY+YY+NNN,编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用删除单据号,每月从001开始。
  372. RK CK DB HZ
  373. "
  374. />
  375. </el-form-item>
  376. <el-form-item label="报关号" prop="fCustomsdeclartion">
  377. <el-input
  378. v-model="form.fCustomsdeclartion"
  379. placeholder="请输入报关号"
  380. />
  381. </el-form-item>
  382. <el-form-item
  383. label="原始业务编号,入库时和f_billno 相同,出库 取入库的f_originalbillno"
  384. prop="fOriginalbillno"
  385. >
  386. <el-input
  387. v-model="form.fOriginalbillno"
  388. placeholder="请输入原始业务编号,入库时和f_billno 相同,出库 取入库的f_originalbillno"
  389. />
  390. </el-form-item>
  391. <el-form-item label="制单部门" prop="fDeptid">
  392. <el-input v-model="form.fDeptid" placeholder="请输入制单部门" />
  393. </el-form-item>
  394. <el-form-item label="业务所属部门" prop="fBsdeptid">
  395. <el-input v-model="form.fBsdeptid" placeholder="请输入业务所属部门" />
  396. </el-form-item>
  397. <el-form-item label="联系人" prop="fContacts">
  398. <el-input v-model="form.fContacts" placeholder="请输入联系人" />
  399. </el-form-item>
  400. <el-form-item label="电话" prop="fTel">
  401. <el-input v-model="form.fTel" placeholder="请输入电话" />
  402. </el-form-item>
  403. <el-form-item
  404. label="客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name"
  405. prop="fCorpid"
  406. >
  407. <el-input
  408. v-model="form.fCorpid"
  409. placeholder="请输入客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name"
  410. />
  411. </el-form-item>
  412. <el-form-item
  413. label="货转客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name,自有在货权转移是该字段有效"
  414. prop="fTocorpid"
  415. >
  416. <el-input
  417. v-model="form.fTocorpid"
  418. placeholder="请输入货转客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name,自有在货权转移是该字段有效"
  419. />
  420. </el-form-item>
  421. <el-form-item
  422. label="结算方式,默认提取corps中stltypeid 也可以从表t_stltypes中下拉选择,存储id,显示name"
  423. prop="fStltypeid"
  424. >
  425. <el-input
  426. v-model="form.fStltypeid"
  427. placeholder="请输入结算方式,默认提取corps中stltypeid 也可以从表t_stltypes中下拉选择,存储id,显示name"
  428. />
  429. </el-form-item>
  430. <el-form-item
  431. label="客户存货编号,格式编号客户编号+YYYY +NNNN,
  432. 编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用,每年从001开始"
  433. prop="fBscorpno"
  434. >
  435. <el-input
  436. v-model="form.fBscorpno"
  437. placeholder="请输入客户存货编号,格式编号客户编号+YYYY +NNNN,
  438. 编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用,每年从001开始"
  439. />
  440. </el-form-item>
  441. <el-form-item label="仓库" prop="fWarehouseid">
  442. <el-input v-model="form.fWarehouseid" placeholder="请输入仓库" />
  443. </el-form-item>
  444. <el-form-item label="仓管人" prop="fStorekeeper">
  445. <el-input v-model="form.fStorekeeper" placeholder="请输入仓管人" />
  446. </el-form-item>
  447. <el-form-item label="入" prop="fBsdate">
  448. <el-date-picker
  449. clearable
  450. size="small"
  451. style="width: 200px"
  452. v-model="form.fBsdate"
  453. type="date"
  454. value-format="yyyy-MM-dd"
  455. placeholder="选择入"
  456. >
  457. </el-date-picker>
  458. </el-form-item>
  459. <el-form-item label="计划件数,由明细表自动合计生成" prop="fPlanqty">
  460. <el-input
  461. v-model="form.fPlanqty"
  462. placeholder="请输入计划件数,由明细表自动合计生成"
  463. />
  464. </el-form-item>
  465. <el-form-item
  466. label="计划毛重,由明细表自动合计生成"
  467. prop="fPlangrossweight"
  468. >
  469. <el-input
  470. v-model="form.fPlangrossweight"
  471. placeholder="请输入计划毛重,由明细表自动合计生成"
  472. />
  473. </el-form-item>
  474. <el-form-item
  475. label="计划净重,由明细表自动合计生成"
  476. prop="fPlannetweight"
  477. >
  478. <el-input
  479. v-model="form.fPlannetweight"
  480. placeholder="请输入计划净重,由明细表自动合计生成"
  481. />
  482. </el-form-item>
  483. <el-form-item label="计划尺码,由明细表自动合计生成" prop="fPlanvolumn">
  484. <el-input
  485. v-model="form.fPlanvolumn"
  486. placeholder="请输入计划尺码,由明细表自动合计生成"
  487. />
  488. </el-form-item>
  489. <el-form-item label="件数,由明细表自动合计生成" prop="fQty">
  490. <el-input
  491. v-model="form.fQty"
  492. placeholder="请输入件数,由明细表自动合计生成"
  493. />
  494. </el-form-item>
  495. <el-form-item label="毛重,由明细表自动合计生成" prop="fGrossweight">
  496. <el-input
  497. v-model="form.fGrossweight"
  498. placeholder="请输入毛重,由明细表自动合计生成"
  499. />
  500. </el-form-item>
  501. <el-form-item label="净重,由明细表自动合计生成" prop="fNetweight">
  502. <el-input
  503. v-model="form.fNetweight"
  504. placeholder="请输入净重,由明细表自动合计生成"
  505. />
  506. </el-form-item>
  507. <el-form-item label="尺码,由明细表自动合计生成" prop="fVolumn">
  508. <el-input
  509. v-model="form.fVolumn"
  510. placeholder="请输入尺码,由明细表自动合计生成"
  511. />
  512. </el-form-item>
  513. <el-form-item
  514. label="贸易方式(数据字典),对应t_trademodels "
  515. prop="fTrademodeid"
  516. >
  517. <el-input
  518. v-model="form.fTrademodeid"
  519. placeholder="请输入贸易方式(数据字典),对应t_trademodels "
  520. />
  521. </el-form-item>
  522. <el-form-item label="经营单位(客户列表)" prop="fSbu">
  523. <el-input
  524. v-model="form.fSbu"
  525. placeholder="请输入经营单位(客户列表)"
  526. />
  527. </el-form-item>
  528. <el-form-item
  529. label="计费单位(数据字典),下拉选择毛重或净重"
  530. prop="fFeetunit"
  531. >
  532. <el-select
  533. v-model="form.fFeetunit"
  534. placeholder="请选择计费单位(数据字典),下拉选择毛重或净重"
  535. >
  536. <el-option
  537. v-for="dict in fFeetunitOptions"
  538. :key="dict.dictValue"
  539. :label="dict.dictLabel"
  540. :value="dict.dictValue"
  541. ></el-option>
  542. </el-select>
  543. </el-form-item>
  544. <el-form-item label="提单号" prop="fMblno">
  545. <el-input v-model="form.fMblno" placeholder="请输入提单号" />
  546. </el-form-item>
  547. <el-form-item label="船名航次,CMA/A0001" prop="fVslvoy">
  548. <el-input
  549. v-model="form.fVslvoy"
  550. placeholder="请输入船名航次,CMA/A0001"
  551. />
  552. </el-form-item>
  553. <el-form-item label="到港日期" prop="fEta">
  554. <el-date-picker
  555. clearable
  556. size="small"
  557. style="width: 200px"
  558. v-model="form.fEta"
  559. type="date"
  560. value-format="yyyy-MM-dd"
  561. placeholder="选择到港日期"
  562. >
  563. </el-date-picker>
  564. </el-form-item>
  565. <el-form-item label="报关单号" prop="fCustomno">
  566. <el-input v-model="form.fCustomno" placeholder="请输入报关单号" />
  567. </el-form-item>
  568. <el-form-item
  569. label="是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择"
  570. prop="fIfweigh"
  571. >
  572. <el-select
  573. v-model="form.fIfweigh"
  574. placeholder="请选择是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择"
  575. >
  576. <el-option
  577. v-for="dict in fIfweighOptions"
  578. :key="dict.dictValue"
  579. :label="dict.dictLabel"
  580. :value="dict.dictValue"
  581. ></el-option>
  582. </el-select>
  583. </el-form-item>
  584. <el-form-item
  585. label="是否质押(数据字典),默认 F ,质押T 否者F 下拉选择"
  586. prop="fIfpledge"
  587. >
  588. <el-select
  589. v-model="form.fIfpledge"
  590. placeholder="请选择是否质押(数据字典),默认 F ,质押T 否者F 下拉选择"
  591. >
  592. <el-option
  593. v-for="dict in fIfpledgeOptions"
  594. :key="dict.dictValue"
  595. :label="dict.dictLabel"
  596. :value="dict.dictValue"
  597. ></el-option>
  598. </el-select>
  599. </el-form-item>
  600. <el-form-item label="是否破损(数据字典),默认F否则T" prop="fIfdamage">
  601. <el-select
  602. v-model="form.fIfdamage"
  603. placeholder="请选择是否破损(数据字典),默认F否则T"
  604. >
  605. <el-option
  606. v-for="dict in fIfdamageOptions"
  607. :key="dict.dictValue"
  608. :label="dict.dictLabel"
  609. :value="dict.dictValue"
  610. ></el-option>
  611. </el-select>
  612. </el-form-item>
  613. <el-form-item
  614. label="银行名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name"
  615. prop="fBankcorpid"
  616. >
  617. <el-input
  618. v-model="form.fBankcorpid"
  619. placeholder="请输入银行名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name"
  620. />
  621. </el-form-item>
  622. <el-form-item label="单据类型(数据字典)SJRK" prop="fBilltype">
  623. <el-select
  624. v-model="form.fBilltype"
  625. placeholder="请选择单据类型(数据字典)SJRK"
  626. >
  627. <el-option
  628. v-for="dict in fBilltypeOptions"
  629. :key="dict.dictValue"
  630. :label="dict.dictLabel"
  631. :value="dict.dictValue"
  632. ></el-option>
  633. </el-select>
  634. </el-form-item>
  635. <el-form-item label="状态(数据字典),N 入" prop="fBillstatus">
  636. <el-select
  637. v-model="form.fBillstatus"
  638. placeholder="请选择状态(数据字典),N 入"
  639. >
  640. <el-option
  641. v-for="dict in fBillstatusOptions"
  642. :key="dict.dictValue"
  643. :label="dict.dictLabel"
  644. :value="dict.dictValue"
  645. ></el-option>
  646. </el-select>
  647. </el-form-item>
  648. <el-form-item label="删除状态" prop="delFlag">
  649. <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
  650. </el-form-item>
  651. <el-form-item label="备注" prop="remark">
  652. <el-input
  653. v-model="form.remark"
  654. type="textarea"
  655. placeholder="请输入内容"
  656. />
  657. </el-form-item>
  658. </el-form>
  659. <div slot="footer" class="dialog-footer">
  660. <el-button type="primary" @click="submitForm">确 定</el-button>
  661. <el-button @click="cancel">取 消</el-button>
  662. </div>
  663. </el-dialog>
  664. </div>
  665. </template>
  666. <script>
  667. import {
  668. listWarehousebills,
  669. getWarehousebills,
  670. delWarehousebills,
  671. addWarehousebills,
  672. updateWarehousebills,
  673. exportWarehousebills,
  674. } from "@/api/warehouseBusiness/warehouseInStock";
  675. export default {
  676. name: "Warehousebills",
  677. components: {},
  678. data() {
  679. return {
  680. // 遮罩层
  681. loading: true,
  682. // 选中数组
  683. ids: [],
  684. // 非单个禁用
  685. single: true,
  686. // 非多个禁用
  687. multiple: true,
  688. // 显示搜索条件
  689. showSearch: true,
  690. // 总条数
  691. total: 0,
  692. // 仓库主(出入库)表格数据
  693. warehousebillsList: [],
  694. // 弹出层标题
  695. title: "",
  696. // 是否显示弹出层
  697. open: false,
  698. // 贸易方式(数据字典),对应t_trademodels 字典
  699. fTrademodeidOptions: [],
  700. // 计费单位(数据字典),下拉选择毛重或净重字典
  701. fFeetunitOptions: [],
  702. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  703. fIfweighOptions: [],
  704. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  705. fIfpledgeOptions: [],
  706. // 是否破损(数据字典),默认F否则T字典
  707. fIfdamageOptions: [],
  708. // 单据类型(数据字典)SJRK字典
  709. fBilltypeOptions: [],
  710. // 状态(数据字典),N 入字典
  711. fBillstatusOptions: [],
  712. // 查询参数
  713. queryParams: {
  714. pageNum: 1,
  715. pageSize: 10,
  716. fBillno: null,
  717. fCustomsdeclartion: null,
  718. fOriginalbillno: null,
  719. fDeptid: null,
  720. fBsdeptid: null,
  721. fContacts: null,
  722. fTel: null,
  723. fCorpid: null,
  724. fTocorpid: null,
  725. fStltypeid: null,
  726. fBscorpno: null,
  727. fWarehouseid: null,
  728. fStorekeeper: null,
  729. fBsdate: null,
  730. fPlanqty: null,
  731. fPlangrossweight: null,
  732. fPlannetweight: null,
  733. fPlanvolumn: null,
  734. fQty: null,
  735. fGrossweight: null,
  736. fNetweight: null,
  737. fVolumn: null,
  738. fTrademodeid: null,
  739. fSbu: null,
  740. fFeetunit: null,
  741. fMblno: null,
  742. fVslvoy: null,
  743. fEta: null,
  744. fCustomno: null,
  745. fIfweigh: null,
  746. fIfpledge: null,
  747. fIfdamage: null,
  748. fBankcorpid: null,
  749. fBilltype: null,
  750. fBillstatus: null,
  751. fCreateby:null,
  752. fCreatetime:null,
  753. fGoodsid:null,
  754. fCntrtype:null,
  755. fCntqty:null
  756. },
  757. // 表单参数
  758. form: {},
  759. // 表单校验
  760. rules: {
  761. fDeptid: [
  762. { required: true, message: "制单部门不能为空", trigger: "blur" },
  763. ],
  764. fBsdeptid: [
  765. { required: true, message: "业务所属部门不能为空", trigger: "blur" },
  766. ],
  767. fCorpid: [
  768. {
  769. required: true,
  770. message:
  771. "客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name不能为空",
  772. trigger: "blur",
  773. },
  774. ],
  775. fTocorpid: [
  776. {
  777. required: true,
  778. message:
  779. "货转客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name,自有在货权转移是该字段有效不能为空",
  780. trigger: "blur",
  781. },
  782. ],
  783. fBscorpno: [
  784. {
  785. required: true,
  786. message:
  787. "客户存货编号,格式编号客户编号+YYYY +NNNN,编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用,每年从001开始不能为空",
  788. trigger: "blur",
  789. },
  790. ],
  791. },
  792. };
  793. },
  794. created() {
  795. this.getList();
  796. this.getDicts("data_trademodes").then((response) => {
  797. this.fTrademodeidOptions = response.data;
  798. });
  799. this.getDicts("data_unitfees").then((response) => {
  800. this.fFeetunitOptions = response.data;
  801. });
  802. this.getDicts("data_ifweigh_status").then((response) => {
  803. this.fIfweighOptions = response.data;
  804. });
  805. this.getDicts("data_ifpledge_status").then((response) => {
  806. this.fIfpledgeOptions = response.data;
  807. });
  808. this.getDicts("data_ifdamage_status").then((response) => {
  809. this.fIfdamageOptions = response.data;
  810. });
  811. this.getDicts("data_billtype_type").then((response) => {
  812. this.fBilltypeOptions = response.data;
  813. });
  814. this.getDicts("sys_common_status").then((response) => {
  815. this.fBillstatusOptions = response.data;
  816. });
  817. },
  818. methods: {
  819. /** 查询仓库主(出入库)列表 */
  820. getList() {
  821. this.loading = true;
  822. listWarehousebills(this.queryParams).then((response) => {
  823. this.warehousebillsList = response.rows;
  824. this.total = response.total;
  825. this.loading = false;
  826. });
  827. },
  828. // 贸易方式(数据字典),对应t_trademodels 字典翻译
  829. fTrademodeidFormat(row, column) {
  830. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  831. },
  832. // 计费单位(数据字典),下拉选择毛重或净重字典翻译
  833. fFeetunitFormat(row, column) {
  834. return this.selectDictLabel(this.fFeetunitOptions, row.fFeetunit);
  835. },
  836. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  837. fIfweighFormat(row, column) {
  838. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  839. },
  840. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  841. fIfpledgeFormat(row, column) {
  842. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge);
  843. },
  844. // 是否破损(数据字典),默认F否则T字典翻译
  845. fIfdamageFormat(row, column) {
  846. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  847. },
  848. // 单据类型(数据字典)SJRK字典翻译
  849. fBilltypeFormat(row, column) {
  850. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  851. },
  852. // 状态(数据字典),N 入字典翻译
  853. fBillstatusFormat(row, column) {
  854. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  855. },
  856. // 取消按钮
  857. cancel() {
  858. this.open = false;
  859. this.reset();
  860. },
  861. // 表单重置
  862. reset() {
  863. this.form = {
  864. fId: null,
  865. fBillno: null,
  866. fCustomsdeclartion: null,
  867. fOriginalbillno: null,
  868. fDeptid: null,
  869. fBsdeptid: null,
  870. fContacts: null,
  871. fTel: null,
  872. fCorpid: null,
  873. fTocorpid: null,
  874. fStltypeid: null,
  875. fBscorpno: null,
  876. fWarehouseid: null,
  877. fStorekeeper: null,
  878. fBsdate: null,
  879. fPlanqty: null,
  880. fPlangrossweight: null,
  881. fPlannetweight: null,
  882. fPlanvolumn: null,
  883. fQty: null,
  884. fGrossweight: null,
  885. fNetweight: null,
  886. fVolumn: null,
  887. fTrademodeid: null,
  888. fSbu: null,
  889. fFeetunit: null,
  890. fMblno: null,
  891. fVslvoy: null,
  892. fEta: null,
  893. fCustomno: null,
  894. fIfweigh: null,
  895. fIfpledge: null,
  896. fIfdamage: null,
  897. fBankcorpid: null,
  898. fBilltype: null,
  899. fBillstatus: null,
  900. delFlag: null,
  901. createBy: null,
  902. createTime: null,
  903. updateBy: null,
  904. updateTime: null,
  905. remark: null,
  906. fCreateby:null,
  907. fCreatetime:null,
  908. fGoodsid:null,
  909. fCntrtype:null,
  910. fCntqty
  911. };
  912. this.resetForm("form");
  913. },
  914. /** 搜索按钮操作 */
  915. handleQuery() {
  916. this.queryParams.pageNum = 1;
  917. this.getList();
  918. },
  919. /** 重置按钮操作 */
  920. resetQuery() {
  921. this.resetForm("queryForm");
  922. this.handleQuery();
  923. },
  924. // 多选框选中数据
  925. handleSelectionChange(selection) {
  926. this.ids = selection.map((item) => item.fId);
  927. this.single = selection.length !== 1;
  928. this.multiple = !selection.length;
  929. },
  930. /** 新增按钮操作 */
  931. handleAdd() {
  932. this.reset();
  933. this.open = true;
  934. this.title = "添加仓库主(出入库)";
  935. },
  936. /** 修改按钮操作 */
  937. handleUpdate(row) {
  938. this.reset();
  939. const fId = row.fId || this.ids;
  940. getWarehousebills(fId).then((response) => {
  941. this.form = response.data;
  942. this.open = true;
  943. this.title = "修改仓库主(出入库)";
  944. });
  945. },
  946. /** 提交按钮 */
  947. submitForm() {
  948. this.$refs["form"].validate((valid) => {
  949. if (valid) {
  950. if (this.form.fId != null) {
  951. updateWarehousebills(this.form).then((response) => {
  952. this.msgSuccess("修改成功");
  953. this.open = false;
  954. this.getList();
  955. });
  956. } else {
  957. addWarehousebills(this.form).then((response) => {
  958. this.msgSuccess("新增成功");
  959. this.open = false;
  960. this.getList();
  961. });
  962. }
  963. }
  964. });
  965. },
  966. /** 删除按钮操作 */
  967. handleDelete(row) {
  968. const fIds = row.fId || this.ids;
  969. this.$confirm(
  970. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  971. "警告",
  972. {
  973. confirmButtonText: "确定",
  974. cancelButtonText: "取消",
  975. type: "warning",
  976. }
  977. )
  978. .then(function () {
  979. return delWarehousebills(fIds);
  980. })
  981. .then(() => {
  982. this.getList();
  983. this.msgSuccess("删除成功");
  984. });
  985. },
  986. /** 导出按钮操作 */
  987. handleExport() {
  988. const queryParams = this.queryParams;
  989. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  990. confirmButtonText: "确定",
  991. cancelButtonText: "取消",
  992. type: "warning",
  993. })
  994. .then(function () {
  995. return exportWarehousebills(queryParams);
  996. })
  997. .then((response) => {
  998. this.download(response.msg);
  999. });
  1000. },
  1001. },
  1002. };
  1003. </script>