index.vue 81 KB

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