index.vue 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="88px"
  9. >
  10. <el-form-item label="业务编号" prop="fbillno">
  11. <el-input
  12. v-model="queryParams.fbillno"
  13. placeholder="请输入业务编号"
  14. clearable
  15. size="small"
  16. @keyup.enter.native="handleQuery"
  17. />
  18. </el-form-item>
  19. <el-form-item label="制单人" prop="createBy">
  20. <el-input
  21. v-model="queryParams.createBy"
  22. placeholder="请输入制单人"
  23. clearable
  24. size="small"
  25. @keyup.enter.native="handleQuery"
  26. />
  27. </el-form-item>
  28. <el-form-item label="制单日期" prop="createTime">
  29. <el-date-picker
  30. clearable
  31. size="small"
  32. style="width: 400px"
  33. v-model="queryParams.createTime"
  34. type="date"
  35. value-format="timestamp"
  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
  87. v-model="queryParams.fgoodsid"
  88. placeholder="请选择货物名称"
  89. clearable
  90. size="small"
  91. >
  92. <el-option label="请选择字典生成" value=""/>
  93. </el-select>
  94. </el-form-item>
  95. <el-form-item label="箱型" prop="fcntrtype">
  96. <el-select
  97. v-model="queryParams.fcntrtype"
  98. placeholder="请选择箱型"
  99. clearable
  100. size="small"
  101. >
  102. <el-option label="请选择字典生成" value=""/>
  103. </el-select>
  104. </el-form-item>
  105. <el-form-item label="箱量" prop="fcntqty">
  106. <el-input
  107. v-model="queryParams.fcntqty"
  108. placeholder="请输入箱量"
  109. clearable
  110. size="small"
  111. @keyup.enter.native="handleQuery"
  112. />
  113. </el-form-item>
  114. <el-form-item label="仓库" prop="fwarehouseid">
  115. <el-input
  116. v-model="queryParams.fwarehouseid"
  117. placeholder="请输入仓库"
  118. clearable
  119. size="small"
  120. @keyup.enter.native="handleQuery"
  121. />
  122. </el-form-item>
  123. <el-form-item>
  124. <el-button
  125. type="cyan"
  126. icon="el-icon-search"
  127. size="mini"
  128. @click="handleQuery"
  129. >搜索
  130. </el-button
  131. >
  132. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  133. >重置
  134. </el-button
  135. >
  136. </el-form-item>
  137. </el-form>
  138. <el-row :gutter="10" class="mb8">
  139. <el-col :span="1.5">
  140. <el-button
  141. type="primary"
  142. icon="el-icon-plus"
  143. size="mini"
  144. @click="handleAdd"
  145. v-hasPermi="['warehouseBusiness:warehousebills:add']"
  146. >新增
  147. </el-button
  148. >
  149. </el-col>
  150. <el-col :span="1.5">
  151. <el-button
  152. type="success"
  153. icon="el-icon-edit"
  154. size="mini"
  155. :disabled="single"
  156. @click="handleUpdate"
  157. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  158. >修改
  159. </el-button
  160. >
  161. </el-col>
  162. <el-col :span="1.5">
  163. <el-button
  164. type="danger"
  165. icon="el-icon-delete"
  166. size="mini"
  167. :disabled="multiple"
  168. @click="handleDelete"
  169. v-hasPermi="['warehouseBusiness:warehousebills:remove']"
  170. >删除
  171. </el-button
  172. >
  173. </el-col>
  174. <el-col :span="1.5">
  175. <el-button
  176. type="warning"
  177. icon="el-icon-download"
  178. size="mini"
  179. @click="handleExport"
  180. v-hasPermi="['warehouseBusiness:warehousebills:export']"
  181. >导出
  182. </el-button
  183. >
  184. </el-col>
  185. <right-toolbar
  186. :showSearch.sync="showSearch"
  187. @queryTable="getList"
  188. ></right-toolbar>
  189. </el-row>
  190. <el-table
  191. v-loading="loading"
  192. :data="warehousebillsList"
  193. @selection-change="handleSelectionChange"
  194. >
  195. <el-table-column type="selection" width="55" align="center"/>
  196. <el-table-column type="index" label="序号" align="center"/>
  197. <el-table-column label="业务编号" align="center" prop="fbillno"/>
  198. <el-table-column label="制单人" align="center" prop="createBy"/>
  199. <el-table-column label="客户名称" align="center" prop="fcorpid"/>
  200. <el-table-column label="贸易方式" align="center" prop="ftrademodeid"/>
  201. <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
  202. <el-table-column label="入库毛重" align="center" prop="fgrossweight"/>
  203. <!-- <el-table-column
  204. label="入库日期"
  205. align="center"
  206. prop="fcreatetime"
  207. width="180"
  208. >
  209. <template slot-scope="scope">
  210. <span>{{ parseTime(scope.row.fcreatetime, "{y}-{m}-{d}") }}</span>
  211. </template>
  212. </el-table-column> -->
  213. <el-table-column label="入库件数" align="center" prop="fQty"/>
  214. <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>
  215. <el-table-column
  216. label="净重"
  217. align="center"
  218. prop="fNetweight"
  219. />
  220. <el-table-column
  221. label="状态"
  222. align="center"
  223. prop="fBillstatus"
  224. :formatter="fBillstatusFormat"
  225. />
  226. <el-table-column
  227. label="是否质押"
  228. align="center"
  229. prop="fIfpledge"
  230. :formatter="fIfpledgeFormat"
  231. />
  232. <el-table-column label="质押银行" align="center" prop="fBankcorpid"/>
  233. <el-table-column label="业务编号" align="center" prop="fBillno"/>
  234. <el-table-column label="报关号" align="center" prop="fCustomno"/>
  235. <el-table-column
  236. label="原始业务编号,入库时和f_billno 相同,出库 取入库的f_originalbillno"
  237. align="center"
  238. prop="fOriginalbillno"
  239. />
  240. <el-table-column label="制单部门" align="center" prop="fDeptid"/>
  241. <el-table-column label="业务所属部门" align="center" prop="fBsdeptid"/>
  242. <el-table-column label="联系人" align="center" prop="fContacts"/>
  243. <el-table-column label="电话" align="center" prop="fTel"/>
  244. <el-table-column
  245. label="货权方,t_corps 中的no或 name,模糊查找选择后,存储id,显示name"
  246. align="center"
  247. prop="fCorpid"
  248. />
  249. <el-table-column
  250. label="货转客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name,自有在货权转移是该字段有效"
  251. align="center"
  252. prop="fTocorpid"
  253. />
  254. <el-table-column
  255. label="结算方式,默认提取corps中stltypeid 也可以从表t_stltypes中下拉选择,存储id,显示name"
  256. align="center"
  257. prop="fStltypeid"
  258. />
  259. <el-table-column
  260. label="客户存货编号,格式编号客户编号+YYYY +NNNN,
  261. 编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用,每年从001开始"
  262. align="center"
  263. prop="fBscorpno"
  264. />
  265. <el-table-column label="仓库" align="center" prop="fWarehouseid"/>
  266. <el-table-column label="仓管人" align="center" prop="fStorekeeper"/>
  267. <el-table-column
  268. label="计划件数,由明细表自动合计生成"
  269. align="center"
  270. prop="fPlanqty"
  271. />
  272. <el-table-column
  273. label="计划毛重,由明细表自动合计生成"
  274. align="center"
  275. prop="fPlangrossweight"
  276. />
  277. <el-table-column
  278. label="计划净重,由明细表自动合计生成"
  279. align="center"
  280. prop="fPlannetweight"
  281. />
  282. <el-table-column
  283. label="计划尺码,由明细表自动合计生成"
  284. align="center"
  285. prop="fPlanvolumn"
  286. />
  287. <el-table-column
  288. label="尺码,由明细表自动合计生成"
  289. align="center"
  290. prop="fVolumn"
  291. />
  292. <el-table-column
  293. label="贸易方式(数据字典),对应t_trademodels "
  294. align="center"
  295. prop="fTrademodeid"
  296. :formatter="fTrademodeidFormat"
  297. />
  298. <el-table-column label="经营单位(客户列表)" align="center" prop="fSbu"/>
  299. <el-table-column
  300. label="计费单位(数据字典),下拉选择毛重或净重"
  301. align="center"
  302. prop="fFeetunit"
  303. :formatter="fFeetunitFormat"
  304. />
  305. <el-table-column label="提单号" align="center" prop="fMblno"/>
  306. <el-table-column
  307. label="船名航次,CMA/A0001"
  308. align="center"
  309. prop="fVslvoy"
  310. />
  311. <el-table-column label="到港日期" align="center" prop="fEta" width="180">
  312. <template slot-scope="scope">
  313. <span>{{ parseTime(scope.row.fEta, "{y}-{m}-{d}") }}</span>
  314. </template>
  315. </el-table-column>
  316. <el-table-column label="报关单号" align="center" prop="fCustomno"/>
  317. <el-table-column
  318. label="是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择"
  319. align="center"
  320. prop="fIfweigh"
  321. :formatter="fIfweighFormat"
  322. />
  323. <el-table-column
  324. label="单据类型(数据字典)SJRK"
  325. align="center"
  326. prop="fBilltype"
  327. :formatter="fBilltypeFormat"
  328. />
  329. <el-table-column label="备注" align="center" prop="remark"/>
  330. <el-table-column
  331. label="操作"
  332. align="center"
  333. class-name="small-padding fixed-width"
  334. >
  335. <template slot-scope="scope">
  336. <el-button
  337. size="mini"
  338. type="text"
  339. icon="el-icon-edit"
  340. @click="handleUpdate(scope.row)"
  341. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  342. >修改
  343. </el-button
  344. >
  345. <el-button
  346. size="mini"
  347. type="text"
  348. icon="el-icon-delete"
  349. @click="handleDelete(scope.row)"
  350. v-hasPermi="['warehouseBusiness:warehousebills:remove']"
  351. >删除
  352. </el-button
  353. >
  354. </template>
  355. </el-table-column>
  356. </el-table>
  357. <pagination
  358. v-show="total > 0"
  359. :total="total"
  360. :page.sync="queryParams.pageNum"
  361. :limit.sync="queryParams.pageSize"
  362. @pagination="getList"
  363. />
  364. <!-- 添加或修改仓库主(出入库)对话框 -->
  365. <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="80%" append-to-body>
  366. <el-form
  367. style="height: 500px"
  368. ref="form"
  369. :model="form"
  370. :rules="rules"
  371. label-width="120px"
  372. >
  373. <el-row>
  374. <el-col :span="8">
  375. <el-form-item label="货权方" prop="fcorpid">
  376. <el-select
  377. v-model="form.fCorpid"
  378. filterable
  379. remote
  380. :remote-method="corpsRemoteMethod"
  381. placeholder="请选择货权方">
  382. <el-option
  383. v-for="dict in fMblnoOptions"
  384. :key="dict.fId"
  385. :label="dict.fName"
  386. :value="dict.fId"
  387. ></el-option>
  388. </el-select>
  389. </el-form-item>
  390. </el-col>
  391. <el-col :span="8">
  392. <el-form-item label="仓库" prop="fwarehouseid">
  393. <el-select
  394. v-model="form.fWarehouseid"
  395. filterable
  396. remote
  397. :remote-method="warehouseRemoteMethod"
  398. placeholder="请选择仓库">
  399. <el-option
  400. v-for="dict in warehouseOptions"
  401. :key="dict.fId"
  402. :label="dict.fName"
  403. :value="dict.fId"
  404. ></el-option>
  405. </el-select>
  406. </el-form-item>
  407. </el-col>
  408. <el-col :span="8">
  409. <el-form-item label="联系人" prop="fContacts">
  410. <el-select
  411. v-model="form.fContacts"
  412. filterable
  413. remote
  414. :remote-method="userRemoteMethod"
  415. placeholder="请选择联系人">
  416. <el-option
  417. v-for="dict in userOptions"
  418. :key="dict.userName"
  419. :label="dict.nickName"
  420. :value="dict.userName"
  421. ></el-option>
  422. </el-select>
  423. </el-form-item>
  424. </el-col>
  425. </el-row>
  426. <el-row>
  427. <el-col :span="8">
  428. <el-form-item label="电话" prop="ftel">
  429. <el-input v-model="form.fTel" placeholder="请输入电话"/>
  430. </el-form-item>
  431. </el-col>
  432. <el-col :span="8">
  433. <el-form-item label="提单号" prop="fmblno">
  434. <el-input v-model="form.fMblno" placeholder="请输入提单号"/>
  435. </el-form-item>
  436. </el-col>
  437. <el-col :span="8">
  438. <el-form-item label="入库日期" prop="fbsdate">
  439. <el-date-picker
  440. v-model="form.fBsdate"
  441. style="width: 375px"
  442. type="date"
  443. value-format="timestamp"
  444. placeholder="入库日期"
  445. >
  446. </el-date-picker>
  447. </el-form-item>
  448. </el-col>
  449. </el-row>
  450. <el-row>
  451. <el-col :span="8">
  452. <el-form-item label="仓管人" prop="fstorekeeper">
  453. <el-input v-model="form.fStorekeeper" placeholder="请输入仓管人"/>
  454. </el-form-item>
  455. </el-col>
  456. <el-col :span="8">
  457. <el-form-item label="制单人" prop="createBy">
  458. <el-input disabled v-model="form.createBy" placeholder="制单人"/>
  459. </el-form-item>
  460. </el-col>
  461. <el-col :span="8">
  462. <el-form-item label="制单部门" prop="fDeptid">
  463. <el-select
  464. v-model="form.fDeptid"
  465. filterable
  466. disabled
  467. remote>
  468. <el-option
  469. v-for="dict in deptOptions"
  470. :key="dict.deptId"
  471. :label="dict.deptName"
  472. :value="dict.deptId"
  473. ></el-option>
  474. </el-select>
  475. </el-form-item>
  476. </el-col>
  477. </el-row>
  478. <el-row>
  479. <el-col :span="8">
  480. <el-form-item disabled label="制单日期" prop="fbilldate">
  481. <el-date-picker
  482. v-model="form.createTime"
  483. style="width: 375px"
  484. type="date"
  485. disabled
  486. value-format="timestamp"
  487. placeholder="制单日期"
  488. >
  489. </el-date-picker>
  490. </el-form-item>
  491. </el-col>
  492. <el-col :span="8">
  493. <el-form-item label="船航次" prop="fvslvoy">
  494. <el-input v-model="form.fVslvoy" placeholder="船航次"/>
  495. </el-form-item>
  496. </el-col>
  497. <el-col :span="8">
  498. <el-form-item label="到港日期" prop="feta">
  499. <el-date-picker
  500. v-model="form.fEta"
  501. style="width: 375px"
  502. type="date"
  503. value-format="timestamp"
  504. placeholder="到港日期"
  505. >
  506. </el-date-picker>
  507. </el-form-item>
  508. </el-col>
  509. </el-row>
  510. <el-row>
  511. <el-col :span="8">
  512. <el-form-item label="贸易方式" prop="ftrademodeid">
  513. <el-select v-model="form.fTrademodeid" placeholder="请选择贸易方式" clearable size="small">
  514. <el-option
  515. v-for="dict in fTrademodeidOptions"
  516. :key="dict.dictValue"
  517. :label="dict.dictLabel"
  518. :value="dict.dictValue"
  519. />
  520. </el-select>
  521. </el-form-item>
  522. </el-col>
  523. <el-col :span="8">
  524. <el-form-item label="计费方式" prop="fbillingway">
  525. <el-select v-model="form.fBillingway "
  526. placeholder="请选择计费方式"
  527. clearable
  528. size="small"
  529. >
  530. <el-option
  531. v-for="dict in fFeetunitOptions"
  532. :key="dict.dictValue"
  533. :label="dict.dictLabel"
  534. :value="dict.dictValue"
  535. />
  536. </el-select>
  537. </el-form-item>
  538. </el-col>
  539. <el-col :span="8">
  540. <el-form-item label="计费单位" prop="ffeetunit">
  541. <el-select
  542. v-model="form.fFeetunit"
  543. placeholder="请选择计费单位"
  544. clearable
  545. size="small"
  546. >
  547. <el-option
  548. v-for="dict in fFeetunitOptions"
  549. :key="dict.dictValue"
  550. :label="dict.dictLabel"
  551. :value="dict.dictValue"
  552. />
  553. </el-select>
  554. </el-form-item>
  555. </el-col>
  556. </el-row>
  557. <el-row>
  558. <el-col :span="8">
  559. <el-form-item label="客户存货编号" prop="fbscorpno">
  560. <el-input v-model="form.fBscorpno" laceholder="客户存货编号"/>
  561. </el-form-item>
  562. </el-col>
  563. <el-col :span="8">
  564. <el-form-item label="报关单号" prop="fcustomno">
  565. <el-input v-model="form.fCustomno" laceholder="报关单号"/>
  566. </el-form-item>
  567. </el-col>
  568. <el-col :span="8">
  569. <el-form-item label="结算方式" prop="fstltypeid">
  570. <el-select
  571. v-model="form.fStltypeid"
  572. placeholder="请选择结算方式"
  573. clearable
  574. size="small"
  575. >
  576. <el-option
  577. v-for="dict in fStltypeOptions"
  578. :key="dict.dictValue"
  579. :label="dict.dictLabel"
  580. :value="dict.dictValue"
  581. />
  582. </el-select>
  583. </el-form-item>
  584. </el-col>
  585. </el-row>
  586. <el-row>
  587. <el-col :span="8">
  588. <el-form-item label="是否过磅" prop="fifweigh">
  589. <el-select
  590. v-model="form.fIfweigh"
  591. placeholder="请选择是否过磅"
  592. clearable
  593. size="small"
  594. >
  595. <el-option
  596. v-for="dict in fIfweighOptions"
  597. :key="dict.dictValue"
  598. :label="dict.dictLabel"
  599. :value="dict.dictValue"
  600. />
  601. </el-select>
  602. </el-form-item>
  603. </el-col>
  604. <el-col :span="8">
  605. <el-form-item label="是否破损" prop="fifdamage">
  606. <el-select
  607. v-model="form.fIfdamage"
  608. placeholder="请选择是否破损"
  609. clearable
  610. size="small"
  611. >
  612. <el-option
  613. v-for="dict in fIfdamageOptions"
  614. :key="dict.dictValue"
  615. :label="dict.dictLabel"
  616. :value="dict.dictValue"
  617. />
  618. </el-select>
  619. </el-form-item>
  620. </el-col>
  621. <el-col :span="8">
  622. <el-form-item label="经营单位" prop="fsbu">
  623. <el-select
  624. v-model="form.fSbu"
  625. filterable
  626. remote
  627. :remote-method="fSbuRemoteMethod"
  628. placeholder="请选择经营单位">
  629. <el-option
  630. v-for="dict in fSbuOptions"
  631. :key="dict.fId"
  632. :label="dict.fName"
  633. :value="dict.fId"
  634. ></el-option>
  635. </el-select>
  636. </el-form-item>
  637. </el-col>
  638. </el-row>
  639. <el-row>
  640. <el-col :span="8">
  641. <el-form-item label="是否质押" prop="fifpledge">
  642. <el-select
  643. v-model="form.fIfpledge"
  644. placeholder="请选择是否过磅"
  645. clearable
  646. size="small"
  647. >
  648. <el-option
  649. v-for="dict in fIfpledgeOptions"
  650. :key="dict.dictValue"
  651. :label="dict.dictLabel"
  652. :value="dict.dictValue"
  653. />
  654. </el-select>
  655. </el-form-item>
  656. </el-col>
  657. <el-col :span="8">
  658. <el-form-item label="银行名称??????????" prop="fbankcorpid">
  659. <el-input v-model="form.fBankcorpid" laceholder="银行名称"/>
  660. </el-form-item>
  661. </el-col>
  662. </el-row>
  663. <el-row>
  664. <el-form-item label="备注" prop="remark">
  665. <el-input
  666. style="width: 100%"
  667. v-model="form.remark"
  668. type="textarea"
  669. placeholder="请输入内容"
  670. />
  671. </el-form-item>
  672. </el-row>
  673. </el-form>
  674. <div class="dialogTableTitle flex a-center jlr">
  675. <h2>库存明细</h2>
  676. <el-button :disabled="browseStatus" @click.prevent="addRelevant()"
  677. >添加
  678. </el-button
  679. >
  680. </div>
  681. <el-table :data="dataList" ref="table" tooltip-effect="dark" border stripe show-summary>
  682. <el-table-column label="序号" type="index" width="80">
  683. </el-table-column>
  684. <el-table-column
  685. prop="fbsdate"
  686. header-align="center"
  687. align="center"
  688. label="入库日期"
  689. >
  690. <template slot-scope="scope">
  691. <el-date-picker
  692. v-model="scope.row.fBsdate"
  693. style="width: 375px"
  694. type="date"
  695. value-format="timestamp"
  696. placeholder=入库日期
  697. >
  698. </el-date-picker>
  699. </template>
  700. </el-table-column>
  701. <el-table-column
  702. prop="fgoodsid"
  703. header-align="center"
  704. align="center"
  705. label="品牌"
  706. >
  707. <template slot-scope="scope">
  708. <el-select
  709. v-model="scope.row.fGoodsid"
  710. filterable
  711. remote
  712. :remote-method="goodsRemoteMethod"
  713. placeholder="请选择品牌">
  714. <el-option
  715. v-for="dict in goodsOptions"
  716. :key="dict.fId"
  717. :label="dict.fName"
  718. :value="dict.fId"
  719. ></el-option>
  720. </el-select>
  721. </template>
  722. </el-table-column>
  723. <el-table-column
  724. prop="fcntrtype"
  725. header-align="center"
  726. align="center"
  727. label="箱型"
  728. >
  729. <template slot-scope="scope">
  730. <el-input
  731. oninput="value=value.replace(/[^\d.]/g,'')"
  732. v-model="scope.row.fCntrtype"
  733. placeholder="箱型"
  734. show-word-limit
  735. />
  736. </template>
  737. </el-table-column>
  738. <el-table-column
  739. prop="fcntqty"
  740. header-align="center"
  741. align="center"
  742. label="箱量"
  743. >
  744. <template slot-scope="scope">
  745. <el-input
  746. oninput="value=value.replace(/[^\d.]/g,'')"
  747. v-model="scope.row.fCntqty"
  748. placeholder="箱量"
  749. show-word-limit
  750. />
  751. </template>
  752. </el-table-column>
  753. <el-table-column
  754. prop="fplangrossweight"
  755. header-align="center"
  756. align="center"
  757. label="计划毛重"
  758. >
  759. <template slot-scope="scope">
  760. <el-input
  761. oninput="value=value.replace(/[^\d.]/g,'')"
  762. v-model="scope.row.fPlangrossweight"
  763. placeholder="计划毛重"
  764. show-word-limit
  765. />
  766. </template>
  767. </el-table-column>
  768. <el-table-column
  769. prop="fplannetweight"
  770. header-align="center"
  771. align="center"
  772. label="计划净重"
  773. >
  774. <template slot-scope="scope">
  775. <el-input
  776. oninput="value=value.replace(/[^\d.]/g,'')"
  777. v-model="scope.row.fplannetweight"
  778. placeholder="计划净重"
  779. show-word-limit
  780. />
  781. </template>
  782. </el-table-column>
  783. <el-table-column
  784. prop="fplanvolumn"
  785. header-align="center"
  786. align="center"
  787. label="计划尺码"
  788. >
  789. <template slot-scope="scope">
  790. <el-input
  791. oninput="value=value.replace(/[^\d.]/g,'')"
  792. v-model="scope.row.fPlanvolumn"
  793. placeholder="尺码"
  794. show-word-limit
  795. />
  796. </template>
  797. </el-table-column>
  798. <el-table-column
  799. prop="fplanqty"
  800. header-align="center"
  801. align="center"
  802. label="计划件数"
  803. >
  804. <template slot-scope="scope">
  805. <el-input
  806. oninput="value=value.replace(/[^\d.]/g,'')"
  807. v-model="scope.row.fPlanqty"
  808. placeholder="件数"
  809. show-word-limit
  810. />
  811. </template>
  812. </el-table-column>
  813. <el-table-column
  814. prop="fgrossweight"
  815. header-align="center"
  816. align="center"
  817. label="入库毛重"
  818. >
  819. <template slot-scope="scope">
  820. <el-input
  821. oninput="value=value.replace(/[^\d.]/g,'')"
  822. v-model="scope.row.fGrossweight"
  823. placeholder="入库毛重"
  824. show-word-limit
  825. />
  826. </template>
  827. </el-table-column>
  828. <el-table-column
  829. prop="fnetweight"
  830. header-align="center"
  831. align="center"
  832. label="入库净重"
  833. >
  834. <template slot-scope="scope">
  835. <el-input
  836. oninput="value=value.replace(/[^\d.]/g,'')"
  837. v-model="scope.row.fNetweight"
  838. placeholder="入库净重"
  839. show-word-limit
  840. />
  841. </template>
  842. </el-table-column>
  843. <el-table-column
  844. prop="fqty"
  845. header-align="center"
  846. align="center"
  847. label="入库件数"
  848. >
  849. <template slot-scope="scope">
  850. <el-input
  851. oninput="value=value.replace(/[^\d.]/g,'')"
  852. v-model="scope.row.fQty"
  853. placeholder="入库件数"
  854. show-word-limit
  855. />
  856. </template>
  857. </el-table-column>
  858. <el-table-column
  859. prop="fPackagespecs"
  860. header-align="center"
  861. align="center"
  862. label="包装规格"
  863. >
  864. <template slot-scope="scope">
  865. <el-input
  866. oninput="value=value.replace(/[^\d.]/g,'')"
  867. v-model="scope.row.fPackagespecs"
  868. placeholder="包装规格"
  869. show-word-limit
  870. />
  871. </template>
  872. </el-table-column>
  873. <el-table-column
  874. prop="fwarehouselocid"
  875. header-align="center"
  876. align="center"
  877. label="库区"
  878. >
  879. <template slot-scope="scope">
  880. <el-input
  881. oninput="value=value.replace(/[^\d.]/g,'')"
  882. v-model="scope.row.fWarehouselocid"
  883. placeholder="库区"
  884. show-word-limit
  885. />
  886. </template>
  887. </el-table-column>
  888. <el-table-column
  889. prop="fBoxno"
  890. header-align="center"
  891. align="center"
  892. label="箱号"
  893. >
  894. <template slot-scope="scope">
  895. <el-input
  896. v-model="scope.row.fBoxno"
  897. placeholder="箱号"
  898. show-word-limit
  899. />
  900. </template>
  901. </el-table-column>
  902. <el-table-column
  903. prop="fGoodsval"
  904. header-align="center"
  905. align="center"
  906. label="货值"
  907. >
  908. <template slot-scope="scope">
  909. <el-input
  910. oninput="value=value.replace(/[^\d.]/g,'')"
  911. v-model="scope.row.fGoodsval"
  912. placeholder="货值"
  913. show-word-limit
  914. />
  915. </template>
  916. </el-table-column>
  917. <el-table-column
  918. prop="ftruckno"
  919. header-align="center"
  920. align="center"
  921. label="车号"
  922. >
  923. <template slot-scope="scope">
  924. <el-input
  925. oninput="value=value.replace(/[^\d.]/g,'')"
  926. v-model="scope.row.fTruckno"
  927. placeholder="车号"
  928. show-word-limit
  929. />
  930. </template>
  931. </el-table-column>
  932. <el-table-column
  933. prop="remark"
  934. header-align="center"
  935. align="center"
  936. label="备注"
  937. >
  938. <template slot-scope="scope">
  939. <el-input
  940. v-model="scope.row.remark"
  941. placeholder="备注"
  942. show-word-limit
  943. />
  944. </template>
  945. </el-table-column>
  946. <el-table-column
  947. header-align="center"
  948. align="center"
  949. label="操作"
  950. width="130PX">
  951. <template slot-scope="scope">
  952. <el-button @click.native.prevent="deleteRow(scope.$index, dataList)" size="small">移除</el-button>
  953. </template>
  954. </el-table-column>
  955. </el-table>
  956. <div class="dialogTableTitle flex a-center jlr">
  957. <h2>附件上传</h2>
  958. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  959. >添加
  960. </el-button
  961. >
  962. </div>
  963. <el-table
  964. :data="relevantAttachments"
  965. ref="table"
  966. tooltip-effect="dark"
  967. border
  968. stripe
  969. style="width: 100%"
  970. height="150"
  971. >
  972. <el-table-column label="序号" type="index" width="80">
  973. </el-table-column>
  974. <el-table-column
  975. prop="attachName"
  976. header-align="center"
  977. align="center"
  978. label="附件名称"
  979. >
  980. <template slot-scope="scope">
  981. <el-input
  982. v-model="scope.row.attachName"
  983. :disabled="browseStatus"
  984. placeholder="附件名称"
  985. show-word-limit
  986. />
  987. </template>
  988. </el-table-column>
  989. <el-table-column
  990. prop="opUserName"
  991. header-align="center"
  992. align="center"
  993. label="上传人"
  994. >
  995. </el-table-column>
  996. <el-table-column
  997. prop="opDate"
  998. header-align="center"
  999. align="center"
  1000. label="上传时间"
  1001. >
  1002. <template slot-scope="scope">
  1003. <el-date-picker
  1004. v-model="scope.row.opDate"
  1005. type="date"
  1006. disabled
  1007. placeholder="上传时间"
  1008. format="yyyy-MM-dd HH:mm"
  1009. value-format="timestamp"
  1010. ></el-date-picker>
  1011. </template>
  1012. </el-table-column>
  1013. <el-table-column
  1014. header-align="center"
  1015. align="center"
  1016. width="250PX"
  1017. label="上传附件"
  1018. >
  1019. <template slot-scope="scope">
  1020. <el-button style="float: left; height: 38px">
  1021. <a
  1022. :href="scope.row.attachId"
  1023. target="_blank"
  1024. class="buttonText"
  1025. style="float: left; margin-left: 1px"
  1026. >查看</a
  1027. >
  1028. </el-button>
  1029. <el-upload
  1030. class="upload-demo"
  1031. ref="upload"
  1032. action="node"
  1033. :on-change="checkType"
  1034. :disabled="browseStatus"
  1035. :show-file-list="false"
  1036. :auto-upload="false"
  1037. style="float: left"
  1038. >
  1039. <el-button
  1040. slot="trigger"
  1041. @click="clickAttachId(scope.$index)"
  1042. size="small"
  1043. type="primary"
  1044. style="margin-left: 5px"
  1045. >上传
  1046. </el-button>
  1047. </el-upload>
  1048. <el-button
  1049. style="margin-left: 5px"
  1050. @click.native.prevent="deleteAttach(scope.row)"
  1051. :disabled="browseStatus"
  1052. size="small"
  1053. >删除
  1054. </el-button>
  1055. </template>
  1056. </el-table-column>
  1057. <el-table-column
  1058. header-align="center"
  1059. align="center"
  1060. label="操作"
  1061. width="130PX"
  1062. >
  1063. <template slot-scope="scope">
  1064. <el-button
  1065. @click.native.prevent="deleteRow(scope.$index, relevantAttachments)"
  1066. :disabled="browseStatus"
  1067. size="small"
  1068. >移除
  1069. </el-button>
  1070. </template>
  1071. </el-table-column>
  1072. </el-table>
  1073. <div class="dialogTableTitle flex a-center jlr">
  1074. <h2>收款信息</h2>
  1075. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  1076. >添加
  1077. </el-button
  1078. >
  1079. </div>
  1080. <el-table
  1081. :data="warehouseDrList"
  1082. ref="table"
  1083. tooltip-effect="dark"
  1084. border
  1085. stripe
  1086. show-summary
  1087. >
  1088. <el-table-column label="序号" type="index" width="80">
  1089. </el-table-column>
  1090. <el-table-column
  1091. prop="fcorpid"
  1092. header-align="center"
  1093. align="center"
  1094. label="客户名称"
  1095. >
  1096. <template slot-scope="scope">
  1097. <el-input
  1098. v-model="scope.row.fCorpid"
  1099. :disabled="browseStatus"
  1100. placeholder="客户名称"
  1101. show-word-limit
  1102. />
  1103. </template>
  1104. </el-table-column>
  1105. <el-table-column
  1106. prop="ffeeid"
  1107. header-align="center"
  1108. align="center"
  1109. label="费用名称"
  1110. >
  1111. <template slot-scope="scope">
  1112. <el-input
  1113. v-model="scope.row.fFeeid"
  1114. placeholder="费用名称"
  1115. show-word-limit
  1116. />
  1117. </template>
  1118. </el-table-column>
  1119. <el-table-column
  1120. prop="ffeeUnitid"
  1121. header-align="center"
  1122. align="center"
  1123. label="计价单位">
  1124. <template slot-scope="scope">
  1125. <el-input
  1126. v-model="scope.row.fFeeUnitid"
  1127. placeholder="计价单位"
  1128. show-word-limit
  1129. />
  1130. </template>
  1131. </el-table-column>
  1132. <el-table-column
  1133. prop="fQty"
  1134. header-align="center"
  1135. align="center"
  1136. label="数量"
  1137. >
  1138. <template slot-scope="scope">
  1139. <el-input
  1140. oninput="value=value.replace(/[^\d.]/g,'')"
  1141. v-model="scope.row.fQty"
  1142. placeholder="数量"
  1143. show-word-limit
  1144. />
  1145. </template>
  1146. </el-table-column>
  1147. <el-table-column
  1148. prop="funitprice"
  1149. header-align="center"
  1150. align="center"
  1151. label="单价"
  1152. >
  1153. <template slot-scope="scope">
  1154. <el-input
  1155. oninput="value=value.replace(/[^\d.]/g,'')"
  1156. v-model="scope.row.fUnitprice"
  1157. placeholder="单价"
  1158. show-word-limit
  1159. />
  1160. </template>
  1161. </el-table-column>
  1162. <el-table-column
  1163. prop="fAmount"
  1164. header-align="center"
  1165. align="center"
  1166. label="金额"
  1167. >
  1168. <template slot-scope="scope">
  1169. <el-input
  1170. disabled
  1171. oninput="value=value.replace(/[^\d.]/g,'')"
  1172. v-model="scope.row.fAmount"
  1173. placeholder="金额"
  1174. show-word-limit
  1175. />
  1176. </template>
  1177. </el-table-column>
  1178. <el-table-column
  1179. prop="fCurrency"
  1180. header-align="center"
  1181. align="center"
  1182. label="币别"
  1183. >
  1184. <template slot-scope="scope">
  1185. <el-input
  1186. v-model="scope.row.fCurrency"
  1187. :disabled="browseStatus"
  1188. placeholder="币别"
  1189. show-word-limit
  1190. />
  1191. </template>
  1192. </el-table-column>
  1193. <el-table-column
  1194. prop="fCxrate"
  1195. header-align="center"
  1196. align="center"
  1197. label="汇率"
  1198. >
  1199. <template slot-scope="scope">
  1200. <el-input
  1201. v-model="scope.row.fCxrate"
  1202. :disabled="browseStatus"
  1203. placeholder="汇率"
  1204. show-word-limit
  1205. />
  1206. </template>
  1207. </el-table-column>
  1208. <el-table-column
  1209. prop="fRate"
  1210. header-align="center"
  1211. align="center"
  1212. label="税率"
  1213. >
  1214. <template slot-scope="scope">
  1215. <el-input
  1216. v-model="scope.row.fRate"
  1217. :disabled="browseStatus"
  1218. placeholder="税率"
  1219. show-word-limit
  1220. />
  1221. </template>
  1222. </el-table-column>
  1223. <el-table-column
  1224. prop="remarks"
  1225. header-align="center"
  1226. align="center"
  1227. label="备注"
  1228. >
  1229. <template slot-scope="scope">
  1230. <el-input
  1231. v-model="scope.row.remarks"
  1232. :disabled="browseStatus"
  1233. placeholder="备注"
  1234. show-word-limit
  1235. />
  1236. </template>
  1237. </el-table-column>
  1238. <el-table-column
  1239. header-align="center"
  1240. align="center"
  1241. label="操作"
  1242. width="130PX">
  1243. <template slot-scope="scope">
  1244. <el-button size="small">审核费用</el-button>
  1245. <el-button @click.native.prevent="deleteRow(scope.$index, warehouseDrList)" size="small">移除</el-button>
  1246. </template>
  1247. </el-table-column>
  1248. </el-table>
  1249. <div class="dialogTableTitle flex a-center jlr">
  1250. <h2>付款信息</h2>
  1251. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1252. >添加
  1253. </el-button
  1254. >
  1255. </div>
  1256. <el-table
  1257. :data="warehouseCrList"
  1258. ref="table"
  1259. tooltip-effect="dark"
  1260. border
  1261. stripe
  1262. show-summary
  1263. >
  1264. <el-table-column label="序号" type="index" width="80">
  1265. </el-table-column>
  1266. <el-table-column
  1267. prop="fcorpid"
  1268. header-align="center"
  1269. align="center"
  1270. label="客户名称"
  1271. >
  1272. <template slot-scope="scope">
  1273. <el-input
  1274. v-model="scope.row.fCorpid"
  1275. :disabled="browseStatus"
  1276. placeholder="客户名称"
  1277. show-word-limit
  1278. />
  1279. </template>
  1280. </el-table-column>
  1281. <el-table-column
  1282. prop="ffeeid"
  1283. header-align="center"
  1284. align="center"
  1285. label="费用名称"
  1286. >
  1287. <template slot-scope="scope">
  1288. <el-input
  1289. v-model="scope.row.fFeeid"
  1290. placeholder="费用名称"
  1291. show-word-limit
  1292. />
  1293. </template>
  1294. </el-table-column>
  1295. <el-table-column
  1296. prop="ffeeUnitid"
  1297. header-align="center"
  1298. align="center"
  1299. label="计价单位">
  1300. <template slot-scope="scope">
  1301. <el-input
  1302. v-model="scope.row.fFeeUnitid"
  1303. placeholder="计价单位"
  1304. show-word-limit
  1305. />
  1306. </template>
  1307. </el-table-column>
  1308. <el-table-column
  1309. prop="fQty"
  1310. header-align="center"
  1311. align="center"
  1312. label="数量"
  1313. >
  1314. <template slot-scope="scope">
  1315. <el-input
  1316. oninput="value=value.replace(/[^\d.]/g,'')"
  1317. v-model="scope.row.fQty"
  1318. placeholder="数量"
  1319. show-word-limit
  1320. />
  1321. </template>
  1322. </el-table-column>
  1323. <el-table-column
  1324. prop="funitprice"
  1325. header-align="center"
  1326. align="center"
  1327. label="单价"
  1328. >
  1329. <template slot-scope="scope">
  1330. <el-input
  1331. oninput="value=value.replace(/[^\d.]/g,'')"
  1332. v-model="scope.row.fUnitprice"
  1333. placeholder="单价"
  1334. show-word-limit
  1335. />
  1336. </template>
  1337. </el-table-column>
  1338. <el-table-column
  1339. prop="fAmount"
  1340. header-align="center"
  1341. align="center"
  1342. label="金额"
  1343. >
  1344. <template slot-scope="scope">
  1345. <el-input
  1346. disabled
  1347. oninput="value=value.replace(/[^\d.]/g,'')"
  1348. v-model="scope.row.fAmount"
  1349. placeholder="金额"
  1350. show-word-limit
  1351. />
  1352. </template>
  1353. </el-table-column>
  1354. <el-table-column
  1355. prop="fCurrency"
  1356. header-align="center"
  1357. align="center"
  1358. label="币别"
  1359. >
  1360. <template slot-scope="scope">
  1361. <el-input
  1362. v-model="scope.row.fCurrency"
  1363. :disabled="browseStatus"
  1364. placeholder="币别"
  1365. show-word-limit
  1366. />
  1367. </template>
  1368. </el-table-column>
  1369. <el-table-column
  1370. prop="fCxrate"
  1371. header-align="center"
  1372. align="center"
  1373. label="汇率"
  1374. >
  1375. <template slot-scope="scope">
  1376. <el-input
  1377. v-model="scope.row.fCxrate"
  1378. :disabled="browseStatus"
  1379. placeholder="汇率"
  1380. show-word-limit
  1381. />
  1382. </template>
  1383. </el-table-column>
  1384. <el-table-column
  1385. prop="fRate"
  1386. header-align="center"
  1387. align="center"
  1388. label="税率"
  1389. >
  1390. <template slot-scope="scope">
  1391. <el-input
  1392. v-model="scope.row.fRate"
  1393. :disabled="browseStatus"
  1394. placeholder="税率"
  1395. show-word-limit
  1396. />
  1397. </template>
  1398. </el-table-column>
  1399. <el-table-column
  1400. prop="remarks"
  1401. header-align="center"
  1402. align="center"
  1403. label="备注"
  1404. >
  1405. <template slot-scope="scope">
  1406. <el-input
  1407. v-model="scope.row.remarks"
  1408. :disabled="browseStatus"
  1409. placeholder="备注"
  1410. show-word-limit
  1411. />
  1412. </template>
  1413. </el-table-column>
  1414. <el-table-column
  1415. header-align="center"
  1416. align="center"
  1417. label="操作"
  1418. width="130PX">
  1419. <template slot-scope="scope">
  1420. <el-button size="small">审核费用</el-button>
  1421. <el-button @click.native.prevent="deleteRow(scope.$index, warehouseCrList)" size="small">移除</el-button>
  1422. </template>
  1423. </el-table-column>
  1424. </el-table>
  1425. <div slot="footer" class="dialog-footer">
  1426. <el-button type="primary" @click="submitForm">确 定</el-button>
  1427. <el-button @click="cancel">取 消</el-button>
  1428. </div>
  1429. </el-dialog>
  1430. </div>
  1431. </template>
  1432. <script>
  1433. import {
  1434. listWarehousebills,
  1435. getWarehousebills,
  1436. delWarehousebills,
  1437. addWarehousebills,
  1438. updateWarehousebills,
  1439. exportWarehousebills,
  1440. } from "@/api/warehouseBusiness/warehouseInStock";
  1441. import {listCorps} from "@/api/basicdata/corps";
  1442. import {listWarehouse} from "@/api/basicdata/warehouse";
  1443. import {listGoods} from "@/api/basicdata/goods";
  1444. import {listUser, queryUserVal} from "@/api/system/user";
  1445. export default {
  1446. name: "Warehousebills",
  1447. components: {},
  1448. data() {
  1449. return {
  1450. // 遮罩层
  1451. loading: true,
  1452. // 选中数组
  1453. ids: [],
  1454. userVal: {
  1455. userName: null,
  1456. nickName: null,
  1457. deptId: null
  1458. },
  1459. queryForm: {},
  1460. dataList: [],
  1461. warehouseCrList: [],
  1462. warehouseDrList: [],
  1463. browseStatus: false,
  1464. relevantAttachments: [],
  1465. // 非单个禁用
  1466. single: true,
  1467. // 非多个禁用
  1468. multiple: true,
  1469. // 显示搜索条件
  1470. showSearch: true,
  1471. // 总条数
  1472. total: 0,
  1473. // 仓库主(出入库)表格数据
  1474. warehousebillsList: [],
  1475. // 弹出层标题
  1476. title: "",
  1477. // 是否显示弹出层
  1478. open: false,
  1479. // 货权方(客户数据)
  1480. fMblnoOptions: [],
  1481. // 货权方(客户数据)
  1482. fSbuOptions: [],
  1483. // 操作员
  1484. userOptions: [],
  1485. // 操作员
  1486. goodsOptions: [],
  1487. // 制单部门
  1488. deptOptions: [],
  1489. // 仓库(仓库数据)
  1490. warehouseOptions: [],
  1491. // 贸易方式(数据字典),对应t_trademodels 字典
  1492. fTrademodeidOptions: [],
  1493. // 计费单位(数据字典),下拉选择毛重或净重字典
  1494. fFeetunitOptions: [],
  1495. // 结算方式(数据字典),下拉选择字典
  1496. fStltypeOptions: [],
  1497. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  1498. fIfweighOptions: [],
  1499. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  1500. fIfpledgeOptions: [],
  1501. // 是否破损(数据字典),默认F否则T字典
  1502. fIfdamageOptions: [],
  1503. // 单据类型(数据字典)SJRK字典
  1504. fBilltypeOptions: [],
  1505. // 状态(数据字典),N 入字典
  1506. fBillstatusOptions: [],
  1507. // 查询参数
  1508. queryParams: {
  1509. pageNum: 1,
  1510. pageSize: 10,
  1511. fBillno: null,
  1512. createBy: null,
  1513. createTime: null,
  1514. fCustomsdeclartion: null,
  1515. fOriginalbillno: null,
  1516. fDeptid: null,
  1517. fBsdeptid: null,
  1518. fContacts: null,
  1519. fTel: null,
  1520. fCorpid: null,
  1521. fTocorpid: null,
  1522. fStltypeid: null,
  1523. fBscorpno: null,
  1524. fWarehouseid: null,
  1525. fStorekeeper: null,
  1526. fBsdate: null,
  1527. fPlanqty: null,
  1528. fPlangrossweight: null,
  1529. fPlannetweight: null,
  1530. fPlanvolumn: null,
  1531. fQty: null,
  1532. fGrossweight: null,
  1533. fNetweight: null,
  1534. fVolumn: null,
  1535. fTrademodeid: null,
  1536. fSbu: null,
  1537. fFeetunit: null,
  1538. fMblno: null,
  1539. fVslvoy: null,
  1540. fEta: null,
  1541. fCustomno: null,
  1542. fIfweigh: null,
  1543. fIfpledge: null,
  1544. fIfdamage: null,
  1545. fBankcorpid: null,
  1546. fBilltype: null,
  1547. fBillstatus: null,
  1548. fCreateby: null,
  1549. fCreatetime: null,
  1550. fGoodsid: null,
  1551. fCntrtype: null,
  1552. fCntqty: null
  1553. },
  1554. // 表单参数
  1555. form: {},
  1556. // 表单校验
  1557. rules: {
  1558. fDeptid: [
  1559. {required: true, message: "制单部门不能为空", trigger: "blur"},
  1560. ],
  1561. fBsdeptid: [
  1562. {required: true, message: "业务所属部门不能为空", trigger: "blur"},
  1563. ],
  1564. fCorpid: [
  1565. {
  1566. required: true,
  1567. message:
  1568. "客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name不能为空",
  1569. trigger: "blur",
  1570. },
  1571. ],
  1572. fTocorpid: [
  1573. {
  1574. required: true,
  1575. message:
  1576. "货转客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name,自有在货权转移是该字段有效不能为空",
  1577. trigger: "blur",
  1578. },
  1579. ],
  1580. fBscorpno: [
  1581. {
  1582. required: true,
  1583. message:
  1584. "客户存货编号,格式编号客户编号+YYYY +NNNN,编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用,每年从001开始不能为空",
  1585. trigger: "blur",
  1586. },
  1587. ],
  1588. },
  1589. };
  1590. },
  1591. created() {
  1592. this.getList();
  1593. this.getDicts("data_trademodes").then((response) => {
  1594. this.fTrademodeidOptions = response.data;
  1595. });
  1596. this.getDicts("data_unitfees").then((response) => {
  1597. this.fFeetunitOptions = response.data;
  1598. });
  1599. this.getDicts("data_stltype_type").then((response) => {
  1600. this.fStltypeOptions = response.data;
  1601. });
  1602. this.getDicts("data_ifweigh_status").then((response) => {
  1603. this.fIfweighOptions = response.data;
  1604. });
  1605. this.getDicts("data_ifpledge_status").then((response) => {
  1606. this.fIfpledgeOptions = response.data;
  1607. });
  1608. this.getDicts("data_ifdamage_status").then((response) => {
  1609. this.fIfdamageOptions = response.data;
  1610. });
  1611. this.getDicts("data_billtype_type").then((response) => {
  1612. this.fBilltypeOptions = response.data;
  1613. });
  1614. this.getDicts("sys_common_status").then((response) => {
  1615. this.fBillstatusOptions = response.data;
  1616. });
  1617. },
  1618. methods: {
  1619. // 添加list
  1620. addRelevant() {
  1621. console.log(JSON.stringify(this.dataList))
  1622. this.dataList.push({
  1623. fbsdate: null,
  1624. fgoodsid: null,
  1625. fcntrtype: null,
  1626. fCntqty: null,
  1627. fplangrossweight: null,
  1628. fplanvolumn: null,
  1629. fplanqty: null,
  1630. fgrossweight: null,
  1631. fqty: null,
  1632. fPackagespecs: null,
  1633. fwarehouselocid: null,
  1634. fBoxno: null,
  1635. fGoodsval: null,
  1636. ftruckno: null,
  1637. remark: null
  1638. });
  1639. },
  1640. // 收款信息
  1641. addCollection() {
  1642. var obj = {};
  1643. this.warehouseDrList.push(obj);
  1644. },
  1645. addpayment() {
  1646. var obj = {};
  1647. this.warehouseCrList.push(obj);
  1648. },
  1649. queryUser() {
  1650. queryUserVal().then((response) => {
  1651. if (response.user !== null) {
  1652. this.userVal = response.user
  1653. this.$set(this.form, 'fDeptid', this.userVal.deptId)
  1654. this.$set(this.form, 'createBy', this.userVal.userName)
  1655. this.$set(this.form, 'createTime', Date.parse(new Date()))
  1656. }
  1657. if (response.dept !== null) {
  1658. this.deptOptions = []
  1659. this.deptOptions.push(response.dept)
  1660. }
  1661. });
  1662. },
  1663. /** 查询仓库主(出入库)列表 */
  1664. getList() {
  1665. this.loading = true;
  1666. listWarehousebills(this.queryParams).then((response) => {
  1667. this.warehousebillsList = response.rows;
  1668. this.total = response.total;
  1669. this.loading = false;
  1670. });
  1671. },
  1672. // 贸易方式(数据字典),对应t_trademodels 字典翻译
  1673. fTrademodeidFormat(row, column) {
  1674. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  1675. },
  1676. // 计费单位(数据字典),下拉选择毛重或净重字典翻译
  1677. fFeetunitFormat(row, column) {
  1678. return this.selectDictLabel(this.fFeetunitOptions, row.fFeetunit);
  1679. },
  1680. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  1681. fIfweighFormat(row, column) {
  1682. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  1683. },
  1684. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  1685. fIfpledgeFormat(row, column) {
  1686. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge);
  1687. },
  1688. // 是否破损(数据字典),默认F否则T字典翻译
  1689. fIfdamageFormat(row, column) {
  1690. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  1691. },
  1692. // 单据类型(数据字典)SJRK字典翻译
  1693. fBilltypeFormat(row, column) {
  1694. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  1695. },
  1696. // 状态(数据字典),N 入字典翻译
  1697. fBillstatusFormat(row, column) {
  1698. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  1699. },
  1700. // 取消按钮
  1701. cancel() {
  1702. this.open = false;
  1703. this.reset();
  1704. },
  1705. // 表单重置
  1706. reset() {
  1707. this.form = {
  1708. fId: null,
  1709. fBillno: null,
  1710. fCustomsdeclartion: null,
  1711. fOriginalbillno: null,
  1712. fDeptid: null,
  1713. fBsdeptid: null,
  1714. fContacts: null,
  1715. fTel: null,
  1716. fCorpid: null,
  1717. fTocorpid: null,
  1718. fStltypeid: null,
  1719. fBscorpno: null,
  1720. fWarehouseid: null,
  1721. fStorekeeper: null,
  1722. fBsdate: null,
  1723. fPlanqty: null,
  1724. fPlangrossweight: null,
  1725. fPlannetweight: null,
  1726. fPlanvolumn: null,
  1727. fQty: null,
  1728. fGrossweight: null,
  1729. fNetweight: null,
  1730. fVolumn: null,
  1731. fTrademodeid: null,
  1732. fSbu: null,
  1733. fFeetunit: null,
  1734. fMblno: null,
  1735. fVslvoy: null,
  1736. fEta: null,
  1737. fCustomno: null,
  1738. fIfweigh: null,
  1739. fIfpledge: null,
  1740. fIfdamage: null,
  1741. fBankcorpid: null,
  1742. fBilltype: null,
  1743. fBillstatus: null,
  1744. delFlag: null,
  1745. createBy: null,
  1746. createTime: null,
  1747. updateBy: null,
  1748. updateTime: null,
  1749. remark: null,
  1750. fCreateby: null,
  1751. fCreatetime: null,
  1752. fGoodsid: null,
  1753. fCntrtype: null,
  1754. fCntqty: null
  1755. };
  1756. this.resetForm("form");
  1757. },
  1758. /** 搜索按钮操作 */
  1759. handleQuery() {
  1760. this.queryParams.pageNum = 1;
  1761. this.getList();
  1762. },
  1763. /** 重置按钮操作 */
  1764. resetQuery() {
  1765. this.resetForm("queryForm");
  1766. this.handleQuery();
  1767. },
  1768. // 多选框选中数据
  1769. handleSelectionChange(selection) {
  1770. this.ids = selection.map((item) => item.fId);
  1771. this.single = selection.length !== 1;
  1772. this.multiple = !selection.length;
  1773. },
  1774. /** 新增按钮操作 */
  1775. handleAdd() {
  1776. this.reset();
  1777. this.queryUser()
  1778. this.open = true;
  1779. this.title = "添加仓库主(出入库)";
  1780. },
  1781. /** 修改按钮操作 */
  1782. handleUpdate(row) {
  1783. this.reset();
  1784. const fId = row.fid || this.ids;
  1785. getWarehousebills(row.fid).then((response) => {
  1786. this.form = response.data.warehousebills;
  1787. this.$set(this.form, 'fCorpid', response.data.warehousebills.fcorpid)
  1788. this.$set(this.form, 'fWarehouseid', response.data.warehousebills.fwarehouseid)
  1789. this.$set(this.form, 'fContacts', response.data.warehousebills.fcontacts)
  1790. this.$set(this.form, 'fTel', response.data.warehousebills.ftel)
  1791. this.$set(this.form, 'fMblno', response.data.warehousebills.fmblno)
  1792. this.$set(this.form, 'fBsdate', Date.parse(response.data.warehousebills.fbsdate))
  1793. this.$set(this.form, 'fStorekeeper', response.data.warehousebills.fstorekeeper)
  1794. this.$set(this.form, 'createBy', response.data.warehousebills.createBy)
  1795. this.$set(this.form, 'fDeptid', response.data.warehousebills.fdeptid)
  1796. this.$set(this.form, 'fDilldate', Date.parse(response.data.warehousebills.fbilldate))
  1797. this.$set(this.form, 'fVslvoy', response.data.warehousebills.fvslvoy)
  1798. this.$set(this.form, 'fEta', Date.parse(response.data.warehousebills.feta))
  1799. this.$set(this.form, 'createTime', Date.parse(response.data.warehousebills.createTime))
  1800. this.$set(this.form, 'fTrademodeid', response.data.warehousebills.ftrademodeid + '')
  1801. this.$set(this.form, 'fBillingway', response.data.warehousebills.fbillingway + '')
  1802. this.$set(this.form, 'fFeetunit', response.data.warehousebills.ffeetunit + '')
  1803. this.$set(this.form, 'fBscorpno', response.data.warehousebills.fbscorpno)
  1804. this.$set(this.form, 'fCustomno', response.data.warehousebills.fcustomno)
  1805. this.$set(this.form, 'fStltypeid', response.data.warehousebills.fstltypeid + '')
  1806. this.$set(this.form, 'fIfweigh', response.data.warehousebills.fifweigh + '')
  1807. this.$set(this.form, 'fIfdamage', response.data.warehousebills.fifdamage + '')
  1808. this.$set(this.form, 'fSbu', response.data.warehousebills.fsbu)
  1809. this.$set(this.form, 'fIfpledge', response.data.warehousebills.fifpledge + '')
  1810. this.$set(this.form, 'fBankcorpid', response.data.warehousebills.fbankcorpid)
  1811. this.$set(this.form, 'remark', response.data.warehousebills.remark)
  1812. this.deptOptions = []
  1813. this.deptOptions.push(response.data.dept)
  1814. this.fMblnoOptions = []
  1815. this.fMblnoOptions.push(response.data.fCorps)
  1816. if (response.data.fSbu !== null) {
  1817. this.fSbuOptions = []
  1818. this.fSbuOptions.push(response.data.fSbu)
  1819. }
  1820. if (response.data.warehouse !== null) {
  1821. this.warehouseOptions = []
  1822. this.warehouseOptions.push(response.data.warehouse)
  1823. }
  1824. if (typeof response.data.warehouseBillsItem !== 'undefined' && response.data.warehouseBillsItem !== null) {
  1825. this.dataList = response.data.warehouseBillsItem
  1826. if (response.data.goodsList !== null) {
  1827. this.goodsOptions = []
  1828. this.goodsOptions = response.data.goodsList
  1829. }
  1830. }
  1831. this.open = true;
  1832. this.title = "修改仓库主(出入库)";
  1833. });
  1834. },
  1835. /** 提交按钮 */
  1836. submitForm() {
  1837. this.$refs["form"].validate((valid) => {
  1838. if (valid) {
  1839. // let formData = new FormData()
  1840. // console.log(JSON.stringify(this.form));
  1841. // formData.append('tWarehouseBills', JSON.stringify(this.formData))
  1842. let formData = new window.FormData();
  1843. // 附件数据
  1844. formData.append("tWarehouseBills", JSON.stringify(this.form));
  1845. console.log(JSON.stringify(this.form));
  1846. // 附件数据
  1847. formData.append("tWhgenleg", null);
  1848. // // 费用明细付款
  1849. formData.append("tWarehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  1850. // // 收款
  1851. formData.append("tWarehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  1852. // // 库存明细
  1853. formData.append("tWarehousebillsitems", JSON.stringify(this.dataList));
  1854. // 附件数据
  1855. // formData.append('tWhgenleg', dataForm)
  1856. // // 费用明细付款
  1857. // formData.append('tWarehousebillsfeesCr', dataForm)
  1858. // // 收款
  1859. // formData.append('tWarehousebillsfeesDr"', dataForm)
  1860. // // 库存明细
  1861. // formData.append('tWarehousebillsitems', dataForm)
  1862. addWarehousebills(formData).then((response) => {
  1863. console.log(response);
  1864. this.msgSuccess("新增成功");
  1865. this.open = false;
  1866. this.getList();
  1867. });
  1868. }
  1869. });
  1870. },
  1871. /** 删除按钮操作 */
  1872. handleDelete(row) {
  1873. const fIds = row.fId || this.ids;
  1874. this.$confirm(
  1875. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  1876. "警告",
  1877. {
  1878. confirmButtonText: "确定",
  1879. cancelButtonText: "取消",
  1880. type: "warning",
  1881. }
  1882. )
  1883. .then(function () {
  1884. return delWarehousebills(fIds);
  1885. })
  1886. .then(() => {
  1887. this.getList();
  1888. this.msgSuccess("删除成功");
  1889. });
  1890. },
  1891. /** 导出按钮操作 */
  1892. handleExport() {
  1893. const queryParams = this.queryParams;
  1894. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  1895. confirmButtonText: "确定",
  1896. cancelButtonText: "取消",
  1897. type: "warning",
  1898. })
  1899. .then(function () {
  1900. return exportWarehousebills(queryParams);
  1901. })
  1902. .then((response) => {
  1903. this.download(response.msg);
  1904. });
  1905. },
  1906. deleteRow(index, rows) {
  1907. rows.splice(index, 1)
  1908. },
  1909. /* 远程模糊查询用户 */
  1910. corpsRemoteMethod(name) {
  1911. if (name == null || name === '') {
  1912. return false
  1913. }
  1914. let queryParams = {pageNum: 1, pageSize: 10, fName: name}
  1915. listCorps(queryParams).then((response) => {
  1916. this.fMblnoOptions = response.rows
  1917. });
  1918. },
  1919. /* 远程模糊查询商品 */
  1920. goodsRemoteMethod(name) {
  1921. if (name == null || name === '') {
  1922. return false
  1923. }
  1924. let queryParams = {pageNum: 1, pageSize: 10, fName: name}
  1925. listGoods(queryParams).then((response) => {
  1926. this.goodsOptions = response.rows
  1927. });
  1928. },
  1929. /* 远程模糊查询经营单位 */
  1930. fSbuRemoteMethod(name) {
  1931. if (name == null || name === '') {
  1932. return false
  1933. }
  1934. let queryParams = {pageNum: 1, pageSize: 10, fName: name}
  1935. listCorps(queryParams).then((response) => {
  1936. this.fSbuOptions = response.rows
  1937. });
  1938. },
  1939. /* 远程模糊查询仓库 */
  1940. warehouseRemoteMethod(name) {
  1941. if (name == null || name === '') {
  1942. return false
  1943. }
  1944. let queryParams = {pageNum: 1, pageSize: 10, fName: name}
  1945. listWarehouse(queryParams).then((response) => {
  1946. this.warehouseOptions = response.rows
  1947. });
  1948. },
  1949. /* 远程模糊查询操作用户 */
  1950. userRemoteMethod(name) {
  1951. if (name == null || name === '') {
  1952. return false
  1953. }
  1954. let queryParams = {pageNum: 1, pageSize: 10, userName: name}
  1955. listUser(queryParams).then((response) => {
  1956. this.userOptions = response.rows
  1957. });
  1958. },
  1959. },
  1960. };
  1961. </script>