index.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911
  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="fplanvolumn"
  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.fPlanvolumn"
  778. placeholder="尺码"
  779. show-word-limit
  780. />
  781. </template>
  782. </el-table-column>
  783. <el-table-column
  784. prop="fplanqty"
  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.fPlanqty"
  793. placeholder="件数"
  794. show-word-limit
  795. />
  796. </template>
  797. </el-table-column>
  798. <el-table-column
  799. prop="fgrossweight"
  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.fGrossweight"
  808. placeholder="入库重量"
  809. show-word-limit
  810. />
  811. </template>
  812. </el-table-column>
  813. <el-table-column
  814. prop="fqty"
  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.fQty"
  823. placeholder="入库件数"
  824. show-word-limit
  825. />
  826. </template>
  827. </el-table-column>
  828. <el-table-column
  829. prop="fPackagespecs"
  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.fPackagespecs"
  838. placeholder="包装规格"
  839. show-word-limit
  840. />
  841. </template>
  842. </el-table-column>
  843. <el-table-column
  844. prop="fwarehouselocid"
  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.fWarehouselocid"
  853. placeholder="库区"
  854. show-word-limit
  855. />
  856. </template>
  857. </el-table-column>
  858. <el-table-column
  859. prop="fBoxno"
  860. header-align="center"
  861. align="center"
  862. label="箱号"
  863. >
  864. <template slot-scope="scope">
  865. <el-input
  866. v-model="scope.row.fBoxno"
  867. placeholder="箱号"
  868. show-word-limit
  869. />
  870. </template>
  871. </el-table-column>
  872. <el-table-column
  873. prop="fGoodsval"
  874. header-align="center"
  875. align="center"
  876. label="货值"
  877. >
  878. <template slot-scope="scope">
  879. <el-input
  880. disabled
  881. oninput="value=value.replace(/[^\d.]/g,'')"
  882. v-model="scope.row.fGoodsval"
  883. placeholder="货值"
  884. show-word-limit
  885. />
  886. </template>
  887. </el-table-column>
  888. <el-table-column
  889. prop="ftruckno"
  890. header-align="center"
  891. align="center"
  892. label="车号"
  893. >
  894. <template slot-scope="scope">
  895. <el-input
  896. oninput="value=value.replace(/[^\d.]/g,'')"
  897. v-model="scope.row.fTruckno"
  898. placeholder="车号"
  899. show-word-limit
  900. />
  901. </template>
  902. </el-table-column>
  903. <el-table-column
  904. prop="remark"
  905. header-align="center"
  906. align="center"
  907. label="备注"
  908. >
  909. <template slot-scope="scope">
  910. <el-input
  911. v-model="scope.row.remark"
  912. placeholder="备注"
  913. show-word-limit
  914. />
  915. </template>
  916. </el-table-column>
  917. <el-table-column
  918. header-align="center"
  919. align="center"
  920. label="操作"
  921. width="130PX">
  922. <template slot-scope="scope">
  923. <el-button @click.native.prevent="deleteRow(scope.$index, dataList)" size="small">移除</el-button>
  924. </template>
  925. </el-table-column>
  926. </el-table>
  927. <div class="dialogTableTitle flex a-center jlr">
  928. <h2>附件上传</h2>
  929. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  930. >添加
  931. </el-button
  932. >
  933. </div>
  934. <el-table
  935. :data="relevantAttachments"
  936. ref="table"
  937. tooltip-effect="dark"
  938. border
  939. stripe
  940. style="width: 100%"
  941. height="150"
  942. >
  943. <el-table-column label="序号" type="index" width="80">
  944. </el-table-column>
  945. <el-table-column
  946. prop="attachName"
  947. header-align="center"
  948. align="center"
  949. label="附件名称"
  950. >
  951. <template slot-scope="scope">
  952. <el-input
  953. v-model="scope.row.attachName"
  954. :disabled="browseStatus"
  955. placeholder="附件名称"
  956. show-word-limit
  957. />
  958. </template>
  959. </el-table-column>
  960. <el-table-column
  961. prop="opUserName"
  962. header-align="center"
  963. align="center"
  964. label="上传人"
  965. >
  966. </el-table-column>
  967. <el-table-column
  968. prop="opDate"
  969. header-align="center"
  970. align="center"
  971. label="上传时间"
  972. >
  973. <template slot-scope="scope">
  974. <el-date-picker
  975. v-model="scope.row.opDate"
  976. type="date"
  977. disabled
  978. placeholder="上传时间"
  979. format="yyyy-MM-dd HH:mm"
  980. value-format="timestamp"
  981. ></el-date-picker>
  982. </template>
  983. </el-table-column>
  984. <el-table-column
  985. header-align="center"
  986. align="center"
  987. width="250PX"
  988. label="上传附件"
  989. >
  990. <template slot-scope="scope">
  991. <el-button style="float: left; height: 38px">
  992. <a
  993. :href="scope.row.attachId"
  994. target="_blank"
  995. class="buttonText"
  996. style="float: left; margin-left: 1px"
  997. >查看</a
  998. >
  999. </el-button>
  1000. <el-upload
  1001. class="upload-demo"
  1002. ref="upload"
  1003. action="node"
  1004. :on-change="checkType"
  1005. :disabled="browseStatus"
  1006. :show-file-list="false"
  1007. :auto-upload="false"
  1008. style="float: left"
  1009. >
  1010. <el-button
  1011. slot="trigger"
  1012. @click="clickAttachId(scope.$index)"
  1013. size="small"
  1014. type="primary"
  1015. style="margin-left: 5px"
  1016. >上传
  1017. </el-button>
  1018. </el-upload>
  1019. <el-button
  1020. style="margin-left: 5px"
  1021. @click.native.prevent="deleteAttach(scope.row)"
  1022. :disabled="browseStatus"
  1023. size="small"
  1024. >删除
  1025. </el-button>
  1026. </template>
  1027. </el-table-column>
  1028. <el-table-column
  1029. header-align="center"
  1030. align="center"
  1031. label="操作"
  1032. width="130PX"
  1033. >
  1034. <template slot-scope="scope">
  1035. <el-button
  1036. @click.native.prevent="deleteRow(scope.$index, relevantAttachments)"
  1037. :disabled="browseStatus"
  1038. size="small"
  1039. >移除
  1040. </el-button>
  1041. </template>
  1042. </el-table-column>
  1043. </el-table>
  1044. <div class="dialogTableTitle flex a-center jlr">
  1045. <h2>收款信息</h2>
  1046. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  1047. >添加
  1048. </el-button
  1049. >
  1050. </div>
  1051. <el-table
  1052. :data="warehouseDrList"
  1053. ref="table"
  1054. tooltip-effect="dark"
  1055. border
  1056. stripe
  1057. show-summary
  1058. >
  1059. <el-table-column label="序号" type="index" width="80">
  1060. </el-table-column>
  1061. <el-table-column
  1062. prop="fcorpid"
  1063. header-align="center"
  1064. align="center"
  1065. label="客户名称"
  1066. >
  1067. <template slot-scope="scope">
  1068. <el-input
  1069. v-model="scope.row.fCorpid"
  1070. :disabled="browseStatus"
  1071. placeholder="客户名称"
  1072. show-word-limit
  1073. />
  1074. </template>
  1075. </el-table-column>
  1076. <el-table-column
  1077. prop="ffeeid"
  1078. header-align="center"
  1079. align="center"
  1080. label="费用名称"
  1081. >
  1082. <template slot-scope="scope">
  1083. <el-input
  1084. v-model="scope.row.fFeeid"
  1085. placeholder="费用名称"
  1086. show-word-limit
  1087. />
  1088. </template>
  1089. </el-table-column>
  1090. <el-table-column
  1091. prop="ffeeUnitid"
  1092. header-align="center"
  1093. align="center"
  1094. label="计价单位">
  1095. <template slot-scope="scope">
  1096. <el-input
  1097. v-model="scope.row.fFeeUnitid"
  1098. placeholder="计价单位"
  1099. show-word-limit
  1100. />
  1101. </template>
  1102. </el-table-column>
  1103. <el-table-column
  1104. prop="fQty"
  1105. header-align="center"
  1106. align="center"
  1107. label="数量"
  1108. >
  1109. <template slot-scope="scope">
  1110. <el-input
  1111. oninput="value=value.replace(/[^\d.]/g,'')"
  1112. v-model="scope.row.fQty"
  1113. placeholder="数量"
  1114. show-word-limit
  1115. />
  1116. </template>
  1117. </el-table-column>
  1118. <el-table-column
  1119. prop="funitprice"
  1120. header-align="center"
  1121. align="center"
  1122. label="单价"
  1123. >
  1124. <template slot-scope="scope">
  1125. <el-input
  1126. oninput="value=value.replace(/[^\d.]/g,'')"
  1127. v-model="scope.row.fUnitprice"
  1128. placeholder="单价"
  1129. show-word-limit
  1130. />
  1131. </template>
  1132. </el-table-column>
  1133. <el-table-column
  1134. prop="fAmount"
  1135. header-align="center"
  1136. align="center"
  1137. label="金额"
  1138. >
  1139. <template slot-scope="scope">
  1140. <el-input
  1141. disabled
  1142. oninput="value=value.replace(/[^\d.]/g,'')"
  1143. v-model="scope.row.fAmount"
  1144. placeholder="金额"
  1145. show-word-limit
  1146. />
  1147. </template>
  1148. </el-table-column>
  1149. <el-table-column
  1150. prop="fCurrency"
  1151. header-align="center"
  1152. align="center"
  1153. label="币别"
  1154. >
  1155. <template slot-scope="scope">
  1156. <el-input
  1157. v-model="scope.row.fCurrency"
  1158. :disabled="browseStatus"
  1159. placeholder="币别"
  1160. show-word-limit
  1161. />
  1162. </template>
  1163. </el-table-column>
  1164. <el-table-column
  1165. prop="fCxrate"
  1166. header-align="center"
  1167. align="center"
  1168. label="汇率"
  1169. >
  1170. <template slot-scope="scope">
  1171. <el-input
  1172. v-model="scope.row.fCxrate"
  1173. :disabled="browseStatus"
  1174. placeholder="汇率"
  1175. show-word-limit
  1176. />
  1177. </template>
  1178. </el-table-column>
  1179. <el-table-column
  1180. prop="fRate"
  1181. header-align="center"
  1182. align="center"
  1183. label="税率"
  1184. >
  1185. <template slot-scope="scope">
  1186. <el-input
  1187. v-model="scope.row.fRate"
  1188. :disabled="browseStatus"
  1189. placeholder="税率"
  1190. show-word-limit
  1191. />
  1192. </template>
  1193. </el-table-column>
  1194. <el-table-column
  1195. header-align="center"
  1196. align="center"
  1197. label="操作"
  1198. width="130PX">
  1199. <template slot-scope="scope">
  1200. <el-button size="small">审核费用</el-button>
  1201. <el-button @click.native.prevent="deleteRow(scope.$index, warehouseDrList)" size="small">移除</el-button>
  1202. </template>
  1203. </el-table-column>
  1204. </el-table>
  1205. <div class="dialogTableTitle flex a-center jlr">
  1206. <h2>付款信息</h2>
  1207. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1208. >添加
  1209. </el-button
  1210. >
  1211. </div>
  1212. <el-table
  1213. :data="warehouseCrList"
  1214. ref="table"
  1215. tooltip-effect="dark"
  1216. border
  1217. stripe
  1218. show-summary
  1219. >
  1220. <el-table-column label="序号" type="index" width="80">
  1221. </el-table-column>
  1222. <el-table-column
  1223. prop="fcorpid"
  1224. header-align="center"
  1225. align="center"
  1226. label="客户名称"
  1227. >
  1228. <template slot-scope="scope">
  1229. <el-input
  1230. v-model="scope.row.fCorpid"
  1231. :disabled="browseStatus"
  1232. placeholder="客户名称"
  1233. show-word-limit
  1234. />
  1235. </template>
  1236. </el-table-column>
  1237. <el-table-column
  1238. prop="ffeeid"
  1239. header-align="center"
  1240. align="center"
  1241. label="费用名称"
  1242. >
  1243. <template slot-scope="scope">
  1244. <el-input
  1245. v-model="scope.row.fFeeid"
  1246. placeholder="费用名称"
  1247. show-word-limit
  1248. />
  1249. </template>
  1250. </el-table-column>
  1251. <el-table-column
  1252. prop="ffeeUnitid"
  1253. header-align="center"
  1254. align="center"
  1255. label="计价单位">
  1256. <template slot-scope="scope">
  1257. <el-input
  1258. v-model="scope.row.fFeeUnitid"
  1259. placeholder="计价单位"
  1260. show-word-limit
  1261. />
  1262. </template>
  1263. </el-table-column>
  1264. <el-table-column
  1265. prop="fQty"
  1266. header-align="center"
  1267. align="center"
  1268. label="数量"
  1269. >
  1270. <template slot-scope="scope">
  1271. <el-input
  1272. oninput="value=value.replace(/[^\d.]/g,'')"
  1273. v-model="scope.row.fQty"
  1274. placeholder="数量"
  1275. show-word-limit
  1276. />
  1277. </template>
  1278. </el-table-column>
  1279. <el-table-column
  1280. prop="funitprice"
  1281. header-align="center"
  1282. align="center"
  1283. label="单价"
  1284. >
  1285. <template slot-scope="scope">
  1286. <el-input
  1287. oninput="value=value.replace(/[^\d.]/g,'')"
  1288. v-model="scope.row.fUnitprice"
  1289. placeholder="单价"
  1290. show-word-limit
  1291. />
  1292. </template>
  1293. </el-table-column>
  1294. <el-table-column
  1295. prop="fAmount"
  1296. header-align="center"
  1297. align="center"
  1298. label="金额"
  1299. >
  1300. <template slot-scope="scope">
  1301. <el-input
  1302. disabled
  1303. oninput="value=value.replace(/[^\d.]/g,'')"
  1304. v-model="scope.row.fAmount"
  1305. placeholder="金额"
  1306. show-word-limit
  1307. />
  1308. </template>
  1309. </el-table-column>
  1310. <el-table-column
  1311. prop="fCurrency"
  1312. header-align="center"
  1313. align="center"
  1314. label="币别"
  1315. >
  1316. <template slot-scope="scope">
  1317. <el-input
  1318. v-model="scope.row.fCurrency"
  1319. :disabled="browseStatus"
  1320. placeholder="币别"
  1321. show-word-limit
  1322. />
  1323. </template>
  1324. </el-table-column>
  1325. <el-table-column
  1326. prop="fCxrate"
  1327. header-align="center"
  1328. align="center"
  1329. label="汇率"
  1330. >
  1331. <template slot-scope="scope">
  1332. <el-input
  1333. v-model="scope.row.fCxrate"
  1334. :disabled="browseStatus"
  1335. placeholder="汇率"
  1336. show-word-limit
  1337. />
  1338. </template>
  1339. </el-table-column>
  1340. <el-table-column
  1341. prop="fRate"
  1342. header-align="center"
  1343. align="center"
  1344. label="税率"
  1345. >
  1346. <template slot-scope="scope">
  1347. <el-input
  1348. v-model="scope.row.fRate"
  1349. :disabled="browseStatus"
  1350. placeholder="税率"
  1351. show-word-limit
  1352. />
  1353. </template>
  1354. </el-table-column>
  1355. <el-table-column
  1356. header-align="center"
  1357. align="center"
  1358. label="操作"
  1359. width="130PX">
  1360. <template slot-scope="scope">
  1361. <el-button size="small">审核费用</el-button>
  1362. <el-button @click.native.prevent="deleteRow(scope.$index, warehouseCrList)" size="small">移除</el-button>
  1363. </template>
  1364. </el-table-column>
  1365. </el-table>
  1366. <div slot="footer" class="dialog-footer">
  1367. <el-button type="primary" @click="submitForm">确 定</el-button>
  1368. <el-button @click="cancel">取 消</el-button>
  1369. </div>
  1370. </el-dialog>
  1371. </div>
  1372. </template>
  1373. <script>
  1374. import {
  1375. listWarehousebills,
  1376. getWarehousebills,
  1377. delWarehousebills,
  1378. addWarehousebills,
  1379. updateWarehousebills,
  1380. exportWarehousebills,
  1381. } from "@/api/warehouseBusiness/warehouseInStock";
  1382. import {listCorps} from "@/api/basicdata/corps";
  1383. import {listWarehouse} from "@/api/basicdata/warehouse";
  1384. import {listGoods} from "@/api/basicdata/goods";
  1385. import {listUser, queryUserVal} from "@/api/system/user";
  1386. export default {
  1387. name: "Warehousebills",
  1388. components: {},
  1389. data() {
  1390. return {
  1391. // 遮罩层
  1392. loading: true,
  1393. // 选中数组
  1394. ids: [],
  1395. userVal: {
  1396. userName: null,
  1397. nickName: null,
  1398. deptId: null
  1399. },
  1400. queryForm: {},
  1401. dataList: [],
  1402. warehouseCrList: [],
  1403. warehouseDrList: [],
  1404. browseStatus: false,
  1405. relevantAttachments: [],
  1406. // 非单个禁用
  1407. single: true,
  1408. // 非多个禁用
  1409. multiple: true,
  1410. // 显示搜索条件
  1411. showSearch: true,
  1412. // 总条数
  1413. total: 0,
  1414. // 仓库主(出入库)表格数据
  1415. warehousebillsList: [],
  1416. // 弹出层标题
  1417. title: "",
  1418. // 是否显示弹出层
  1419. open: false,
  1420. // 货权方(客户数据)
  1421. fMblnoOptions: [],
  1422. // 货权方(客户数据)
  1423. fSbuOptions: [],
  1424. // 操作员
  1425. userOptions: [],
  1426. // 操作员
  1427. goodsOptions: [],
  1428. // 制单部门
  1429. deptOptions: [],
  1430. // 仓库(仓库数据)
  1431. warehouseOptions: [],
  1432. // 贸易方式(数据字典),对应t_trademodels 字典
  1433. fTrademodeidOptions: [],
  1434. // 计费单位(数据字典),下拉选择毛重或净重字典
  1435. fFeetunitOptions: [],
  1436. // 结算方式(数据字典),下拉选择字典
  1437. fStltypeOptions: [],
  1438. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  1439. fIfweighOptions: [],
  1440. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  1441. fIfpledgeOptions: [],
  1442. // 是否破损(数据字典),默认F否则T字典
  1443. fIfdamageOptions: [],
  1444. // 单据类型(数据字典)SJRK字典
  1445. fBilltypeOptions: [],
  1446. // 状态(数据字典),N 入字典
  1447. fBillstatusOptions: [],
  1448. // 查询参数
  1449. queryParams: {
  1450. pageNum: 1,
  1451. pageSize: 10,
  1452. fBillno: null,
  1453. createBy: null,
  1454. createTime: null,
  1455. fCustomsdeclartion: null,
  1456. fOriginalbillno: null,
  1457. fDeptid: null,
  1458. fBsdeptid: null,
  1459. fContacts: null,
  1460. fTel: null,
  1461. fCorpid: null,
  1462. fTocorpid: null,
  1463. fStltypeid: null,
  1464. fBscorpno: null,
  1465. fWarehouseid: null,
  1466. fStorekeeper: null,
  1467. fBsdate: null,
  1468. fPlanqty: null,
  1469. fPlangrossweight: null,
  1470. fPlannetweight: null,
  1471. fPlanvolumn: null,
  1472. fQty: null,
  1473. fGrossweight: null,
  1474. fNetweight: null,
  1475. fVolumn: null,
  1476. fTrademodeid: null,
  1477. fSbu: null,
  1478. fFeetunit: null,
  1479. fMblno: null,
  1480. fVslvoy: null,
  1481. fEta: null,
  1482. fCustomno: null,
  1483. fIfweigh: null,
  1484. fIfpledge: null,
  1485. fIfdamage: null,
  1486. fBankcorpid: null,
  1487. fBilltype: null,
  1488. fBillstatus: null,
  1489. fCreateby: null,
  1490. fCreatetime: null,
  1491. fGoodsid: null,
  1492. fCntrtype: null,
  1493. fCntqty: null
  1494. },
  1495. // 表单参数
  1496. form: {},
  1497. // 表单校验
  1498. rules: {
  1499. fDeptid: [
  1500. {required: true, message: "制单部门不能为空", trigger: "blur"},
  1501. ],
  1502. fBsdeptid: [
  1503. {required: true, message: "业务所属部门不能为空", trigger: "blur"},
  1504. ],
  1505. fCorpid: [
  1506. {
  1507. required: true,
  1508. message:
  1509. "客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name不能为空",
  1510. trigger: "blur",
  1511. },
  1512. ],
  1513. fTocorpid: [
  1514. {
  1515. required: true,
  1516. message:
  1517. "货转客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name,自有在货权转移是该字段有效不能为空",
  1518. trigger: "blur",
  1519. },
  1520. ],
  1521. fBscorpno: [
  1522. {
  1523. required: true,
  1524. message:
  1525. "客户存货编号,格式编号客户编号+YYYY +NNNN,编号不能断号,要连续、如果删除该编号,下次新建单据,优先使用,每年从001开始不能为空",
  1526. trigger: "blur",
  1527. },
  1528. ],
  1529. },
  1530. };
  1531. },
  1532. created() {
  1533. this.getList();
  1534. this.getDicts("data_trademodes").then((response) => {
  1535. this.fTrademodeidOptions = response.data;
  1536. });
  1537. this.getDicts("data_unitfees").then((response) => {
  1538. this.fFeetunitOptions = response.data;
  1539. });
  1540. this.getDicts("data_stltype_type").then((response) => {
  1541. this.fStltypeOptions = response.data;
  1542. });
  1543. this.getDicts("data_ifweigh_status").then((response) => {
  1544. this.fIfweighOptions = response.data;
  1545. });
  1546. this.getDicts("data_ifpledge_status").then((response) => {
  1547. this.fIfpledgeOptions = response.data;
  1548. });
  1549. this.getDicts("data_ifdamage_status").then((response) => {
  1550. this.fIfdamageOptions = response.data;
  1551. });
  1552. this.getDicts("data_billtype_type").then((response) => {
  1553. this.fBilltypeOptions = response.data;
  1554. });
  1555. this.getDicts("sys_common_status").then((response) => {
  1556. this.fBillstatusOptions = response.data;
  1557. });
  1558. },
  1559. methods: {
  1560. // 添加list
  1561. addRelevant() {
  1562. console.log(JSON.stringify(this.dataList))
  1563. this.dataList.push({
  1564. fbsdate: null,
  1565. fgoodsid: null,
  1566. fcntrtype: null,
  1567. fCntqty: null,
  1568. fplangrossweight: null,
  1569. fplanvolumn: null,
  1570. fplanqty: null,
  1571. fgrossweight: null,
  1572. fqty: null,
  1573. fPackagespecs: null,
  1574. fwarehouselocid: null,
  1575. fBoxno: null,
  1576. fGoodsval: null,
  1577. ftruckno: null,
  1578. remark: null
  1579. });
  1580. },
  1581. // 收款信息
  1582. addCollection() {
  1583. var obj = {};
  1584. this.warehouseDrList.push(obj);
  1585. },
  1586. addpayment() {
  1587. var obj = {};
  1588. this.warehouseCrList.push(obj);
  1589. },
  1590. queryUser() {
  1591. queryUserVal().then((response) => {
  1592. if (response.user !== null) {
  1593. this.userVal = response.user
  1594. this.$set(this.form, 'fDeptid', this.userVal.deptId)
  1595. this.$set(this.form, 'createBy', this.userVal.userName)
  1596. this.$set(this.form, 'createTime', Date.parse(new Date()))
  1597. }
  1598. if (response.dept !== null) {
  1599. this.deptOptions = []
  1600. this.deptOptions.push(response.dept)
  1601. }
  1602. });
  1603. },
  1604. /** 查询仓库主(出入库)列表 */
  1605. getList() {
  1606. this.loading = true;
  1607. listWarehousebills(this.queryParams).then((response) => {
  1608. this.warehousebillsList = response.rows;
  1609. this.total = response.total;
  1610. this.loading = false;
  1611. });
  1612. },
  1613. // 贸易方式(数据字典),对应t_trademodels 字典翻译
  1614. fTrademodeidFormat(row, column) {
  1615. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  1616. },
  1617. // 计费单位(数据字典),下拉选择毛重或净重字典翻译
  1618. fFeetunitFormat(row, column) {
  1619. return this.selectDictLabel(this.fFeetunitOptions, row.fFeetunit);
  1620. },
  1621. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  1622. fIfweighFormat(row, column) {
  1623. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  1624. },
  1625. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  1626. fIfpledgeFormat(row, column) {
  1627. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge);
  1628. },
  1629. // 是否破损(数据字典),默认F否则T字典翻译
  1630. fIfdamageFormat(row, column) {
  1631. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  1632. },
  1633. // 单据类型(数据字典)SJRK字典翻译
  1634. fBilltypeFormat(row, column) {
  1635. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  1636. },
  1637. // 状态(数据字典),N 入字典翻译
  1638. fBillstatusFormat(row, column) {
  1639. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  1640. },
  1641. // 取消按钮
  1642. cancel() {
  1643. this.open = false;
  1644. this.reset();
  1645. },
  1646. // 表单重置
  1647. reset() {
  1648. this.form = {
  1649. fId: null,
  1650. fBillno: null,
  1651. fCustomsdeclartion: null,
  1652. fOriginalbillno: null,
  1653. fDeptid: null,
  1654. fBsdeptid: null,
  1655. fContacts: null,
  1656. fTel: null,
  1657. fCorpid: null,
  1658. fTocorpid: null,
  1659. fStltypeid: null,
  1660. fBscorpno: null,
  1661. fWarehouseid: null,
  1662. fStorekeeper: null,
  1663. fBsdate: null,
  1664. fPlanqty: null,
  1665. fPlangrossweight: null,
  1666. fPlannetweight: null,
  1667. fPlanvolumn: null,
  1668. fQty: null,
  1669. fGrossweight: null,
  1670. fNetweight: null,
  1671. fVolumn: null,
  1672. fTrademodeid: null,
  1673. fSbu: null,
  1674. fFeetunit: null,
  1675. fMblno: null,
  1676. fVslvoy: null,
  1677. fEta: null,
  1678. fCustomno: null,
  1679. fIfweigh: null,
  1680. fIfpledge: null,
  1681. fIfdamage: null,
  1682. fBankcorpid: null,
  1683. fBilltype: null,
  1684. fBillstatus: null,
  1685. delFlag: null,
  1686. createBy: null,
  1687. createTime: null,
  1688. updateBy: null,
  1689. updateTime: null,
  1690. remark: null,
  1691. fCreateby: null,
  1692. fCreatetime: null,
  1693. fGoodsid: null,
  1694. fCntrtype: null,
  1695. fCntqty: null
  1696. };
  1697. this.resetForm("form");
  1698. },
  1699. /** 搜索按钮操作 */
  1700. handleQuery() {
  1701. this.queryParams.pageNum = 1;
  1702. this.getList();
  1703. },
  1704. /** 重置按钮操作 */
  1705. resetQuery() {
  1706. this.resetForm("queryForm");
  1707. this.handleQuery();
  1708. },
  1709. // 多选框选中数据
  1710. handleSelectionChange(selection) {
  1711. this.ids = selection.map((item) => item.fId);
  1712. this.single = selection.length !== 1;
  1713. this.multiple = !selection.length;
  1714. },
  1715. /** 新增按钮操作 */
  1716. handleAdd() {
  1717. this.reset();
  1718. this.queryUser()
  1719. this.open = true;
  1720. this.title = "添加仓库主(出入库)";
  1721. },
  1722. /** 修改按钮操作 */
  1723. handleUpdate(row) {
  1724. this.reset();
  1725. const fId = row.fid || this.ids;
  1726. getWarehousebills(row.fid).then((response) => {
  1727. this.form = response.data.warehousebills;
  1728. this.$set(this.form, 'fCorpid', response.data.warehousebills.fcorpid)
  1729. this.$set(this.form, 'fWarehouseid', response.data.warehousebills.fwarehouseid)
  1730. this.$set(this.form, 'fContacts', response.data.warehousebills.fcontacts)
  1731. this.$set(this.form, 'fTel', response.data.warehousebills.ftel)
  1732. this.$set(this.form, 'fMblno', response.data.warehousebills.fmblno)
  1733. this.$set(this.form, 'fBsdate', Date.parse(response.data.warehousebills.fbsdate))
  1734. this.$set(this.form, 'fStorekeeper', response.data.warehousebills.fstorekeeper)
  1735. this.$set(this.form, 'createBy', response.data.warehousebills.createBy)
  1736. this.$set(this.form, 'fDeptid', response.data.warehousebills.fdeptid)
  1737. this.$set(this.form, 'fDilldate', Date.parse(response.data.warehousebills.fbilldate))
  1738. this.$set(this.form, 'fVslvoy', response.data.warehousebills.fvslvoy)
  1739. this.$set(this.form, 'fEta', Date.parse(response.data.warehousebills.feta))
  1740. this.$set(this.form, 'createTime', Date.parse(response.data.warehousebills.createTime))
  1741. this.$set(this.form, 'fTrademodeid', response.data.warehousebills.ftrademodeid + '')
  1742. this.$set(this.form, 'fBillingway', response.data.warehousebills.fbillingway + '')
  1743. this.$set(this.form, 'fFeetunit', response.data.warehousebills.ffeetunit + '')
  1744. this.$set(this.form, 'fBscorpno', response.data.warehousebills.fbscorpno)
  1745. this.$set(this.form, 'fCustomno', response.data.warehousebills.fcustomno)
  1746. this.$set(this.form, 'fStltypeid', response.data.warehousebills.fstltypeid + '')
  1747. this.$set(this.form, 'fIfweigh', response.data.warehousebills.fifweigh + '')
  1748. this.$set(this.form, 'fIfdamage', response.data.warehousebills.fifdamage + '')
  1749. this.$set(this.form, 'fSbu', response.data.warehousebills.fsbu)
  1750. this.$set(this.form, 'fIfpledge', response.data.warehousebills.fifpledge + '')
  1751. this.$set(this.form, 'fBankcorpid', response.data.warehousebills.fbankcorpid)
  1752. this.$set(this.form, 'remark', response.data.warehousebills.remark)
  1753. this.deptOptions = []
  1754. this.deptOptions.push(response.data.dept)
  1755. this.fMblnoOptions = []
  1756. this.fMblnoOptions.push(response.data.fCorps)
  1757. if (response.data.fSbu !== null) {
  1758. this.fSbuOptions = []
  1759. this.fSbuOptions.push(response.data.fSbu)
  1760. }
  1761. if (response.data.warehouse !== null) {
  1762. this.warehouseOptions = []
  1763. this.warehouseOptions.push(response.data.warehouse)
  1764. }
  1765. console.log(JSON.stringify(response.data.warehouseBillsItem))
  1766. if (typeof response.data.warehouseBillsItem !== 'undefined' && response.data.warehouseBillsItem !== null) {
  1767. this.dataList = response.data.warehouseBillsItem
  1768. if (response.data.goodsList !== null) {
  1769. this.goodsOptions = []
  1770. this.goodsOptions = response.data.goodsList
  1771. }
  1772. }
  1773. this.open = true;
  1774. this.title = "修改仓库主(出入库)";
  1775. });
  1776. },
  1777. /** 提交按钮 */
  1778. submitForm() {
  1779. this.$refs["form"].validate((valid) => {
  1780. if (valid) {
  1781. // let formData = new FormData()
  1782. // console.log(JSON.stringify(this.form));
  1783. // formData.append('tWarehouseBills', JSON.stringify(this.formData))
  1784. let formData = new window.FormData();
  1785. // 附件数据
  1786. formData.append("tWarehouseBills", JSON.stringify(this.form));
  1787. console.log(JSON.stringify(this.form));
  1788. // 附件数据
  1789. formData.append("tWhgenleg", null);
  1790. // // 费用明细付款
  1791. formData.append("tWarehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  1792. // // 收款
  1793. formData.append("tWarehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  1794. // // 库存明细
  1795. formData.append("tWarehousebillsitems", JSON.stringify(this.dataList));
  1796. // 附件数据
  1797. // formData.append('tWhgenleg', dataForm)
  1798. // // 费用明细付款
  1799. // formData.append('tWarehousebillsfeesCr', dataForm)
  1800. // // 收款
  1801. // formData.append('tWarehousebillsfeesDr"', dataForm)
  1802. // // 库存明细
  1803. // formData.append('tWarehousebillsitems', dataForm)
  1804. addWarehousebills(formData).then((response) => {
  1805. console.log(response);
  1806. this.msgSuccess("新增成功");
  1807. this.open = false;
  1808. this.getList();
  1809. });
  1810. }
  1811. });
  1812. },
  1813. /** 删除按钮操作 */
  1814. handleDelete(row) {
  1815. const fIds = row.fId || this.ids;
  1816. this.$confirm(
  1817. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  1818. "警告",
  1819. {
  1820. confirmButtonText: "确定",
  1821. cancelButtonText: "取消",
  1822. type: "warning",
  1823. }
  1824. )
  1825. .then(function () {
  1826. return delWarehousebills(fIds);
  1827. })
  1828. .then(() => {
  1829. this.getList();
  1830. this.msgSuccess("删除成功");
  1831. });
  1832. },
  1833. /** 导出按钮操作 */
  1834. handleExport() {
  1835. const queryParams = this.queryParams;
  1836. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  1837. confirmButtonText: "确定",
  1838. cancelButtonText: "取消",
  1839. type: "warning",
  1840. })
  1841. .then(function () {
  1842. return exportWarehousebills(queryParams);
  1843. })
  1844. .then((response) => {
  1845. this.download(response.msg);
  1846. });
  1847. },
  1848. deleteRow(index, rows) {
  1849. rows.splice(index, 1)
  1850. },
  1851. /* 远程模糊查询用户 */
  1852. corpsRemoteMethod(name) {
  1853. if (name == null || name === '') {
  1854. return false
  1855. }
  1856. let queryParams = {pageNum: 1, pageSize: 10, fName: name}
  1857. listCorps(queryParams).then((response) => {
  1858. this.fMblnoOptions = response.rows
  1859. });
  1860. },
  1861. /* 远程模糊查询商品 */
  1862. goodsRemoteMethod(name) {
  1863. if (name == null || name === '') {
  1864. return false
  1865. }
  1866. let queryParams = {pageNum: 1, pageSize: 10, fName: name}
  1867. listGoods(queryParams).then((response) => {
  1868. this.goodsOptions = response.rows
  1869. });
  1870. },
  1871. /* 远程模糊查询经营单位 */
  1872. fSbuRemoteMethod(name) {
  1873. if (name == null || name === '') {
  1874. return false
  1875. }
  1876. let queryParams = {pageNum: 1, pageSize: 10, fName: name}
  1877. listCorps(queryParams).then((response) => {
  1878. this.fSbuOptions = response.rows
  1879. });
  1880. },
  1881. /* 远程模糊查询仓库 */
  1882. warehouseRemoteMethod(name) {
  1883. if (name == null || name === '') {
  1884. return false
  1885. }
  1886. let queryParams = {pageNum: 1, pageSize: 10, fName: name}
  1887. listWarehouse(queryParams).then((response) => {
  1888. this.warehouseOptions = response.rows
  1889. });
  1890. },
  1891. /* 远程模糊查询操作用户 */
  1892. userRemoteMethod(name) {
  1893. if (name == null || name === '') {
  1894. return false
  1895. }
  1896. let queryParams = {pageNum: 1, pageSize: 10, userName: name}
  1897. listUser(queryParams).then((response) => {
  1898. this.userOptions = response.rows
  1899. });
  1900. },
  1901. },
  1902. };
  1903. </script>