index.vue 79 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566
  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. v-model="queryParams.createTime"
  33. type="date"
  34. value-format="timestamp"
  35. placeholder="选择入库日期"
  36. >
  37. </el-date-picker>
  38. </el-form-item>
  39. <el-form-item label="贸易方式" prop="fTrademodeid">
  40. <el-input
  41. v-model="queryParams.fTrademodeid"
  42. placeholder="请输入贸易方式"
  43. clearable
  44. size="small"
  45. @keyup.enter.native="handleQuery"
  46. />
  47. </el-form-item>
  48. <el-form-item label="货权方" prop="fCorpid">
  49. <el-input
  50. v-model="queryParams.fCorpid"
  51. placeholder="请输入货权方"
  52. clearable
  53. size="small"
  54. @keyup.enter.native="handleQuery"
  55. />
  56. </el-form-item>
  57. <el-form-item label="提单号" prop="fmblno">
  58. <el-input
  59. v-model="queryParams.fmblno"
  60. placeholder="请输入提单号"
  61. clearable
  62. size="small"
  63. @keyup.enter.native="handleQuery"
  64. />
  65. </el-form-item>
  66. <el-form-item label="经营单位" prop="fsbu">
  67. <el-input
  68. v-model="queryParams.fsbu"
  69. placeholder="请输入经营单位"
  70. clearable
  71. size="small"
  72. @keyup.enter.native="handleQuery"
  73. />
  74. </el-form-item>
  75. <el-form-item label="货物名称" prop="fgoodsid">
  76. <el-select
  77. v-model="queryParams.fgoodsid"
  78. placeholder="请选择货物名称"
  79. clearable
  80. size="small"
  81. >
  82. <el-option label="请选择字典生成" value="" />
  83. </el-select>
  84. </el-form-item>
  85. <el-form-item label="仓库" prop="fwarehouseid">
  86. <el-input
  87. v-model="queryParams.fWarehouseid"
  88. placeholder="请输入仓库"
  89. clearable
  90. size="small"
  91. @keyup.enter.native="handleQuery"
  92. />
  93. </el-form-item>
  94. <el-form-item>
  95. <el-button
  96. type="cyan"
  97. icon="el-icon-search"
  98. size="mini"
  99. @click="handleQuery"
  100. >搜索
  101. </el-button>
  102. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  103. >重置
  104. </el-button>
  105. </el-form-item>
  106. </el-form>
  107. <el-row :gutter="10" class="mb8">
  108. <el-col :span="1.5">
  109. <el-button
  110. type="primary"
  111. icon="el-icon-plus"
  112. size="mini"
  113. @click="handleAdd"
  114. v-hasPermi="['warehouseBusiness:warehousebills:add']"
  115. >新增
  116. </el-button>
  117. </el-col>
  118. <el-col :span="1.5">
  119. <el-button
  120. type="success"
  121. icon="el-icon-edit"
  122. size="mini"
  123. :disabled="single"
  124. @click="handleUpdate"
  125. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  126. >修改
  127. </el-button>
  128. </el-col>
  129. <el-col :span="1.5">
  130. <el-button
  131. type="danger"
  132. icon="el-icon-delete"
  133. size="mini"
  134. :disabled="multiple"
  135. @click="handleDelete"
  136. v-hasPermi="['warehouseBusiness:warehousebills:remove']"
  137. >删除
  138. </el-button>
  139. </el-col>
  140. <el-col :span="1.5">
  141. <el-button
  142. type="warning"
  143. icon="el-icon-download"
  144. size="mini"
  145. @click="handleExport"
  146. v-hasPermi="['warehouseBusiness:warehousebills:export']"
  147. >导出
  148. </el-button>
  149. </el-col>
  150. <right-toolbar
  151. :showSearch.sync="showSearch"
  152. @queryTable="getList"
  153. ></right-toolbar>
  154. </el-row>
  155. <el-table
  156. v-loading="loading"
  157. :data="warehousebillsList"
  158. @selection-change="handleSelectionChange"
  159. >
  160. <el-table-column type="selection" width="55" align="center" />
  161. <el-table-column type="index" label="行号" align="center" />
  162. <el-table-column label="货权方" align="center" prop="fCorpid" />
  163. <el-table-column label="提单号" align="center" prop="fMblno" />
  164. <el-table-column label="经营单位" align="center" prop="fSbu" />
  165. <el-table-column
  166. label="入库日期"
  167. align="center"
  168. prop="fBsdate"
  169. width="180"
  170. ><template slot-scope="scope">
  171. <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column
  175. label="贸易方式"
  176. align="center"
  177. prop="fTrademodeid"
  178. :formatter="fTrademodeidFormat"
  179. />
  180. <el-table-column label="仓库" align="center" prop="fWarehouseid" />
  181. <el-table-column label="入库件数" align="center" prop="fQty" />
  182. <!-- <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>-->
  183. <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
  184. <el-table-column label="入库毛重" align="center" prop="fGrossweight" />
  185. <el-table-column label="净重" align="center" prop="fNetweight" />
  186. <el-table-column
  187. label="操作"
  188. align="center"
  189. class-name="small-padding fixed-width"
  190. width="100"
  191. >
  192. <template slot-scope="scope">
  193. <el-button
  194. size="mini"
  195. type="text"
  196. icon="el-icon-edit"
  197. @click="handleUpdate(scope.row, true)"
  198. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  199. >查看
  200. </el-button>
  201. <el-button
  202. size="mini"
  203. type="text"
  204. icon="el-icon-edit"
  205. @click="handleUpdate(scope.row, false)"
  206. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  207. >修改
  208. </el-button>
  209. <el-button
  210. size="mini"
  211. type="text"
  212. icon="el-icon-delete"
  213. v-if="scope.row.fBillstatus !== '6'"
  214. @click="handleDelete(scope.row)"
  215. v-hasPermi="['warehouseBusiness:warehousebills:remove']"
  216. >删除
  217. </el-button>
  218. </template>
  219. </el-table-column>
  220. </el-table>
  221. <pagination
  222. v-show="total > 0"
  223. :total="total"
  224. :page.sync="queryParams.pageNum"
  225. :limit.sync="queryParams.pageSize"
  226. @pagination="getList"
  227. />
  228. <!-- 添加或修改仓库主(出入库)对话框 -->
  229. <el-dialog
  230. :title="title"
  231. :visible.sync="open"
  232. :close-on-click-modal="false"
  233. width="80%"
  234. append-to-body
  235. >
  236. <el-form
  237. style="height: 570px"
  238. ref="form"
  239. :model="form"
  240. :rules="rules"
  241. label-width="120px"
  242. >
  243. <el-row>
  244. <el-col :span="8">
  245. <el-form-item label="货权方" prop="fCorpid">
  246. <el-select
  247. v-model="form.fCorpid"
  248. filterable
  249. remote
  250. style="width: 250px"
  251. :remote-method="corpsRemoteMethod"
  252. placeholder="请选择货权方"
  253. >
  254. <el-option
  255. v-for="(dict,index) in fMblnoOptions"
  256. :key="index.fId"
  257. :label="dict.fName"
  258. :value="dict.fId"
  259. ></el-option>
  260. </el-select>
  261. </el-form-item>
  262. </el-col>
  263. <el-col :span="8">
  264. <el-form-item label="结算方式" prop="fStltypeid">
  265. <el-select
  266. v-model="form.fStltypeid"
  267. placeholder="请选择结算方式"
  268. clearable
  269. style="width: 250px"
  270. >
  271. <el-option
  272. v-for="(dict,index) in fStltypeOptions"
  273. :key="index.dictValue"
  274. :label="dict.dictLabel"
  275. :value="dict.dictValue"
  276. />
  277. </el-select>
  278. </el-form-item>
  279. </el-col>
  280. <el-col :span="8">
  281. <el-form-item label="提单号" prop="fMblno">
  282. <el-input
  283. v-model="form.fMblno"
  284. style="width: 250px"
  285. placeholder="手工输入"
  286. />
  287. </el-form-item>
  288. </el-col>
  289. </el-row>
  290. <el-row>
  291. <el-col :span="8">
  292. <el-form-item label="业务日期" prop="fBsdate">
  293. <el-date-picker
  294. v-model="form.fBsdate"
  295. style="width: 250px"
  296. type="date"
  297. @change="changefBsdate"
  298. value-format="timestamp"
  299. placeholder="业务日期"
  300. >
  301. </el-date-picker>
  302. </el-form-item>
  303. </el-col>
  304. <el-col :span="8">
  305. <el-form-item label="仓管员" prop="fStorekeeper">
  306. <el-select
  307. v-model="form.fStorekeeper"
  308. filterable
  309. remote
  310. :disabled="browseStatus"
  311. style="width: 250px"
  312. :remote-method="userRemoteMethod"
  313. placeholder="请选择仓管员"
  314. >
  315. <el-option
  316. v-for="(dict,index) in userOptions"
  317. :key="index.userName"
  318. :label="dict.nickName"
  319. :value="dict.userName"
  320. ></el-option>
  321. </el-select>
  322. </el-form-item>
  323. </el-col>
  324. <el-col :span="8">
  325. <el-form-item label="仓库" prop="fWarehouseid">
  326. <el-select
  327. v-model="form.fWarehouseid"
  328. filterable
  329. :disabled="browseStatus"
  330. remote
  331. style="width: 250px"
  332. :remote-method="warehouseRemoteMethod"
  333. placeholder="请选择仓库"
  334. >
  335. <el-option
  336. v-for="(dict,index) in warehouseOptions"
  337. :key="index.fId"
  338. :label="dict.fName"
  339. :value="dict.fId"
  340. ></el-option>
  341. </el-select>
  342. </el-form-item>
  343. </el-col>
  344. </el-row>
  345. <el-row>
  346. <el-col :span="8">
  347. <el-form-item label="存货编号" prop="fBscorpno">
  348. <el-input
  349. disabled
  350. v-model="form.fBscorpno"
  351. style="width: 250px"
  352. laceholder="存货编号"
  353. />
  354. </el-form-item>
  355. </el-col>
  356. <el-col :span="8">
  357. <el-form-item label="破损" prop="fIfdamage">
  358. <el-select
  359. v-model="form.fIfdamage"
  360. placeholder="请选择是否破损"
  361. clearable
  362. style="width: 250px"
  363. >
  364. <el-option
  365. v-for="(dict,index) in fIfdamageOptions"
  366. :key="index.dictValue"
  367. :label="dict.dictLabel"
  368. :value="dict.dictValue"
  369. />
  370. </el-select>
  371. </el-form-item>
  372. </el-col>
  373. <el-col :span="8">
  374. <el-form-item label="过磅" prop="fIfweigh">
  375. <el-select
  376. v-model="form.fIfweigh"
  377. placeholder="请选择是否过磅"
  378. clearable
  379. style="width: 250px"
  380. >
  381. <el-option
  382. v-for="(dict,index) in fIfweighOptions"
  383. :key="index.dictValue"
  384. :label="dict.dictLabel"
  385. :value="dict.dictValue"
  386. />
  387. </el-select>
  388. </el-form-item>
  389. </el-col>
  390. </el-row>
  391. <el-row>
  392. <el-col :span="8">
  393. <el-form-item label="质押" prop="fIfpledge">
  394. <el-select
  395. v-model="form.fIfpledge"
  396. placeholder="请选择是否过磅"
  397. clearable
  398. style="width: 250px"
  399. >
  400. <el-option
  401. v-for="(dict,index) in fIfpledgeOptions"
  402. :key="index.dictValue"
  403. :label="dict.dictLabel"
  404. :value="dict.dictValue"
  405. />
  406. </el-select>
  407. </el-form-item>
  408. </el-col>
  409. <el-col :span="8">
  410. <el-form-item label="质押银行" prop="fBankcorpid">
  411. <el-input
  412. v-model="form.fBankcorpid"
  413. laceholder="质押银行"
  414. style="width: 250px"
  415. />
  416. </el-form-item>
  417. </el-col>
  418. <el-col :span="8">
  419. <el-form-item label="计费单位" prop="fFeetunit">
  420. <el-select
  421. v-model="form.fFeetunit"
  422. placeholder="请选择计费单位"
  423. clearable
  424. style="width: 250px"
  425. >
  426. <el-option
  427. v-for="(dict,index) in fFeetunitOptions"
  428. :key="index.dictValue"
  429. :label="dict.dictLabel"
  430. :value="dict.dictValue"
  431. />
  432. </el-select>
  433. </el-form-item>
  434. </el-col>
  435. </el-row>
  436. <el-row>
  437. <el-form-item label="备注" prop="remark">
  438. <el-input
  439. style="width: 100%"
  440. v-model="form.remark"
  441. type="textarea"
  442. placeholder="请输入内容"
  443. />
  444. </el-form-item>
  445. </el-row>
  446. <el-row style="margin-top: 30px">
  447. <el-col :span="8">
  448. <el-form-item label="仓库联系人" prop="fContacts">
  449. <el-input
  450. v-model="form.fContacts"
  451. style="width: 250px"
  452. placeholder="仓库联系人"
  453. />
  454. </el-form-item>
  455. </el-col>
  456. <el-col :span="8">
  457. <el-form-item label="仓库电话" prop="fTel">
  458. <el-input
  459. v-model="form.fTel"
  460. style="width: 250px"
  461. placeholder="请输仓库入电话"
  462. />
  463. </el-form-item>
  464. </el-col>
  465. <el-col :span="8">
  466. <el-form-item label="船名航次" prop="fVslvoy">
  467. <el-input
  468. v-model="form.fVslvoy"
  469. style="width: 250px"
  470. placeholder="船名航次"
  471. />
  472. </el-form-item>
  473. </el-col>
  474. </el-row>
  475. <el-row>
  476. <el-col :span="8">
  477. <el-form-item label="到港日期" prop="fEta">
  478. <el-date-picker
  479. v-model="form.fEta"
  480. style="width: 250px"
  481. type="date"
  482. value-format="timestamp"
  483. placeholder="到港日期"
  484. >
  485. </el-date-picker>
  486. </el-form-item>
  487. </el-col>
  488. <el-col :span="8">
  489. <el-form-item label="报关单号" prop="fCustomno">
  490. <el-input
  491. v-model="form.fCustomno"
  492. style="width: 250px"
  493. laceholder="报关单号"
  494. />
  495. </el-form-item>
  496. </el-col>
  497. <el-col :span="8">
  498. <el-form-item label="经营单位" prop="fSbu">
  499. <el-select
  500. v-model="form.fSbu"
  501. filterable
  502. remote
  503. :remote-method="fSbuRemoteMethod"
  504. style="width: 250px"
  505. placeholder="请选择经营单位"
  506. >
  507. <el-option
  508. v-for="(dict,index) in fSbuOptions"
  509. :key="index.fId"
  510. :label="dict.fName"
  511. :value="dict.fId"
  512. ></el-option>
  513. </el-select>
  514. </el-form-item>
  515. </el-col>
  516. </el-row>
  517. <el-row>
  518. <el-col :span="8">
  519. <el-form-item label="单据编号" prop="fBillno">
  520. <el-input
  521. v-model="form.fBillno"
  522. disabled
  523. style="width: 250px"
  524. placeholder="单据编号"
  525. />
  526. </el-form-item>
  527. </el-col>
  528. <el-col :span="8">
  529. <el-form-item label="贸易方式" prop="fTrademodeid">
  530. <el-select
  531. v-model="form.fTrademodeid"
  532. placeholder="请选择贸易方式"
  533. clearable
  534. style="width: 250px"
  535. >
  536. <el-option
  537. v-for="(dict,index) in fTrademodeidOptions"
  538. :key="index.dictValue"
  539. :label="dict.dictLabel"
  540. :value="dict.dictValue"
  541. />
  542. </el-select>
  543. </el-form-item>
  544. </el-col>
  545. <el-col :span="8">
  546. <el-form-item label="制单人" prop="createBy">
  547. <el-input
  548. disabled
  549. v-model="form.createBy"
  550. style="width: 250px"
  551. placeholder="制单人"
  552. />
  553. </el-form-item>
  554. </el-col>
  555. </el-row>
  556. <el-row>
  557. <el-col :span="8">
  558. <el-form-item label="制单部门" prop="fDeptid">
  559. <el-select
  560. v-model="form.fDeptid"
  561. filterable
  562. disabled
  563. style="width: 250px"
  564. remote
  565. >
  566. <el-option
  567. v-for="(dict,index) in deptOptions"
  568. :key="index.deptId"
  569. :label="dict.deptName"
  570. :value="dict.deptId"
  571. ></el-option>
  572. </el-select>
  573. </el-form-item>
  574. </el-col>
  575. <el-col :span="8">
  576. <el-form-item disabled label="制单日期" prop="fbilldate">
  577. <el-date-picker
  578. v-model="form.createTime"
  579. size="large"
  580. type="date"
  581. disabled
  582. value-format="timestamp"
  583. placeholder="制单日期"
  584. >
  585. </el-date-picker>
  586. </el-form-item>
  587. </el-col>
  588. <el-col :span="8">
  589. <el-form-item label="唛头" prop="fbarks">
  590. <el-input
  591. v-model="form.fMarks"
  592. style="width: 250px"
  593. placeholder="唛头"
  594. />
  595. </el-form-item>
  596. </el-col>
  597. </el-row>
  598. </el-form>
  599. <div class="dialogTableTitle flex a-center jlr">
  600. <h2>库存明细</h2>
  601. <el-button :disabled="browseStatus" @click.prevent="addRelevant()"
  602. >添加
  603. </el-button>
  604. </div>
  605. <el-table
  606. :data="dataList"
  607. ref="table"
  608. tooltip-effect="dark"
  609. border
  610. stripe
  611. :summary-method="getSummaries"
  612. show-summary
  613. >
  614. <el-table-column label="序号" type="index" width="80">
  615. </el-table-column>
  616. <el-table-column
  617. prop="fBsdate"
  618. header-align="center"
  619. align="center"
  620. width="180px"
  621. label="入库日期"
  622. >
  623. <template slot-scope="scope">
  624. <el-date-picker
  625. v-model="scope.row.fBsdate"
  626. style="width: 150px"
  627. type="date"
  628. disabled
  629. value-format="timestamp"
  630. placeholder="入库日期"
  631. >
  632. </el-date-picker>
  633. </template>
  634. </el-table-column>
  635. <el-table-column
  636. prop="fGoodsid"
  637. header-align="center"
  638. align="center"
  639. width="140px"
  640. label="品名"
  641. >
  642. <template slot-scope="scope">
  643. <el-select
  644. v-model="scope.row.fGoodsid"
  645. filterable
  646. remote
  647. :remote-method="goodsRemoteMethod"
  648. placeholder="请选择品名"
  649. >
  650. <el-option
  651. v-for="(dict,index) in goodsOptions"
  652. :key="index.fId"
  653. :label="dict.fName"
  654. :value="dict.fId"
  655. ></el-option>
  656. </el-select>
  657. </template>
  658. </el-table-column>
  659. <el-table-column
  660. prop="fcntrtype"
  661. header-align="center"
  662. align="center"
  663. width="140px"
  664. label="箱型"
  665. >
  666. <template slot-scope="scope">
  667. <el-input
  668. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  669. v-model="scope.row.fCntrtype"
  670. placeholder="箱型"
  671. show-word-limit
  672. />
  673. </template>
  674. </el-table-column>
  675. <el-table-column
  676. prop="fPlangrossweight"
  677. header-align="center"
  678. align="center"
  679. width="180px"
  680. label="计划毛重"
  681. >
  682. <template slot-scope="scope">
  683. <el-input
  684. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  685. v-model="scope.row.fPlangrossweight"
  686. placeholder="计划毛重"
  687. show-word-limit
  688. />
  689. </template>
  690. </el-table-column>
  691. <el-table-column
  692. prop="fPlannetweight"
  693. header-align="center"
  694. align="center"
  695. width="180px"
  696. label="计划净重"
  697. >
  698. <template slot-scope="scope">
  699. <el-input
  700. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  701. v-model="scope.row.fPlannetweight"
  702. placeholder="计划净重"
  703. show-word-limit
  704. />
  705. </template>
  706. </el-table-column>
  707. <el-table-column
  708. prop="fPlanvolumn"
  709. header-align="center"
  710. width="180px"
  711. align="center"
  712. label="计划尺码"
  713. >
  714. <template slot-scope="scope">
  715. <el-input
  716. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  717. v-model="scope.row.fPlanvolumn"
  718. placeholder="尺码"
  719. show-word-limit
  720. />
  721. </template>
  722. </el-table-column>
  723. <el-table-column
  724. prop="fPlanqty"
  725. header-align="center"
  726. width="180px"
  727. align="center"
  728. label="计划件数"
  729. >
  730. <template slot-scope="scope">
  731. <el-input
  732. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  733. v-model="scope.row.fPlanqty"
  734. placeholder="件数"
  735. show-word-limit
  736. />
  737. </template>
  738. </el-table-column>
  739. <el-table-column
  740. prop="fGrossweight"
  741. header-align="center"
  742. width="180px"
  743. align="center"
  744. label="入库毛重"
  745. >
  746. <template slot-scope="scope">
  747. <el-input
  748. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  749. v-model="scope.row.fGrossweight"
  750. placeholder="入库毛重"
  751. show-word-limit
  752. />
  753. </template>
  754. </el-table-column>
  755. <el-table-column
  756. prop="fNetweight"
  757. header-align="center"
  758. width="180px"
  759. align="center"
  760. label="入库净重"
  761. >
  762. <template slot-scope="scope">
  763. <el-input
  764. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  765. v-model="scope.row.fNetweight"
  766. placeholder="入库净重"
  767. show-word-limit
  768. />
  769. </template>
  770. </el-table-column>
  771. <el-table-column
  772. prop="fQty"
  773. header-align="center"
  774. width="180px"
  775. align="center"
  776. label="入库件数"
  777. >
  778. <template slot-scope="scope">
  779. <el-input
  780. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  781. v-model="scope.row.fQty"
  782. placeholder="入库件数"
  783. show-word-limit
  784. />
  785. </template>
  786. </el-table-column>
  787. <el-table-column
  788. prop="fPackagespecs"
  789. header-align="center"
  790. width="180px"
  791. align="center"
  792. label="包装规格"
  793. >
  794. <template slot-scope="scope">
  795. <el-input
  796. oninput="value=value.replace(/[^\d.]/g,'')"
  797. v-model="scope.row.fPackagespecs"
  798. placeholder="包装规格"
  799. show-word-limit
  800. />
  801. </template>
  802. </el-table-column>
  803. <el-table-column
  804. prop="fWarehouselocid"
  805. header-align="center"
  806. width="150px"
  807. align="center"
  808. label="库区"
  809. >
  810. <template slot-scope="scope">
  811. <el-select
  812. v-model="scope.row.fWarehouselocid"
  813. filterable
  814. remote
  815. :remote-method="kqhouseRemoteMethod"
  816. placeholder="请选择库区"
  817. >
  818. <el-option
  819. v-for="(dict,index) in kqhouseOptions"
  820. :key="index.fId"
  821. :label="dict.fName"
  822. :value="dict.fId"
  823. ></el-option>
  824. </el-select>
  825. </template>
  826. </el-table-column>
  827. <el-table-column
  828. prop="fCntrno"
  829. header-align="center"
  830. width="150px"
  831. align="center"
  832. label="箱号"
  833. >
  834. <template slot-scope="scope">
  835. <el-input
  836. v-model="scope.row.fCntrno"
  837. placeholder="箱号"
  838. show-word-limit
  839. />
  840. </template>
  841. </el-table-column>
  842. <el-table-column
  843. prop="fGoodsval"
  844. header-align="center"
  845. width="150px"
  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.fGoodsval"
  853. placeholder="货值"
  854. show-word-limit
  855. />
  856. </template>
  857. </el-table-column>
  858. <el-table-column
  859. prop="fTruckno"
  860. header-align="center"
  861. width="150px"
  862. align="center"
  863. label="车号"
  864. >
  865. <template slot-scope="scope">
  866. <el-input
  867. oninput="value=value.replace(/[^\d.]/g,'')"
  868. v-model="scope.row.fTruckno"
  869. placeholder="车号"
  870. show-word-limit
  871. />
  872. </template>
  873. </el-table-column>
  874. <el-table-column
  875. prop="remark"
  876. header-align="center"
  877. width="150px"
  878. align="center"
  879. label="备注"
  880. >
  881. <template slot-scope="scope">
  882. <el-input
  883. v-model="scope.row.remark"
  884. placeholder="备注"
  885. show-word-limit
  886. />
  887. </template>
  888. </el-table-column>
  889. <el-table-column
  890. header-align="center"
  891. align="center"
  892. label="操作"
  893. width="130PX"
  894. >
  895. <template slot-scope="scope">
  896. <el-button
  897. @click.native.prevent="deleteRow(scope.$index, dataList)"
  898. size="small"
  899. >移除</el-button
  900. >
  901. </template>
  902. </el-table-column>
  903. </el-table>
  904. <div class="dialogTableTitle flex a-center jlr">
  905. <h2>附件上传</h2>
  906. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  907. >添加
  908. </el-button>
  909. </div>
  910. <el-table
  911. :data="relevantAttachments"
  912. ref="table"
  913. tooltip-effect="dark"
  914. border
  915. stripe
  916. style="width: 100%"
  917. height="150"
  918. >
  919. <el-table-column label="序号" type="index" width="80">
  920. </el-table-column>
  921. <el-table-column
  922. prop="fName"
  923. header-align="center"
  924. align="center"
  925. label="附件名称"
  926. >
  927. <template slot-scope="scope">
  928. <el-input
  929. v-model="scope.row.fName"
  930. :disabled="browseStatus"
  931. placeholder="附件名称"
  932. show-word-limit
  933. />
  934. </template>
  935. </el-table-column>
  936. <el-table-column
  937. prop="createBy"
  938. header-align="center"
  939. align="center"
  940. label="上传人"
  941. >
  942. <template slot-scope="scope">
  943. <el-input
  944. v-model="scope.row.createBy"
  945. :disabled="browseStatus"
  946. placeholder="上传人"
  947. show-word-limit
  948. />
  949. </template>
  950. </el-table-column>
  951. <el-table-column
  952. prop="createTime"
  953. header-align="center"
  954. align="center"
  955. label="上传时间"
  956. >
  957. <template slot-scope="scope">
  958. <el-date-picker
  959. v-model="scope.row.createTime"
  960. type="date"
  961. disabled
  962. placeholder="上传时间"
  963. format="yyyy-MM-dd HH:mm"
  964. value-format="timestamp"
  965. ></el-date-picker>
  966. </template>
  967. </el-table-column>
  968. <el-table-column
  969. prop="fUrl"
  970. header-align="center"
  971. align="center"
  972. width="250PX"
  973. label="上传附件"
  974. >
  975. <template slot-scope="scope">
  976. <uploadFile @input="showFile" v-model="scope.row.fUrl" />
  977. </template>
  978. </el-table-column>
  979. <el-table-column
  980. header-align="center"
  981. align="center"
  982. label="操作"
  983. width="130PX"
  984. >
  985. <template slot-scope="scope">
  986. <el-button
  987. @click.native.prevent="
  988. deleteRow(scope.$index, relevantAttachments)
  989. "
  990. :disabled="browseStatus"
  991. size="small"
  992. >移除
  993. </el-button>
  994. </template>
  995. </el-table-column>
  996. </el-table>
  997. <div class="dialogTableTitle flex a-center jlr">
  998. <h2>收款信息</h2>
  999. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  1000. >添加
  1001. </el-button>
  1002. </div>
  1003. <el-table
  1004. :data="warehouseDrList"
  1005. ref="table"
  1006. tooltip-effect="dark"
  1007. border
  1008. stripe
  1009. show-summary
  1010. >
  1011. <el-table-column label="序号" type="index" width="80">
  1012. </el-table-column>
  1013. <el-table-column
  1014. prop="fCorpid"
  1015. header-align="center"
  1016. align="center"
  1017. width="180px"
  1018. label="客户名称"
  1019. >
  1020. <template slot-scope="scope">
  1021. <el-select
  1022. v-model="scope.row.fCorpid"
  1023. filterable
  1024. remote
  1025. :remote-method="corpsRemoteMethod"
  1026. placeholder="客户名称"
  1027. >
  1028. <el-option
  1029. v-for="(dict,index) in KHblnoOptions"
  1030. :key="index.fId"
  1031. :label="dict.fName"
  1032. :value="dict.fId"
  1033. ></el-option>
  1034. </el-select>
  1035. </template>
  1036. </el-table-column>
  1037. <el-table-column
  1038. prop="fFeeid"
  1039. header-align="center"
  1040. align="center"
  1041. width="180px"
  1042. label="费用名称"
  1043. >
  1044. <template slot-scope="scope">
  1045. <el-select
  1046. v-model="scope.row.fFeeid"
  1047. filterable
  1048. remote
  1049. :remote-method="fWRemoteMethod"
  1050. placeholder="费用名称"
  1051. >
  1052. <el-option
  1053. v-for="(dict,index) in fWbuOptions"
  1054. :key="index.fId"
  1055. :label="dict.fName"
  1056. :value="dict.fId"
  1057. ></el-option>
  1058. </el-select>
  1059. </template>
  1060. </el-table-column>
  1061. <el-table-column
  1062. prop="fFeeunitid"
  1063. header-align="center"
  1064. align="center"
  1065. width="180px"
  1066. label="计价单位"
  1067. >
  1068. <template slot-scope="scope">
  1069. <el-select
  1070. v-model="scope.row.fFeeUnitid"
  1071. placeholder="请选择计价单位"
  1072. clearable
  1073. >
  1074. <el-option
  1075. v-for="(dict,index) in jFeetunitOptions"
  1076. :key="index.dictValue"
  1077. :label="dict.dictLabel"
  1078. :value="dict.dictValue"
  1079. />
  1080. </el-select>
  1081. </template>
  1082. </el-table-column>
  1083. <el-table-column
  1084. prop="fQty"
  1085. header-align="center"
  1086. align="center"
  1087. width="150px"
  1088. label="数量"
  1089. >
  1090. <template slot-scope="scope">
  1091. <el-input
  1092. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1093. v-model="scope.row.fQty"
  1094. placeholder="数量"
  1095. @change="changeEstmateAmt(scope.row)"
  1096. show-word-limit
  1097. />
  1098. </template>
  1099. </el-table-column>
  1100. <el-table-column
  1101. prop="fUnitprice"
  1102. header-align="center"
  1103. align="center"
  1104. width="150px"
  1105. label="单价"
  1106. >
  1107. <template slot-scope="scope">
  1108. <el-input
  1109. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1110. v-model="scope.row.fUnitprice"
  1111. placeholder="单价"
  1112. @change="changeContractAmt(scope.row)"
  1113. show-word-limit
  1114. />
  1115. </template>
  1116. </el-table-column>
  1117. <el-table-column
  1118. prop="fAmount"
  1119. header-align="center"
  1120. align="center"
  1121. width="150px"
  1122. label="金额"
  1123. >
  1124. <template slot-scope="scope">
  1125. <el-input
  1126. disabled
  1127. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1128. v-model="scope.row.fAmount"
  1129. placeholder="金额"
  1130. show-word-limit
  1131. />
  1132. </template>
  1133. </el-table-column>
  1134. <el-table-column
  1135. prop="fCurrency"
  1136. header-align="center"
  1137. align="center"
  1138. width="150px"
  1139. label="币别"
  1140. >
  1141. <template slot-scope="scope">
  1142. <el-input
  1143. v-model="scope.row.fCurrency"
  1144. :disabled="browseStatus"
  1145. placeholder="币别"
  1146. show-word-limit
  1147. />
  1148. </template>
  1149. </el-table-column>
  1150. <el-table-column
  1151. prop="fExrate"
  1152. header-align="center"
  1153. align="center"
  1154. width="150px"
  1155. label="汇率"
  1156. >
  1157. <template slot-scope="scope">
  1158. <el-input
  1159. v-model="scope.row.fExrate"
  1160. :disabled="browseStatus"
  1161. placeholder="汇率"
  1162. show-word-limit
  1163. />
  1164. </template>
  1165. </el-table-column>
  1166. <el-table-column
  1167. prop="fTaxrate"
  1168. header-align="center"
  1169. align="center"
  1170. width="150px"
  1171. label="税率"
  1172. >
  1173. <template slot-scope="scope">
  1174. <el-input
  1175. v-model="scope.row.fTaxrate"
  1176. :disabled="browseStatus"
  1177. placeholder="税率"
  1178. show-word-limit
  1179. />
  1180. </template>
  1181. </el-table-column>
  1182. <el-table-column
  1183. prop="remarks"
  1184. header-align="center"
  1185. align="center"
  1186. width="150px"
  1187. label="备注"
  1188. >
  1189. <template slot-scope="scope">
  1190. <el-input
  1191. v-model="scope.row.remarks"
  1192. :disabled="browseStatus"
  1193. placeholder="备注"
  1194. show-word-limit
  1195. />
  1196. </template>
  1197. </el-table-column>
  1198. <el-table-column
  1199. header-align="center"
  1200. align="center"
  1201. label="操作"
  1202. width="150px"
  1203. >
  1204. <template slot-scope="scope">
  1205. <el-button size="small">审核费用</el-button>
  1206. <el-button
  1207. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1208. size="small"
  1209. >移除</el-button
  1210. >
  1211. </template>
  1212. </el-table-column>
  1213. </el-table>
  1214. <div class="dialogTableTitle flex a-center jlr">
  1215. <h2>付款信息</h2>
  1216. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1217. >添加
  1218. </el-button>
  1219. </div>
  1220. <el-table
  1221. :data="warehouseCrList"
  1222. ref="table"
  1223. tooltip-effect="dark"
  1224. border
  1225. stripe
  1226. show-summary
  1227. >
  1228. <el-table-column label="序号" type="index" width="80">
  1229. </el-table-column>
  1230. <el-table-column
  1231. prop="fCorpid"
  1232. header-align="center"
  1233. align="center"
  1234. width="180px"
  1235. label="客户名称"
  1236. >
  1237. <template slot-scope="scope">
  1238. <el-select
  1239. v-model="scope.row.fCorpid"
  1240. filterable
  1241. remote
  1242. :remote-method="corpsRemoteMethod"
  1243. placeholder="客户名称"
  1244. >
  1245. <el-option
  1246. v-for="(dict, index) in KHblnoOptions"
  1247. :key="index.fId"
  1248. :label="dict.fName"
  1249. :value="dict.fId"
  1250. ></el-option>
  1251. </el-select>
  1252. </template>
  1253. </el-table-column>
  1254. <el-table-column
  1255. prop="fFeeid"
  1256. header-align="center"
  1257. align="center"
  1258. width="180px"
  1259. label="费用名称"
  1260. >
  1261. <template slot-scope="scope">
  1262. <el-select
  1263. v-model="scope.row.fFeeid"
  1264. filterable
  1265. remote
  1266. :remote-method="fWRemoteMethod"
  1267. placeholder="费用名称"
  1268. >
  1269. <el-option
  1270. v-for="(dict,index) in fWbuOptions"
  1271. :key="index.fId"
  1272. :label="dict.fName"
  1273. :value="dict.fId"
  1274. ></el-option>
  1275. </el-select>
  1276. </template>
  1277. </el-table-column>
  1278. <el-table-column
  1279. prop="fFeeUnitid"
  1280. header-align="center"
  1281. align="center"
  1282. width="180px"
  1283. label="计价单位"
  1284. >
  1285. <template slot-scope="scope">
  1286. <el-select
  1287. v-model="scope.row.fFeeUnitid"
  1288. filterable
  1289. remote
  1290. :remote-method="corpsRemoteMethod"
  1291. placeholder="计价单位"
  1292. >
  1293. <el-option
  1294. v-for="(dict, index) in jFeetunitOptions"
  1295. :key="index.dictValue"
  1296. :label="dict.dictLabel"
  1297. :value="dict.dictValue"
  1298. ></el-option>
  1299. </el-select>
  1300. </template>
  1301. </el-table-column>
  1302. <el-table-column
  1303. prop="fQty"
  1304. header-align="center"
  1305. align="center"
  1306. width="150px"
  1307. label="数量"
  1308. >
  1309. <template slot-scope="scope">
  1310. <el-input
  1311. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1312. v-model="scope.row.fQty"
  1313. @change="changeEstmateAmt(scope.row)"
  1314. placeholder="数量"
  1315. show-word-limit
  1316. />
  1317. </template>
  1318. </el-table-column>
  1319. <el-table-column
  1320. prop="fUnitprice"
  1321. header-align="center"
  1322. align="center"
  1323. width="150px"
  1324. label="单价"
  1325. >
  1326. <template slot-scope="scope">
  1327. <el-input
  1328. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1329. v-model="scope.row.fUnitprice"
  1330. @change="changeContractAmt(scope.row)"
  1331. placeholder="单价"
  1332. show-word-limit
  1333. />
  1334. </template>
  1335. </el-table-column>
  1336. <el-table-column
  1337. prop="fAmount"
  1338. header-align="center"
  1339. align="center"
  1340. width="150px"
  1341. label="金额"
  1342. >
  1343. <template slot-scope="scope">
  1344. <el-input
  1345. disabled
  1346. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1347. v-model="scope.row.fAmount"
  1348. placeholder="金额"
  1349. show-word-limit
  1350. />
  1351. </template>
  1352. </el-table-column>
  1353. <el-table-column
  1354. prop="fCurrency"
  1355. header-align="center"
  1356. align="center"
  1357. width="150px"
  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="fExrate"
  1371. header-align="center"
  1372. align="center"
  1373. width="150px"
  1374. label="汇率"
  1375. >
  1376. <template slot-scope="scope">
  1377. <el-input
  1378. v-model="scope.row.fExrate"
  1379. :disabled="browseStatus"
  1380. placeholder="汇率"
  1381. show-word-limit
  1382. />
  1383. </template>
  1384. </el-table-column>
  1385. <el-table-column
  1386. prop="fTaxrate"
  1387. header-align="center"
  1388. align="center"
  1389. width="150px"
  1390. label="税率"
  1391. >
  1392. <template slot-scope="scope">
  1393. <el-input
  1394. v-model="scope.row.fTaxrate"
  1395. :disabled="browseStatus"
  1396. placeholder="税率"
  1397. show-word-limit
  1398. />
  1399. </template>
  1400. </el-table-column>
  1401. <el-table-column
  1402. prop="remarks"
  1403. header-align="center"
  1404. align="center"
  1405. width="150px"
  1406. label="备注"
  1407. >
  1408. <template slot-scope="scope">
  1409. <el-input
  1410. v-model="scope.row.remarks"
  1411. :disabled="browseStatus"
  1412. placeholder="备注"
  1413. show-word-limit
  1414. />
  1415. </template>
  1416. </el-table-column>
  1417. <el-table-column
  1418. header-align="center"
  1419. align="center"
  1420. width="150px"
  1421. label="操作"
  1422. >
  1423. <template slot-scope="scope">
  1424. <el-button size="small">审核费用</el-button>
  1425. <el-button
  1426. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  1427. size="small"
  1428. >移除</el-button
  1429. >
  1430. </template>
  1431. </el-table-column>
  1432. </el-table>
  1433. <div slot="footer" class="dialog-footer">
  1434. <el-button
  1435. type="danger"
  1436. size="mini"
  1437. prop="打印"
  1438. @click="showEditDialog_ss"
  1439. >收货单
  1440. </el-button>
  1441. <el-button
  1442. type="danger"
  1443. size="mini"
  1444. prop="打印"
  1445. @click="showEditDialog_s"
  1446. >入库单
  1447. </el-button>
  1448. <el-button type="primary" @click="submitForm(2)">暂 存</el-button>
  1449. <el-button type="primary" @click="submitForm(6)">提 交</el-button>
  1450. <el-button @click="cancel">取 消</el-button>
  1451. </div>
  1452. <el-dialog
  1453. title="入库页面"
  1454. :modal="false"
  1455. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1456. :visible.sync="editDialogVisible_s"
  1457. width="70%"
  1458. >
  1459. <table
  1460. id="print_area"
  1461. class="biaoge zzss"
  1462. border="1"
  1463. style="border-collapse: collapse; border: none"
  1464. >
  1465. <tr>
  1466. <td
  1467. width="100"
  1468. colspan="7"
  1469. class="zzss"
  1470. style="font-size: 28px; font-weight: bold; border: none"
  1471. >
  1472. 青岛大木进进仓单
  1473. </td>
  1474. </tr>
  1475. <tr>
  1476. <td
  1477. width="100"
  1478. colspan="7"
  1479. class="zzss"
  1480. style="font-size: 28px; font-weight: bold; border: none"
  1481. >
  1482. &nbsp;
  1483. </td>
  1484. </tr>
  1485. <tr>
  1486. <td width="450" colspan="2" class="zzss">货权方:某某有限公司</td>
  1487. <td width="450" colspan="2" class="zzss">仓库:某某3号大仓</td>
  1488. <td width="450" colspan="3" class="zzss">
  1489. 地址:青岛市市北区郑州路1344号
  1490. </td>
  1491. </tr>
  1492. <tr>
  1493. <td width="200" colspan="2" class="zzss">保管方:某某有限公司</td>
  1494. <td width="200" colspan="2" class="zzss">联系人:张三</td>
  1495. <td width="200" colspan="3" class="zzss">
  1496. 电话:0532-561651561-546
  1497. </td>
  1498. </tr>
  1499. <tr>
  1500. <td width="100" border="1">提单号</td>
  1501. <td width="100">品名</td>
  1502. <td width="100">箱型</td>
  1503. <td width="100">品牌</td>
  1504. <td width="100">件数</td>
  1505. <td width="100">重量</td>
  1506. <td width="100">包装规格</td>
  1507. </tr>
  1508. <tr>
  1509. <td width="100">56165654555</td>
  1510. <td width="100">某某商品</td>
  1511. <td width="100">20GP</td>
  1512. <td width="100">某某</td>
  1513. <td width="100">包</td>
  1514. <td width="100">吨</td>
  1515. <td width="100">50kg</td>
  1516. </tr>
  1517. <tr>
  1518. <td width="100">序号</td>
  1519. <td width="100">入货日期</td>
  1520. <td width="100">箱量(20GP)</td>
  1521. <td width="100">重量</td>
  1522. <td width="100">件数</td>
  1523. <td width="100">入库重量</td>
  1524. <td width="100">入库件数</td>
  1525. </tr>
  1526. <tr>
  1527. <td width="100">1</td>
  1528. <td width="100">2020-11-20</td>
  1529. <td width="100">10</td>
  1530. <td width="100">100</td>
  1531. <td width="100">10000</td>
  1532. <td width="100">20</td>
  1533. <td width="100">3000</td>
  1534. </tr>
  1535. <tr>
  1536. <td width="100">2</td>
  1537. <td width="100">2020-11-20</td>
  1538. <td width="100">10</td>
  1539. <td width="100">100</td>
  1540. <td width="100">10000</td>
  1541. <td width="100">20</td>
  1542. <td width="100">3000</td>
  1543. </tr>
  1544. <tr>
  1545. <td width="100">3</td>
  1546. <td width="100">2020-11-20</td>
  1547. <td width="100">10</td>
  1548. <td width="100">100</td>
  1549. <td width="100">10000</td>
  1550. <td width="100">20</td>
  1551. <td width="100">3000</td>
  1552. </tr>
  1553. <tr>
  1554. <td width="100">4</td>
  1555. <td width="100">2020-11-20</td>
  1556. <td width="100">10</td>
  1557. <td width="100">100</td>
  1558. <td width="100">10000</td>
  1559. <td width="100">20</td>
  1560. <td width="100">3000</td>
  1561. </tr>
  1562. <tr>
  1563. <td width="100">5</td>
  1564. <td width="100">2020-11-20</td>
  1565. <td width="100">10</td>
  1566. <td width="100">100</td>
  1567. <td width="100">10000</td>
  1568. <td width="100">20</td>
  1569. <td width="100">3000</td>
  1570. </tr>
  1571. <tr>
  1572. <td width="100">6</td>
  1573. <td width="100">2020-11-20</td>
  1574. <td width="100">10</td>
  1575. <td width="100">100</td>
  1576. <td width="100">10000</td>
  1577. <td width="100">20</td>
  1578. <td width="100">3000</td>
  1579. </tr>
  1580. <tr>
  1581. <td width="100">7</td>
  1582. <td width="100">2020-11-20</td>
  1583. <td width="100">10</td>
  1584. <td width="100">100</td>
  1585. <td width="100">10000</td>
  1586. <td width="100">20</td>
  1587. <td width="100">3000</td>
  1588. </tr>
  1589. <tr>
  1590. <td width="100" colspan="2">合计:</td>
  1591. <td width="100">10</td>
  1592. <td width="100">100</td>
  1593. <td width="100">10000</td>
  1594. <td width="100">20</td>
  1595. <td width="100">3000</td>
  1596. </tr>
  1597. <tr>
  1598. <td width="100">备注:</td>
  1599. <td width="100" colspan="6"></td>
  1600. </tr>
  1601. <tr>
  1602. <td width="100" colspan="7" class="zzss">
  1603. 本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
  1604. </td>
  1605. </tr>
  1606. <tr style="border: none">
  1607. <td width="100" colspan="2" class="zzss" style="border: none">
  1608. 开单员:
  1609. </td>
  1610. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  1611. <td width="100" colspan="2" class="zzss" style="border: none">
  1612. 仓管员:张三
  1613. </td>
  1614. </tr>
  1615. <tr style="border: none">
  1616. <td width="100" colspan="2" class="zzss" style="border: none">
  1617. 开单时间:
  1618. </td>
  1619. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  1620. <td width="100" colspan="2" class="zzss" style="border: none">
  1621. (盖章)
  1622. </td>
  1623. </tr>
  1624. </table>
  1625. <button @click="printSomething">打印</button>
  1626. </el-dialog>
  1627. <el-dialog
  1628. title="收货单打印"
  1629. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1630. :visible.sync="editDialogVisible_ss"
  1631. width="70%"
  1632. :modal="false"
  1633. >
  1634. <table
  1635. id="print_area"
  1636. class="biaoge zzss"
  1637. border="1"
  1638. style="border-collapse: collapse; border: none"
  1639. >
  1640. <tr>
  1641. <td
  1642. width="1400"
  1643. colspan="6"
  1644. class="zzss"
  1645. style="font-size: 28px; font-weight: bold; border: none"
  1646. >
  1647. 大木国际物流(青岛)有限公司收货单
  1648. </td>
  1649. </tr>
  1650. <tr>
  1651. <td
  1652. width="900"
  1653. colspan="4"
  1654. class="zzss"
  1655. style="font-size: 28px; font-weight: bold"
  1656. >
  1657. &nbsp;
  1658. </td>
  1659. <td
  1660. width="500"
  1661. colspan="2"
  1662. style="padding-bottom: 0px; font-weight: bold; border: none"
  1663. class="zzss"
  1664. >
  1665. 出库日期:2020-11-20
  1666. </td>
  1667. </tr>
  1668. <tr>
  1669. <td width="200">车号</td>
  1670. <td width="200">苏HFN751</td>
  1671. <td width="200">货物品名</td>
  1672. <td width="200" colspan="4" class="zzss">某某商品名</td>
  1673. </tr>
  1674. <tr>
  1675. <td width="1400" colspan="6">&nbsp;</td>
  1676. </tr>
  1677. <tr>
  1678. <td>备注:</td>
  1679. <td colspan="5"></td>
  1680. </tr>
  1681. <tr>
  1682. <td>收费</td>
  1683. <td>装箱费</td>
  1684. <td>100元</td>
  1685. <td colspan="4">办单费:5元,过磅费自理</td>
  1686. </tr>
  1687. <tr>
  1688. <td>司机签字:</td>
  1689. <td></td>
  1690. <td>电话</td>
  1691. <td>15896154516</td>
  1692. <td colspan="2" rowspan="2">
  1693. 确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
  1694. </td>
  1695. </tr>
  1696. <tr>
  1697. <td>制表:</td>
  1698. <td>张三</td>
  1699. <td>机械/人工:</td>
  1700. <td></td>
  1701. </tr>
  1702. <tr>
  1703. <td colspan="6" class="zzss">&nbsp;</td>
  1704. </tr>
  1705. <tr>
  1706. <td width="280" class="zzss"></td>
  1707. <td width="280" class="zzss"></td>
  1708. <td width="280" class="zzss"></td>
  1709. <td width="280" class="zzss"></td>
  1710. <td width="290" class="zzss">地址:淮河东路96号</td>
  1711. <td width="290" class="zzss">电话:18685818919</td>
  1712. </tr>
  1713. </table>
  1714. <button @click="printSomething">打印</button>
  1715. </el-dialog>
  1716. </el-dialog>
  1717. </div>
  1718. </template>
  1719. <script>
  1720. import print from "print-js";
  1721. import {
  1722. listWarehousebills,
  1723. getWarehousebills,
  1724. delWarehousebills,
  1725. addWarehousebills,
  1726. updateWarehousebills,
  1727. exportWarehousebills,
  1728. } from "@/api/warehouseBusiness/warehouseInStock";
  1729. import { listCorps } from "@/api/basicdata/corps";
  1730. import { listFees } from "@/api/basicdata/fees";
  1731. import { listWarehouse } from "@/api/basicdata/warehouse";
  1732. import { listArea } from "@/api/basicdata/area";
  1733. import { listGoods } from "@/api/basicdata/goods";
  1734. import { listUser, queryUserVal } from "@/api/system/user";
  1735. import UploadFile from "@/components/Uploadfile";
  1736. export default {
  1737. name: "Warehousebills",
  1738. components: {
  1739. UploadFile,
  1740. },
  1741. data() {
  1742. return {
  1743. // 修改查看状态
  1744. browseStatus: false,
  1745. fPlangrossweight:"",
  1746. fPlannetweight:"",
  1747. fPlanvolumn: "",
  1748. fPlanqty: "",
  1749. fGrossweight:"",
  1750. fNetweight:"",
  1751. fQty:"",
  1752. fPlangrossweight: 0,
  1753. // 遮罩层
  1754. loading: true,
  1755. // 选中数组
  1756. ids: [],
  1757. userVal: {
  1758. userName: null,
  1759. nickName: null,
  1760. deptId: null,
  1761. },
  1762. queryForm: {},
  1763. // 添加用户对话框
  1764. editDialogVisible_s: false,
  1765. editDialogVisible_ss: false,
  1766. editDialogClosed_ss: false,
  1767. dataList: [],
  1768. warehouseCrList: [],
  1769. warehouseDrList: [],
  1770. browseStatus: false,
  1771. relevantAttachments: [],
  1772. // 非单个禁用
  1773. single: true,
  1774. // 非多个禁用
  1775. multiple: true,
  1776. // 显示搜索条件
  1777. showSearch: true,
  1778. // 总条数
  1779. total: 0,
  1780. // 仓库主(出入库)表格数据
  1781. warehousebillsList: [],
  1782. // 弹出层标题
  1783. title: "",
  1784. // 是否显示弹出层
  1785. open: false,
  1786. // 货权方(客户数据)
  1787. fMblnoOptions: [],
  1788. // 货权方(客户数据)
  1789. // 客户名称
  1790. KHblnoOptions: [],
  1791. fSbuOptions: [],
  1792. // 操作员
  1793. userOptions: [],
  1794. // 操作员
  1795. goodsOptions: [],
  1796. // 制单部门
  1797. deptOptions: [],
  1798. // 仓库(仓库数据)
  1799. warehouseOptions: [],
  1800. kqhouseOptions: [],
  1801. // 贸易方式(数据字典),对应t_trademodels 字典
  1802. fTrademodeidOptions: [],
  1803. // 计费单位(数据字典),下拉选择毛重或净重字典
  1804. fFeetunitOptions: [],
  1805. // 结算方式(数据字典),下拉选择字典
  1806. fStltypeOptions: [],
  1807. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  1808. fIfweighOptions: [],
  1809. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  1810. fIfpledgeOptions: [],
  1811. // 是否破损(数据字典),默认F否则T字典
  1812. fIfdamageOptions: [],
  1813. // 单据类型(数据字典)SJRK字典
  1814. fBilltypeOptions: [],
  1815. // 状态(数据字典),N 入字典
  1816. fBillstatusOptions: [],
  1817. // 费用名称
  1818. fWbuOptions: [],
  1819. // 计价单位
  1820. jFeetunitOptions: [],
  1821. // 查询参数
  1822. queryParams: {
  1823. pageNum: 1,
  1824. pageSize: 10,
  1825. fBillno: null,
  1826. createBy: null,
  1827. createTime: null,
  1828. fCustomsdeclartion: null,
  1829. fOriginalbillno: null,
  1830. fDeptid: null,
  1831. fBsdeptid: null,
  1832. fContacts: null,
  1833. fTel: null,
  1834. fCorpid: null,
  1835. fTocorpid: null,
  1836. fStltypeid: null,
  1837. fBscorpno: null,
  1838. fWarehouseid: null,
  1839. fStorekeeper: null,
  1840. fBsdate: null,
  1841. fPlanqty: null,
  1842. fPlangrossweight: null,
  1843. fPlannetweight: null,
  1844. fPlanvolumn: null,
  1845. fQty: null,
  1846. fGrossweight: null,
  1847. fNetweight: null,
  1848. fVolumn: null,
  1849. fTrademodeid: null,
  1850. fSbu: null,
  1851. fFeetunit: null,
  1852. fMblno: null,
  1853. fVslvoy: null,
  1854. fEta: null,
  1855. fCustomno: null,
  1856. fIfweigh: null,
  1857. fIfpledge: null,
  1858. fIfdamage: null,
  1859. fBankcorpid: null,
  1860. fBilltype: null,
  1861. fBillstatus: null,
  1862. fCreateby: null,
  1863. fCreatetime: null,
  1864. fGoodsid: null,
  1865. fCntrtype: null,
  1866. fCntqty: null,
  1867. },
  1868. // 表单参数
  1869. form: {},
  1870. // 表单校验
  1871. rules: {
  1872. fDeptid: [
  1873. { required: true, message: "制单部门不能为空", trigger: "blur" },
  1874. ],
  1875. fMblno: [{ required: true, message: "请输入提单号", trigger: "blur" }],
  1876. fBsdeptid: [
  1877. { required: true, message: "业务所属部门不能为空", trigger: "blur" },
  1878. ],
  1879. fCorpid: [
  1880. {
  1881. required: true,
  1882. message: "请选择货权方",
  1883. trigger: "blur",
  1884. },
  1885. ],
  1886. fBsdate: [
  1887. { required: true, message: "请选择业务日期", trigger: "blur" },
  1888. ],
  1889. fTrademodeid: [
  1890. { required: true, message: "请选择贸易方式", trigger: "blur" },
  1891. ],
  1892. fSbu: [
  1893. { required: true, message: "请选择经营单位", trigger: "blur" },
  1894. ],
  1895. fStorekeeper: {
  1896. required: true,
  1897. message: "请输入仓管员",
  1898. trigger: "blur",
  1899. },
  1900. fWarehouseid: [
  1901. { required: true, message: "请选择仓库", trigger: "blur" },
  1902. ],
  1903. fbillingway: [
  1904. {
  1905. required: true,
  1906. message: "请选择结算方式",
  1907. trigger: "blur",
  1908. },
  1909. ],
  1910. fTocorpid: [
  1911. {
  1912. required: true,
  1913. message:
  1914. "货转客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name,自有在货权转移是该字段有效不能为空",
  1915. trigger: "blur",
  1916. },
  1917. ],
  1918. },
  1919. };
  1920. },
  1921. created() {
  1922. this.getList();
  1923. this.getDicts("data_trademodes").then((response) => {
  1924. this.fTrademodeidOptions = response.data;
  1925. });
  1926. this.getDicts("data_unitfees").then((response) => {
  1927. this.fFeetunitOptions = response.data;
  1928. this.jFeetunitOptions = JSON.parse(JSON.stringify(response.data))
  1929. });
  1930. this.getDicts("data_stltype_type").then((response) => {
  1931. this.fStltypeOptions = response.data;
  1932. });
  1933. this.getDicts("data_ifweigh_status").then((response) => {
  1934. this.fIfweighOptions = response.data;
  1935. });
  1936. this.getDicts("data_ifpledge_status").then((response) => {
  1937. this.fIfpledgeOptions = response.data;
  1938. });
  1939. this.getDicts("data_ifdamage_status").then((response) => {
  1940. this.fIfdamageOptions = response.data;
  1941. });
  1942. this.getDicts("data_billtype_type").then((response) => {
  1943. this.fBilltypeOptions = response.data;
  1944. });
  1945. this.getDicts("sys_common_status").then((response) => {
  1946. this.fBillstatusOptions = response.data;
  1947. });
  1948. },
  1949. methods: {
  1950. // 上传成功返回数据
  1951. showFile(row) {
  1952. // this.$set(this.relevantAttachments[0], 'fName', row.fileName)
  1953. this.$set(this.relevantAttachments[0], "fUrl", row.url);
  1954. },
  1955. printSomething() {
  1956. // 此处的style即为打印时的样式
  1957. const style =
  1958. "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
  1959. print({
  1960. printable: "print_area",
  1961. type: "html",
  1962. style: style, // 亦可使用引入的外部css;
  1963. scanStyles: false,
  1964. });
  1965. },
  1966. // 添加附件上传
  1967. addRelevt() {
  1968. this.relevantAttachments.push({
  1969. fUrl: null,
  1970. fName: null,
  1971. createBy: this.queryParams.createBy,
  1972. createTime: Date.parse(new Date()),
  1973. });
  1974. },
  1975. // 添加list
  1976. addRelevant() {
  1977. let time = null
  1978. if (this.form.fBsdate) {
  1979. time = this.form.fBsdate
  1980. }
  1981. this.dataList.push({
  1982. fBsdate: time,
  1983. fGoodsid: null,
  1984. fCntrtype: null,
  1985. fCntqty: null,
  1986. fPlangrossweight: null,
  1987. fPlanvolumn: null,
  1988. fPlanqty: null,
  1989. fGrossweight: null,
  1990. fQty: null,
  1991. fPackagespecs: null,
  1992. fWarehouselocid: null,
  1993. fBoxno: null,
  1994. fGoodsval: null,
  1995. fTruckno: null,
  1996. remark: null,
  1997. })
  1998. },
  1999. // 收货单打印界面
  2000. showEditDialog_s() {
  2001. this.editDialogVisible_s = true;
  2002. },
  2003. showEditDialog_ss() {
  2004. this.editDialogVisible_ss = true;
  2005. },
  2006. // 收款信息
  2007. addCollection() {
  2008. this.warehouseDrList.push({
  2009. fCorpid: null,
  2010. fFeeid: null,
  2011. fFeeUnitid: null,
  2012. fQty: null,
  2013. fUnitprice: null,
  2014. fAmount: null,
  2015. fCurrency: null,
  2016. fCxrate: null,
  2017. fRate: null,
  2018. remarks: null,
  2019. });
  2020. },
  2021. addpayment() {
  2022. this.warehouseCrList.push({
  2023. fCorpid: null,
  2024. fFeeid: null,
  2025. fFeeUnitid: null,
  2026. fQty: null,
  2027. fUnitprice: null,
  2028. fAmount: null,
  2029. fCurrency: null,
  2030. fCxrate: null,
  2031. fRate: null,
  2032. remarks: null,
  2033. })
  2034. },
  2035. queryUser() {
  2036. queryUserVal().then((response) => {
  2037. if (response.user !== null) {
  2038. this.userVal = response.user;
  2039. this.$set(this.form, "fDeptid", this.userVal.deptId);
  2040. this.$set(this.form, "createBy", this.userVal.userName);
  2041. // this.$set(this.relevantAttachments, "opUserName", this.userVal.userName);
  2042. this.$set(this.form, "createTime", Date.parse(new Date()));
  2043. }
  2044. if (response.dept !== null) {
  2045. this.deptOptions = [];
  2046. this.deptOptions.push(response.dept);
  2047. }
  2048. });
  2049. },
  2050. /** 查询仓库主(出入库)列表 */
  2051. getList() {
  2052. this.loading = true;
  2053. listWarehousebills(this.queryParams).then((response) => {
  2054. this.warehousebillsList = response.rows
  2055. console.log(response.rows)
  2056. this.total = response.total
  2057. this.loading = false
  2058. });
  2059. },
  2060. // 贸易方式(数据字典),对���t_trademodels 字典翻译
  2061. fTrademodeidFormat(row, column) {
  2062. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  2063. },
  2064. // 计费单位(数据字典),下拉选择毛重或净重字典翻译
  2065. fFeetunitFormat(row, column) {
  2066. return this.selectDictLabel(this.fFeetunitOptions, row.fFeetunit);
  2067. },
  2068. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  2069. fIfweighFormat(row, column) {
  2070. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  2071. },
  2072. // 编号字典翻译
  2073. fStltypeidFormat(row, column) {
  2074. return this.selectDictLabel(this.fStltypeOptions, row.fStltypeid);
  2075. },
  2076. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  2077. fIfpledgeFormat(row, column) {
  2078. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge);
  2079. },
  2080. // 是否破损(数据字典),默认F否则T字典翻译
  2081. fIfdamageFormat(row, column) {
  2082. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  2083. },
  2084. // 单据类型(数据字典)SJRK字典翻译
  2085. fBilltypeFormat(row, column) {
  2086. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  2087. },
  2088. // 状态(数据字典),N 入字典翻译
  2089. fBillstatusFormat(row, column) {
  2090. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  2091. },
  2092. // 取消按钮
  2093. cancel() {
  2094. this.open = false;
  2095. this.reset();
  2096. },
  2097. // 表单重置
  2098. reset() {
  2099. this.form = {
  2100. fId: null,
  2101. fBillno: null,
  2102. fCustomsdeclartion: null,
  2103. fOriginalbillno: null,
  2104. fDeptid: null,
  2105. fBsdeptid: null,
  2106. fContacts: null,
  2107. fTel: null,
  2108. fCorpid: null,
  2109. fTocorpid: null,
  2110. fStltypeid: null,
  2111. fBscorpno: null,
  2112. fWarehouseid: null,
  2113. fStorekeeper: null,
  2114. fBsdate: null,
  2115. fPlanqty: null,
  2116. fPlangrossweight: null,
  2117. fPlannetweight: null,
  2118. fPlanvolumn: null,
  2119. fQty: null,
  2120. fGrossweight: null,
  2121. fNetweight: null,
  2122. fVolumn: null,
  2123. fTrademodeid: null,
  2124. fSbu: null,
  2125. fFeetunit: null,
  2126. fMblno: null,
  2127. fVslvoy: null,
  2128. fEta: null,
  2129. fCustomno: null,
  2130. fIfweigh: null,
  2131. fIfpledge: null,
  2132. fIfdamage: null,
  2133. fBankcorpid: null,
  2134. fBilltype: null,
  2135. fBillstatus: null,
  2136. delFlag: null,
  2137. createBy: null,
  2138. createTime: null,
  2139. updateBy: null,
  2140. updateTime: null,
  2141. remark: null,
  2142. fCreateby: null,
  2143. fCreatetime: null,
  2144. fGoodsid: null,
  2145. fCntrtype: null,
  2146. fCntqty: null,
  2147. };
  2148. this.resetForm("form");
  2149. },
  2150. /** 搜索按钮操作 */
  2151. handleQuery() {
  2152. this.queryParams.pageNum = 1;
  2153. this.getList();
  2154. },
  2155. /** 重置按钮操作 */
  2156. resetQuery() {
  2157. this.resetForm("queryForm");
  2158. this.handleQuery();
  2159. },
  2160. // 多选框选中数据
  2161. handleSelectionChange(selection) {
  2162. this.ids = selection.map((item) => item.fId);
  2163. this.single = selection.length !== 1;
  2164. this.multiple = !selection.length;
  2165. },
  2166. /** 新增按钮操作 */
  2167. handleAdd() {
  2168. this.reset();
  2169. this.queryUser();
  2170. this.open = true;
  2171. this.dataList = [];
  2172. this.warehouseCrList = [];
  2173. this.warehouseDrList = [];
  2174. this.relevantAttachments = [];
  2175. this.title = "入库单";
  2176. },
  2177. /** 修改按钮操作 */
  2178. handleUpdate(row, status) {
  2179. console.log(status)
  2180. console.log(this.form)
  2181. this.browseStatus = status
  2182. this.reset();
  2183. const fId = row.fId || this.ids;
  2184. getWarehousebills(fId).then((response) => {
  2185. this.form = response.data.warehousebills
  2186. this.fMblnoOptions = response.data.corps
  2187. this.KHblnoOptions = response.data.corps
  2188. this.fSbuOptions = response.data.corps
  2189. this.fWbuOptions = response.data.feesList
  2190. this.warehouseOptions = response.data.warehouse;
  2191. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2192. this.$set(this.form,'fEta', Date.parse(this.form.fEta))
  2193. this.$set(this.form,'createTime', Date.parse(this.form.createTime))
  2194. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2195. this.dataList = response.data.warehouseBillsItem;
  2196. for (let list in this.dataList) {
  2197. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2198. }
  2199. this.goodsOptions = response.data.goodsList
  2200. this.kqhouseOptions = response.data.warehouseAreas
  2201. this.relevantAttachments = response.data.enclosures
  2202. this.warehouseDrList = response.data.warehousebillsfeesDr
  2203. for (let dr in this.warehouseDrList) {
  2204. this.$set(this.warehouseDrList[dr], 'fFeeUnitid', this.warehouseDrList[dr].fFeeUnitid + "")
  2205. }
  2206. this.warehouseCrList = response.data.warehousebillsfeesCr
  2207. for (let cr in this.warehouseCrList) {
  2208. this.$set(this.warehouseCrList[cr], 'fFeeUnitid', this.warehouseCrList[cr].fFeeUnitid + "")
  2209. }
  2210. this.userOptions = response.data.sysUser;
  2211. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate))
  2212. this.open = true;
  2213. this.title = "修改仓入库)";
  2214. });
  2215. },
  2216. // 合计
  2217. getSummaries (param) {
  2218. console.log(param)
  2219.         const {columns, data} = param
  2220.          const sums = []
  2221.          var values = []
  2222.       columns.forEach((column, index) => {
  2223. if (index === 0) {
  2224. sums[index] = '总价'
  2225. return
  2226. }
  2227.         if (column.property === 'fPlangrossweight') {
  2228.             values = data.map(item => Number(item['fPlangrossweight']))
  2229.           }
  2230.           if (column.property === 'fPlannetweight') {
  2231.             values = data.map(item => Number(item['fPlannetweight']))
  2232.           }
  2233.           if (column.property === 'fPlanvolumn') {
  2234.             values = data.map(item => Number(item['fPlanvolumn']))
  2235.           }
  2236.           if (column.property === 'fPlanqty') {
  2237.             values = data.map(item => Number(item['fPlanqty']))
  2238.           }
  2239.           if (column.property === 'fGrossweight') {
  2240.             values = data.map(item => Number(item['fGrossweight']))
  2241.           }
  2242.           if (column.property === 'fNetweight') {
  2243.             values = data.map(item => Number(item['fNetweight']))
  2244.           }
  2245.           if (column.property === 'fQty') {
  2246.             values = data.map(item => Number(item['fQty']))
  2247.           }
  2248.         
  2249.         // const values = data.map(item => Number(item[column.property]))
  2250.         if (column.property === 'fPlangrossweight' || column.property === 'fPlannetweight' || column.property === 'fPlanvolumn'|| column.property === 'fPlanqty'|| column.property === 'fGrossweight'|| column.property === 'fNetweight'|| column.property === 'fQty') {
  2251.           sums[index] = values.reduce((prev, curr) => {
  2252.             const value = Number(curr)
  2253.             if (!isNaN(value)) {
  2254. if (column.property === 'fPlangrossweight') {
  2255. this.fPlangrossweight = prev + curr
  2256. }
  2257. if (column.property === 'fPlannetweight') {
  2258. this.fPlannetweight = prev + curr
  2259. }
  2260. if (column.property === 'fPlanvolumn') {
  2261. this.fPlanvolumn = prev + curr
  2262. }
  2263. if (column.property === 'fPlanqty') {
  2264. this.fPlanqty = prev + curr
  2265. }
  2266. if (column.property === 'fGrossweight') {
  2267. this.fGrossweight = prev + curr
  2268. }
  2269. if (column.property === 'fNetweight') {
  2270. this.fNetweight = prev + curr
  2271. }
  2272. if (column.property === 'fQty') {
  2273. this.fQty = prev + curr
  2274. }
  2275.               return prev + curr
  2276.             } else {
  2277.               return prev
  2278.             }
  2279.           }, 0)
  2280.           // sums[index]
  2281.         }
  2282.       })
  2283.     this.sums = sums
  2284.    return sums
  2285. },
  2286. // 数量计算
  2287. changeContractAmt(row) {
  2288. if (row.fUnitprice !== "") {
  2289. if (row.fQty !== "") {
  2290. this.$set(
  2291. row,
  2292. "fAmount",
  2293. Number(row.fUnitprice) * Number(row.fQty)
  2294. ).toFixed(2);
  2295. } else {
  2296. this.$set(row, "fAmount", row.fUnitprice);
  2297. }
  2298. }
  2299. },
  2300. changeEstmateAmt(row) {
  2301. if (row.fUnitprice !== "") {
  2302. if (row.fQty !== "") {
  2303. this.$set(
  2304. row,
  2305. "fAmount",
  2306. Number(row.fUnitprice) * Number(row.fQty)
  2307. ).toFixed(2);
  2308. } else {
  2309. this.$set(row, "fAmount", row.fUnitprice);
  2310. }
  2311. }
  2312. },
  2313. changefBsdate(row) {
  2314. if (this.dataList.length > 0) {
  2315. for (var i = 0; i < this.dataList.length; i++) {
  2316. this.$set(this.dataList[i], "fBsdate", row);
  2317. }
  2318. }
  2319. },
  2320. /** 提交按钮 */
  2321. submitForm(status) {
  2322. console.log(this.form)
  2323. this.$refs["form"].validate((valid) => {
  2324. if (this.dataList.length === 0) {
  2325. this.$message.error('请添加库存明细!')
  2326. return false
  2327. }
  2328. if (this.relevantAttachments.length === 0) {
  2329. this.$message.error('请添加附件上传!')
  2330. return false
  2331. }
  2332. if (this.warehouseDrList.length === 0) {
  2333. this.$message.error('请添加收款信息!')
  2334. return false
  2335. }
  2336. if (this.warehouseCrList.length === 0) {
  2337. this.$message.error('请添加付款信息!')
  2338. return false
  2339. }
  2340. for (let list in this.dataList) {
  2341. if (!this.dataList[list].fGoodsid) {
  2342. this.$message.error('请输入品名!')
  2343. return false
  2344. }
  2345. if (!this.dataList[list].fWarehouselocid) {
  2346. this.$message.error('请输入库区!')
  2347. return false
  2348. }
  2349. }
  2350. for (let relevant in this.relevantAttachments) {
  2351. if (!this.relevantAttachments[relevant].fName) {
  2352. this.$message.error('请输入附件名称!')
  2353. return false
  2354. }
  2355. }
  2356. for (let warehouseDr in this.warehouseDrList) {
  2357. if (!this.warehouseDrList[warehouseDr].fCorpid) {
  2358. this.$message.error('请选择客户名称')
  2359. return false
  2360. }
  2361. if (!this.warehouseDrList[warehouseDr].fFeeid) {
  2362. this.$message.error('请选择费用名称')
  2363. return false
  2364. }
  2365. if (!this.warehouseDrList[warehouseDr]) {
  2366. this.$message.error('请选择收款计费单位')
  2367. return false
  2368. }
  2369. }
  2370. for (let warehouseCr in this.warehouseCrList) {
  2371. if (!this.warehouseCrList[warehouseCr].fCorpid) {
  2372. this.$message.error('请选择客户名称')
  2373. return false
  2374. }
  2375. if (!this.warehouseCrList[warehouseCr].fFeeid) {
  2376. this.$message.error('请选择费用名称')
  2377. return false
  2378. }
  2379. if (!this.warehouseCrList[warehouseCr].fFeeUnitid) {
  2380. this.$message.error('请选择付款计费单位')
  2381. return false
  2382. }
  2383. }
  2384. if (valid) {
  2385. this.form.fBillstatus = status;
  2386. this.form.fNetweight = this.fNetweight;
  2387. this.form.fPlangrossweight = this.fPlangrossweight;
  2388. this.form.fPlannetweight = this.fPlannetweight;
  2389. this.form.fPlanvolumn = this.fPlanvolumn;
  2390. this.form.fPlanqty = this.fPlanqty;
  2391. this.form.fGrossweight = this.fGrossweight;
  2392. this.form.fQty = this.fQty;
  2393. console.log(this.amt)
  2394. let formData = new window.FormData();
  2395. // 附件数据
  2396. formData.append("tWarehouseBills", JSON.stringify(this.form))
  2397. // 库存明细
  2398. formData.append("tWarehousebillsitems", JSON.stringify(this.dataList))
  2399. // 附件数据
  2400. formData.append("tWhgenleg", JSON.stringify(this.relevantAttachments))
  2401. // 费用明细付款
  2402. formData.append("tWarehousebillsfeesCr", JSON.stringify(this.warehouseCrList))
  2403. // 收款
  2404. formData.append("tWarehousebillsfeesDr", JSON.stringify(this.warehouseDrList))
  2405. addWarehousebills(formData).then((response) => {
  2406. this.msgSuccess("提交成功");
  2407. this.open = false;
  2408. this.getList();
  2409. })
  2410. }
  2411. })
  2412. },
  2413. /** 删除按钮操作 */
  2414. handleDelete(row) {
  2415. const fIds = row.fId || this.ids;
  2416. this.$confirm(
  2417. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  2418. "警告",
  2419. {
  2420. confirmButtonText: "确定",
  2421. cancelButtonText: "取消",
  2422. type: "warning",
  2423. }
  2424. )
  2425. .then(function () {
  2426. return delWarehousebills(fIds);
  2427. })
  2428. .then(() => {
  2429. this.getList();
  2430. this.msgSuccess("删除成功");
  2431. });
  2432. },
  2433. /** 导出按钮操作 */
  2434. handleExport() {
  2435. const queryParams = this.queryParams;
  2436. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  2437. confirmButtonText: "确定",
  2438. cancelButtonText: "取消",
  2439. type: "warning",
  2440. })
  2441. .then(function () {
  2442. return exportWarehousebills(queryParams);
  2443. })
  2444. .then((response) => {
  2445. this.download(response.msg);
  2446. });
  2447. },
  2448. deleteRow(index, rows) {
  2449. rows.splice(index, 1);
  2450. },
  2451. /* 远程模糊查询用户 */
  2452. corpsRemoteMethod(name) {
  2453. if (name == null || name === "") {
  2454. return false;
  2455. }
  2456. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2457. listCorps(queryParams).then((response) => {
  2458. this.fMblnoOptions = response.rows;
  2459. this.KHblnoOptions = response.rows;
  2460. });
  2461. },
  2462. /* 远程模糊查询商品 */
  2463. goodsRemoteMethod(name) {
  2464. if (name == null || name === "") {
  2465. return false;
  2466. }
  2467. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2468. listGoods(queryParams).then((response) => {
  2469. this.goodsOptions = response.rows;
  2470. });
  2471. },
  2472. // 远程模糊查询费用名称
  2473. fWRemoteMethod(name) {
  2474. if (name == null || name === "") {
  2475. return false;
  2476. }
  2477. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2478. listFees(queryParams).then((response) => {
  2479. this.fWbuOptions = response.rows;
  2480. });
  2481. },
  2482. /* 远程模糊查询经营单位 */
  2483. fSbuRemoteMethod(name) {
  2484. if (name == null || name === "") {
  2485. return false;
  2486. }
  2487. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2488. listCorps(queryParams).then((response) => {
  2489. this.fSbuOptions = response.rows;
  2490. });
  2491. },
  2492. /* 远程模糊查询仓库 */
  2493. warehouseRemoteMethod(name) {
  2494. if (name == null || name === "") {
  2495. return false;
  2496. }
  2497. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2498. listWarehouse(queryParams).then((response) => {
  2499. this.warehouseOptions = response.rows;
  2500. });
  2501. },
  2502. /* 远程模糊查询库区 */
  2503. kqhouseRemoteMethod(name) {
  2504. if (name == null || name === "") {
  2505. return false;
  2506. }
  2507. if (!this.form.fWarehouseid) {
  2508.         this.$message.error('请输入仓库!')
  2509.         return false
  2510.       }
  2511. let queryParams = { pageNum: 1, pageSize: 10, fWarehouseid:this.form.fWarehouseid , fName: name };
  2512. listArea(queryParams).then((response) => {
  2513. this.kqhouseOptions = response.rows;
  2514. });
  2515. },
  2516. /* 远程模糊查询操作用户 */
  2517. userRemoteMethod(name) {
  2518. if (name == null || name === "") {
  2519. return false;
  2520. }
  2521. let queryParams = { pageNum: 1, pageSize: 10, userName: name };
  2522. listUser(queryParams).then((response) => {
  2523. this.userOptions = response.rows;
  2524. });
  2525. },
  2526. },
  2527. };
  2528. </script>
  2529. <style lang="scss">
  2530. .juzhong > th {
  2531. text-align: center;
  2532. }
  2533. .biaoge > tr > td {
  2534. height: 30px;
  2535. text-align: center;
  2536. border-right: 1px solid #dfe6ec !important;
  2537. order-bottom: 1px solid #dfe6ec !important;
  2538. border-bottom: 1px solid #dfe6ec !important;
  2539. }
  2540. .el-table thead th {
  2541. background: #1890ff;
  2542. color: #fff;
  2543. }
  2544. .upload-demo {
  2545. margin-left: 50px;
  2546. }
  2547. </style>