index.vue 38 KB

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