index.vue 70 KB

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