index.vue 90 KB

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