index.vue 33 KB

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