index.vue 100 KB

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