index.vue 112 KB

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