index.vue 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  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. import { addSet, select, resetModule } from "@/api/system/set";
  574. import Cookies from "js-cookie";
  575. import draggable from "vuedraggable";
  576. export default {
  577. name: "Warehousebills",
  578. components: {
  579. },
  580. data() {
  581. return {
  582. // 遮罩层
  583. loading: true,
  584. // 选中数组
  585. ids: [],
  586. // 非单个禁用
  587. single: true,
  588. // 非多个禁用
  589. multiple: true,
  590. // 显示搜索条件
  591. showSearch: true,
  592. // 总条数
  593. total: 0,
  594. // 仓库表格数据
  595. warehousebillsList: [],
  596. // 弹出层标题
  597. title: "",
  598. // 是否显示弹出层
  599. open: false,
  600. // 结算方式(数据字段),默认提取corps中stltypeid,也可以从表t_stltypes中下拉选择,存储id,显示name字典
  601. fStltypeidOptions: [],
  602. // 贸易方式(数据字典),对应t_trademodels 字典
  603. fTrademodeidOptions: [],
  604. // 是否过磅(数据字典),字典
  605. fIfweighOptions: [],
  606. // 是否质押(数据字典)字典
  607. fIfpledgeOptions: [],
  608. // 是否破损(数据字典)字典
  609. fIfdamageOptions: [],
  610. // 单据类型(数据字典),SJRK字典
  611. fBilltypeOptions: [],
  612. // 状态(数据字典),N 入字典
  613. fBillstatusOptions: [],
  614. // 查询参数
  615. queryParams: {
  616. pageNum: 1,
  617. pageSize: 10,
  618. fBillno: null,
  619. fOriginalbillno: null,
  620. fDeptid: null,
  621. fBsdeptid: null,
  622. fCorpid: null,
  623. fTocorpid: null,
  624. fStltypeid: null,
  625. fBscorpno: null,
  626. fWarehouseid: null,
  627. fBsdate: null,
  628. fGoodsid: null,
  629. fPlanqty: null,
  630. fPlangrossweight: null,
  631. fPlannetweight: null,
  632. fQty: null,
  633. fGrossweight: null,
  634. fNetweight: null,
  635. fTrademodeid: null,
  636. fFeetunit: null,
  637. fMblno: null,
  638. fVslvoy: null,
  639. fEta: null,
  640. fCustomno: null,
  641. fIfweigh: null,
  642. fIfpledge: null,
  643. fIfdamage: null,
  644. fBankcorpid: null,
  645. fBilltype: null,
  646. fBillstatus: null,
  647. },
  648. // 表单参数
  649. form: {},
  650. // 表单校验
  651. rules: {
  652. fBillno: [
  653. { required: true, message: "业务编号,格式RK+YYYY+YY+NNN,编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用删除单据号,每月从001开始。RK CK DB HZ不能为空", trigger: "blur" }
  654. ],
  655. fOriginalbillno: [
  656. { required: true, message: "原始业务编号,入库时和f_billno 相同,出库 取入库的f_originalbillno不能为空", trigger: "blur" }
  657. ],
  658. fCorpid: [
  659. { required: true, message: "客户id,t_corps 中的no或 name,模糊查找选择后,存储id,显示name不能为空", trigger: "blur" }
  660. ],
  661. fTocorpid: [
  662. { required: true, message: "货转客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name,自有在货权转移是该字段有效不能为空", trigger: "blur" }
  663. ],
  664. fBscorpno: [
  665. { required: true, message: "客户存货编号,格式编号客户编号+YYYY +NNNN,编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用,每年从001开始不能为空", trigger: "blur" }
  666. ],
  667. }
  668. };
  669. },
  670. created() {
  671. this.getList();
  672. this.getDicts("data_stltype_type").then(response => {
  673. this.fStltypeidOptions = response.data;
  674. });
  675. this.getDicts("data_trademodes").then(response => {
  676. this.fTrademodeidOptions = response.data;
  677. });
  678. this.getDicts("data_ifweigh_status").then(response => {
  679. this.fIfweighOptions = response.data;
  680. });
  681. this.getDicts("data_ifpledge_status").then(response => {
  682. this.fIfpledgeOptions = response.data;
  683. });
  684. this.getDicts("data_ifdamage_status").then(response => {
  685. this.fIfdamageOptions = response.data;
  686. });
  687. this.getDicts("data_billtype_type").then(response => {
  688. this.fBilltypeOptions = response.data;
  689. });
  690. this.getDicts("sys_common_status").then(response => {
  691. this.fBillstatusOptions = response.data;
  692. });
  693. },
  694. methods: {
  695. /** 查询仓库列表 */
  696. getList() {
  697. this.loading = true;
  698. listWarehousebills(this.queryParams).then(response => {
  699. this.warehousebillsList = response.rows;
  700. this.total = response.total;
  701. this.loading = false;
  702. });
  703. },
  704. // 结算方式(数据字段),默认提取corps中stltypeid,也可以从表t_stltypes中下拉选择,存储id,显示name字典翻译
  705. fStltypeidFormat(row, column) {
  706. return this.selectDictLabel(this.fStltypeidOptions, row.fStltypeid);
  707. },
  708. // 贸易方式(数据字典),对应t_trademodels 字典翻译
  709. fTrademodeidFormat(row, column) {
  710. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  711. },
  712. // 是否过磅(数据字典),字典翻译
  713. fIfweighFormat(row, column) {
  714. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  715. },
  716. // 是否质押(数据字典)字典翻译
  717. fIfpledgeFormat(row, column) {
  718. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge);
  719. },
  720. // 是否破损(数据字典)字典翻译
  721. fIfdamageFormat(row, column) {
  722. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  723. },
  724. // 单据类型(数据字典),SJRK字典翻译
  725. fBilltypeFormat(row, column) {
  726. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  727. },
  728. // 状态(数据字典),N 入字典翻译
  729. fBillstatusFormat(row, column) {
  730. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  731. },
  732. // 取消按钮
  733. cancel() {
  734. this.open = false;
  735. this.reset();
  736. },
  737. // 表单重置
  738. reset() {
  739. this.form = {
  740. fId: null,
  741. fBillno: null,
  742. fOriginalbillno: null,
  743. fDeptid: null,
  744. fBsdeptid: null,
  745. fCorpid: null,
  746. fTocorpid: null,
  747. fStltypeid: null,
  748. fBscorpno: null,
  749. fWarehouseid: null,
  750. fBsdate: null,
  751. fGoodsid: null,
  752. fPlanqty: null,
  753. fPlangrossweight: null,
  754. fPlannetweight: null,
  755. fQty: null,
  756. fGrossweight: null,
  757. fNetweight: null,
  758. fTrademodeid: null,
  759. fFeetunit: null,
  760. fMblno: null,
  761. fVslvoy: null,
  762. fEta: null,
  763. fCustomno: null,
  764. fIfweigh: null,
  765. fIfpledge: null,
  766. fIfdamage: null,
  767. fBankcorpid: null,
  768. fBilltype: null,
  769. fBillstatus: null,
  770. delFlag: null,
  771. createBy: null,
  772. createTime: null,
  773. updateBy: null,
  774. updateTime: null,
  775. remark: null
  776. };
  777. this.resetForm("form");
  778. },
  779. /** 搜索按钮操作 */
  780. handleQuery() {
  781. this.queryParams.pageNum = 1;
  782. this.getList();
  783. },
  784. /** 重置按钮操作 */
  785. resetQuery() {
  786. this.resetForm("queryForm");
  787. this.handleQuery();
  788. },
  789. // 多选框选中数据
  790. handleSelectionChange(selection) {
  791. this.ids = selection.map(item => item.fId)
  792. this.single = selection.length!==1
  793. this.multiple = !selection.length
  794. },
  795. /** 新增按钮操作 */
  796. handleAdd() {
  797. this.reset();
  798. this.open = true;
  799. this.title = "添加仓库";
  800. },
  801. /** 修改按钮操作 */
  802. handleUpdate(row) {
  803. this.reset();
  804. const fId = row.fId || this.ids
  805. getWarehousebills(fId).then(response => {
  806. this.form = response.data;
  807. this.open = true;
  808. this.title = "修改仓库";
  809. });
  810. },
  811. /** 提交按钮 */
  812. submitForm() {
  813. this.$refs["form"].validate(valid => {
  814. if (valid) {
  815. if (this.form.fId != null) {
  816. updateWarehousebills(this.form).then(response => {
  817. this.msgSuccess("修改成功");
  818. this.open = false;
  819. this.getList();
  820. });
  821. } else {
  822. addWarehousebills(this.form).then(response => {
  823. this.msgSuccess("新增成功");
  824. this.open = false;
  825. this.getList();
  826. });
  827. }
  828. }
  829. });
  830. },
  831. /** 删除按钮操作 */
  832. handleDelete(row) {
  833. const fIds = row.fId || this.ids;
  834. this.$confirm('是否确认删除仓库编号为"' + fIds + '"的数据项?', "警告", {
  835. confirmButtonText: "确定",
  836. cancelButtonText: "取消",
  837. type: "warning"
  838. }).then(function() {
  839. return delWarehousebills(fIds);
  840. }).then(() => {
  841. this.getList();
  842. this.msgSuccess("删除成功");
  843. })
  844. },
  845. /** 导出按钮操作 */
  846. handleExport() {
  847. const queryParams = this.queryParams;
  848. this.$confirm('是否确认导出所有仓库数据项?', "警告", {
  849. confirmButtonText: "确定",
  850. cancelButtonText: "取消",
  851. type: "warning"
  852. }).then(function() {
  853. return exportWarehousebills(queryParams);
  854. }).then(response => {
  855. this.download(response.msg);
  856. })
  857. }
  858. }
  859. };
  860. </script>
  861. <style lang="scss" scoped>
  862. .tabSetting {
  863. display: flex;
  864. justify-content: flex-end;
  865. }
  866. .listStyle {
  867. display: flex;
  868. border-top: 1px solid #dcdfe6;
  869. border-left: 1px solid #dcdfe6;
  870. border-right: 1px solid #dcdfe6;
  871. }
  872. .listStyle:last-child {
  873. border-bottom: 1px solid #dcdfe6;
  874. }
  875. .progress {
  876. display: flex;
  877. align-items: center;
  878. padding: 2px;
  879. background-color: rgba(0, 0, 0, 0.05);
  880. height: 100%;
  881. }
  882. </style>