index.vue 100 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026
  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 || scope.row.fBillstatus === 6"
  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">审核费用</el-button>
  1220. <el-button
  1221. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1222. size="small"
  1223. >移除
  1224. </el-button
  1225. >
  1226. </template>
  1227. </el-table-column>
  1228. </el-table>
  1229. <div class="dialogTableTitle flex a-center jlr">
  1230. <h3>付款信息</h3>
  1231. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1232. >新增
  1233. </el-button>
  1234. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1235. </div>
  1236. <el-table
  1237. :data="warehouseCrList"
  1238. ref="warehouseCr"
  1239. tooltip-effect="dark"
  1240. border
  1241. stripe
  1242. :summary-method="warehouseDrSummaries"
  1243. show-summary
  1244. >
  1245. <el-table-column label="序号" type="index" width="80">
  1246. </el-table-column>
  1247. <el-table-column
  1248. prop="fCorpid"
  1249. header-align="center"
  1250. align="center"
  1251. width="180px"
  1252. label="客户名称"
  1253. >
  1254. <template slot-scope="scope">
  1255. <el-select
  1256. v-model="scope.row.fCorpid"
  1257. filterable
  1258. remote
  1259. :disabled="browseStatus"
  1260. :remote-method="corpsRemoteMethod"
  1261. placeholder="客户名称"
  1262. >
  1263. <el-option
  1264. v-for="(dict, index) in KHblnoOptions"
  1265. :key="index.fId"
  1266. :label="dict.fName"
  1267. :value="dict.fId"
  1268. ></el-option>
  1269. </el-select>
  1270. </template>
  1271. </el-table-column>
  1272. <el-table-column
  1273. prop="fFeeid"
  1274. header-align="center"
  1275. align="center"
  1276. width="180px"
  1277. label="费用名称"
  1278. >
  1279. <template slot-scope="scope">
  1280. <el-select
  1281. v-model="scope.row.fFeeid"
  1282. filterable
  1283. remote
  1284. :disabled="browseStatus"
  1285. :remote-method="fWRemoteMethod"
  1286. @change="changeFeeId(scope.row)"
  1287. placeholder="费用名称"
  1288. >
  1289. <el-option
  1290. v-for="(dict, index) in fWbuOptions"
  1291. :key="index.fId"
  1292. :label="dict.fName"
  1293. :value="dict.fId"
  1294. ></el-option>
  1295. </el-select>
  1296. </template>
  1297. </el-table-column>
  1298. <el-table-column
  1299. prop="fFeeunitid"
  1300. header-align="center"
  1301. align="center"
  1302. width="180px"
  1303. label="计价单位"
  1304. >
  1305. <template slot-scope="scope">
  1306. <el-select
  1307. v-model="scope.row.fFeeunitid"
  1308. filterable
  1309. remote
  1310. :disabled="browseStatus"
  1311. @change="changeFeeUnit(scope.row)"
  1312. :remote-method="corpsRemoteMethod"
  1313. placeholder="计价单位"
  1314. >
  1315. <el-option
  1316. v-for="(dict, index) in fFeetunitOptions"
  1317. :key="index.dictValue"
  1318. :label="dict.dictLabel"
  1319. :value="dict.dictValue"
  1320. ></el-option>
  1321. </el-select>
  1322. </template>
  1323. </el-table-column>
  1324. <el-table-column
  1325. prop="fQty"
  1326. header-align="center"
  1327. align="center"
  1328. width="150px"
  1329. label="数量"
  1330. >
  1331. <template slot-scope="scope">
  1332. <el-input
  1333. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1334. v-model="scope.row.fQty"
  1335. :disabled="browseStatus"
  1336. @change="changeContractAmt(scope.row)"
  1337. placeholder="数量"
  1338. show-word-limit
  1339. />
  1340. </template>
  1341. </el-table-column>
  1342. <el-table-column
  1343. prop="fUnitprice"
  1344. header-align="center"
  1345. align="center"
  1346. width="150px"
  1347. label="单价"
  1348. >
  1349. <template slot-scope="scope">
  1350. <el-input
  1351. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1352. v-model="scope.row.fUnitprice"
  1353. :disabled="browseStatus"
  1354. @change="changeContractAmt(scope.row)"
  1355. placeholder="单价"
  1356. show-word-limit
  1357. />
  1358. </template>
  1359. </el-table-column>
  1360. <el-table-column
  1361. prop="fAmount"
  1362. header-align="center"
  1363. align="center"
  1364. width="150px"
  1365. label="金额"
  1366. >
  1367. <template slot-scope="scope">
  1368. <el-input
  1369. disabled
  1370. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1371. v-model="scope.row.fAmount"
  1372. placeholder="金额"
  1373. show-word-limit
  1374. />
  1375. </template>
  1376. </el-table-column>
  1377. <el-table-column
  1378. prop="fCurrency"
  1379. header-align="center"
  1380. align="center"
  1381. width="150px"
  1382. label="币别"
  1383. >
  1384. <template slot-scope="scope">
  1385. <el-input
  1386. v-model="scope.row.fCurrency"
  1387. :disabled="browseStatus"
  1388. placeholder="币别"
  1389. show-word-limit
  1390. />
  1391. </template>
  1392. </el-table-column>
  1393. <el-table-column
  1394. prop="fExrate"
  1395. header-align="center"
  1396. align="center"
  1397. width="150px"
  1398. label="汇率"
  1399. >
  1400. <template slot-scope="scope">
  1401. <el-input
  1402. v-model="scope.row.fExrate"
  1403. :disabled="browseStatus"
  1404. placeholder="汇率"
  1405. show-word-limit
  1406. />
  1407. </template>
  1408. </el-table-column>
  1409. <el-table-column
  1410. prop="fTaxrate"
  1411. header-align="center"
  1412. align="center"
  1413. width="150px"
  1414. label="税率"
  1415. >
  1416. <template slot-scope="scope">
  1417. <el-input
  1418. v-model="scope.row.fTaxrate"
  1419. :disabled="browseStatus"
  1420. placeholder="税率"
  1421. show-word-limit
  1422. />
  1423. </template>
  1424. </el-table-column>
  1425. <el-table-column
  1426. prop="fMblno"
  1427. header-align="center"
  1428. align="center"
  1429. width="130px"
  1430. label="提单号"
  1431. >
  1432. <template slot-scope="scope">
  1433. <el-input
  1434. v-model="scope.row.fMblno"
  1435. :disabled="browseStatus"
  1436. placeholder="提单号"
  1437. show-word-limit
  1438. />
  1439. </template>
  1440. </el-table-column>
  1441. <el-table-column
  1442. prop="fProductName"
  1443. header-align="center"
  1444. align="center"
  1445. width="140px"
  1446. label="品名"
  1447. >
  1448. <template slot-scope="scope">
  1449. <el-input
  1450. v-model="scope.row.fProductName"
  1451. :disabled="browseStatus"
  1452. placeholder="品名"
  1453. show-word-limit
  1454. />
  1455. </template>
  1456. </el-table-column>
  1457. <el-table-column
  1458. prop="fMarks"
  1459. header-align="center"
  1460. align="center"
  1461. width="130px"
  1462. label="品牌"
  1463. >
  1464. <template slot-scope="scope">
  1465. <el-input
  1466. v-model="scope.row.fMarks"
  1467. :disabled="browseStatus"
  1468. placeholder="品牌"
  1469. show-word-limit
  1470. />
  1471. </template>
  1472. </el-table-column>
  1473. <el-table-column
  1474. prop="remarks"
  1475. header-align="center"
  1476. align="center"
  1477. width="150px"
  1478. label="备注"
  1479. >
  1480. <template slot-scope="scope">
  1481. <el-input
  1482. v-model="scope.row.remarks"
  1483. :disabled="browseStatus"
  1484. placeholder="备注"
  1485. show-word-limit
  1486. />
  1487. </template>
  1488. </el-table-column>
  1489. <el-table-column
  1490. header-align="center"
  1491. align="center"
  1492. width="150px"
  1493. label="操作"
  1494. >
  1495. <template slot-scope="scope">
  1496. <el-button size="small">审核费用</el-button>
  1497. <el-button
  1498. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  1499. :disabled="browseStatus"
  1500. size="small"
  1501. >移除
  1502. </el-button
  1503. >
  1504. </template>
  1505. </el-table-column>
  1506. </el-table>
  1507. <div slot="footer" class="dialog-footer">
  1508. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  1509. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
  1510. <el-button type="primary" :disabled="notChange" @click="saveForm">保 存</el-button>
  1511. <el-button v-if="approve === true" @click="goApproval">审批</el-button>
  1512. <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
  1513. <el-button type="primary" :disabled="approvalStatus" v-if="form.fBillstatus > 3" @click="addOrUpdateHandle()">查看审批流</el-button>
  1514. <el-button type="primary" :disabled="notChange" @click="submitForm">提交审核</el-button>
  1515. <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @click="backApproval">撤销审批</el-button>
  1516. <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
  1517. <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
  1518. </div>
  1519. <!-- 选择库存总账数据 -->
  1520. <el-dialog
  1521. title="库存总账"
  1522. :modal="false"
  1523. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1524. :visible.sync="whgenlegVisible"
  1525. :close-on-click-modal="false"
  1526. width="70%"
  1527. >
  1528. <el-table
  1529. :data="whgenlegList"
  1530. ref="tableList"
  1531. tooltip-effect="dark"
  1532. width="100%"
  1533. border
  1534. stripe
  1535. @selection-change="whgenlegSelectionChange"
  1536. >
  1537. <el-table-column type="selection" width="55"></el-table-column>
  1538. <el-table-column
  1539. prop="fMblno"
  1540. header-align="center"
  1541. align="center"
  1542. label="提单号"
  1543. >
  1544. </el-table-column>
  1545. <el-table-column
  1546. prop="createTime"
  1547. header-align="center"
  1548. align="center"
  1549. width="180px"
  1550. label="入库日期"
  1551. >
  1552. </el-table-column>
  1553. <el-table-column
  1554. prop="fGoodsids"
  1555. header-align="center"
  1556. align="center"
  1557. label="品名"
  1558. >
  1559. </el-table-column>
  1560. <el-table-column
  1561. prop="fQtyblc"
  1562. header-align="center"
  1563. align="center"
  1564. label="结余数量"
  1565. >
  1566. </el-table-column>
  1567. <el-table-column
  1568. prop="fWarehouseids"
  1569. header-align="center"
  1570. align="center"
  1571. label="仓库"
  1572. >
  1573. </el-table-column>
  1574. <el-table-column
  1575. prop="fWarehouseLocationids"
  1576. header-align="center"
  1577. align="center"
  1578. label="库区"
  1579. >
  1580. </el-table-column>
  1581. </el-table>
  1582. <pagination
  1583. v-show="whgenlegTotal > 0"
  1584. :total="whgenlegTotal"
  1585. :page.sync="whgenlegParams.pageNum"
  1586. :limit.sync="whgenlegParams.pageSize"
  1587. @pagination="getWhgenlegList"
  1588. />
  1589. <div slot="footer" class="dialog-footer">
  1590. <el-button type="primary" @click="whgenlegData">导入</el-button>
  1591. <el-button @click="whgenlegVisible = false">取 消</el-button>
  1592. </div>
  1593. </el-dialog>
  1594. </el-dialog>
  1595. </div>
  1596. </template>
  1597. <script>
  1598. import print from 'print-js'
  1599. import {
  1600. backFee,
  1601. RevocationApproval,
  1602. addWhgenleg,
  1603. listGoodsTransfer,
  1604. getGoodsTransfer,
  1605. addGoodsTransfer,
  1606. warehouseSubmission,
  1607. delGoodsTransfer,
  1608. exportGoodsTransfer
  1609. } from '@/api/warehouseBusiness/goodsTransfer'
  1610. import { updateCredit } from '@/api/warehouseBusiness/goodsTransfer'
  1611. import { listCorps } from '@/api/basicdata/corps'
  1612. import { listFees } from '@/api/basicdata/fees'
  1613. import { listWarehouse } from '@/api/basicdata/warehouse'
  1614. import { listArea } from '@/api/basicdata/area'
  1615. import { listGoods } from '@/api/basicdata/goods'
  1616. import { listUser, queryUserVal } from '@/api/system/user'
  1617. import { listWhgenleg } from '@/api/reportManagement/whgenleg'
  1618. import UploadFile from '@/components/Uploadfile'
  1619. import AddOrUpdate from '@/views/viewApproval'
  1620. import ApprovalComments from '@/views/startApproval'
  1621. import Global from '@/layout/components/global'
  1622. import { getAgreement } from '@/api/warehouseBusiness/agreement'
  1623. export default {
  1624. name: 'goodsTransfer',
  1625. components: {
  1626. UploadFile,
  1627. AddOrUpdate,
  1628. ApprovalComments
  1629. },
  1630. data() {
  1631. return {
  1632. Lander:'',
  1633. Operator:'',
  1634. colseButton:true,
  1635. cancelButton:true,
  1636. disappear:false,
  1637. goodsTransferId:130,
  1638. addOrUpdateVisible: false,
  1639. addOrUpdateVisib:false,
  1640. approvalStatus: false,
  1641. // 审批状态
  1642. approve:false,
  1643. notChange:false,
  1644. // 修改查看状态
  1645. browseStatus: false,
  1646. // 是否有明细入库
  1647. formBrowseStatus: false,
  1648. // 遮罩层
  1649. loading: true,
  1650. // 选中数组
  1651. ids: [],
  1652. userVal: {
  1653. userName: null,
  1654. nickName: null,
  1655. deptId: null
  1656. },
  1657. queryForm: {},
  1658. // 添加用户对话框
  1659. editDialogVisible_s: false,
  1660. editDialogVisible_ss: false,
  1661. editDialogClosed_ss: false,
  1662. dataList: [],
  1663. warehouseCrList: [],
  1664. warehouseDrList: [],
  1665. relevantAttachments: [],
  1666. fPlannetweight: '',
  1667. // 税率
  1668. fTaxrate: null,
  1669. // 非单个禁用
  1670. single: true,
  1671. // 非多个禁用
  1672. multiple: true,
  1673. // 显示搜索条件
  1674. showSearch: true,
  1675. // 总条数
  1676. total: 0,
  1677. // 仓库主(出入库)表格数据
  1678. goodsTransferList: [],
  1679. // 弹出层标题
  1680. title: '',
  1681. // 是否显示弹出层
  1682. open: false,
  1683. // 货权方(客户数据)
  1684. fMblnoOptions: [],
  1685. // 货权方(客户数据)
  1686. // 客户名称
  1687. KHblnoOptions: [],
  1688. fSbuOptions: [],
  1689. // 操作员
  1690. userOptions: [],
  1691. // 操作员
  1692. goodsOptions: [],
  1693. // 库存明细入账数组
  1694. dataListSelection: [],
  1695. // 库存明细撤回入账数组
  1696. dataWithdrawList: [],
  1697. // 仓库(仓库
  1698. warehouseOptions: [],
  1699. // 仓储类型 入库时选择 产地 规格 品牌 所用,对应storage_type 字典
  1700. fStorageTypeOptions: [],
  1701. kqhouseOptions: [],
  1702. // 贸易方式(数据字典),对应t_trademodels 字典
  1703. fTrademodeidOptions: [],
  1704. // 计费单位(数据字典),下拉选择毛重或净重字典
  1705. fFeetunitOptions: [],
  1706. // 结算方式(数据字典),下拉选择字典
  1707. fStltypeOptions: [],
  1708. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  1709. fIfweighOptions: [],
  1710. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典
  1711. fIfpledgeOptions: [],
  1712. // 是否破损(数据字典),默认F否则T字典
  1713. fIfdamageOptions: [],
  1714. // 单据类型(数据字典)SJRK字典
  1715. fBilltypeOptions: [],
  1716. // 状态(数据字典),N 入字典
  1717. fBillstatusOptions: [],
  1718. // 费用名称
  1719. fWbuOptions: [],
  1720. // 查询参数
  1721. queryParams: {
  1722. pageNum: 1,
  1723. pageSize: 10,
  1724. fBillno: null,
  1725. createBy: null,
  1726. createTime: null,
  1727. fCustomsdeclartion: null,
  1728. fOriginalbillno: null,
  1729. fDeptid: null,
  1730. fBsdeptid: null,
  1731. fContacts: null,
  1732. fTel: null,
  1733. fCorpid: null,
  1734. fTocorpid: null,
  1735. fStltypeid: null,
  1736. fBscorpno: null,
  1737. fWarehouseid: null,
  1738. fStorekeeper: null,
  1739. fBsdate: null,
  1740. fPlanqty: null,
  1741. fPlangrossweight: null,
  1742. fPlannetweight: null,
  1743. fPlanvolumn: null,
  1744. fQty: null,
  1745. fGrossweight: null,
  1746. fNetweight: null,
  1747. fVolumn: null,
  1748. fTrademodeid: null,
  1749. fSbu: null,
  1750. fFeetunit: null,
  1751. fMblno: null,
  1752. fVslvoy: null,
  1753. fEta: null,
  1754. fCustomno: null,
  1755. fIfweigh: null,
  1756. fIfpledge: null,
  1757. fIfdamage: null,
  1758. fBankcorpid: null,
  1759. fBilltype: null,
  1760. fBillstatus: null,
  1761. fCreateby: null,
  1762. fCreatetime: null,
  1763. fGoodsid: null,
  1764. fCntrtype: null,
  1765. fCntqty: null
  1766. },
  1767. // 日期区间
  1768. orgStorageDate: null,
  1769. // 表单参数
  1770. form: {
  1771. fFeetunit:"2"
  1772. },
  1773. // 库存总账参数
  1774. whgenlegParams: {
  1775. pageNum: 1,
  1776. pageSize: 10,
  1777. fMblno: null,
  1778. fCorpid: null,
  1779. fWarehouseid: null,
  1780. fTrademodeid: null,
  1781. orgStorageDate: null
  1782. },
  1783. // 库存总账表
  1784. whgenlegList: [],
  1785. whgenlegTotal: 0,
  1786. // 弹窗库存总账数据
  1787. dialogWhgenlegList: [],
  1788. // 库存总账对话框
  1789. whgenlegVisible: false,
  1790. // 表单校验
  1791. rules: {
  1792. fBsdeptid: [{ required: true, message: ' ', trigger: 'blur' }],
  1793. fCorpid: [{ required: true, message: ' ', trigger: 'blur' }],
  1794. fBsdate: [{ required: true, message: ' ', trigger: 'blur' }],
  1795. fFeetunit: [{ required: true, message: ' ', trigger: 'blur' }],
  1796. fChargedate: [{ required: true, message: ' ', trigger: 'blur' }],
  1797. fTrademodeid: [{ required: true, message: ' ', trigger: 'blur' }],
  1798. fSbu: [{ required: true, message: ' ', trigger: 'blur' }],
  1799. fStorekeeper: {
  1800. required: true,
  1801. message: ' ',
  1802. trigger: 'blur'
  1803. },
  1804. fWarehouseid: [{ required: true, message: ' ', trigger: 'blur' }],
  1805. fbillingway: [
  1806. {
  1807. required: true,
  1808. message: ' ',
  1809. trigger: 'blur'
  1810. }
  1811. ],
  1812. fTocorpid: [
  1813. {
  1814. required: true,
  1815. message: ' ',
  1816. trigger: 'blur'
  1817. }
  1818. ]
  1819. }
  1820. }
  1821. },
  1822. created() {
  1823. this.getList()
  1824. this.getDicts('tax_rate').then((response) => {
  1825. this.fTaxrate = response.data[0].dictValue
  1826. })
  1827. this.getDicts('data_trademodes').then((response) => {
  1828. this.fTrademodeidOptions = response.data
  1829. })
  1830. this.getDicts("storage_type").then((response) => {
  1831. this.fStorageTypeOptions = response.data;
  1832. });
  1833. this.getDicts('data_stltype_type').then((response) => {
  1834. this.fStltypeOptions = response.data
  1835. })
  1836. this.getDicts('data_ifweigh_status').then((response) => {
  1837. this.fIfweighOptions = response.data
  1838. })
  1839. this.getDicts('data_ifpledge_status').then((response) => {
  1840. this.fIfpledgeOptions = response.data
  1841. })
  1842. this.getDicts('data_ifdamage_status').then((response) => {
  1843. this.fIfdamageOptions = response.data
  1844. })
  1845. this.getDicts('data_billtype_type').then((response) => {
  1846. this.fBilltypeOptions = response.data
  1847. })
  1848. this.getDicts('sys_common_status').then((response) => {
  1849. this.fBillstatusOptions = response.data
  1850. })
  1851. this.getDicts('data_unitfees').then((response) => {
  1852. this.fFeetunitOptions = response.data
  1853. })
  1854. this.register()
  1855. },
  1856. activated(){
  1857. this.Jump()
  1858. },
  1859. methods: {
  1860. // 撤销审核
  1861. backrRconciliation(){
  1862. this.form.fBillstatus = '1'
  1863. backFee(this.form.fId).then(response=>{
  1864. this.msgSuccess("撤回成功")
  1865. this.getList()
  1866. this.open = false
  1867. this.getList()
  1868. })
  1869. },
  1870. // 默认录入人
  1871. register() {
  1872. queryUserVal().then((response)=>{
  1873. this.Lander = response.user.userName
  1874. })
  1875. },
  1876. // 审批按钮
  1877. goApproval(){
  1878. this.addOrUpdateVisib = true
  1879. this.$nextTick(() => {
  1880. this.$refs.ApprovalComments.init(this.form.fId,this.goodsTransferId)
  1881. })
  1882. },
  1883. Jump(){
  1884. this.approval = this.$route.query.data
  1885. if(this.approval){
  1886. this.reset()
  1887. this.colseButton = false
  1888. this.approval = JSON.parse(this.approval)
  1889. this.hide = false
  1890. this.open = true
  1891. this.browseStatus = true
  1892. this.notChange = true
  1893. this.approve = true
  1894. this.disappear = true
  1895. this.cancelButton = false
  1896. getGoodsTransfer(this.approval.billId).then((response) => {
  1897. if (response.data.warehousebills) {
  1898. this.form = response.data.warehousebills;
  1899. if (this.form.fBillstatus > 2) {
  1900. this.approvalStatus = false;
  1901. } else {
  1902. this.approvalStatus = true;
  1903. }
  1904. }
  1905. this.form = response.data.warehousebills
  1906. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  1907. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  1908. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  1909. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  1910. this.fMblnoOptions = response.data.corps
  1911. this.KHblnoOptions = response.data.corps
  1912. this.fWbuOptions = response.data.feesList
  1913. this.warehouseOptions = response.data.warehouse
  1914. this.dataList = response.data.warehouseBillsItem
  1915. for (let list in this.dataList) {
  1916. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  1917. this.formBrowseStatus = true
  1918. }
  1919. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  1920. }
  1921. this.goodsOptions = response.data.goodsList
  1922. if (response.data.warehousebillsfeesDr) {
  1923. this.warehouseDrList = response.data.warehousebillsfeesDr
  1924. }
  1925. if (response.data.warehousebillsfeesCr) {
  1926. this.warehouseCrList = response.data.warehousebillsfeesCr
  1927. }
  1928. if (response.data.enclosures) {
  1929. this.relevantAttachments = response.data.enclosures;
  1930. }
  1931. this.userOptions = response.data.sysUser
  1932. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  1933. this.open = true
  1934. this.title = '修改货存转移'
  1935. })
  1936. }
  1937. },
  1938. homepaGe(){
  1939. let view = {
  1940. fullPath: "/business/goodsTransfer",
  1941. hash: "",
  1942. matched: Array(2),
  1943. meta: Object,
  1944. name: "GoodsTransfer",
  1945. params: Object,
  1946. path: "/business/goodsTransfer",
  1947. query: Object,
  1948. title: "货转"
  1949. }
  1950. this.$router.push({ path: '/index'})
  1951. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  1952. if (this.isActive(view)) {
  1953. this.toLastView(visitedViews, view)
  1954. }
  1955. })
  1956. Global.$emit("removeCache", "closeSelectedTag", view);
  1957. },
  1958. homePage() {
  1959. this.open = false
  1960. let view = {
  1961. fullPath: "/business/goodsTransfer",
  1962. hash: "",
  1963. matched: Array(2),
  1964. meta: Object,
  1965. name: "GoodsTransfer",
  1966. params: Object,
  1967. path: "/business/goodsTransfer",
  1968. query: Object,
  1969. title: "货转"
  1970. }
  1971. this.$router.push({ path: '/index' })
  1972. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  1973. if (this.isActive(view)) {
  1974. this.toLastView(visitedViews, view)
  1975. }
  1976. })
  1977. Global.$emit("removeCache", "closeSelectedTag", view);
  1978. },
  1979. // 撤销审批
  1980. backApproval(){
  1981. let data = {
  1982. id:this.form.fId,
  1983. actId:this.goodsTransferId,
  1984. billId:this.form.fId
  1985. }
  1986. RevocationApproval(data).then(response => {
  1987. this.msgSuccess("撤销审批成功")
  1988. this.disappear = true
  1989. this.open = false
  1990. this.getList()
  1991. })
  1992. },
  1993. returnData(){
  1994. this.addOrUpdateVisib = false
  1995. this.open = false
  1996. this.homepaGe()
  1997. },
  1998. getDataList(){
  1999. this.addOrUpdateVisible = false
  2000. },
  2001. // 查看审批流
  2002. addOrUpdateHandle(){
  2003. this.addOrUpdateVisible = true
  2004. this.addOrUpdateVisib = false
  2005. let id = '448'
  2006. let actId = '110'
  2007. this.$nextTick(() => {
  2008. this.$refs.addOrUpdate.init(this.form.fId,this.goodsTransferId)
  2009. })
  2010. },
  2011. // 上传成功返回数据
  2012. showFile(row) {
  2013. // this.$set(this.relevantAttachments[0], 'fName', row.fileName)
  2014. this.$set(this.relevantAttachments[0], 'fUrl', row.url)
  2015. },
  2016. printSomething() {
  2017. // 此处的style即为打印时的样式
  2018. const style =
  2019. '@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}'
  2020. print({
  2021. printable: 'print_area',
  2022. type: 'html',
  2023. style: style, // 亦可使用引入的外部css;
  2024. scanStyles: false
  2025. })
  2026. },
  2027. // 新增附件上传
  2028. addRelevt() {
  2029. this.relevantAttachments.push({
  2030. fUrl: null,
  2031. fName: null,
  2032. createBy: this.form.createBy,
  2033. createTime: Date.parse(new Date())
  2034. })
  2035. },
  2036. // 添加list
  2037. addRelevant() {
  2038. if (!this.form.fCorpid || !this.form.fTrademodeid || !this.form.fWarehouseid) {
  2039. this.$message({ message: '请维护货权方、贸易方式、仓库', type: 'warning' })
  2040. return false
  2041. }
  2042. this.whgenlegList = []
  2043. this.dialogWhgenlegList = []
  2044. this.whgenlegTotal = 0
  2045. this.whgenlegVisible = true
  2046. this.getWhgenlegList()
  2047. },
  2048. // 查询库存总账信息
  2049. getWhgenlegList() {
  2050. this.whgenlegParams.fMblno = this.form.fMblno
  2051. this.whgenlegParams.fCorpid = this.form.fCorpid
  2052. this.whgenlegParams.fWarehouseid = this.form.fWarehouseid
  2053. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid
  2054. this.whgenlegParams.orgStorageDate = this.orgStorageDate
  2055. listWhgenleg(this.whgenlegParams).then((response) => {
  2056. this.whgenlegList = response.rows
  2057. this.whgenlegTotal = response.total
  2058. })
  2059. },
  2060. // 库存总账多选框
  2061. whgenlegSelectionChange(selection) {
  2062. this.dialogWhgenlegList = selection
  2063. },
  2064. // 库存总账导出数据
  2065. whgenlegData() {
  2066. if (this.dialogWhgenlegList.length === 0) {
  2067. this.$message({ message: '未勾选信息', type: 'warning' })
  2068. return false
  2069. }
  2070. setTimeout(() => {
  2071. for (let whgen in this.dialogWhgenlegList) {
  2072. this.dataList.push({
  2073. fId: null,
  2074. fQty: 0,
  2075. fCntqty: 1,
  2076. remark: null,
  2077. fGoodsval: 0,
  2078. fNetweight: 0,
  2079. fBillstatus: 1,
  2080. fGrossweight: 0,
  2081. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  2082. fMarks: this.dialogWhgenlegList[whgen].fMarks,
  2083. fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
  2084. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  2085. fVolumn: this.dialogWhgenlegList[whgen].fVolumnblc,
  2086. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  2087. fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
  2088. fWarehouseids: this.dialogWhgenlegList[whgen].fWarehouseids,
  2089. fPackagespecs: this.dialogWhgenlegList[whgen].fPackagespecs,
  2090. fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
  2091. fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
  2092. fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
  2093. fBusinessType: this.dialogWhgenlegList[whgen].fBusinessType + '',
  2094. fOriginalbilldate: this.dialogWhgenlegList[whgen].fOriginalbilldate,
  2095. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  2096. fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids
  2097. })
  2098. }
  2099. }, 100)
  2100. setTimeout(() => {
  2101. this.updateDeduplication()
  2102. }, 300)
  2103. this.whgenlegVisible = false
  2104. },
  2105. // 更新主表品牌、品名并去重
  2106. updateDeduplication: function() {
  2107. if (this.dataList.length === 0) {
  2108. return false
  2109. }
  2110. let fMarks = []
  2111. let fProductName = []
  2112. let fMblno = []
  2113. for (let li in this.dataList) {
  2114. fMarks.push(this.dataList[li].fMarks)
  2115. fProductName.push(this.dataList[li].fGoodsids)
  2116. fMblno.push(this.dataList[li].fMblno)
  2117. }
  2118. this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
  2119. this.$set(this.form, 'fProductName', Array.from(new Set(fProductName)).join(","))
  2120. this.$set(this.form, 'fMblno', Array.from(new Set(fMblno)).join(","))
  2121. },
  2122. // 收货单打印界面
  2123. showEditDialog_s() {
  2124. this.editDialogVisible_s = true
  2125. },
  2126. showEditDialog_ss() {
  2127. this.editDialogVisible_ss = true
  2128. },
  2129. // 收款信息
  2130. addCollection() {
  2131. // 获取明细件数
  2132. let fQty = 0;
  2133. for (let li in this.dataList) {
  2134. if (this.dataList[li].fQty) {
  2135. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  2136. }
  2137. }
  2138. fQty=(fQty/1000).toFixed(2);
  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. fQty=(fQty/1000).toFixed(2);
  2165. this.warehouseCrList.push({
  2166. fCorpid: null,
  2167. fFeeid: null,
  2168. fFeeunitid: "1",
  2169. fQty: fQty,
  2170. fUnitprice: 0,
  2171. fAmount: 0,
  2172. fCurrency: null,
  2173. fTaxrate: this.fTaxrate,
  2174. fCxrate: null,
  2175. fRate: null,
  2176. remarks: null,
  2177. fMblno:this.form.fMblno,
  2178. fProductName:this.form.fProductName,
  2179. fMarks:this.form.fMarks
  2180. })
  2181. },
  2182. queryUser() {
  2183. queryUserVal().then((response) => {
  2184. if (response.user !== null) {
  2185. this.userVal = response.user
  2186. this.$set(this.form, 'fDeptid', this.userVal.deptId)
  2187. this.$set(this.form, 'createBy', this.userVal.userName)
  2188. this.$set(this.form,"fStorekeeper",this.userVal.userName)
  2189. this.$set(this.form, 'fTrademodeid', '1')
  2190. // this.$set(this.relevantAttachments, "opUserName", this.userVal.userName);
  2191. this.$set(this.form, 'createTime', Date.parse(new Date()))
  2192. }
  2193. })
  2194. },
  2195. /** 查询仓库主(出入库)列表 */
  2196. getList() {
  2197. this.loading = true
  2198. listGoodsTransfer(this.queryParams).then((response) => {
  2199. this.goodsTransferList = response.rows
  2200. this.total = response.total
  2201. this.loading = false
  2202. })
  2203. },
  2204. /* 远程模糊查询库区 */
  2205. kqhouseRemoteMethod(name) {
  2206. if (name == null || name === '') {
  2207. return false
  2208. }
  2209. if (!this.form.fWarehouseid) {
  2210. this.$message.error('请输入仓库!')
  2211. return false
  2212. }
  2213. let queryParams = {
  2214. pageNum: 1,
  2215. pageSize: 10,
  2216. fWarehouseid: this.form.fWarehouseid,
  2217. fName: name
  2218. }
  2219. listArea(queryParams).then((response) => {
  2220. this.kqhouseOptions = response.rows
  2221. })
  2222. },
  2223. // 贸易方式(数据字典),对���t_trademodels 字典翻译
  2224. fTrademodeidFormat(row, column) {
  2225. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid)
  2226. },
  2227. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  2228. fIfweighFormat(row, column) {
  2229. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh)
  2230. },
  2231. // 编号字典翻译
  2232. fStltypeidFormat(row, column) {
  2233. return this.selectDictLabel(this.fStltypeOptions, row.fStltypeid)
  2234. },
  2235. // 是否质押(数据字典),默认 F ,质押T 否者F 下拉选择字典翻译
  2236. fIfpledgeFormat(row, column) {
  2237. return this.selectDictLabel(this.fIfpledgeOptions, row.fIfpledge)
  2238. },
  2239. // 是否破损(数据字典),默认F否则T字典翻译
  2240. fIfdamageFormat(row, column) {
  2241. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage)
  2242. },
  2243. // 单据类型(数据字典)SJRK字典翻译
  2244. fBilltypeFormat(row, column) {
  2245. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype)
  2246. },
  2247. // 状态(数据字典),N 入字典翻译
  2248. fBillstatusFormat(row, column) {
  2249. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus)
  2250. },
  2251. // 取消按钮
  2252. cancel() {
  2253. this.reset()
  2254. this.open = false
  2255. this.getList()
  2256. },
  2257. // 表单重置
  2258. reset() {
  2259. this.disappear = false
  2260. this.addOrUpdateVisible = false
  2261. this.addOrUpdateVisib = false
  2262. this.approve = false
  2263. this.formBrowseStatus = false
  2264. this.detailsHidden = false
  2265. this.notChange = false
  2266. this.browseStatus = false
  2267. this.whgenlegVisible = false
  2268. this.editDialogVisible_ss = false
  2269. this.editDialogVisible_s = false
  2270. this.dataList = []
  2271. this.fWbuOptions = []
  2272. this.fWbuOptions = []
  2273. this.resetForm('form')
  2274. this.fMblnoOptions = []
  2275. this.KHblnoOptions = []
  2276. this.KHblnoOptions = []
  2277. this.warehouseDrList = []
  2278. this.warehouseCrList = []
  2279. this.warehouseOptions = []
  2280. this.relevantAttachments = []
  2281. },
  2282. /** 搜索按钮操作 */
  2283. handleQuery() {
  2284. this.queryParams.pageNum = 1
  2285. this.getList()
  2286. },
  2287. /** 重置按钮操作 */
  2288. resetQuery() {
  2289. this.resetForm('queryForm')
  2290. this.handleQuery()
  2291. },
  2292. // 多选框选中数据
  2293. handleSelectionChange(selection) {
  2294. this.ids = selection.map((item) => item.fId)
  2295. this.single = selection.length !== 1
  2296. this.multiple = !selection.length
  2297. },
  2298. /** 新增按钮操作 */
  2299. handleAdd() {
  2300. this.reset()
  2301. this.notChange = false
  2302. this.browseStatus = false
  2303. this.queryUser()
  2304. this.open = true
  2305. this.dataList = []
  2306. this.warehouseCrList = []
  2307. this.warehouseDrList = []
  2308. this.relevantAttachments = []
  2309. this.title = '货权转移'
  2310. },
  2311. check_s(row) {
  2312. this.disappear = true
  2313. this.notChange = true
  2314. this.browseStatus = true
  2315. const fId = row.fId || this.ids
  2316. getGoodsTransfer(fId).then((response) => {
  2317. this.Operator = response.data.corps[0].createBy
  2318. this.form = response.data.warehousebills
  2319. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2320. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2321. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2322. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2323. this.fMblnoOptions = response.data.corps
  2324. this.KHblnoOptions = response.data.corps
  2325. this.fWbuOptions = response.data.feesList
  2326. this.warehouseOptions = response.data.warehouse
  2327. this.dataList = response.data.warehouseBillsItem
  2328. for (let list in this.dataList) {
  2329. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  2330. this.formBrowseStatus = true
  2331. }
  2332. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2333. }
  2334. this.goodsOptions = response.data.goodsList
  2335. if (response.data.warehousebillsfeesDr) {
  2336. this.warehouseDrList = response.data.warehousebillsfeesDr
  2337. }
  2338. if (response.data.warehousebillsfeesCr) {
  2339. this.warehouseCrList = response.data.warehousebillsfeesCr
  2340. }
  2341. if (response.data.enclosures) {
  2342. this.relevantAttachments = response.data.enclosures;
  2343. }
  2344. this.userOptions = response.data.sysUser
  2345. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2346. this.open = true
  2347. this.title = '修改货存转移'
  2348. console.log(this.Operator)
  2349. console.log(this.Lander)
  2350. })
  2351. },
  2352. // 查看按钮
  2353. check(row) {
  2354. this.disappear = false
  2355. this.notChange = true
  2356. this.browseStatus = true
  2357. const fId = row.fId || this.ids
  2358. getGoodsTransfer(fId).then((response) => {
  2359. console.log(response.data.corps[0].createBy)
  2360. this.Operator = response.data.corps[0].createBy
  2361. this.form = response.data.warehousebills
  2362. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2363. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2364. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2365. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2366. this.fMblnoOptions = response.data.corps
  2367. this.KHblnoOptions = response.data.corps
  2368. this.fWbuOptions = response.data.feesList
  2369. this.warehouseOptions = response.data.warehouse
  2370. this.dataList = response.data.warehouseBillsItem
  2371. for (let list in this.dataList) {
  2372. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  2373. this.formBrowseStatus = true
  2374. }
  2375. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2376. }
  2377. this.goodsOptions = response.data.goodsList
  2378. if (response.data.warehousebillsfeesDr) {
  2379. this.warehouseDrList = response.data.warehousebillsfeesDr
  2380. }
  2381. if (response.data.warehousebillsfeesCr) {
  2382. this.warehouseCrList = response.data.warehousebillsfeesCr
  2383. }
  2384. if (response.data.enclosures) {
  2385. this.relevantAttachments = response.data.enclosures;
  2386. }
  2387. this.userOptions = response.data.sysUser
  2388. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2389. this.open = true
  2390. this.title = '修改货存转移'
  2391. console.log(this.Operator)
  2392. console.log(this.Lander)
  2393. })
  2394. },
  2395. /** 修改按钮操作 */
  2396. handleUpdate(row, status) {
  2397. this.reset()
  2398. this.notChange = false
  2399. this.browseStatus = status
  2400. const fId = row.fId || this.ids
  2401. getGoodsTransfer(fId).then((response) => {
  2402. this.form = response.data.warehousebills
  2403. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2404. this.$set(this.form, 'fFeetunit', this.form.fFeetunit + '')
  2405. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2406. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2407. this.fMblnoOptions = response.data.corps
  2408. this.KHblnoOptions = response.data.corps
  2409. this.fWbuOptions = response.data.feesList
  2410. this.warehouseOptions = response.data.warehouse
  2411. this.dataList = response.data.warehouseBillsItem
  2412. for (let list in this.dataList) {
  2413. if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
  2414. this.formBrowseStatus = true
  2415. }
  2416. this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
  2417. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  2418. }
  2419. this.goodsOptions = response.data.goodsList
  2420. if (response.data.warehousebillsfeesDr) {
  2421. this.warehouseDrList = response.data.warehousebillsfeesDr
  2422. for (let dr in this.warehouseDrList) {
  2423. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  2424. }
  2425. }
  2426. if (response.data.warehousebillsfeesCr) {
  2427. this.warehouseCrList = response.data.warehousebillsfeesCr
  2428. for (let cr in this.warehouseCrList) {
  2429. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  2430. }
  2431. }
  2432. if (response.data.enclosures) {
  2433. this.relevantAttachments = response.data.enclosures;
  2434. }
  2435. this.userOptions = response.data.sysUser
  2436. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2437. this.open = true
  2438. this.title = '修改货存转移'
  2439. })
  2440. },
  2441. // 库存明细合计
  2442. getSummaries(param) {
  2443. const { columns, data } = param
  2444. const sums = []
  2445. var values = []
  2446. columns.forEach((column, index) => {
  2447. if (index === 0) {
  2448. sums[index] = ''
  2449. return
  2450. }
  2451. if (column.property === 'fPlanqty') {
  2452. values = data.map((item) => Number(item['fPlanqty']))
  2453. }
  2454. if (column.property === 'fNetweight') {
  2455. values = data.map((item) => Number(item['fPlannetweight']))
  2456. }
  2457. if (column.property === 'fPlannetweight') {
  2458. values = data.map((item) => Number(item['fPlannetweight']))
  2459. }
  2460. if (column.property === 'fQty') {
  2461. values = data.map((item) => Number(item['fQty']))
  2462. }
  2463. if (column.property === 'fGrossweight') {
  2464. values = data.map((item) => Number(item['fGrossweight']))
  2465. }
  2466. if (column.property === 'fCntqty') {
  2467. values = data.map((item) => Number(item['fCntqty']))
  2468. } // const values = data.map(item => Number(item[column.property]))
  2469. if (
  2470. column.property === 'fPlanqty' ||
  2471. column.property === 'fPlannetweight' ||
  2472. column.property === 'fQty' ||
  2473. column.property === 'fGrossweight' ||
  2474. column.property === 'fCntqty' ||
  2475. column.property === 'fPlannetweight'
  2476. ) {
  2477. sums[index] = values.reduce((prev, curr) => {
  2478. const value = Number(curr)
  2479. if (!isNaN(value)) {
  2480. if (column.property === 'fGrossweight') {
  2481. this.form.fGrossweight = prev + curr
  2482. }
  2483. if (column.property === 'fQty') {
  2484. this.form.fQty = prev + curr
  2485. }
  2486. if (column.property === 'fCntqty') {
  2487. this.form.fCntqty = prev + curr
  2488. }
  2489. if (column.property === 'fPlannetweight') {
  2490. this.form.fNetweight = prev + curr
  2491. }
  2492. return prev + curr
  2493. } else {
  2494. return prev
  2495. }
  2496. }, 0) // sums[index]
  2497. }
  2498. })
  2499. this.sums = sums
  2500. return sums
  2501. },
  2502. // 入账
  2503. creditClick() {
  2504. if (this.dataList.length === 0) {
  2505. this.$message({ message: '未找到货转明细', type: 'warning' })
  2506. return false
  2507. }
  2508. for (let dataSelection in this.dataListSelection) {
  2509. if (!this.dataListSelection[dataSelection].fId) {
  2510. this.$message({ message: '请先点击保存,在进行货转确认', type: 'warning' })
  2511. return false
  2512. }
  2513. }
  2514. this.$refs['form'].validate((valid) => {
  2515. if (valid) {
  2516. for (let li in this.dataList) {
  2517. if(this.form.fFeetunit > 3){
  2518. this.$message.error('请维护主表计费单位为件数、毛重或净重')
  2519. return false
  2520. }
  2521. if (!this.dataList[li].fWarehouselocids) {
  2522. this.$message({ message: '请维护第' + Number(li) + 1 + '行库区', type: 'warning' })
  2523. return false
  2524. }
  2525. if (!this.dataList[li].fQty) {
  2526. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转件数', type: 'warning' })
  2527. return false
  2528. }
  2529. if (!this.dataList[li].fGrossweight) {
  2530. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转毛重', type: 'warning' })
  2531. return false
  2532. }
  2533. if (!this.dataList[li].fNetweight) {
  2534. this.$message({ message: '请维护第' + Number(li) + 1 + '行货转净重', type: 'warning' })
  2535. return false
  2536. }
  2537. if (!this.dataList[li].fPackagespecs) {
  2538. this.$message({ message: '请维护第' + Number(li) + 1 + '行货包装规格', type: 'warning' })
  2539. return false
  2540. }
  2541. }
  2542. let formData = new window.FormData()
  2543. formData.append("warehouseBills", JSON.stringify(this.form));
  2544. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2545. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  2546. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2547. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2548. addWhgenleg(formData).then((response) => {
  2549. this.$refs.tableListRef.clearSelection()
  2550. this.msgSuccess('入账成功')
  2551. let item = response.data.warehouseItem
  2552. for (let li in this.dataList) {
  2553. for (let ite in item) {
  2554. if (this.dataList[li].fId === item[ite].fId) {
  2555. this.$set(this.dataList[li], 'fBillstatus', 6)
  2556. }
  2557. }
  2558. }
  2559. this.formBrowseStatus = true
  2560. })
  2561. }
  2562. })
  2563. },
  2564. // 撤回货转
  2565. withdrawClick() {
  2566. // 撤回货转
  2567. let formData = new window.FormData()
  2568. let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
  2569. formData.append("warehouseBills", JSON.stringify(this.form));
  2570. formData.append("warehousebillsitems", JSON.stringify(withdrawList));
  2571. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2572. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2573. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2574. updateCredit(formData).then((response) => {
  2575. this.fid = response.data
  2576. this.formBrowseStatus = false
  2577. this.msgSuccess('撤销入账成功')
  2578. this.$refs.tableListRef.clearSelection()
  2579. let mun = 0;
  2580. for (let i in this.dataList) {
  2581. for (let li in withdrawList) {
  2582. if (withdrawList[li].fId === this.dataList[i].fId) {
  2583. this.$set(this.dataList[i], 'fBillstatus', 1)
  2584. }
  2585. }
  2586. if (this.dataList[i].fBillstatus && this.dataList[i].fBillstatus === 6) {
  2587. mun ++;
  2588. }
  2589. }
  2590. if (mun > 0) {
  2591. this.formBrowseStatus = true
  2592. } else {
  2593. this.formBrowseStatus = false
  2594. }
  2595. })
  2596. },
  2597. // 付款合计
  2598. warehouseDrSummaries(param) {
  2599. const { columns, data } = param
  2600. const sums = []
  2601. columns.forEach((column, index) => {
  2602. if (index === 0) {
  2603. sums[index] = '合计'
  2604. return
  2605. }
  2606. const values = data.map((item) => Number(item[column.property]))
  2607. if (
  2608. column.property === 'fUnitprice' ||
  2609. column.property === 'fAmount' ||
  2610. column.property === 'fQty' ||
  2611. column.property === 'fQty'
  2612. ) {
  2613. sums[index] = values.reduce((prev, curr) => {
  2614. const value = Number(curr)
  2615. if (!isNaN(value)) {
  2616. return prev + curr
  2617. } else {
  2618. return prev
  2619. }
  2620. }, 0) // sums[index]
  2621. sums[index] = sums[index].toFixed(2);
  2622. }
  2623. })
  2624. return sums
  2625. },
  2626. // 数量计算
  2627. changeContractAmt(row) {
  2628. let fQty = 0
  2629. let fUnitprice = 0
  2630. if (row.fUnitprice) {
  2631. fUnitprice = row.fUnitprice
  2632. }
  2633. if (row.fQty) {
  2634. fQty = row.fQty
  2635. }
  2636. this.$set(row, 'fAmount', Number(fUnitprice) * Number(fQty)).toFixed(2)
  2637. },
  2638. changefBsdate(row) {
  2639. if (this.dataList.length > 0) {
  2640. for (var i = 0; i < this.dataList.length; i++) {
  2641. this.$set(this.dataList[i], 'fBsdate', row)
  2642. }
  2643. }
  2644. },
  2645. // 库存明细多选
  2646. Selectinventory(selection) {
  2647. this.dataWithdrawList = []
  2648. this.dataListSelection = []
  2649. if (!selection || selection.length === 0) {
  2650. return false
  2651. }
  2652. for (let se in selection) {
  2653. if (!selection[se].fBillstatus || selection[se].fBillstatus !== 6) {
  2654. this.dataListSelection.push(selection[se])
  2655. } else if (selection[se].fBillstatus && selection[se].fBillstatus === 6) {
  2656. this.dataWithdrawList.push(selection[se])
  2657. }
  2658. }
  2659. },
  2660. // 库存明细多选框结果
  2661. dataListChange(row) {
  2662. this.dataListSelection = row
  2663. },
  2664. saveForm() {
  2665. this.updateDeduplication()
  2666. this.$refs['form'].validate((valid) => {
  2667. if (this.form.fCorpid === this.form.fTocorpid) {
  2668. this.$message.error('新货权方不得与货权方一致')
  2669. return false
  2670. }
  2671. if (this.dataList.length === 0) {
  2672. this.$message.error('请添加库存明细!')
  2673. return false
  2674. }
  2675. this.updateDeduplication()
  2676. for (let list in this.dataList) {
  2677. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  2678. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  2679. return false
  2680. }
  2681. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  2682. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重!')
  2683. return false
  2684. }
  2685. }
  2686. if (valid) {
  2687. this.form.fBillstatus = 2
  2688. let formData = new window.FormData()
  2689. formData.append("warehouseBills", JSON.stringify(this.form));
  2690. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  2691. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2692. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2693. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2694. addGoodsTransfer(formData).then((response) => {
  2695. this.msgSuccess('保存成功')
  2696. this.form = response.data.warehouseBills
  2697. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  2698. this.$set(this.form, 'fFeetunit',this.form.fFeetunit + '')
  2699. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  2700. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  2701. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  2702. this.dataList = response.data.warehousebillsitems
  2703. for (let li in this.dataList) {
  2704. this.$set(this.dataList[li], 'fBusinessType', this.dataList[li].fBusinessType + '')
  2705. }
  2706. })
  2707. }
  2708. })
  2709. },
  2710. /** 提交按钮 */
  2711. submitForm() {
  2712. this.$refs['form'].validate((valid) => {
  2713. if (this.form.fCorpid === this.form.fTocorpid) {
  2714. this.$message.error('新货权方不得与货权方一致')
  2715. return false
  2716. }
  2717. if (this.dataList.length === 0) {
  2718. this.$message.error('请添加库存明细!')
  2719. return false
  2720. }
  2721. for (let list in this.dataList) {
  2722. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  2723. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')
  2724. return false
  2725. }
  2726. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  2727. this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转毛重!')
  2728. return false
  2729. }
  2730. }
  2731. if (this.relevantAttachments.length !== 0) {
  2732. for (let relevant in this.relevantAttachments) {
  2733. if (!this.relevantAttachments[relevant].fName) {
  2734. this.$message.error('请输入附件名称!')
  2735. return false
  2736. }
  2737. }
  2738. }
  2739. if (this.warehouseDrList.length !== 0) {
  2740. for (let warehouseDr in this.warehouseDrList) {
  2741. if (!this.warehouseDrList[warehouseDr].fAmount) {
  2742. this.$message.error('收款信息序号为' + (Number(warehouseDr) + 1) + '的金额异常')
  2743. return false
  2744. }
  2745. }
  2746. }
  2747. if (this.warehouseDrList.length !== 0) {
  2748. for (let warehouseCr in this.warehouseCrList) {
  2749. if (!this.warehouseCrList[warehouseCr].fAmount) {
  2750. this.$message.error(
  2751. '付款信息序号为' + (Number(warehouseCr) + 1) + '的金额异常'
  2752. )
  2753. return false
  2754. }
  2755. }
  2756. }
  2757. if (valid) {
  2758. // this.form.fBillstatus = 4
  2759. let formData = new window.FormData()
  2760. formData.append("warehouseBills", JSON.stringify(this.form));
  2761. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  2762. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  2763. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  2764. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  2765. warehouseSubmission(formData).then((response) => {
  2766. this.msgSuccess('提交成功')
  2767. // this.browseStatus = true
  2768. // this.notChange = true
  2769. this.cancel()
  2770. this.getList()
  2771. })
  2772. }
  2773. })
  2774. },
  2775. /** 删除按钮操作 */
  2776. handleDelete(row) {
  2777. const fIds = row.fId || this.ids
  2778. this.$confirm(
  2779. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  2780. '警告',
  2781. {
  2782. confirmButtonText: '确定',
  2783. cancelButtonText: '取消',
  2784. type: 'warning'
  2785. }
  2786. )
  2787. .then(function() {
  2788. return delGoodsTransfer(fIds)
  2789. })
  2790. .then(() => {
  2791. this.getList()
  2792. this.msgSuccess('删除成功')
  2793. })
  2794. },
  2795. /** 导出按钮操作 */
  2796. handleExport() {
  2797. const queryParams = this.queryParams
  2798. this.$confirm('是否确认导出所有仓库主(出入库)数据项?', '警告', {
  2799. confirmButtonText: '确定',
  2800. cancelButtonText: '取消',
  2801. type: 'warning'
  2802. })
  2803. .then(function() {
  2804. return exportgoodsTransfer(queryParams)
  2805. })
  2806. .then((response) => {
  2807. this.download(response.msg)
  2808. })
  2809. },
  2810. // 货转件数的计算
  2811. qtyChange(row) {
  2812. if (!row.fQty || row.fQty === '') {
  2813. this.$set(row, 'fNetweight', 0)
  2814. this.$set(row, 'fGrossweight', 0)
  2815. return false
  2816. }
  2817. if (row.fPlanqty < row.fQty) {
  2818. this.$message.error("货转件数超出结余件数!");
  2819. this.$set(row, 'fQty', 0)
  2820. this.$set(row, 'fNetweight', 0)
  2821. this.$set(row, 'fGrossweight', 0)
  2822. return false;
  2823. }
  2824. let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(2)
  2825. let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(2)
  2826. this.$set(row, 'fNetweight', parseFloat(Number(netweight) * Number(row.fQty)).toFixed(2))
  2827. this.$set(row, 'fGrossweight', parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(2))
  2828. },
  2829. // 修改毛重净重
  2830. changeTransfer (row) {
  2831. let fNetweight = 0;
  2832. let fGrossweight = 0;
  2833. if (row.fNetweight) {
  2834. fNetweight = row.fNetweight
  2835. }
  2836. if (row.fGrossweight) {
  2837. fGrossweight = row.fGrossweight
  2838. }
  2839. if (row.fPlannetweight < fNetweight) {
  2840. this.$message({ message: '货转净重超出结余净重', type: 'warning' })
  2841. return false
  2842. }
  2843. if (row.fPlangrossweight < fGrossweight) {
  2844. this.$message({ message: '货转毛重超出结余毛重', type: 'warning' })
  2845. return false
  2846. }
  2847. },
  2848. deleteRow(index, rows) {
  2849. rows.splice(index, 1)
  2850. this.this.updateDeduplication()
  2851. },
  2852. // 变更计价单位
  2853. changeFeeUnit(row) {
  2854. if (!row.fFeeunitid) {
  2855. return false
  2856. }
  2857. let fQty = 0;
  2858. let fGrossweight = 0;
  2859. let fNetweight = 0;
  2860. let volumn = 0;
  2861. let fixed = 1;
  2862. for (let li in this.dataList) {
  2863. if (this.dataList[li].fQty) {
  2864. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  2865. }
  2866. if (this.dataList[li].fGrossweight) {
  2867. fGrossweight = parseFloat(Number(fGrossweight) + Number(this.dataList[li].fGrossweight)).toFixed(2)
  2868. }
  2869. if (this.dataList[li].fNetweight) {
  2870. fNetweight = parseFloat(Number(fNetweight) + Number(this.dataList[li].fNetweight)).toFixed(2)
  2871. }
  2872. if (this.dataList[li].volumn) {
  2873. volumn = parseFloat(Number(volumn) + Number(this.dataList[li].volumn)).toFixed(2)
  2874. }
  2875. }
  2876. if (row.fFeeunitid === 1) {
  2877. this.$set(row, 'fQty', (fQty/1000).toFixed(2))
  2878. } else if (row.fFeeunitid === 2) {
  2879. this.$set(row, 'fQty', (fGrossweight/1000).toFixed(2))
  2880. }else if (row.fFeeunitid === 3) {
  2881. this.$set(row, 'fQty', (fNetweight/1000).toFixed(2))
  2882. }else if (row.fFeeunitid === 4) {
  2883. this.$set(row, 'fQty', (volumn/1000).toFixed(2))
  2884. }else if (row.fFeeunitid === 5) {
  2885. this.$set(row, 'fQty', (fixed/1000).toFixed(2))
  2886. }
  2887. if (row.fUnitprice) {
  2888. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  2889. }
  2890. },
  2891. // 选择新货权方自动带出结算方式
  2892. changefCorpid(row) {
  2893. this.$set(row, "fSbu", row.fCorpid);
  2894. for (let corp in this.fMblnoOptions) {
  2895. if (row.fTocorpid === this.fMblnoOptions[corp].fId) {
  2896. this.$set(this.form, "fStltypeid", this.fMblnoOptions[corp].fStltypeid + '');
  2897. }
  2898. }
  2899. },
  2900. /* 远程模糊查询用户 */
  2901. corpsRemoteMethod(name) {
  2902. if (name == null || name === '') {
  2903. return false
  2904. }
  2905. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2906. listCorps(queryParams).then((response) => {
  2907. this.fMblnoOptions = response.rows
  2908. this.KHblnoOptions = response.rows
  2909. })
  2910. },
  2911. /* 远程模糊查询商品 */
  2912. goodsRemoteMethod(name) {
  2913. if (name == null || name === '') {
  2914. return false
  2915. }
  2916. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2917. listGoods(queryParams).then((response) => {
  2918. this.goodsOptions = response.rows
  2919. })
  2920. },
  2921. // 选择费用信息时获取计价单位
  2922. changeFeeId (row) {
  2923. for (let li in this.fWbuOptions) {
  2924. if (row.fFeeid === this.fWbuOptions[li].fId) {
  2925. this.$set(row, 'fFeeUnitid', this.fWbuOptions[li].fFeeunitid + '')
  2926. this.changeFeeUnit(row)
  2927. break
  2928. }
  2929. }
  2930. },
  2931. // 远程模糊查询费用名称
  2932. fWRemoteMethod(name) {
  2933. if (name == null || name === '') {
  2934. return false
  2935. }
  2936. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2937. listFees(queryParams).then((response) => {
  2938. this.fWbuOptions = response.rows
  2939. })
  2940. },
  2941. /* 远程模糊查询经营单位 */
  2942. fSbuRemoteMethod(name) {
  2943. if (name == null || name === '') {
  2944. return false
  2945. }
  2946. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2947. listCorps(queryParams).then((response) => {
  2948. this.fSbuOptions = response.rows
  2949. })
  2950. },
  2951. /* 远程模糊查询仓库 */
  2952. warehouseRemoteMethod(name) {
  2953. if (name == null || name === '') {
  2954. return false
  2955. }
  2956. let queryParams = { pageNum: 1, pageSize: 10, fName: name }
  2957. listWarehouse(queryParams).then((response) => {
  2958. this.warehouseOptions = response.rows
  2959. })
  2960. },
  2961. /* 远程模糊查询操作用户 */
  2962. userRemoteMethod(name) {
  2963. if (name == null || name === '') {
  2964. return false
  2965. }
  2966. let queryParams = { pageNum: 1, pageSize: 10, userName: name }
  2967. listUser(queryParams).then((response) => {
  2968. this.userOptions = response.rows
  2969. })
  2970. }
  2971. }
  2972. }
  2973. </script>
  2974. <style lang="scss">
  2975. .juzhong > th {
  2976. text-align: center;
  2977. }
  2978. .biaoge > tr > td {
  2979. height: 30px;
  2980. text-align: center;
  2981. border-right: 1px solid #dfe6ec !important;
  2982. order-bottom: 1px solid #dfe6ec !important;
  2983. border-bottom: 1px solid #dfe6ec !important;
  2984. }
  2985. .el-table thead th {
  2986. background: #1890ff;
  2987. color: #fff;
  2988. }
  2989. .upload-demo {
  2990. margin-left: 50px;
  2991. }
  2992. .el-form-item {
  2993. margin-bottom: 5px !important;
  2994. }
  2995. .el-form-item__label {
  2996. font-size: 12px !important;
  2997. }
  2998. </style>