index.vue 136 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="88px"
  9. >
  10. <el-form-item label="业务编号" prop="fBillno">
  11. <el-input
  12. v-model="queryParams.fBillno"
  13. placeholder="请输入业务编号"
  14. style="width: 80%"
  15. clearable
  16. size="small"
  17. @keyup.enter.native="handleQuery"
  18. />
  19. </el-form-item>
  20. <el-form-item label="制单人" prop="createBy">
  21. <el-select
  22. v-model="queryParams.createBy"
  23. filterable
  24. remote
  25. clearable
  26. style="width: 80%"
  27. :remote-method="userRemoteMethod"
  28. placeholder="请选择制单人"
  29. >
  30. <el-option
  31. v-for="(dict, index) in userOptions"
  32. :key="index.userName"
  33. :label="dict.nickName"
  34. :value="dict.userName"
  35. ></el-option>
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item label="调拨日期" prop="timeInterval">
  39. <el-date-picker
  40. v-model="queryParams.timeInterval"
  41. type="daterange"
  42. value-format="yyyy-MM-dd"
  43. clearable
  44. style="width: 60%"
  45. range-separator="至"
  46. start-placeholder="开始日期"
  47. end-placeholder="结束日期"
  48. @keyup.enter.native="handleQuery"
  49. >
  50. </el-date-picker>
  51. </el-form-item>
  52. <el-form-item label="贸易方式" prop="fTrademodeid">
  53. <el-select
  54. v-model="queryParams.fTrademodeid"
  55. placeholder="请选择贸易方式"
  56. clearable
  57. style="width: 80%"
  58. @keyup.enter.native="handleQuery"
  59. >
  60. <el-option
  61. v-for="(dict, index) in fTrademodeidOptions"
  62. :key="index.dictValue"
  63. :label="dict.dictLabel"
  64. :value="dict.dictValue"
  65. />
  66. </el-select>
  67. </el-form-item>
  68. <el-form-item label="货权方" prop="fCorpid">
  69. <el-select
  70. v-model="queryParams.fCorpid"
  71. filterable
  72. remote
  73. clearable
  74. style="width: 80%"
  75. @keyup.enter.native="handleQuery"
  76. :remote-method="corpsRemoteMethod"
  77. placeholder="请选择货权方"
  78. >
  79. <el-option
  80. v-for="(dict, index) in fMblnoOptions"
  81. :key="index.fId"
  82. :label="dict.fName"
  83. :value="dict.fId"
  84. ></el-option>
  85. </el-select>
  86. </el-form-item>
  87. <el-form-item label="提单号" prop="fMblno">
  88. <el-input
  89. v-model="queryParams.fMblno"
  90. placeholder="请输入提单号"
  91. clearable
  92. style="width: 80%"
  93. size="small"
  94. @keyup.enter.native="handleQuery"
  95. />
  96. </el-form-item>
  97. <el-form-item label="经营单位" prop="fSbu">
  98. <el-select
  99. v-model="queryParams.fSbu"
  100. filterable
  101. remote
  102. clearable
  103. :remote-method="fSbuRemoteMethod"
  104. @keyup.enter.native="handleQuery"
  105. style="width: 80%"
  106. placeholder="请选择经营单位"
  107. >
  108. <el-option
  109. v-for="(dict, index) in fSbuOptions"
  110. :key="index.fId"
  111. :label="dict.fName"
  112. :value="dict.fId"
  113. ></el-option>
  114. </el-select>
  115. </el-form-item>
  116. <el-form-item label="货物名称" prop="fGoodsid">
  117. <el-select
  118. v-model="queryParams.fGoodsid"
  119. filterable
  120. remote
  121. clearable
  122. :remote-method="goodsRemoteMethod"
  123. @keyup.enter.native="handleQuery"
  124. placeholder="请选择货物名称"
  125. >
  126. <el-option
  127. v-for="(dict, index) in goodsOptions"
  128. :key="index.fId"
  129. :label="dict.fName"
  130. :value="dict.fId"
  131. ></el-option>
  132. </el-select>
  133. </el-form-item>
  134. <el-form-item label="仓库" prop="fWarehouseid">
  135. <el-select
  136. v-model="queryParams.fWarehouseid"
  137. filterable
  138. remote
  139. clearable
  140. style="width: 80%"
  141. :remote-method="warehouseRemoteMethod"
  142. @keyup.enter.native="handleQuery"
  143. placeholder="请选择仓库"
  144. >
  145. <el-option
  146. v-for="(dict, index) in warehouseOptions"
  147. :key="index.fId"
  148. :label="dict.fName"
  149. :value="dict.fId"
  150. ></el-option>
  151. </el-select>
  152. </el-form-item>
  153. <el-form-item label="品牌" prop="fMarks">
  154. <el-input
  155. v-model="queryParams.fMarks"
  156. placeholder="请输入品牌"
  157. clearable
  158. size="small"
  159. style="width: 80%"
  160. @keyup.enter.native="handleQuery"
  161. />
  162. </el-form-item>
  163. <el-form-item>
  164. <el-button
  165. type="cyan"
  166. icon="el-icon-search"
  167. size="mini"
  168. @click="handleQuery"
  169. >搜索
  170. </el-button>
  171. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  172. >重置
  173. </el-button>
  174. </el-form-item>
  175. </el-form>
  176. <el-row :gutter="10" class="mb8">
  177. <el-col :span="1.5">
  178. <el-button
  179. type="primary"
  180. icon="el-icon-plus"
  181. size="mini"
  182. @click="handleAdd(false)"
  183. v-hasPermi="['warehouseBusiness:stockTransfer:add']"
  184. >新增
  185. </el-button>
  186. </el-col>
  187. <el-col :span="1.5">
  188. <el-button
  189. type="success"
  190. icon="el-icon-edit"
  191. size="mini"
  192. :disabled="single"
  193. @click="handleUpdate"
  194. v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
  195. >修改
  196. </el-button>
  197. </el-col>
  198. <el-col :span="1.5">
  199. <el-button
  200. type="warning"
  201. icon="el-icon-download"
  202. size="mini"
  203. @click="handleExport"
  204. v-hasPermi="['warehouseBusiness:stockTransfer:export']"
  205. >导出
  206. </el-button>
  207. </el-col>
  208. <el-col :span="1.5">
  209. <el-button
  210. type="warning"
  211. icon="el-icon-download"
  212. size="mini"
  213. @click="handleExport"
  214. :disabled="multiple"
  215. v-hasPermi="['warehouseBusiness:stockTransfer:export']"
  216. >导入
  217. </el-button>
  218. </el-col>
  219. <right-toolbar
  220. :showSearch.sync="showSearch"
  221. @queryTable="getList"
  222. ></right-toolbar>
  223. </el-row>
  224. <el-table
  225. v-loading="loading"
  226. :data="warehousebillsList"
  227. @selection-change="handleSelectionChange"
  228. >
  229. <el-table-column type="selection" width="55" align="center" />
  230. <el-table-column type="index" label="行号" align="center" />
  231. <el-table-column
  232. :show-overflow-tooltip="true"
  233. label="货权方"
  234. align="center"
  235. prop="fCorpid"
  236. />
  237. <el-table-column label="提单号" align="center" prop="fMblno" />
  238. <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
  239. <el-table-column label="品牌" align="center" prop="fMarks" />
  240. <el-table-column
  241. label="调拨日期"
  242. align="center"
  243. prop="createTime"
  244. style="width: 60%"
  245. ><template slot-scope="scope">
  246. <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
  247. </template>
  248. </el-table-column>
  249. <el-table-column label="仓库" align="center" prop="fWarehouseid" />
  250. <el-table-column label="计划调拨件数" align="center" prop="fPlanqty" />
  251. <el-table-column label="调拨件数" align="center" prop="fQty" />
  252. <el-table-column label="调拨毛重" align="center" prop="fGrossweight" />
  253. <el-table-column label="调拨净重" align="center" prop="fNetweight" />
  254. <el-table-column
  255. width="100"
  256. label="调拨状态"
  257. align="center"
  258. prop="fItemsStatus"
  259. >
  260. <template slot-scope="scope">
  261. <span v-if="scope.row.fItemsStatus === 1">计划</span>
  262. <span v-if="scope.row.fItemsStatus === 2">待调拨</span>
  263. <span v-if="scope.row.fItemsStatus === 6">已调拨</span>
  264. </template>
  265. </el-table-column>
  266. <el-table-column
  267. width="100"
  268. label="费用状态"
  269. align="center"
  270. prop="fBillstatus"
  271. >
  272. <template slot-scope="scope">
  273. <span v-if="scope.row.fBillstatus === 1">录入</span>
  274. <span v-if="scope.row.fBillstatus === 2">暂存</span>
  275. <span v-if="scope.row.fBillstatus === 3">驳回</span>
  276. <span v-if="scope.row.fBillstatus === 4">请核</span>
  277. <span v-if="scope.row.fBillstatus === 5">审核中</span>
  278. <span v-if="scope.row.fBillstatus === 6">全部入账</span>
  279. </template>
  280. </el-table-column>
  281. <el-table-column
  282. label="操作"
  283. align="center"
  284. class-name="small-padding fixed-width"
  285. width="180"
  286. >
  287. <template slot-scope="scope">
  288. <el-button
  289. size="mini"
  290. type="text"
  291. icon="el-icon-edit"
  292. @click="check_s(scope.row, true)"
  293. v-hasPermi="['warehouseBusiness:stockTransfer:query']"
  294. >查看
  295. </el-button>
  296. <el-button
  297. size="mini"
  298. type="text"
  299. icon="el-icon-edit"
  300. v-if="scope.row.fBillstatus === 4 || scope.row.fBillstatus === 5"
  301. @click="check(scope.row, true)"
  302. v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
  303. >审批进度
  304. </el-button>
  305. <el-button
  306. size="mini"
  307. type="text"
  308. icon="el-icon-edit"
  309. v-if="scope.row.fBillstatus <= 3"
  310. @click="handleUpdate(scope.row, false)"
  311. v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
  312. >修改
  313. </el-button>
  314. <el-button
  315. size="mini"
  316. type="text"
  317. icon="el-icon-delete"
  318. @click="handleDelete(scope.row)"
  319. v-if="scope.row.fBillstatus <= 3"
  320. v-hasPermi="['warehouseBusiness:stockTransfer:remove']"
  321. >删除
  322. </el-button>
  323. </template>
  324. </el-table-column>
  325. </el-table>
  326. <pagination
  327. v-show="total > 0"
  328. :total="total"
  329. :page.sync="queryParams.pageNum"
  330. :limit.sync="queryParams.pageSize"
  331. @pagination="getList"
  332. />
  333. <!-- 新增或修改仓库主(出入库)对话框 -->
  334. <el-dialog
  335. :visible.sync="open"
  336. :close-on-click-modal="false"
  337. @close='addCloseDialog'
  338. width="80%"
  339. append-to-body
  340. :show-close="colseButton"
  341. >
  342. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  343. <el-row>
  344. <el-col :span="8">
  345. <el-form-item label="货权方" prop="fCorpid">
  346. <el-select
  347. v-model="form.fCorpid"
  348. filterable
  349. remote
  350. :disabled="notChange || formBrowseStatus"
  351. @change="changefCorpid(form)"
  352. style="width: 80%"
  353. :remote-method="corpsRemoteMethod"
  354. placeholder="请输入模糊查找"
  355. >
  356. <el-option
  357. v-for="(dict, index) in fMblnoOptions"
  358. :key="index.fId"
  359. :label="dict.fName"
  360. :value="dict.fId"
  361. ></el-option>
  362. </el-select>
  363. </el-form-item>
  364. </el-col>
  365. <el-col :span="8">
  366. <el-form-item label="结算方式" prop="fstltypeid">
  367. <el-select
  368. v-model="form.fStltypeid"
  369. placeholder="请选择结算方式"
  370. :disabled="notChange || formBrowseStatus"
  371. clearable
  372. style="width: 80%"
  373. >
  374. <el-option
  375. v-for="(dict, index) in fStltypeOptions"
  376. :key="index.dictValue"
  377. :label="dict.dictLabel"
  378. :value="dict.dictValue"
  379. />
  380. </el-select>
  381. </el-form-item>
  382. </el-col>
  383. <el-col :span="8">
  384. <el-form-item label="提单号" prop="fMblno">
  385. <el-input
  386. v-model="form.fMblno"
  387. style="width: 80%"
  388. :disabled="notChange || formBrowseStatus"
  389. placeholder="手工输入"
  390. />
  391. </el-form-item>
  392. </el-col>
  393. </el-row>
  394. <el-row>
  395. <el-col :span="8">
  396. <el-form-item label="业务日期" prop="fBsdate">
  397. <el-date-picker
  398. v-model="form.fBsdate"
  399. style="width: 80%"
  400. type="date"
  401. :disabled="notChange || formBrowseStatus"
  402. @change="changefBsdate"
  403. value-format="timestamp"
  404. placeholder="业务日期"
  405. >
  406. </el-date-picker>
  407. </el-form-item>
  408. </el-col>
  409. <el-col :span="8">
  410. <el-form-item label="仓管员" prop="fStorekeeper">
  411. <el-select
  412. v-model="form.fStorekeeper"
  413. filterable
  414. remote
  415. :disabled="notChange || formBrowseStatus"
  416. style="width: 80%"
  417. :remote-method="userRemoteMethod"
  418. placeholder="请输入模糊查找"
  419. >
  420. <el-option
  421. v-for="dict in userOptions"
  422. :key="dict.userName"
  423. :label="dict.nickName"
  424. :value="dict.userName"
  425. ></el-option>
  426. </el-select>
  427. </el-form-item>
  428. </el-col>
  429. <el-col :span="8">
  430. <el-form-item label="仓库" prop="fWarehouseid">
  431. <el-select
  432. v-model="form.fWarehouseid"
  433. filterable
  434. remote
  435. @change="changefWarehouseid(form)"
  436. :disabled="notChange || formBrowseStatus"
  437. style="width: 80%"
  438. :remote-method="warehouseRemoteMethod"
  439. placeholder="请输入模糊查找"
  440. >
  441. <el-option
  442. v-for="(dict, index) in warehouseOptions"
  443. :key="index.fId"
  444. :label="dict.fName"
  445. :value="dict.fId"
  446. ></el-option>
  447. </el-select>
  448. </el-form-item>
  449. </el-col>
  450. </el-row>
  451. <el-row>
  452. <el-col :span="8">
  453. <el-form-item label="单据编号" prop="fBillno">
  454. <el-input
  455. v-model="form.fBillno"
  456. style="width: 80%"
  457. disabled
  458. placeholder="单据编号"
  459. />
  460. </el-form-item>
  461. </el-col>
  462. <el-col :span="8">
  463. <el-form-item label="破损" prop="fifdamage">
  464. <el-select
  465. v-model="form.fIfdamage"
  466. placeholder="请选择是否破损"
  467. :disabled="notChange || formBrowseStatus"
  468. clearable
  469. style="width: 80%"
  470. >
  471. <el-option
  472. v-for="dict in fIfdamageOptions"
  473. :key="dict.dictValue"
  474. :label="dict.dictLabel"
  475. :value="dict.dictValue"
  476. />
  477. </el-select>
  478. </el-form-item>
  479. </el-col>
  480. <el-col :span="8">
  481. <el-form-item label="过磅" prop="fifweigh">
  482. <el-select
  483. v-model="form.fIfweigh"
  484. placeholder="请选择是否过磅"
  485. :disabled="notChange || formBrowseStatus"
  486. clearable
  487. style="width: 80%"
  488. >
  489. <el-option
  490. v-for="dict in fIfweighOptions"
  491. :key="dict.dictValue"
  492. :label="dict.dictLabel"
  493. :value="dict.dictValue"
  494. />
  495. </el-select>
  496. </el-form-item>
  497. </el-col>
  498. </el-row>
  499. <el-row>
  500. <el-col :span="8">
  501. <el-form-item label="贸易方式" prop="fTrademodeid">
  502. <el-select
  503. v-model="form.fTrademodeid"
  504. placeholder="请选择贸易方式"
  505. :disabled="notChange || formBrowseStatus"
  506. clearable
  507. style="width: 80%"
  508. >
  509. <el-option
  510. v-for="dict in fTrademodeidOptions"
  511. :key="dict.dictValue"
  512. :label="dict.dictLabel"
  513. :value="dict.dictValue"
  514. />
  515. </el-select>
  516. </el-form-item>
  517. </el-col>
  518. <el-col :span="8">
  519. <el-form-item label="品牌" prop="fMarks">
  520. <el-input
  521. v-model="form.fMarks"
  522. style="width: 80%"
  523. disabled
  524. placeholder="品牌"
  525. />
  526. </el-form-item>
  527. </el-col>
  528. <el-col :span="8">
  529. <el-form-item label="品名" prop="fProductName">
  530. <el-input
  531. v-model="form.fProductName"
  532. style="width: 80%"
  533. disabled
  534. placeholder="品名"
  535. />
  536. </el-form-item>
  537. </el-col>
  538. </el-row>
  539. <el-row>
  540. <el-form-item label="备注" prop="remark">
  541. <el-input
  542. style="width: 100%"
  543. v-model="form.remark"
  544. :disabled="notChange || formBrowseStatus"
  545. type="textarea"
  546. placeholder="请输入内容"
  547. />
  548. </el-form-item>
  549. </el-row>
  550. <div v-if="detailsHidden">
  551. <el-row style="margin-top: 30px">
  552. <el-col :span="8">
  553. <el-form-item label="仓库联系人" prop="fContacts">
  554. <el-input
  555. v-model="form.fContacts"
  556. :disabled="notChange || formBrowseStatus"
  557. style="width: 80%"
  558. placeholder="仓库联系人"
  559. />
  560. </el-form-item>
  561. </el-col>
  562. <el-col :span="8">
  563. <el-form-item label="仓库电话" prop="ftel">
  564. <el-input
  565. v-model="form.fTel"
  566. :disabled="notChange || formBrowseStatus"
  567. style="width: 80%"
  568. placeholder="请输仓库入电话"
  569. />
  570. </el-form-item>
  571. </el-col>
  572. </el-row>
  573. <el-row>
  574. <el-col :span="8">
  575. <el-form-item label="制单人" prop="createBy">
  576. <el-input
  577. disabled
  578. v-model="form.createBy"
  579. style="width: 80%"
  580. placeholder="制单人"
  581. />
  582. </el-form-item>
  583. </el-col>
  584. <el-col :span="8">
  585. <el-form-item label="制单部门" prop="fDeptid">
  586. <el-select
  587. v-model="form.fDeptid"
  588. filterable
  589. disabled
  590. style="width: 80%"
  591. remote
  592. >
  593. <el-option
  594. v-for="dict in deptOptions"
  595. :key="dict.deptId"
  596. :label="dict.deptName"
  597. :value="dict.deptId"
  598. ></el-option>
  599. </el-select>
  600. </el-form-item>
  601. </el-col>
  602. <el-col :span="8">
  603. <el-form-item disabled label="制单日期" prop="fbilldate">
  604. <el-date-picker
  605. v-model="form.createTime"
  606. size="large"
  607. type="date"
  608. disabled
  609. value-format="timestamp"
  610. placeholder="制单日期"
  611. >
  612. </el-date-picker>
  613. </el-form-item>
  614. </el-col>
  615. </el-row>
  616. </div>
  617. </el-form>
  618. <div style="
  619. display: flex;
  620. justify-content: space-between;
  621. align-items: center;
  622. margin: 10px 0;
  623. ">
  624. <div>
  625. <el-button
  626. type="primary"
  627. :disabled="browseStatus"
  628. @click.prevent="addRelevant"
  629. >新行
  630. </el-button>
  631. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  632. </div>
  633. <div style="display: flex">
  634. <el-button @click="detailsHidden ? (detailsHidden = false) : (detailsHidden = true)">{{ detailsHidden ? '隐藏' :
  635. '展开' }}
  636. </el-button>
  637. <!-- <el-button type="info" :disabled="printinglist.length <= 0" prop="打印" @click="printJobSheet">作业单</el-button>-->
  638. <!-- <el-button :disabled="printinglist.length <= 0" @click="discharge">装货</el-button>-->
  639. <el-button
  640. :disabled="dataListSelection.length <= 0 || browseStatus"
  641. @click.prevent="creditClick"
  642. >调拨确认
  643. </el-button>
  644. <el-button
  645. :disabled="dataWithdrawList.length <= 0 || browseStatus"
  646. @click.prevent="withdrawClick"
  647. >撤回调拨
  648. </el-button
  649. >
  650. <el-button
  651. style="background-color: #008000; color: #fff"
  652. @click="submitForm"
  653. :disabled="browseStatus"
  654. >请核
  655. </el-button
  656. >
  657. </div>
  658. <div style="font-size: 18px">调拨明细</div>
  659. <!--点击展开-->
  660. </div>
  661. <el-table
  662. :data="dataList"
  663. ref="tableList"
  664. tooltip-effect="dark"
  665. border
  666. stripe
  667. :summary-method="getSummaries"
  668. @selection-change="selectinventory"
  669. show-summary
  670. >
  671. <el-table-column type="selection" width="55" align="center" />
  672. <el-table-column label="序号" type="index" width="80">
  673. </el-table-column>
  674. <el-table-column
  675. prop="fMblno"
  676. header-align="center"
  677. align="center"
  678. width="140px"
  679. label="提单号"
  680. >
  681. </el-table-column>
  682. <el-table-column
  683. prop="fGoodsids"
  684. header-align="center"
  685. align="center"
  686. width="140px"
  687. label="品名"
  688. >
  689. </el-table-column>
  690. <el-table-column
  691. prop="fMarks"
  692. header-align="center"
  693. align="center"
  694. width="140px"
  695. label="*品牌"
  696. >
  697. </el-table-column>
  698. <el-table-column
  699. prop="fWarehouselocids"
  700. header-align="center"
  701. width="150px"
  702. align="center"
  703. label="*库区"
  704. >
  705. </el-table-column>
  706. <el-table-column
  707. prop="fTransferWarehouselocid"
  708. header-align="center"
  709. width="150px"
  710. align="center"
  711. label="*调拨库区"
  712. >
  713. <template slot-scope="scope">
  714. <el-select
  715. v-model="scope.row.fTransferWarehouselocid"
  716. :disabled="browseStatus || scope.row.fBillstatus === 6 || !form.fWarehouseid"
  717. filterable
  718. remote
  719. style="width: 80%"
  720. :remote-method="kqhouseRemoteMethod"
  721. placeholder="请输入模糊查找"
  722. >
  723. <el-option
  724. v-for="(dict, index) in kqhouseOptions"
  725. :key="index.fId"
  726. :label="dict.fName"
  727. :value="dict.fId"
  728. ></el-option>
  729. </el-select>
  730. </template>
  731. </el-table-column>
  732. <el-table-column
  733. prop="fPlanqty"
  734. header-align="center"
  735. align="center"
  736. width="180px"
  737. label="*结余库存"
  738. >
  739. </el-table-column>
  740. <el-table-column
  741. prop="fPlangrossweight"
  742. header-align="center"
  743. align="center"
  744. width="180px"
  745. label="*结余毛重"
  746. >
  747. </el-table-column>
  748. <el-table-column
  749. prop="fPlannetweight"
  750. header-align="center"
  751. align="center"
  752. width="180px"
  753. label="*结余净重"
  754. >
  755. </el-table-column>
  756. <el-table-column
  757. prop="fQty"
  758. header-align="center"
  759. width="180px"
  760. align="center"
  761. label="*调拨件数"
  762. >
  763. <template slot-scope="scope">
  764. <el-input
  765. oninput='this.value=this.value.replace(/[^\-?\d]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "")'
  766. @change="qtyChange(scope.row)"
  767. v-model="scope.row.fQty"
  768. :disabled="browseStatus || scope.row.fBillstatus === 6"
  769. placeholder="调拨件数"
  770. show-word-limit
  771. />
  772. </template>
  773. </el-table-column>
  774. <el-table-column
  775. prop="fGrossweight"
  776. header-align="center"
  777. width="180px"
  778. align="center"
  779. label="*调拨毛重"
  780. >
  781. <template slot-scope="scope">
  782. <el-input
  783. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  784. :disabled="browseStatus || scope.row.fBillstatus === 6"
  785. v-model="scope.row.fGrossweight"
  786. @change="changeStock(scope.row)"
  787. placeholder="调拨毛重"
  788. show-word-limit
  789. />
  790. </template>
  791. </el-table-column>
  792. <el-table-column
  793. prop="fNetweight"
  794. header-align="center"
  795. width="180px"
  796. align="center"
  797. label="*调拨净重"
  798. >
  799. <template slot-scope="scope">
  800. <el-input
  801. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  802. :disabled="browseStatus || scope.row.fBillstatus === 6"
  803. v-model="scope.row.fNetweight"
  804. @change="changeStock(scope.row)"
  805. placeholder="调拨净重"
  806. show-word-limit
  807. />
  808. </template>
  809. </el-table-column>
  810. <el-table-column
  811. prop="fVolumn"
  812. header-align="center"
  813. width="180px"
  814. align="center"
  815. label="调拨尺码"
  816. >
  817. <template slot-scope="scope">
  818. <el-input
  819. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/, "$1$2.$3")'
  820. :disabled="browseStatus || scope.row.fBillstatus === 6"
  821. v-model="scope.row.fVolumn"
  822. placeholder="调拨尺码"
  823. show-word-limit
  824. />
  825. </template>
  826. </el-table-column>
  827. <el-table-column
  828. prop="fPackagespecs"
  829. header-align="center"
  830. width="180px"
  831. align="center"
  832. label="*包装规格"
  833. >
  834. <template slot-scope="scope">
  835. <el-input
  836. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  837. v-model="scope.row.fPackagespecs"
  838. :disabled="browseStatus || scope.row.fBillstatus === 6"
  839. placeholder="包装规格"
  840. show-word-limit
  841. />
  842. </template>
  843. </el-table-column>
  844. <el-table-column
  845. prop="fCntrtype"
  846. header-align="center"
  847. align="center"
  848. width="140px"
  849. label="箱型"
  850. >
  851. <template slot-scope="scope">
  852. <el-input
  853. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  854. v-model="scope.row.fCntrtype"
  855. :disabled="browseStatus || scope.row.fBillstatus === 6"
  856. placeholder="箱型"
  857. show-word-limit
  858. />
  859. </template>
  860. </el-table-column>
  861. <el-table-column
  862. prop="fCntqty"
  863. header-align="center"
  864. align="center"
  865. width="140px"
  866. label="箱量"
  867. >
  868. <template slot-scope="scope">
  869. <el-input
  870. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  871. v-model="scope.row.fCntqty"
  872. placeholder="箱量"
  873. :disabled="browseStatus || scope.row.fBillstatus === 6"
  874. show-word-limit
  875. />
  876. </template>
  877. </el-table-column>
  878. <el-table-column
  879. prop="fCntrno"
  880. header-align="center"
  881. width="150px"
  882. align="center"
  883. label="箱号"
  884. >
  885. <template slot-scope="scope">
  886. <el-input
  887. v-model="scope.row.fCntrno"
  888. placeholder="箱号"
  889. :disabled="browseStatus || scope.row.fBillstatus === 6"
  890. show-word-limit
  891. />
  892. </template>
  893. </el-table-column>
  894. <el-table-column
  895. prop="fGoodsval"
  896. header-align="center"
  897. width="150px"
  898. align="center"
  899. label="货值"
  900. >
  901. <template slot-scope="scope">
  902. <el-input
  903. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  904. v-model="scope.row.fGoodsval"
  905. placeholder="货值"
  906. :disabled="browseStatus || scope.row.fBillstatus === 6"
  907. show-word-limit
  908. />
  909. </template>
  910. </el-table-column>
  911. <!--<el-table-column
  912. prop="fSerialNumber"
  913. header-align="center"
  914. width="160px"
  915. align="center"
  916. label="流水号"
  917. >
  918. </el-table-column>-->
  919. <el-table-column
  920. prop="remark"
  921. header-align="center"
  922. width="150px"
  923. align="center"
  924. label="备注"
  925. >
  926. <template slot-scope="scope">
  927. <el-input
  928. v-model="scope.row.remark"
  929. placeholder="备注"
  930. :disabled="browseStatus || scope.row.fBillstatus === 6"
  931. show-word-limit
  932. />
  933. </template>
  934. </el-table-column>
  935. <el-table-column
  936. prop="fBillstatus"
  937. header-align="center"
  938. width="150px"
  939. align="center"
  940. label="状态"
  941. >
  942. <template slot-scope="scope">
  943. <span v-if="scope.row.fBillstatus === 6">已调拨</span>
  944. <span v-if="scope.row.fBillstatus === 2">未调拨</span>
  945. <span v-if="scope.row.fBillstatus === 1">计划</span>
  946. </template>
  947. </el-table-column>
  948. <el-table-column
  949. header-align="center"
  950. align="center"
  951. label="操作"
  952. width="130PX"
  953. >
  954. <template slot-scope="scope">
  955. <el-button
  956. @click.native.prevent="deleteRow(scope.$index, dataList)"
  957. size="small"
  958. :disabled="browseStatus || scope.row.fBillstatus === 6"
  959. >移除
  960. </el-button>
  961. </template>
  962. </el-table-column>
  963. </el-table>
  964. <div
  965. class="dialogTableTitle flex a-center jlr"
  966. style="
  967. display: flex;
  968. justify-content: space-between;
  969. align-items: center;
  970. margin: 10px 0;
  971. "
  972. >
  973. <div>
  974. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  975. >新行
  976. </el-button>
  977. </div>
  978. <div style="font-size: 18px">附件明细</div>
  979. </div>
  980. <el-table
  981. :data="relevantAttachments"
  982. ref="table"
  983. tooltip-effect="dark"
  984. border
  985. stripe
  986. style="width: 100%"
  987. height="150"
  988. >
  989. <el-table-column label="序号" type="index" width="80">
  990. </el-table-column>
  991. <el-table-column
  992. prop="fName"
  993. header-align="center"
  994. align="center"
  995. width="250px"
  996. label="附件名称"
  997. >
  998. <template slot-scope="scope">
  999. <el-input
  1000. v-model="scope.row.fName"
  1001. :disabled="browseStatus"
  1002. placeholder="附件名称"
  1003. show-word-limit
  1004. />
  1005. </template>
  1006. </el-table-column>
  1007. <el-table-column
  1008. prop="createBy"
  1009. header-align="center"
  1010. align="center"
  1011. width="250px"
  1012. label="上传人"
  1013. >
  1014. <template slot-scope="scope">
  1015. <el-input
  1016. v-model="scope.row.createBy"
  1017. disabled
  1018. placeholder="上传人"
  1019. show-word-limit
  1020. />
  1021. </template>
  1022. </el-table-column>
  1023. <el-table-column
  1024. prop="createTime"
  1025. header-align="center"
  1026. align="center"
  1027. label="上传时间"
  1028. >
  1029. <template slot-scope="scope">
  1030. <el-date-picker
  1031. v-model="scope.row.createTime"
  1032. type="date"
  1033. disabled
  1034. placeholder="上传时间"
  1035. format="yyyy-MM-dd HH:mm"
  1036. value-format="timestamp"
  1037. ></el-date-picker>
  1038. </template>
  1039. </el-table-column>
  1040. <el-table-column
  1041. prop="fUrl"
  1042. header-align="center"
  1043. align="center"
  1044. width="300px"
  1045. label="上传附件"
  1046. >
  1047. <template slot-scope="scope">
  1048. <uploadFile @input="showFile" v-model="scope.row.fUrl" />
  1049. </template>
  1050. </el-table-column>
  1051. <el-table-column header-align="center" align="center" label="操作">
  1052. <template slot-scope="scope">
  1053. <el-button
  1054. @click.native.prevent="deleteRow(scope.$index, relevantAttachments)"
  1055. :disabled="browseStatus"
  1056. size="small"
  1057. >移除
  1058. </el-button>
  1059. </template>
  1060. </el-table-column>
  1061. </el-table>
  1062. <div
  1063. class="dialogTableTitle flex a-center jlr"
  1064. style="
  1065. display: flex;
  1066. justify-content: space-between;
  1067. align-items: center;
  1068. margin: 10px 0;
  1069. "
  1070. >
  1071. <div>
  1072. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  1073. >新行
  1074. </el-button>
  1075. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1076. <!--暂时隐藏-->
  1077. <!-- <el-button type="warning" @click.prevent="addStorages('Dr')">仓储费协议</el-button >-->
  1078. <el-button type="danger"
  1079. :disabled="browseStatus"
  1080. @click.prevent="addAgreement('Dr')"
  1081. >作业费协议</el-button
  1082. >
  1083. </div>
  1084. <div style="font-size: 18px">收款信息</div>
  1085. </div>
  1086. <el-table
  1087. :data="warehouseDrList"
  1088. ref="tableDr"
  1089. tooltip-effect="dark"
  1090. border
  1091. stripe
  1092. show-summary
  1093. @selection-change="collectionoptions"
  1094. :summary-method="warehouseDrSummaries"
  1095. >
  1096. <el-table-column type="selection" width="55" align="center" />
  1097. <el-table-column label="序号" type="index" width="80">
  1098. </el-table-column>
  1099. <el-table-column
  1100. prop="fCorpid"
  1101. header-align="center"
  1102. align="center"
  1103. width="180px"
  1104. label="客户名称"
  1105. >
  1106. <template slot-scope="scope">
  1107. <el-select
  1108. v-model="scope.row.fCorpid"
  1109. filterable
  1110. remote
  1111. :disabled="browseStatus"
  1112. :remote-method="corpsRemoteMethod"
  1113. placeholder="客户名称"
  1114. >
  1115. <el-option
  1116. v-for="(dict, index) in KHblnoOptions"
  1117. :key="index.fId"
  1118. :label="dict.fName"
  1119. :value="dict.fId"
  1120. ></el-option>
  1121. </el-select>
  1122. </template>
  1123. </el-table-column>
  1124. <el-table-column
  1125. prop="fFeeid"
  1126. header-align="center"
  1127. align="center"
  1128. width="180px"
  1129. label="费用名称"
  1130. >
  1131. <template slot-scope="scope">
  1132. <el-select
  1133. v-model="scope.row.fFeeid"
  1134. filterable
  1135. remote
  1136. :disabled="browseStatus"
  1137. :remote-method="fWRemoteMethod"
  1138. placeholder="费用名称"
  1139. >
  1140. <el-option
  1141. v-for="(dict, index) in fWbuOptions"
  1142. :key="index.fId"
  1143. :label="dict.fName"
  1144. :value="dict.fId"
  1145. ></el-option>
  1146. </el-select>
  1147. </template>
  1148. </el-table-column>
  1149. <el-table-column
  1150. prop="fFeeunitid"
  1151. header-align="center"
  1152. align="center"
  1153. width="180px"
  1154. label="计价单位"
  1155. >
  1156. <template slot-scope="scope">
  1157. <el-select
  1158. v-model="scope.row.fFeeunitid"
  1159. placeholder="请选择计费单位"
  1160. @change="changeFeeUnit(scope.row)"
  1161. :disabled="browseStatus"
  1162. clearable
  1163. >
  1164. <el-option
  1165. v-for="(dict, index) in jFeetunitOptions"
  1166. :key="index.dictValue"
  1167. :label="dict.dictLabel"
  1168. :value="dict.dictValue"
  1169. />
  1170. </el-select>
  1171. </template>
  1172. </el-table-column>
  1173. <el-table-column
  1174. prop="fQty"
  1175. header-align="center"
  1176. align="center"
  1177. width="150px"
  1178. label="数量"
  1179. >
  1180. <template slot-scope="scope">
  1181. <el-input
  1182. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1183. v-model="scope.row.fQty"
  1184. placeholder="数量"
  1185. :disabled="browseStatus"
  1186. @change="changeContractAmt(scope.row)"
  1187. show-word-limit
  1188. />
  1189. </template>
  1190. </el-table-column>
  1191. <el-table-column
  1192. prop="funitprice"
  1193. header-align="center"
  1194. align="center"
  1195. width="150px"
  1196. label="单价"
  1197. >
  1198. <template slot-scope="scope">
  1199. <el-input
  1200. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1201. v-model="scope.row.fUnitprice"
  1202. placeholder="单价"
  1203. :disabled="browseStatus"
  1204. @change="changeContractAmt(scope.row)"
  1205. show-word-limit
  1206. />
  1207. </template>
  1208. </el-table-column>
  1209. <el-table-column
  1210. prop="fAmount"
  1211. header-align="center"
  1212. align="center"
  1213. width="150px"
  1214. label="金额"
  1215. >
  1216. <template slot-scope="scope">
  1217. <el-input
  1218. disabled
  1219. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1220. v-model="scope.row.fAmount"
  1221. placeholder="金额"
  1222. show-word-limit
  1223. />
  1224. </template>
  1225. </el-table-column>
  1226. <el-table-column
  1227. prop="fCurrency"
  1228. header-align="center"
  1229. align="center"
  1230. width="150px"
  1231. label="币别"
  1232. >
  1233. <template slot-scope="scope">
  1234. <el-input
  1235. v-model="scope.row.fCurrency"
  1236. :disabled="browseStatus"
  1237. placeholder="币别"
  1238. show-word-limit
  1239. />
  1240. </template>
  1241. </el-table-column>
  1242. <el-table-column
  1243. prop="fExrate"
  1244. header-align="center"
  1245. align="center"
  1246. width="150px"
  1247. label="汇率"
  1248. >
  1249. <template slot-scope="scope">
  1250. <el-input
  1251. v-model="scope.row.fExrate"
  1252. :disabled="browseStatus"
  1253. placeholder="汇率"
  1254. show-word-limit
  1255. />
  1256. </template>
  1257. </el-table-column>
  1258. <el-table-column
  1259. prop="fTaxrate"
  1260. header-align="center"
  1261. align="center"
  1262. width="150px"
  1263. label="税率"
  1264. >
  1265. <template slot-scope="scope">
  1266. <el-input
  1267. v-model="scope.row.fTaxrate"
  1268. :disabled="browseStatus"
  1269. placeholder="税率"
  1270. show-word-limit
  1271. />
  1272. </template>
  1273. </el-table-column>
  1274. <el-table-column
  1275. prop="remarks"
  1276. header-align="center"
  1277. align="center"
  1278. width="150px"
  1279. label="备注"
  1280. >
  1281. <template slot-scope="scope">
  1282. <el-input
  1283. v-model="scope.row.remarks"
  1284. :disabled="browseStatus"
  1285. placeholder="备注"
  1286. show-word-limit
  1287. />
  1288. </template>
  1289. </el-table-column>
  1290. <el-table-column
  1291. header-align="center"
  1292. align="center"
  1293. label="操作"
  1294. width="200px"
  1295. >
  1296. <template slot-scope="scope">
  1297. <el-button
  1298. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1299. size="small"
  1300. :disabled="browseStatus"
  1301. >移除</el-button
  1302. >
  1303. </template>
  1304. </el-table-column>
  1305. </el-table>
  1306. <div
  1307. class="dialogTableTitle flex a-center jlr"
  1308. style="
  1309. display: flex;
  1310. justify-content: space-between;
  1311. align-items: center;
  1312. margin: 10px 0;
  1313. "
  1314. >
  1315. <div>
  1316. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1317. >新行
  1318. </el-button>
  1319. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  1320. >删除
  1321. </el-button> -->
  1322. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1323. <!--暂时隐藏-->
  1324. <!-- <el-button type="warning" @click.prevent="addStorages('Cr')">仓储费协议</el-button>-->
  1325. <el-button type="danger"
  1326. :disabled="browseStatus"
  1327. @click.prevent="addAgreement('Cr')"
  1328. >作业费协议</el-button
  1329. >
  1330. </div>
  1331. <div style="font-size: 18px">付款信息</div>
  1332. </div>
  1333. <el-table
  1334. :data="warehouseCrList"
  1335. ref="table"
  1336. tooltip-effect="dark"
  1337. border
  1338. stripe
  1339. show-summary
  1340. @selection-change="collectionoptions"
  1341. :summary-method="warehouseDrSummaries"
  1342. >
  1343. <el-table-column type="selection" width="55" align="center" />
  1344. <el-table-column label="序号" type="index" width="80">
  1345. </el-table-column>
  1346. <el-table-column
  1347. prop="fCorpid"
  1348. header-align="center"
  1349. align="center"
  1350. width="180px"
  1351. label="客户名称"
  1352. >
  1353. <template slot-scope="scope">
  1354. <el-select
  1355. v-model="scope.row.fCorpid"
  1356. filterable
  1357. remote
  1358. :disabled="browseStatus"
  1359. :remote-method="corpsRemoteMethod"
  1360. placeholder="客户名称"
  1361. >
  1362. <el-option
  1363. v-for="(dict, index) in KHblnoOptions"
  1364. :key="index.fId"
  1365. :label="dict.fName"
  1366. :value="dict.fId"
  1367. ></el-option>
  1368. </el-select>
  1369. </template>
  1370. </el-table-column>
  1371. <el-table-column
  1372. prop="fFeeid"
  1373. header-align="center"
  1374. align="center"
  1375. width="180px"
  1376. label="费用名称"
  1377. >
  1378. <template slot-scope="scope">
  1379. <el-select
  1380. v-model="scope.row.fFeeid"
  1381. filterable
  1382. remote
  1383. :disabled="browseStatus"
  1384. :remote-method="fWRemoteMethod"
  1385. placeholder="费用名称"
  1386. >
  1387. <el-option
  1388. v-for="(dict, index) in fWbuOptions"
  1389. :key="index.fId"
  1390. :label="dict.fName"
  1391. :value="dict.fId"
  1392. ></el-option>
  1393. </el-select>
  1394. </template>
  1395. </el-table-column>
  1396. <el-table-column
  1397. prop="fFeeunitid"
  1398. header-align="center"
  1399. align="center"
  1400. width="180px"
  1401. label="计价单位"
  1402. >
  1403. <template slot-scope="scope">
  1404. <el-select
  1405. v-model="scope.row.fFeeunitid"
  1406. placeholder="请选择计费单位"
  1407. @change="changeFeeUnit(scope.row)"
  1408. :disabled="browseStatus"
  1409. clearable
  1410. >
  1411. <el-option
  1412. v-for="(dict, index) in jFeetunitOptions"
  1413. :key="index.dictValue"
  1414. :label="dict.dictLabel"
  1415. :value="dict.dictValue"
  1416. ></el-option>
  1417. </el-select>
  1418. </template>
  1419. </el-table-column>
  1420. <el-table-column
  1421. prop="fQty"
  1422. header-align="center"
  1423. align="center"
  1424. width="150px"
  1425. label="数量"
  1426. >
  1427. <template slot-scope="scope">
  1428. <el-input
  1429. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1430. v-model="scope.row.fQty"
  1431. @change="changeContractAmt(scope.row)"
  1432. :disabled="browseStatus"
  1433. placeholder="数量"
  1434. show-word-limit
  1435. />
  1436. </template>
  1437. </el-table-column>
  1438. <el-table-column
  1439. prop="funitprice"
  1440. header-align="center"
  1441. align="center"
  1442. width="150px"
  1443. label="单价"
  1444. >
  1445. <template slot-scope="scope">
  1446. <el-input
  1447. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1448. v-model="scope.row.fUnitprice"
  1449. @change="changeContractAmt(scope.row)"
  1450. :disabled="browseStatus"
  1451. placeholder="单价"
  1452. show-word-limit
  1453. />
  1454. </template>
  1455. </el-table-column>
  1456. <el-table-column
  1457. prop="fAmount"
  1458. header-align="center"
  1459. align="center"
  1460. width="150px"
  1461. label="金额"
  1462. >
  1463. <template slot-scope="scope">
  1464. <el-input
  1465. disabled
  1466. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1467. v-model="scope.row.fAmount"
  1468. placeholder="金额"
  1469. show-word-limit
  1470. />
  1471. </template>
  1472. </el-table-column>
  1473. <el-table-column
  1474. prop="fCurrency"
  1475. header-align="center"
  1476. align="center"
  1477. width="150px"
  1478. label="币别"
  1479. >
  1480. <template slot-scope="scope">
  1481. <el-input
  1482. v-model="scope.row.fCurrency"
  1483. :disabled="browseStatus"
  1484. placeholder="币别"
  1485. show-word-limit
  1486. />
  1487. </template>
  1488. </el-table-column>
  1489. <el-table-column
  1490. prop="fExrate"
  1491. header-align="center"
  1492. align="center"
  1493. width="150px"
  1494. label="汇率"
  1495. >
  1496. <template slot-scope="scope">
  1497. <el-input
  1498. v-model="scope.row.fExrate"
  1499. :disabled="browseStatus"
  1500. placeholder="汇率"
  1501. show-word-limit
  1502. />
  1503. </template>
  1504. </el-table-column>
  1505. <el-table-column
  1506. prop="fTaxrate"
  1507. header-align="center"
  1508. align="center"
  1509. width="150px"
  1510. label="税率"
  1511. >
  1512. <template slot-scope="scope">
  1513. <el-input
  1514. v-model="scope.row.fTaxrate"
  1515. :disabled="browseStatus"
  1516. placeholder="税率"
  1517. show-word-limit
  1518. />
  1519. </template>
  1520. </el-table-column>
  1521. <el-table-column
  1522. prop="remarks"
  1523. header-align="center"
  1524. align="center"
  1525. width="150px"
  1526. label="备注"
  1527. >
  1528. <template slot-scope="scope">
  1529. <el-input
  1530. v-model="scope.row.remarks"
  1531. :disabled="browseStatus"
  1532. placeholder="备注"
  1533. show-word-limit
  1534. />
  1535. </template>
  1536. </el-table-column>
  1537. <el-table-column
  1538. header-align="center"
  1539. align="center"
  1540. width="200px"
  1541. label="操作"
  1542. >
  1543. <template slot-scope="scope">
  1544. <el-button
  1545. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  1546. size="small"
  1547. :disabled="browseStatus"
  1548. >移除</el-button
  1549. >
  1550. </template>
  1551. </el-table-column>
  1552. </el-table>
  1553. <div slot="footer" class="dialog-footer">
  1554. <!-- <el-button type="success" prop="打印" @click="showEditDialog_ss"
  1555. >收货单
  1556. </el-button> -->
  1557. <!--<el-button type="warning" prop="打印" :disabled="printinglist.length <= 0 || browseStatus" @click="showEditDialog_s"
  1558. >调拨单
  1559. </el-button>
  1560. <el-button :disabled="printinglist.length <= 0 || browseStatus" @click="discharge">装货</el-button>
  1561. <el-button type="info" prop="打印" :disabled="printinglist.length <= 0 || browseStatus" @click="printJobSheet"
  1562. >作业单
  1563. </el-button>-->
  1564. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  1565. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
  1566. <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
  1567. <el-button v-if="approve === true" @click="goApproval">审批</el-button>
  1568. <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @click="backApproval">撤销审批</el-button>
  1569. <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
  1570. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1571. <el-button
  1572. style="background-color: #008000; color: #fff"
  1573. @click="submitForm"
  1574. :disabled="browseStatus"
  1575. >请核</el-button
  1576. >
  1577. <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
  1578. <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
  1579. </div>
  1580. <!-- 选择库存总账数据 -->
  1581. <el-dialog
  1582. title="库存总账"
  1583. :modal="false"
  1584. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1585. :visible.sync="whgenlegVisible"
  1586. width="70%"
  1587. >
  1588. <el-table
  1589. :data="whgenlegList"
  1590. ref="table"
  1591. tooltip-effect="dark"
  1592. width="100%"
  1593. border
  1594. stripe
  1595. @selection-change="whgenlegSelectionChange"
  1596. >
  1597. <el-table-column type="selection" width="55"> </el-table-column>
  1598. <el-table-column
  1599. prop="fMblno"
  1600. header-align="center"
  1601. align="center"
  1602. label="提单号"
  1603. >
  1604. </el-table-column>
  1605. <el-table-column
  1606. prop="createTime"
  1607. header-align="center"
  1608. align="center"
  1609. width="180px"
  1610. label="入库日期"
  1611. >
  1612. </el-table-column>
  1613. <el-table-column
  1614. prop="fGoodsids"
  1615. header-align="center"
  1616. align="center"
  1617. label="品名"
  1618. >
  1619. </el-table-column>
  1620. <el-table-column
  1621. prop="fQtyblc"
  1622. header-align="center"
  1623. align="center"
  1624. label="结余数量"
  1625. >
  1626. </el-table-column>
  1627. <el-table-column
  1628. prop="fWarehouseLocationids"
  1629. header-align="center"
  1630. align="center"
  1631. label="库区"
  1632. >
  1633. </el-table-column>
  1634. <el-table-column
  1635. prop="fMarks"
  1636. header-align="center"
  1637. align="center"
  1638. label="品牌"
  1639. >
  1640. </el-table-column>
  1641. </el-table>
  1642. <pagination
  1643. v-show="whgenlegTotal > 0"
  1644. :total="whgenlegTotal"
  1645. :page.sync="whgenlegParams.pageNum"
  1646. :limit.sync="whgenlegParams.pageSize"
  1647. @pagination="getWhgenlegList"
  1648. />
  1649. <div slot="footer" class="dialog-footer">
  1650. <el-button type="primary" @click="whgenlegData">导入库存总账</el-button>
  1651. <el-button @click="whgenlegVisible = false">取 消</el-button>
  1652. </div>
  1653. </el-dialog>
  1654. <!-- 选择作业费协议数据 -->
  1655. <el-dialog
  1656. title="作业费协议"
  1657. :modal="false"
  1658. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1659. :visible.sync="warehousingagreements"
  1660. width="70%"
  1661. >
  1662. <el-table
  1663. :data="tasklegList"
  1664. ref="table"
  1665. tooltip-effect="dark"
  1666. width="100%"
  1667. border
  1668. stripe
  1669. @selection-change="whgenlegSelectionChange"
  1670. >
  1671. <el-table-column type="selection" width="55"> </el-table-column>
  1672. <el-table-column label="行号" type="index" width="80">
  1673. </el-table-column>
  1674. <el-table-column
  1675. prop="fCorpname"
  1676. header-align="center"
  1677. align="center"
  1678. label="客户名称"
  1679. >
  1680. </el-table-column>
  1681. <el-table-column
  1682. prop="fName"
  1683. header-align="center"
  1684. align="center"
  1685. width="180px"
  1686. label="费用名称"
  1687. >
  1688. </el-table-column>
  1689. <el-table-column
  1690. prop="fFeeUnitid"
  1691. header-align="center"
  1692. align="center"
  1693. label="计价单位"
  1694. >
  1695. <template slot-scope="scope">
  1696. <span v-if="scope.row.fFeeUnitid === 1">件数</span>
  1697. <span v-if="scope.row.fFeeUnitid === 2">毛重</span>
  1698. <span v-if="scope.row.fFeeUnitid === 3">净重</span>
  1699. <span v-if="scope.row.fFeeUnitid === 4">尺码</span>
  1700. <span v-if="scope.row.fFeeUnitid === 5">固定</span>
  1701. </template>
  1702. </el-table-column>
  1703. <el-table-column
  1704. prop="fPrice"
  1705. header-align="center"
  1706. align="center"
  1707. label="单价"
  1708. >
  1709. </el-table-column>
  1710. </el-table>
  1711. <pagination
  1712. v-show="whgenlegTotal > 0"
  1713. :total="whgenlegTotal"
  1714. :page.sync="queryParams.pageNum"
  1715. :limit.sync="queryParams.pageSize"
  1716. @pagination="getWhgenlegList"
  1717. />
  1718. <div slot="footer" class="dialog-footer">
  1719. <el-button type="primary" @click="zhgenlegData">导入作业费</el-button>
  1720. <el-button @click="warehousingagreements = false">取 消</el-button>
  1721. </div>
  1722. </el-dialog>
  1723. <!-- 选择仓储费协议数据 -->
  1724. <el-dialog
  1725. title="仓储费协议"
  1726. :modal="false"
  1727. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1728. :visible.sync="storageAgreements"
  1729. width="70%"
  1730. >
  1731. <el-table
  1732. :data="tasklegList"
  1733. ref="table"
  1734. tooltip-effect="dark"
  1735. width="100%"
  1736. border
  1737. stripe
  1738. @selection-change="whgenlegSelectionChange"
  1739. >
  1740. <el-table-column type="selection" width="55"> </el-table-column>
  1741. <el-table-column label="行号" type="index" width="80"></el-table-column>
  1742. <el-table-column
  1743. prop="fContractno"
  1744. header-align="center"
  1745. align="center"
  1746. label="提单号"
  1747. >
  1748. </el-table-column>
  1749. <el-table-column
  1750. prop="fCorpid"
  1751. header-align="center"
  1752. align="center"
  1753. label="客户名称"
  1754. >
  1755. </el-table-column>
  1756. <el-table-column
  1757. prop="fGoodsids"
  1758. header-align="center"
  1759. align="center"
  1760. label="品名"
  1761. >
  1762. </el-table-column>
  1763. <el-table-column
  1764. prop="fBegindate"
  1765. header-align="center"
  1766. align="center"
  1767. width="180px"
  1768. label="入库日期"
  1769. >
  1770. </el-table-column>
  1771. </el-table>
  1772. <pagination
  1773. v-show="whgenlegTotal > 0"
  1774. :total="whgenlegTotal"
  1775. :page.sync="whgenlegParams.pageNum"
  1776. :limit.sync="whgenlegParams.pageSize"
  1777. @pagination="getWhgenlegList"
  1778. />
  1779. <div slot="footer" class="dialog-footer">
  1780. <el-button type="primary" @click="storageFeeExport">导入仓储费</el-button>
  1781. <el-button @click="storageAgreements = false">取 消</el-button>
  1782. </div>
  1783. </el-dialog>
  1784. <el-dialog
  1785. title="入库页面"
  1786. :modal="false"
  1787. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1788. :visible.sync="editDialogVisible_s"
  1789. :close-on-click-modal="false"
  1790. width="70%"
  1791. >
  1792. <table
  1793. id="print_area"
  1794. class="biaoge zzss"
  1795. border="1"
  1796. style="border-collapse: collapse; border: none"
  1797. >
  1798. <tr>
  1799. <td
  1800. width="100"
  1801. colspan="7"
  1802. class="zzss"
  1803. style="font-size: 28px; font-weight: bold; border: none"
  1804. >
  1805. 青岛大木进仓单
  1806. </td>
  1807. </tr>
  1808. <tr>
  1809. <td
  1810. width="100"
  1811. colspan="7"
  1812. class="zzss"
  1813. style="font-size: 28px; font-weight: bold; border: none"
  1814. >
  1815. &nbsp;
  1816. </td>
  1817. </tr>
  1818. <tr>
  1819. <td width="450" colspan="2" class="zzss">
  1820. 货权方:{{ form.fCorpName }}
  1821. </td>
  1822. <td width="450" colspan="2" class="zzss">
  1823. 仓库:{{ form.fWarehouseids }}
  1824. </td>
  1825. <td width="450" colspan="3" class="zzss">地址:{{ fAddr }}</td>
  1826. </tr>
  1827. <tr>
  1828. <td width="200" colspan="2" class="zzss">保管方:大木有限公司</td>
  1829. <td width="200" colspan="2" class="zzss">
  1830. 联系人:{{ form.fContacts }}
  1831. </td>
  1832. <td width="200" colspan="3" class="zzss">电话:{{ form.fTel }}</td>
  1833. </tr>
  1834. <tr>
  1835. <td width="100" border="1">提单号</td>
  1836. <td width="100">品名</td>
  1837. <td width="100">箱型</td>
  1838. <td width="100">品牌</td>
  1839. <td width="100">件数</td>
  1840. <td width="100">重量</td>
  1841. <td width="100">包装规格</td>
  1842. </tr>
  1843. <tr>
  1844. <td width="100">{{ form.fMblno }}</td>
  1845. <td width="100">{{ fGoodsids }}</td>
  1846. <td width="100">{{ fCntrtype }}</td>
  1847. <td width="100"></td>
  1848. <td width="100">包</td>
  1849. <td width="100">吨</td>
  1850. <td width="100"></td>
  1851. </tr>
  1852. <tr>
  1853. <td width="100">序号</td>
  1854. <td width="100">入货日期</td>
  1855. <td width="100">箱量(20GP)</td>
  1856. <td width="100">重量</td>
  1857. <td width="100">件数</td>
  1858. <td width="100">入库重量</td>
  1859. <td width="100">入库件数</td>
  1860. </tr>
  1861. <tr v-for="(item, index) in printinglist" :key="index">
  1862. <td width="100">{{ index + 1 }}</td>
  1863. <td width="100">{{ item.fChargedate }}</td>
  1864. <td width="100">{{ item.fCntqty }}</td>
  1865. <td width="100">{{ item.fGrossweight }}</td>
  1866. <td width="100">{{ item.fPlanqty }}</td>
  1867. <td width="100">{{ item.fNetweight }}</td>
  1868. <td width="100">{{ item.fQty }}</td>
  1869. </tr>
  1870. <tr>
  1871. <td width="100" colspan="2">合计:</td>
  1872. <td width="100">{{ fCntqty }}</td>
  1873. <td width="100">{{ fGrossweight }}</td>
  1874. <td width="100">{{ fPlanqty }}</td>
  1875. <td width="100">{{ fNetweight }}</td>
  1876. <td width="100">{{ fQty }}</td>
  1877. </tr>
  1878. <tr>
  1879. <td width="100">备注:</td>
  1880. <td width="100" colspan="6"></td>
  1881. </tr>
  1882. <tr>
  1883. <td width="100" colspan="7" class="zzss">
  1884. 本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
  1885. </td>
  1886. </tr>
  1887. <tr style="border: none">
  1888. <td width="100" colspan="2" class="zzss" style="border: none">
  1889. 开单员:
  1890. </td>
  1891. <td width="100" colspan="3" class="zzss" style="border: none">
  1892. {{ form.createBy }}
  1893. </td>
  1894. <td width="100" colspan="2" class="zzss" style="border: none">
  1895. 仓管员:{{ form.fContacts }}
  1896. </td>
  1897. </tr>
  1898. <tr style="border: none">
  1899. <td width="100" colspan="2" class="zzss" style="border: none">
  1900. 开单时间:
  1901. </td>
  1902. <td width="100" colspan="3" class="zzss" style="border: none">
  1903. {{ fBsdate }}
  1904. </td>
  1905. <td width="100" colspan="2" class="zzss" style="border: none">
  1906. (盖章)
  1907. </td>
  1908. </tr>
  1909. </table>
  1910. <button @click="printSomething">打印</button>
  1911. </el-dialog>
  1912. <el-dialog
  1913. title="收货单打印"
  1914. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1915. :visible.sync="editDialogVisible_ss"
  1916. :close-on-click-modal="false"
  1917. width="70%"
  1918. :modal="false"
  1919. >
  1920. <table
  1921. id="print_area"
  1922. class="biaoge zzss"
  1923. border="1"
  1924. style="border-collapse: collapse; border: none;margin-top;100px;"
  1925. >
  1926. <tr>
  1927. <td
  1928. width="1400"
  1929. colspan="6"
  1930. class="zzss"
  1931. style="font-size: 26px; font-weight: bold; border: none"
  1932. >
  1933. 大木国际物流(青岛)有限公司收货单
  1934. </td>
  1935. </tr>
  1936. <!-- <div v-for="{{}}" :key="index"> -->
  1937. <tr>
  1938. <td width="400">车号:</td>
  1939. <td width="400">{{ fTruckno }}</td>
  1940. <td
  1941. width="500"
  1942. colspan="2"
  1943. style="padding-bottom: 0px; font-weight: bold; border: none"
  1944. class="zzss"
  1945. >
  1946. 日期:
  1947. </td>
  1948. <td
  1949. width="500"
  1950. colspan="2"
  1951. style="padding-bottom: 0px; font-weight: bold; border: none"
  1952. class="zzss"
  1953. >
  1954. {{ fBsdate }}
  1955. </td>
  1956. </tr>
  1957. <tr v-for="(item, index) in printinglist" :key="index">
  1958. <td width="250">货物品名:</td>
  1959. <td width="250">{{ item.fGoodsids }}</td>
  1960. <td width="250">白色聚吕</td>
  1961. <!-- <td width="200" colspan="2">件数: 161件</td> -->
  1962. <!-- <td width="200"></td> -->
  1963. <td width="200" colspan="4" class="zzss">
  1964. 件数: {{ item.fQty }}件
  1965. </td>
  1966. </tr>
  1967. <!-- <tr>
  1968. <td width="1400" colspan="6">&nbsp;</td>
  1969. </tr> -->
  1970. <tr v-for="(item, index) in printinglist" :key="index">
  1971. <td>备注:</td>
  1972. <td colspan="5">{{ item.remark }}</td>
  1973. </tr>
  1974. <tr>
  1975. <td>司机签字:</td>
  1976. <td></td>
  1977. <td colspan="2">司机电话:</td>
  1978. <td colspan="2">{{ form.fTel }}</td>
  1979. </tr>
  1980. <tr>
  1981. <td>制单人:</td>
  1982. <td>{{ form.createBy }}</td>
  1983. <td colspan="2">收货人:</td>
  1984. <td colspan="2">{{ form.fContacts }}</td>
  1985. </tr>
  1986. <!-- <tr>
  1987. <td colspan="6" class="zzss">&nbsp;</td>
  1988. </tr> -->
  1989. <tr>
  1990. <td width="280" class="zzss"></td>
  1991. <td width="280" class="zzss"></td>
  1992. <td width="280" class="zzss"></td>
  1993. <td width="280" class="zzss"></td>
  1994. <td width="290" class="zzss">地址:{{ fAddr }}</td>
  1995. <td width="290" class="zzss">电话:{{ form.fTel }}</td>
  1996. </tr>
  1997. <!-- </div> -->
  1998. </table>
  1999. <button @click="printSomething">打印</button>
  2000. </el-dialog>
  2001. <el-dialog
  2002. title="调拨作业单打印"
  2003. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2004. :visible.sync="openPrintJobSheet"
  2005. :close-on-click-modal="false"
  2006. width="70%"
  2007. :modal="false"
  2008. >
  2009. <table id="print_area"
  2010. class="biaoge zzss"
  2011. border="1"
  2012. style="border-collapse: collapse; border: none"
  2013. >
  2014. <tr>
  2015. <td
  2016. width="1400"
  2017. colspan="6"
  2018. class="zzss"
  2019. style="font-size: 28px; font-weight: bold; border: none"
  2020. >
  2021. 大木国际物流(青岛)有限公司作业单
  2022. </td>
  2023. </tr>
  2024. <tr>
  2025. <td
  2026. width="900"
  2027. colspan="4"
  2028. class="zzss"
  2029. style="font-size: 28px; font-weight: bold"
  2030. >
  2031. &nbsp;
  2032. </td>
  2033. <td
  2034. width="500"
  2035. colspan="2"
  2036. style="padding-bottom: 0px; font-weight: bold; border: none"
  2037. class="zzss"
  2038. >
  2039. 调拨日期:{{ fBsdate }}
  2040. </td>
  2041. </tr>
  2042. <tr v-for="(item, index) in printinglist" :key="index">
  2043. <td width="200">车号</td>
  2044. <td width="200">{{ item.fTruckno }}</td>
  2045. <td width="200">货物品名</td>
  2046. <td width="200">{{ item.fGoodsids }}</td>
  2047. </tr>
  2048. <tr>
  2049. <td width="1400" colspan="6">&nbsp;</td>
  2050. </tr>
  2051. <tr>
  2052. <td>备注:</td>
  2053. <td colspan="5">{{form.remark}}</td>
  2054. </tr>
  2055. <tr v-for="(item, index) in feelDrSelection" :key="'info2-'+index">
  2056. <td width="200">收费</td>
  2057. <td width="200">{{ item.fFeeName }}</td>
  2058. <td width="200">货物品名</td>
  2059. <td width="200">元</td>
  2060. <td width="200">{{ item.fAmount }}</td>
  2061. </tr>
  2062. <tr>
  2063. <td>司机签字:</td>
  2064. <td></td>
  2065. <td>电话</td>
  2066. <td>{{ form.fTel }}</td>
  2067. <td colspan="2" rowspan="2">
  2068. 确认货物数量无误,包装于货物完好!<br />调拨盖好篷布,如有违背责任自负<br />装卸工是否收小费
  2069. </td>
  2070. </tr>
  2071. <tr>
  2072. <td>制表:</td>
  2073. <td>{{ form.createBy }}</td>
  2074. <td>机械/人工:</td>
  2075. <td>{{ form.fContacts }}</td>
  2076. </tr>
  2077. <tr>
  2078. <td colspan="6" class="zzss">&nbsp;</td>
  2079. </tr>
  2080. <tr>
  2081. <td width="280" class="zzss"></td>
  2082. <td width="280" class="zzss"></td>
  2083. <td width="280" class="zzss"></td>
  2084. <td width="280" class="zzss"></td>
  2085. <td width="290" class="zzss">地址:{{ fAddr }}</td>
  2086. <td width="290" class="zzss">电话:{{ form.fTel }}</td>
  2087. </tr>
  2088. </table>
  2089. <div style="display: flex; justify-content: space-between">
  2090. <el-button type="primary" @click="printSomething">打印</el-button>
  2091. <el-button @click="closeWindow">取消</el-button>
  2092. </div>
  2093. </el-dialog>
  2094. </el-dialog>
  2095. </div>
  2096. </template>
  2097. <script>
  2098. import print from "print-js";
  2099. import {
  2100. backFee,
  2101. RevocationApproval,
  2102. addWhgenleg,
  2103. getStockTransferList,
  2104. getStockTransfer,
  2105. delStockTransfer,
  2106. updateCredit,
  2107. addJoblist,
  2108. disChargelist,
  2109. addStockTransfer,
  2110. warehouseSubmission,
  2111. updateStockTransfer,
  2112. exportStockTransfer,
  2113. } from "@/api/warehouseBusiness/stockTransfer";
  2114. import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
  2115. import { listAgreements } from "@/api/warehouseBusiness/agreement";
  2116. import { listCorps } from "@/api/basicdata/corps";
  2117. import { listFees, getFees } from "@/api/basicdata/fees";
  2118. import { listWarehouse } from "@/api/basicdata/warehouse";
  2119. import { listArea } from "@/api/basicdata/area";
  2120. import { listGoods } from "@/api/basicdata/goods";
  2121. import { listUser, queryUserVal } from "@/api/system/user";
  2122. import UploadFile from "@/components/Uploadfile";
  2123. import { listWhgenleg } from "@/api/reportManagement/whgenleg";
  2124. import Global from '@/layout/components/global'
  2125. import AddOrUpdate from '@/views/viewApproval'
  2126. import ApprovalComments from '@/views/startApproval'
  2127. export default {
  2128. name: "Warehousebills",
  2129. components: {
  2130. UploadFile,
  2131. AddOrUpdate,
  2132. ApprovalComments
  2133. },
  2134. data() {
  2135. return {
  2136. Lander:'',
  2137. Operator:'',
  2138. cancelButton:true,
  2139. approve:false,
  2140. disappear:false,
  2141. colseButton:true,
  2142. addOrUpdateVisible: false,
  2143. addOrUpdateVisib:false,
  2144. stockTransferId:140,
  2145. notChange:false,
  2146. index: 0,
  2147. fFeeUnitid: null,
  2148. fFeeUnitids: null,
  2149. formBrowseStatus: false,
  2150. detailsHidden: false,
  2151. warehousingagreements: false,
  2152. fTruckno: null,
  2153. fBsdate: null,
  2154. fCntrtype: null,
  2155. fGoodsids: null,
  2156. fPlanqty: null,
  2157. fPlannetweight: null,
  2158. fPlanvolumn: null,
  2159. fGrossweight: 0,
  2160. fCntqty: 0,
  2161. fNetweight: 0,
  2162. fVolumn: 0,
  2163. fid: 0,
  2164. fQty: 0,
  2165. fSbu: 0,
  2166. // 遮罩层
  2167. loading: true,
  2168. // 打印地址
  2169. fAddr: "",
  2170. // 税率
  2171. fTaxrate: null,
  2172. // 选中数组
  2173. ids: [],
  2174. userVal: {
  2175. userName: null,
  2176. nickName: null,
  2177. deptId: null,
  2178. },
  2179. queryForm: {},
  2180. // 费用状态
  2181. costStatus: 'Dr',
  2182. // 库存总账表
  2183. whgenlegList: [],
  2184. whgenlegTotal: 0,
  2185. // 弹窗库存总账数据
  2186. dialogWhgenlegList: [],
  2187. // 库存总账对话框
  2188. whgenlegVisible: false,
  2189. // 收费多选框
  2190. feelDrSelection: [],
  2191. // 新增用户对话框
  2192. editDialogVisible_s: false,
  2193. editDialogVisible_ss: false,
  2194. openPrintJobSheet: false,
  2195. editDialogClosed_ss: false,
  2196. storageAgreements: false,
  2197. dataList: [],
  2198. warehouseCrList: [],
  2199. warehouseDrList: [],
  2200. printinglist: [],
  2201. browseStatus: false,
  2202. relevantAttachments: [],
  2203. // 非单个禁用
  2204. single: true,
  2205. // 非多个禁用
  2206. multiple: true,
  2207. // 显示搜索条件
  2208. showSearch: true,
  2209. // 总条数
  2210. total: 0,
  2211. // 仓库主(出入库)表格数据
  2212. warehousebillsList: [],
  2213. // 弹出层标题
  2214. title: "",
  2215. // 是否显示弹出层
  2216. open: false,
  2217. // 货权方(客户数据)
  2218. fMblnoOptions: [],
  2219. // 货权方(客户数据)
  2220. // 客户名称
  2221. KHblnoOptions: [],
  2222. // 作业费协议
  2223. tasklegList: [],
  2224. fSbuOptions: [],
  2225. // 操作员
  2226. userOptions: [],
  2227. // 操作员
  2228. goodsOptions: [],
  2229. // 制单部门
  2230. deptOptions: [],
  2231. // 仓库(仓库数据)
  2232. warehouseOptions: [],
  2233. // 库存明细入账数组
  2234. dataListSelection: [],
  2235. // 库存明细撤回入账数组
  2236. dataWithdrawList: [],
  2237. kqhouseOptions: [],
  2238. // 贸易方式(数据字典),对应t_trademodels 字典
  2239. fTrademodeidOptions: [],
  2240. // 结算方式(数据字典),下拉选择字典
  2241. fStltypeOptions: [],
  2242. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  2243. fIfweighOptions: [],
  2244. // 是否破损(数据字典),默认F否则T字典
  2245. fIfdamageOptions: [],
  2246. // 单据类型(数据字典)SJRK字典
  2247. fBilltypeOptions: [],
  2248. // 状态(数据字典),N 入字典
  2249. fBillstatusOptions: [],
  2250. // 费用名称
  2251. fWbuOptions: [],
  2252. // 计价单位
  2253. jFeetunitOptions: [
  2254. {dictLabel: "件数",dictValue: 1},
  2255. {dictLabel: "毛重",dictValue: 2},
  2256. {dictLabel: "净重",dictValue: 3},
  2257. {dictLabel: "尺码",dictValue: 4},
  2258. {dictLabel: "固定",dictValue: 5},
  2259. ],
  2260. // 查询参数
  2261. queryParams: {
  2262. pageNum: 1,
  2263. pageSize: 10,
  2264. fBillno: null,
  2265. createBy: null,
  2266. createTime: null,
  2267. fCustomsdeclartion: null,
  2268. fOriginalbillno: null,
  2269. fDeptid: null,
  2270. fBsdeptid: null,
  2271. fContacts: null,
  2272. fTel: null,
  2273. fCorpid: null,
  2274. fTocorpid: null,
  2275. fStltypeid: null,
  2276. fBscorpno: null,
  2277. fWarehouseid: null,
  2278. fStorekeeper: null,
  2279. fBsdate: null,
  2280. fPlanqty: null,
  2281. fPlangrossweight: null,
  2282. fPlannetweight: null,
  2283. fPlanvolumn: null,
  2284. fQty: null,
  2285. fGrossweight: null,
  2286. fNetweight: null,
  2287. fVolumn: null,
  2288. fTrademodeid: null,
  2289. fSbu: null,
  2290. fFeetunit: null,
  2291. fMblno: null,
  2292. fVslvoy: null,
  2293. fEta: null,
  2294. fCustomno: null,
  2295. fIfweigh: null,
  2296. fIfpledge: null,
  2297. fIfdamage: null,
  2298. fBankcorpid: null,
  2299. fBilltype: null,
  2300. fBillstatus: null,
  2301. fCreateby: null,
  2302. fCreatetime: null,
  2303. fGoodsid: null,
  2304. fCntrtype: null,
  2305. fCntqty: null,
  2306. },
  2307. // 库存总账参数
  2308. whgenlegParams: {
  2309. pageNum: 1,
  2310. pageSize: 10,
  2311. fMblno: null,
  2312. fCorpid: null,
  2313. fWarehouseid: null,
  2314. },
  2315. // 表单参数
  2316. form: {
  2317. fMblno: null,
  2318. fCorpid: null,
  2319. fTrademodeid: null,
  2320. fWarehouseid: null,
  2321. },
  2322. // 表单校验
  2323. rules: {
  2324. fDeptid: [{ required: true, message: " ", trigger: "blur" }],
  2325. fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
  2326. fCorpid: [{ required: true, message: " ", trigger: "blur"},],
  2327. fPlanqty: [{ required: true, message: " ", trigger: "blur"},],
  2328. fFeeUnitid: [{ required: true, message: " ", trigger: "blur" }],
  2329. fChargedate: [{ required: true, message: " ", trigger: "blur" }],
  2330. fBillingway: [{ required: true, message: " ", trigger: "blur" }],
  2331. fBsdate: [{ required: true, message: " ", trigger: "blur" }],
  2332. fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  2333. fSbu: [{ required: true, message: " ", trigger: "blur" }],
  2334. fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
  2335. fPlannetweight: [{ required: true, message: " ", trigger: "blur"},],
  2336. fPlangrossweight: [{ required: true, message: " ", trigger: "blur"},],
  2337. fbillingway: [
  2338. {
  2339. required: true,
  2340. message: " ",
  2341. trigger: "blur",
  2342. },
  2343. ],
  2344. fTocorpid: [
  2345. {
  2346. required: true,
  2347. message: " ",
  2348. trigger: "blur",
  2349. },
  2350. ],
  2351. },
  2352. };
  2353. },
  2354. created() {
  2355. this.getList();
  2356. this.getDicts("data_trademodes").then((response) => {
  2357. this.fTrademodeidOptions = response.data;
  2358. });
  2359. this.getDicts("data_stltype_type").then((response) => {
  2360. this.fStltypeOptions = response.data;
  2361. });
  2362. this.getDicts("tax_rate").then((response) => {
  2363. this.fTaxrate = response.data[0].dictValue
  2364. });
  2365. this.getDicts("data_ifweigh_status").then((response) => {
  2366. this.fIfweighOptions = response.data;
  2367. });
  2368. this.getDicts("data_ifdamage_status").then((response) => {
  2369. this.fIfdamageOptions = response.data;
  2370. });
  2371. this.getDicts("data_billtype_type").then((response) => {
  2372. this.fBilltypeOptions = response.data;
  2373. });
  2374. this.getDicts("sys_common_status").then((response) => {
  2375. this.fBillstatusOptions = response.data;
  2376. });
  2377. this.register()
  2378. },
  2379. activated(){
  2380. this.Jump()
  2381. },
  2382. methods: {
  2383. // 撤销审核
  2384. backrRconciliation(){
  2385. this.form.fBillstatus = '1'
  2386. backFee(this.form.fId).then(response=>{
  2387. this.msgSuccess("撤回成功")
  2388. this.getList()
  2389. this.open = false
  2390. })
  2391. this.getList()
  2392. },
  2393. // 默认录入人
  2394. register() {
  2395. queryUserVal().then((response)=>{
  2396. this.Lander = response.user.userName
  2397. })
  2398. },
  2399. // 审批按钮
  2400. goApproval(){
  2401. this.addOrUpdateVisib = true
  2402. this.$nextTick(() => {
  2403. this.$refs.ApprovalComments.init(this.form.fId,this.stockTransferId)
  2404. })
  2405. },
  2406. Jump(){
  2407. this.approval = this.$route.query.data
  2408. if(this.approval){
  2409. this.colseButton = false
  2410. this.approval = JSON.parse(this.approval)
  2411. this.hide = false
  2412. this.open = true
  2413. this.browseStatus = true
  2414. this.notChange = true
  2415. this.approve = true
  2416. this.disappear = true
  2417. this.cancelButton = false
  2418. this.reset()
  2419. getStockTransfer(this.approval.billId).then((response) => {
  2420. if (response.data.warehousebills) {
  2421. this.form = response.data.warehousebills;
  2422. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  2423. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  2424. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2425. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  2426. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  2427. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  2428. }
  2429. if (response.data.corps) {
  2430. this.fMblnoOptions = response.data.corps;
  2431. this.KHblnoOptions = response.data.corps;
  2432. this.fSbuOptions = response.data.corps;
  2433. }
  2434. if (response.data.feesList) {
  2435. this.fWbuOptions = response.data.feesList;
  2436. }
  2437. if (response.data.warehouse) {
  2438. this.warehouseOptions = response.data.warehouse;
  2439. }
  2440. if (response.data.warehouseBillsItem) {
  2441. this.dataList = response.data.warehouseBillsItem;
  2442. for (let list in this.dataList) {
  2443. if (!this.form.fMblno) {
  2444. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  2445. }
  2446. if (this.dataList[list].fBillstatus >= 6) {
  2447. this.formBrowseStatus = true;
  2448. }
  2449. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  2450. }
  2451. }
  2452. if (response.data.enclosures) {
  2453. this.relevantAttachments = response.data.enclosures;
  2454. }
  2455. if (response.data.warehouse) {
  2456. this.warehouseDrList = response.data.warehousebillsfeesDr;
  2457. }
  2458. if (response.data.warehousebillsfeesCr) {
  2459. this.warehouseCrList = response.data.warehousebillsfeesCr;
  2460. }
  2461. if (response.data.sysUser) {
  2462. this.userVal = response.data.sysUser
  2463. this.userOptions = response.data.sysUser;
  2464. }
  2465. if (response.data.dept) {
  2466. this.deptOptions = []
  2467. this.deptOptions.push(response.data.dept)
  2468. }
  2469. if (response.data.feesList) {
  2470. this.fWbuOptions = response.data.feesList;
  2471. }
  2472. if (response.data.goodsList) {
  2473. this.goodsOptions = response.data.goodsList;
  2474. }
  2475. if (response.data.warehouse) {
  2476. this.warehouseOptions = response.data.warehouse;
  2477. }
  2478. if (response.data.warehouseAreas) {
  2479. this.kqhouseOptions = response.data.warehouseAreas;
  2480. }
  2481. this.open = true;
  2482. this.title = "修改调拨";
  2483. });
  2484. }
  2485. },
  2486. homepaGe(){
  2487. let view = {
  2488. fullPath: "/business/stockTransfer",
  2489. hash: "",
  2490. matched: Array(2),
  2491. meta: Object,
  2492. name: "StockTransfer",
  2493. params: Object,
  2494. path: "/business/stockTransfer",
  2495. query: Object,
  2496. title: "调拨"
  2497. }
  2498. this.$router.push({ path: '/index'})
  2499. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  2500. if (this.isActive(view)) {
  2501. this.toLastView(visitedViews, view)
  2502. }
  2503. })
  2504. Global.$emit("removeCache", "closeSelectedTag", view);
  2505. },
  2506. homePage() {
  2507. this.open = false
  2508. let view = {
  2509. fullPath: "/business/stockTransfer",
  2510. hash: "",
  2511. matched: Array(2),
  2512. meta: Object,
  2513. name: "StockTransfer",
  2514. params: Object,
  2515. path: "/business/stockTransfer",
  2516. query: Object,
  2517. title: "调拨"
  2518. }
  2519. this.$router.push({ path: '/index' })
  2520. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  2521. if (this.isActive(view)) {
  2522. this.toLastView(visitedViews, view)
  2523. }
  2524. })
  2525. Global.$emit("removeCache", "closeSelectedTag", view);
  2526. },
  2527. // 撤销审批
  2528. backApproval(){
  2529. let data = {
  2530. id:this.form.fId,
  2531. actId:this.stockTransferId,
  2532. billId:this.form.fId
  2533. }
  2534. RevocationApproval(data).then(response => {
  2535. this.msgSuccess("撤销审批成功")
  2536. this.disappear = true
  2537. this.open = false
  2538. this.getList()
  2539. })
  2540. },
  2541. returnData(){
  2542. this.addOrUpdateVisib = false
  2543. this.open = false
  2544. this.homepaGe()
  2545. },
  2546. getDataList(){
  2547. this.addOrUpdateVisible = false
  2548. },
  2549. // 查看审批流
  2550. addOrUpdateHandle(){
  2551. this.addOrUpdateVisible = true
  2552. this.addOrUpdateVisib = false
  2553. let id = '448'
  2554. let actId = '110'
  2555. this.$nextTick(() => {
  2556. this.$refs.addOrUpdate.init(this.form.fId,this.stockTransferId)
  2557. })
  2558. },
  2559. //关闭弹框的事件
  2560. addCloseDialog(){
  2561. this.getList()
  2562. },
  2563. // 上传成功返回数据
  2564. showFile(row) {
  2565. for(let list in this.relevantAttachments) {
  2566. this.$set(this.relevantAttachments[list], "fUrl", row.url);
  2567. this.$set(this.relevantAttachments[list], "fName", row.fileName);
  2568. }
  2569. },
  2570. printSomething() {
  2571. // 此处的style即为打印时的样式
  2572. const style = "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
  2573. print({ printable: "print_area", type: "html",
  2574. style: style, // 亦可使用引入的外部css;
  2575. scanStyles: false,
  2576. });
  2577. this.addList();
  2578. this.openPrintJobSheet = false;
  2579. },
  2580. // 关闭二级弹窗
  2581. closeWindow () {
  2582. this.openPrintJobSheet = false
  2583. },
  2584. // 新增附件上传
  2585. addRelevt() {
  2586. this.relevantAttachments.push({
  2587. fUrl: null,
  2588. fName: null,
  2589. createBy: this.form.createBy,
  2590. createTime: Date.parse(new Date()),
  2591. });
  2592. },
  2593. // 新增作业费协议
  2594. addAgreement(status) {
  2595. this.costStatus = status
  2596. if (this.dataList.length === 0 || !this.dataList[0].fGoodsid) {
  2597. this.$message({ message: "请维护库存明细,或第一行品名", type: "warning", });
  2598. return false
  2599. }
  2600. if (!this.form.fCorpid) {
  2601. this.$message({ message: "请维护货权方", type: "warning", });
  2602. return false
  2603. }
  2604. this.whgenlegList = []
  2605. this.dialogWhgenlegList = []
  2606. this.whgenlegTotal = 0
  2607. this.warehousingagreements = true
  2608. this.getWhgenlegListt()
  2609. },
  2610. // 新增仓储费协议
  2611. addStorages() {
  2612. if (!this.form.fCorpid) {
  2613. this.$message({ message: "请维护货权方", type: "warning", });
  2614. return false
  2615. }
  2616. this.whgenlegList = [];
  2617. this.dialogWhgenlegList = [];
  2618. this.whgenlegTotal = 0;
  2619. this.storageAgreements = true;
  2620. this.getAgreement();
  2621. },
  2622. // 查询仓储费协议
  2623. getAgreement() {
  2624. this.queryParams.fCorpid = this.form.fCorpid;
  2625. listAgreements(this.queryParams).then((response) => {
  2626. this.tasklegList = response.rows;
  2627. this.whgenlegTotal = response.total;
  2628. });
  2629. },
  2630. // 查询作业费信息
  2631. getWhgenlegListt() {
  2632. let data = {
  2633. pageNum:1,
  2634. pageSize:10,
  2635. fLineno:this.form.fCorpid,
  2636. fFeeid:this.dataList[0].fGoodsid
  2637. }
  2638. operationAgreement(data).then((response) => {
  2639. this.tasklegList = response.rows;
  2640. this.whgenlegTotal = response.total;
  2641. });
  2642. },
  2643. // 导入付款信息
  2644. whgenlegDatas() {
  2645. if (this.dialogWhgenlegList.length === 0) {
  2646. this.$message({
  2647. message: "请选择需要导入的数据",
  2648. type: "warning",
  2649. });
  2650. } else {
  2651. for (let whgen in this.dialogWhgenlegList) {
  2652. let feeId = this.dialogWhgenlegList[whgen].feeFId;
  2653. getFees(feeId).then((response) => {
  2654. this.fWbuOptions.push(response.data);
  2655. });
  2656. this.warehouseDrList.push({
  2657. fCorpid: this.dialogWhgenlegList[whgen].fCorpid,
  2658. fFeeid: feeId,
  2659. fFeeUnitid: this.dialogWhgenlegList[whgen].fFeeUnitid + "",
  2660. fUnitprice: this.dialogWhgenlegList[whgen].fPrice,
  2661. fCurrency: "RMB",
  2662. fExrate: 1,
  2663. fTaxrate: this.fTaxrate
  2664. });
  2665. }
  2666. this.warehousingagreements = false;
  2667. }
  2668. },
  2669. // 导出作业费
  2670. zhgenlegData() {
  2671. if (this.dialogWhgenlegList.length === 0) {
  2672. this.$message({ message: "请选择需要导入的数据", type: "warning", });
  2673. return false
  2674. }
  2675. for (let zhgen in this.dialogWhgenlegList) {
  2676. let haveGoods = false
  2677. let feeId = this.dialogWhgenlegList[zhgen].feeFId
  2678. if (this.fWbuOptions.length !== 0) {
  2679. for (let wbu in this.fWbuOptions) {
  2680. if (this.fWbuOptions[wbu].fId === feeId) {
  2681. haveGoods = true
  2682. break
  2683. }
  2684. }
  2685. }
  2686. if (!haveGoods) {
  2687. getFees(feeId).then((response) => {
  2688. this.fWbuOptions.push(response.data)
  2689. })
  2690. }
  2691. let qty = 1;
  2692. if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 1) {
  2693. qty = this.fQty
  2694. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 2) {
  2695. qty = this.fGrossweight
  2696. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 3) {
  2697. qty = this.fNetweight
  2698. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 4) {
  2699. qty = this.fVolumn
  2700. }
  2701. let fAmount = parseFloat(Number(this.dialogWhgenlegList[zhgen].fPrice) * Number(qty)).toFixed(2)
  2702. if (this.costStatus === 'Cr') {
  2703. this.warehouseCrList.push({
  2704. fQty: qty,
  2705. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2706. fFeeid: feeId,
  2707. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2708. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2709. fCurrency: 'RMB',
  2710. fExrate: 1,
  2711. fAmount: fAmount,
  2712. fTaxrate: this.fTaxrate
  2713. })
  2714. } else {
  2715. this.warehouseDrList.push({
  2716. fQty: qty,
  2717. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2718. fFeeid: feeId,
  2719. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2720. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2721. fCurrency: 'RMB',
  2722. fExrate: 1,
  2723. fAmount: fAmount,
  2724. fTaxrate: this.fTaxrate
  2725. })
  2726. }
  2727. }
  2728. this.warehousingagreements = false
  2729. },
  2730. // 导出仓储费
  2731. storageFeeExport () {
  2732. if (this.dialogWhgenlegList.length === 0) {
  2733. this.$message({ message: "请选择需要导入的数据", type: "warning", });
  2734. return false
  2735. }
  2736. for (let zhgen in this.dialogWhgenlegList) {
  2737. let haveGoods = false
  2738. if (this.fWbuOptions.length !== 0) {
  2739. for (let wbu in this.fWbuOptions) {
  2740. if (this.fWbuOptions[wbu].fId === this.dialogWhgenlegList[zhgen].fGoodsid) {
  2741. haveGoods = true
  2742. break
  2743. }
  2744. }
  2745. }
  2746. if (!haveGoods) {
  2747. let feeId = this.dialogWhgenlegList[zhgen].feeFId
  2748. getFees(feeId).then((response) => {
  2749. this.fWbuOptions.push(response.data)
  2750. })
  2751. }
  2752. if (this.costStatus === 'Cr') {
  2753. this.warehouseCrList.push({
  2754. fQty: 0,
  2755. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2756. fFeeid: null,
  2757. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2758. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2759. fCurrency: 'RMB',
  2760. fExrate: 1,
  2761. fAmount: 0,
  2762. fTaxrate: this.fTaxrate
  2763. })
  2764. } else {
  2765. this.warehouseDrList.push({
  2766. fQty: 0,
  2767. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2768. fFeeid: null,
  2769. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2770. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2771. fCurrency: 'RMB',
  2772. fExrate: 1,
  2773. fAmount: 0,
  2774. fTaxrate: this.fTaxrate
  2775. })
  2776. }
  2777. }
  2778. this.storageAgreements = false
  2779. },
  2780. // 新增list
  2781. addRelevant() {
  2782. this.$refs['form'].validate((valid) => {
  2783. if (valid) {
  2784. this.whgenlegList = [];
  2785. this.dialogWhgenlegList = [];
  2786. this.whgenlegTotal = 0;
  2787. this.whgenlegVisible = true;
  2788. this.getWhgenlegList();
  2789. }
  2790. })
  2791. },
  2792. // 库存总账导出数据
  2793. whgenlegData() {
  2794. if (this.dialogWhgenlegList.length === 0) {
  2795. this.$message({ message: "未勾选信息", type: "warning" });
  2796. return false;
  2797. }
  2798. for (let whgen in this.dialogWhgenlegList) {
  2799. if (!this.form.fMblno || this.form.fMblno === "") {
  2800. this.$set(this.form, "fMblno", this.dialogWhgenlegList[whgen].fMblno);
  2801. }
  2802. let haveGoods = false
  2803. if (this.kqhouseOptions.length !== 0) {
  2804. for (let house in this.kqhouseOptions) {
  2805. if (this.kqhouseOptions[house].fId === this.dialogWhgenlegList[whgen].fWarehouseLocationid) {
  2806. haveGoods = true
  2807. break;
  2808. }
  2809. }
  2810. }
  2811. if (!haveGoods) {
  2812. let queryParams = {
  2813. pageNum: 1,
  2814. pageSize: 10,
  2815. fId: this.dialogWhgenlegList[whgen].fWarehouseLocationid
  2816. };
  2817. listArea(queryParams).then((response) => {
  2818. for (let row in response.rows) {
  2819. this.kqhouseOptions.push(response.rows[row])
  2820. }
  2821. });
  2822. }
  2823. this.dataList.push({
  2824. fId: null,
  2825. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  2826. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  2827. fCntrtype: null,
  2828. fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
  2829. fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
  2830. fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
  2831. fWarehouseLocationids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  2832. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  2833. fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
  2834. fChargedate: this.dialogWhgenlegList[whgen].fChargedate,
  2835. fMarks: this.dialogWhgenlegList[whgen].fMarks,
  2836. fOriginalbilldate: this.dialogWhgenlegList[whgen].fOriginalbilldate,
  2837. fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
  2838. fPackagespecs: this.dialogWhgenlegList[whgen].fPackagespecs,
  2839. fVolumn: this.dialogWhgenlegList[whgen].fVolumnblc,
  2840. fGrossweight: 0,
  2841. fNetweight: 0,
  2842. fQty: 0,
  2843. fCntqty: 1,
  2844. fTransferWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  2845. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  2846. fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  2847. fCntrno: this.dialogWhgenlegList[whgen].fCntrno,
  2848. fGoodsval: null,
  2849. fBillstatus: 1,
  2850. fTruckno: null,
  2851. remark: null,
  2852. fIsPass: 'F'
  2853. });
  2854. }
  2855. this.whgenlegVisible = false;
  2856. },
  2857. // 收货单打印界面
  2858. showEditDialog_s() {
  2859. if (this.printinglist.length <= 0) {
  2860. this.$message.error("请选择需要打印的明细!");
  2861. return false
  2862. }
  2863. for (let aorp in this.printinglist) {
  2864. var date = new Date(this.printinglist[aorp].fBsdate);
  2865. var Y = date.getFullYear() + "-";
  2866. var M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-";
  2867. var D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  2868. this.$set(this.printinglist[aorp], "fBsdate", Y + M + D);
  2869. }
  2870. this.editDialogVisible_s = true;
  2871. for (let corp in this.fMblnoOptions) {
  2872. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  2873. this.$set(this.form, "fCorpName", this.fMblnoOptions[corp].fName);
  2874. }
  2875. }
  2876. for (let sorp in this.warehouseOptions) {
  2877. if (this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
  2878. this.$set(this.form, "fWarehouseids", this.warehouseOptions[sorp].fName);
  2879. }
  2880. }
  2881. },
  2882. // 作业单打印
  2883. printJobSheet() {
  2884. // if (this.feelDrSelection.length <= 0) {
  2885. // this.$message.error("请勾选收款信息!");
  2886. // return false;
  2887. // }
  2888. for (let fee in this.feelDrSelection) {
  2889. if (!this.feelDrSelection[fee].fCorpid) {
  2890. this.$message.error("请维护收款费用客户名称!");
  2891. return false;
  2892. }
  2893. if (!this.feelDrSelection[fee].fFeeid) {
  2894. this.$message.error("请维护收款费用费用信息!");
  2895. return false;
  2896. }
  2897. }
  2898. for (let li in this.printinglist) {
  2899. if(!this.printinglist[li].fId) {
  2900. this.$message.error("请先保存!");
  2901. return false;
  2902. }
  2903. }
  2904. let fTruckno = this.printinglist[0].fTruckno
  2905. let fDriverName = this.printinglist[0].fDriverName
  2906. for (let warehouseCr in this.printinglist) {
  2907. if (!this.printinglist[warehouseCr].fTruckno || this.printinglist[warehouseCr].fTruckno !== fTruckno) {
  2908. this.$message.error('请填写车号或选择车相同车号')
  2909. return false
  2910. } else if (!this.printinglist[warehouseCr].fDriverName || this.printinglist[warehouseCr].fDriverName !== fDriverName) {
  2911. this.$message.error('请填写司机姓名选择相同司机姓名')
  2912. return false
  2913. } else if (!this.printinglist[warehouseCr].fGrossweight) {
  2914. this.$message.error('请选择调拨毛重')
  2915. return false
  2916. } else if (!this.printinglist[warehouseCr].fDriverTel) {
  2917. this.$message.error('请选填写司机电话')
  2918. return false
  2919. } else if (!this.printinglist[warehouseCr].fDriverIdCar) {
  2920. this.$message.error('请选填写司机身份证')
  2921. return false
  2922. } else if (!this.printinglist[warehouseCr].fNetweight) {
  2923. this.$message.error('请选择调拨净重')
  2924. return false
  2925. } else if (!this.printinglist[warehouseCr].fQty) {
  2926. this.$message.error('请选择调拨件数')
  2927. return false
  2928. } else if (!this.printinglist[warehouseCr].fDriverName) {
  2929. this.$message.error('请输入司机姓名')
  2930. return false
  2931. } else if (!this.printinglist[warehouseCr].fDriverTel) {
  2932. this.$message.error('请输入司机电话')
  2933. return false
  2934. }
  2935. }
  2936. // 获取业务日期
  2937. var date = new Date(this.form.fBsdate)
  2938. var Y = date.getFullYear() + '-'
  2939. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
  2940. var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
  2941. this.fBsdate = Y + M + D
  2942. for (let dr in this.feelDrSelection) {
  2943. for (let opt in this.fWbuOptions) {
  2944. if (this.fWbuOptions[opt].fId === this.feelDrSelection[dr].fFeeid) {
  2945. this.$set(this.feelDrSelection[dr], 'fFeeName', this.fWbuOptions[opt].fName)
  2946. break
  2947. }
  2948. }
  2949. }
  2950. setTimeout(() => {
  2951. this.openPrintJobSheet = true
  2952. }, 200);
  2953. },
  2954. showEditDialog_ss() {
  2955. if (this.printinglist.length > 0) {
  2956. for (let warehouseCr in this.printinglist) {
  2957. if (
  2958. this.printinglist[warehouseCr].fTruckno != this.printinglist[0].fTruckno
  2959. ) {
  2960. this.$message.error("请选择车相同车号");
  2961. return false;
  2962. }
  2963. if (!this.printinglist[warehouseCr].fGoodsid) {
  2964. this.$message.error("请选择品名");
  2965. return false;
  2966. }
  2967. if (!this.printinglist[warehouseCr].fWarehouselocid) {
  2968. this.$message.error("请选择库区");
  2969. return false;
  2970. }
  2971. if (!this.printinglist[warehouseCr].fGrossweight) {
  2972. this.$message.error("请选择入库毛重");
  2973. return false;
  2974. }
  2975. if (!this.printinglist[warehouseCr].fNetweight) {
  2976. this.$message.error("请选择入库净重");
  2977. return false;
  2978. }
  2979. if (!this.printinglist[warehouseCr].fQty) {
  2980. this.$message.error("请选择入库件数");
  2981. return false;
  2982. }
  2983. if (!this.printinglist[warehouseCr].fDriverName) {
  2984. this.$message.error("请输入司机姓名");
  2985. return false;
  2986. }
  2987. if (!this.printinglist[warehouseCr].fDriverTel) {
  2988. this.$message.error("请输入司机电话");
  2989. return false;
  2990. }
  2991. }
  2992. this.openPrintJobSheet = true;
  2993. // this.addList()
  2994. } else {
  2995. this.$message.error("请选择需要打印的明细!");
  2996. }
  2997. },
  2998. // 收款信息
  2999. addCollection() {
  3000. this.warehouseDrList.push({
  3001. fcorpid: this.form.fCorpid,
  3002. ffeeid: null,
  3003. fFeeUnitid: null,
  3004. fQty: 0,
  3005. funitprice: 0,
  3006. fAmount: 0,
  3007. fCurrency: "RMB",
  3008. fExrate: 1,
  3009. fTaxrate: this.fTaxrate,
  3010. remarks: null,
  3011. });
  3012. },
  3013. addpayment() {
  3014. this.warehouseCrList.push({
  3015. fcorpid: this.form.fCorpid,
  3016. ffeeid: null,
  3017. fFeeUnitid: null,
  3018. fQty: 0,
  3019. funitprice: 0,
  3020. fAmount: 0,
  3021. fCurrency: "RMB",
  3022. fExrate: 1,
  3023. fTaxrate: this.fTaxrate,
  3024. remarks: null,
  3025. });
  3026. },
  3027. queryUser() {
  3028. queryUserVal().then((response) => {
  3029. if (response.user !== null) {
  3030. this.userVal = response.user;
  3031. this.$set(this.form, "fDeptid", this.userVal.deptId);
  3032. this.$set(this.form, "createBy", this.userVal.userName);
  3033. this.$set(this.form, "fIfdamage", "1");
  3034. this.$set(this.form, "fIfweigh", "1");
  3035. this.$set(this.form, "fTrademodeid", "1");
  3036. this.$set(this.form, "createTime", Date.parse(new Date()));
  3037. }
  3038. if (response.dept !== null) {
  3039. this.deptOptions = [];
  3040. this.deptOptions.push(response.dept);
  3041. }
  3042. });
  3043. },
  3044. /** 查询仓库主(出入库)列表 */
  3045. getList() {
  3046. this.loading = true;
  3047. getStockTransferList(this.queryParams).then((response) => {
  3048. this.warehousebillsList = response.rows;
  3049. this.total = response.total;
  3050. this.loading = false;
  3051. });
  3052. },
  3053. // 查询库存总账信息
  3054. getWhgenlegList() {
  3055. this.whgenlegParams.fMblno = this.form.fMblno;
  3056. this.whgenlegParams.fCorpid = this.form.fCorpid;
  3057. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
  3058. listWhgenleg(this.whgenlegParams).then((response) => {
  3059. this.whgenlegList = response.rows;
  3060. this.whgenlegTotal = response.total;
  3061. });
  3062. },
  3063. // 贸易方式(数据字典),对应t_trademodels 字典翻译
  3064. fTrademodeidFormat(row, column) {
  3065. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  3066. },
  3067. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  3068. fIfweighFormat(row, column) {
  3069. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  3070. },
  3071. // 是否破损(数据字典),默认F否则T字典翻译
  3072. fIfdamageFormat(row, column) {
  3073. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  3074. },
  3075. // 单据类型(数据字典)SJRK字典翻译
  3076. fBilltypeFormat(row, column) {
  3077. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  3078. },
  3079. // 状态(数据字典),N 入字典翻译
  3080. fBillstatusFormat(row, column) {
  3081. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  3082. },
  3083. // 取消按钮
  3084. cancel() {
  3085. this.open = false;
  3086. this.reset();
  3087. },
  3088. // 表单重置
  3089. reset() {
  3090. this.form = {
  3091. fId: null,
  3092. fBillno: null,
  3093. fCustomsdeclartion: null,
  3094. fOriginalbillno: null,
  3095. fDeptid: null,
  3096. fBsdeptid: null,
  3097. fContacts: null,
  3098. fTel: null,
  3099. fCorpid: null,
  3100. fTocorpid: null,
  3101. fStltypeid: null,
  3102. fBscorpno: null,
  3103. fWarehouseid: null,
  3104. fStorekeeper: null,
  3105. fBsdate: null,
  3106. fPlanqty: null,
  3107. fPlangrossweight: null,
  3108. fPlannetweight: null,
  3109. fPlanvolumn: null,
  3110. fQty: null,
  3111. fGrossweight: null,
  3112. fNetweight: null,
  3113. fVolumn: null,
  3114. fTrademodeid: null,
  3115. fSbu: null,
  3116. fFeetunit: null,
  3117. fMblno: null,
  3118. fVslvoy: null,
  3119. fEta: null,
  3120. fCustomno: null,
  3121. fIfweigh: null,
  3122. fIfpledge: null,
  3123. fIfdamage: null,
  3124. fBankcorpid: null,
  3125. fBilltype: null,
  3126. fBillstatus: null,
  3127. delFlag: null,
  3128. createBy: null,
  3129. createTime: null,
  3130. updateBy: null,
  3131. updateTime: null,
  3132. remark: null,
  3133. fCreateby: null,
  3134. fCreatetime: null,
  3135. fGoodsid: null,
  3136. fCntrtype: null,
  3137. fCntqty: null,
  3138. };
  3139. this.deptOptions = [];
  3140. this.userOptions = [];
  3141. this.fSbuOptions = [];
  3142. this.fWbuOptions = [];
  3143. this.goodsOptions = [];
  3144. this.KHblnoOptions = [];
  3145. this.fMblnoOptions = [];
  3146. this.kqhouseOptions = [];
  3147. this.resetForm("form");
  3148. },
  3149. /** 搜索按钮操作 */
  3150. handleQuery() {
  3151. this.queryParams.pageNum = 1;
  3152. this.getList();
  3153. },
  3154. /** 重置按钮操作 */
  3155. resetQuery() {
  3156. this.resetForm("queryForm");
  3157. this.handleQuery();
  3158. },
  3159. // 多选框选中数据
  3160. handleSelectionChange(selection) {
  3161. this.ids = selection;
  3162. // this.ids = selection.map((item) => item.fId);
  3163. this.single = selection.length !== 1;
  3164. this.multiple = !selection.length;
  3165. },
  3166. // 库存总账多选框
  3167. whgenlegSelectionChange(selection) {
  3168. this.dialogWhgenlegList = selection;
  3169. },
  3170. /** 新增按钮操作 */
  3171. handleAdd(status) {
  3172. this.form = {
  3173. fCorpid: '',
  3174. fTocorpid: '',
  3175. fBillno: '',
  3176. fBsdate: '',
  3177. fChargedate: '',
  3178. fWarehouseid: '',
  3179. fStltypeid: '',
  3180. fFeetunit: '',
  3181. fTrademodeid: '',
  3182. fMblno: '',
  3183. fOriginalbillno: '',
  3184. orgStorageDate: ''
  3185. }
  3186. this.browseStatus = status;
  3187. this.notChange = false
  3188. this.reset();
  3189. this.queryUser();
  3190. this.open = true;
  3191. this.detailsHidden = false;
  3192. this.dataList = [];
  3193. this.warehouseCrList = [];
  3194. this.warehouseDrList = [];
  3195. this.relevantAttachments = [];
  3196. this.title = "调拨单";
  3197. this.formBrowseStatus = false;
  3198. },
  3199. check_s(row,status,res){
  3200. this.disappear = true
  3201. this.notChange = true
  3202. this.browseStatus = status;
  3203. this.reset();
  3204. this.detailsHidden = false;
  3205. let data = row || this.ids;
  3206. getStockTransfer(data.fId).then((response) => {
  3207. this.Operator = response.data.corps[0].createBy
  3208. if (response.data.warehousebills) {
  3209. this.form = response.data.warehousebills;
  3210. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  3211. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  3212. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  3213. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  3214. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  3215. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  3216. }
  3217. if (response.data.corps) {
  3218. this.fMblnoOptions = response.data.corps;
  3219. this.KHblnoOptions = response.data.corps;
  3220. this.fSbuOptions = response.data.corps;
  3221. }
  3222. if (response.data.feesList) {
  3223. this.fWbuOptions = response.data.feesList;
  3224. }
  3225. if (response.data.warehouse) {
  3226. this.warehouseOptions = response.data.warehouse;
  3227. }
  3228. if (response.data.warehouseBillsItem) {
  3229. this.dataList = response.data.warehouseBillsItem;
  3230. for (let list in this.dataList) {
  3231. if (!this.form.fMblno) {
  3232. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  3233. }
  3234. if (this.dataList[list].fBillstatus >= 6) {
  3235. this.formBrowseStatus = true;
  3236. }
  3237. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  3238. }
  3239. }
  3240. if (response.data.enclosures) {
  3241. this.relevantAttachments = response.data.enclosures;
  3242. }
  3243. if (response.data.warehouse) {
  3244. this.warehouseDrList = response.data.warehousebillsfeesDr;
  3245. }
  3246. if (response.data.warehousebillsfeesCr) {
  3247. this.warehouseCrList = response.data.warehousebillsfeesCr;
  3248. }
  3249. if (response.data.sysUser) {
  3250. this.userVal = response.data.sysUser
  3251. this.userOptions = response.data.sysUser;
  3252. }
  3253. if (response.data.dept) {
  3254. this.deptOptions = []
  3255. this.deptOptions.push(response.data.dept)
  3256. }
  3257. if (response.data.feesList) {
  3258. this.fWbuOptions = response.data.feesList;
  3259. }
  3260. if (response.data.goodsList) {
  3261. this.goodsOptions = response.data.goodsList;
  3262. }
  3263. if (response.data.warehouse) {
  3264. this.warehouseOptions = response.data.warehouse;
  3265. }
  3266. if (response.data.warehouseAreas) {
  3267. this.kqhouseOptions = response.data.warehouseAreas;
  3268. }
  3269. this.open = true;
  3270. this.title = "修改调拨";
  3271. });
  3272. },
  3273. check(row,status,res){
  3274. this.disappear = false
  3275. this.notChange = true
  3276. this.browseStatus = status;
  3277. this.reset();
  3278. this.detailsHidden = false;
  3279. let data = row || this.ids;
  3280. getStockTransfer(data.fId).then((response) => {
  3281. console.log(response.data.corps[0].createBy)
  3282. this.Operator = response.data.corps[0].createBy
  3283. if (response.data.warehousebills) {
  3284. this.form = response.data.warehousebills;
  3285. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  3286. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  3287. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  3288. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  3289. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  3290. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  3291. }
  3292. if (response.data.corps) {
  3293. this.fMblnoOptions = response.data.corps;
  3294. this.KHblnoOptions = response.data.corps;
  3295. this.fSbuOptions = response.data.corps;
  3296. }
  3297. if (response.data.feesList) {
  3298. this.fWbuOptions = response.data.feesList;
  3299. }
  3300. if (response.data.warehouse) {
  3301. this.warehouseOptions = response.data.warehouse;
  3302. }
  3303. if (response.data.warehouseBillsItem) {
  3304. this.dataList = response.data.warehouseBillsItem;
  3305. for (let list in this.dataList) {
  3306. if (!this.form.fMblno) {
  3307. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  3308. }
  3309. if (this.dataList[list].fBillstatus >= 6) {
  3310. this.formBrowseStatus = true;
  3311. }
  3312. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  3313. }
  3314. }
  3315. if (response.data.enclosures) {
  3316. this.relevantAttachments = response.data.enclosures;
  3317. }
  3318. if (response.data.warehouse) {
  3319. this.warehouseDrList = response.data.warehousebillsfeesDr;
  3320. }
  3321. if (response.data.warehousebillsfeesCr) {
  3322. this.warehouseCrList = response.data.warehousebillsfeesCr;
  3323. }
  3324. if (response.data.sysUser) {
  3325. this.userVal = response.data.sysUser
  3326. this.userOptions = response.data.sysUser;
  3327. }
  3328. if (response.data.dept) {
  3329. this.deptOptions = []
  3330. this.deptOptions.push(response.data.dept)
  3331. }
  3332. if (response.data.feesList) {
  3333. this.fWbuOptions = response.data.feesList;
  3334. }
  3335. if (response.data.goodsList) {
  3336. this.goodsOptions = response.data.goodsList;
  3337. }
  3338. if (response.data.warehouse) {
  3339. this.warehouseOptions = response.data.warehouse;
  3340. }
  3341. if (response.data.warehouseAreas) {
  3342. this.kqhouseOptions = response.data.warehouseAreas;
  3343. }
  3344. this.open = true;
  3345. this.title = "修改调拨";
  3346. });
  3347. },
  3348. /** 修改按钮操作 */
  3349. handleUpdate(row, status) {
  3350. this.notChange = false
  3351. this.browseStatus = status;
  3352. this.reset();
  3353. this.detailsHidden = false;
  3354. let data = row || this.ids;
  3355. getStockTransfer(data.fId).then((response) => {
  3356. if (response.data.warehousebills) {
  3357. this.form = response.data.warehousebills;
  3358. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  3359. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  3360. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  3361. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  3362. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  3363. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  3364. }
  3365. if (response.data.corps) {
  3366. this.fMblnoOptions = response.data.corps;
  3367. this.KHblnoOptions = response.data.corps;
  3368. this.fSbuOptions = response.data.corps;
  3369. }
  3370. if (response.data.feesList) {
  3371. this.fWbuOptions = response.data.feesList;
  3372. }
  3373. if (response.data.warehouse) {
  3374. this.warehouseOptions = response.data.warehouse;
  3375. }
  3376. if (response.data.warehouseBillsItem) {
  3377. this.dataList = response.data.warehouseBillsItem;
  3378. for (let list in this.dataList) {
  3379. if (!this.form.fMblno) {
  3380. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  3381. }
  3382. if (this.dataList[list].fBillstatus >= 6) {
  3383. this.formBrowseStatus = true;
  3384. }
  3385. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  3386. }
  3387. }
  3388. if (response.data.enclosures) {
  3389. this.relevantAttachments = response.data.enclosures;
  3390. }
  3391. if (response.data.warehouse) {
  3392. this.warehouseDrList = response.data.warehousebillsfeesDr;
  3393. }
  3394. if (response.data.warehousebillsfeesCr) {
  3395. this.warehouseCrList = response.data.warehousebillsfeesCr;
  3396. }
  3397. if (response.data.sysUser) {
  3398. this.userVal = response.data.sysUser
  3399. this.userOptions = response.data.sysUser;
  3400. }
  3401. if (response.data.dept) {
  3402. this.deptOptions = []
  3403. this.deptOptions.push(response.data.dept)
  3404. }
  3405. if (response.data.feesList) {
  3406. this.fWbuOptions = response.data.feesList;
  3407. }
  3408. if (response.data.goodsList) {
  3409. this.goodsOptions = response.data.goodsList;
  3410. }
  3411. if (response.data.warehouse) {
  3412. this.warehouseOptions = response.data.warehouse;
  3413. }
  3414. if (response.data.warehouseAreas) {
  3415. this.kqhouseOptions = response.data.warehouseAreas;
  3416. }
  3417. this.open = true;
  3418. this.title = "修改调拨";
  3419. });
  3420. },
  3421. // 数量计算
  3422. changeContractAmt(row) {
  3423. let fQty = 0
  3424. let fUnitprice = 0
  3425. if (row.fUnitprice) {
  3426. fUnitprice = row.fUnitprice
  3427. }
  3428. if (row.fQty) {
  3429. fQty = row.fQty
  3430. }
  3431. this.$set(row, 'fAmount', parseFloat(Number(fUnitprice) * Number(fQty)).toFixed(2))
  3432. },
  3433. changefBsdate(row) {
  3434. if (this.dataList.length > 0) {
  3435. for (var i = 0; i < this.dataList.length; i++) {
  3436. this.$set(this.dataList[i], "fBsdate", row);
  3437. }
  3438. }
  3439. },
  3440. // change仓库
  3441. changefWarehouseid(row) {
  3442. for (let corp in this.warehouseOptions) {
  3443. if (row.fWarehouseid === this.warehouseOptions[corp].fId) {
  3444. // this.$set(
  3445. // this.form,
  3446. // "fContacts",
  3447. // this.warehouseOptions[corp].createBy
  3448. // );
  3449. // this.$set(this.form, "fTel", this.warehouseOptions[corp].fTotalgross);
  3450. this.fAddr = this.warehouseOptions[corp].fAddr;
  3451. }
  3452. }
  3453. },
  3454. // 选择按钮
  3455. collectionoptions(selection) {
  3456. this.feelDrSelection = selection
  3457. },
  3458. changefCorpid(row) {
  3459. this.$set(row, "fSbu", row.fCorpid);
  3460. for (let corp in this.fMblnoOptions) {
  3461. if (row.fCorpid === this.fMblnoOptions[corp].fId) {
  3462. this.$set(this.form, "fStltypeid", this.fMblnoOptions[corp].fStltypeid + "");
  3463. }
  3464. }
  3465. },
  3466. // 合计
  3467. getSummaries(param) {
  3468. const { columns, data } = param;
  3469. const sums = [];
  3470. var values = [];
  3471. columns.forEach((column, index) => {
  3472. if (index === 0) {
  3473. sums[index] = "合计";
  3474. return;
  3475. }
  3476. if (column.property === "fGrossweight") {
  3477. values = data.map((item) => Number(item["fGrossweight"]));
  3478. }
  3479. if (column.property === "fNetweight") {
  3480. values = data.map((item) => Number(item["fNetweight"]));
  3481. }
  3482. if (column.property === "fQty") {
  3483. values = data.map((item) => Number(item["fQty"]));
  3484. }
  3485. if (column.property === "fCntqty") {
  3486. values = data.map((item) => Number(item["fCntqty"]));
  3487. } // const values = data.map(item => Number(item[column.property]))
  3488. if (
  3489. column.property === "fGrossweight" ||
  3490. column.property === "fNetweight" ||
  3491. column.property === "fQty" ||
  3492. column.property === "fCntqty"
  3493. ) {
  3494. sums[index] = values.reduce((prev, curr) => {
  3495. const value = Number(curr);
  3496. if (!isNaN(value)) {
  3497. if (column.property === "fGrossweight") {
  3498. this.form.fGrossweight = prev + curr;
  3499. this.fGrossweight = prev + curr;
  3500. }
  3501. if (column.property === "fNetweight") {
  3502. this.form.fNetweight = prev + curr;
  3503. this.fNetweight = prev + curr;
  3504. }
  3505. if (column.property === "fVolumn") {
  3506. this.fVolumn = prev + curr;
  3507. }
  3508. if (column.property === "fQty") {
  3509. this.form.fQty = prev + curr;
  3510. this.fQty = prev + curr;
  3511. }
  3512. if (column.property === "fCntqty") {
  3513. this.fCntqty = prev + curr;
  3514. }
  3515. return prev + curr;
  3516. } else {
  3517. return prev;
  3518. }
  3519. }, 0); // sums[index]
  3520. }
  3521. });
  3522. this.sums = sums;
  3523. return sums;
  3524. },
  3525. // 付款合计
  3526. warehouseDrSummaries(param) {
  3527. const { columns, data } = param;
  3528. const sums = [];
  3529. columns.forEach((column, index) => {
  3530. if (index === 0) {
  3531. sums[index] = "合计";
  3532. return;
  3533. }
  3534. const values = data.map((item) => Number(item[column.property]));
  3535. if (
  3536. column.property === "fUnitprice" ||
  3537. column.property === "fAmount" ||
  3538. column.property === "fQty" ||
  3539. column.property === "fQty"
  3540. ) {
  3541. sums[index] = values.reduce((prev, curr) => {
  3542. const value = Number(curr);
  3543. if (!isNaN(value)) {
  3544. return prev + curr;
  3545. } else {
  3546. return prev;
  3547. }
  3548. }, 0); // sums[index]
  3549. }
  3550. });
  3551. return sums;
  3552. },
  3553. // 库存明细多选框结果
  3554. dataListChange(row) {
  3555. this.dataListSelection = row;
  3556. },
  3557. // 变更计价单位
  3558. changeFeeUnit(row) {
  3559. if (!row.fFeeunitid) {
  3560. return false
  3561. }
  3562. let fQty = 0;
  3563. let fGrossweight = 0;
  3564. let fNetweight = 0;
  3565. let volumn = 0;
  3566. let fixed = 1;
  3567. for (let li in this.dataList) {
  3568. if (this.dataList[li].fQty) {
  3569. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  3570. }
  3571. if (this.dataList[li].fGrossweight) {
  3572. fGrossweight = parseFloat(Number(fGrossweight) + Number(this.dataList[li].fGrossweight)).toFixed(2)
  3573. }
  3574. if (this.dataList[li].fNetweight) {
  3575. fNetweight = parseFloat(Number(fNetweight) + Number(this.dataList[li].fNetweight)).toFixed(2)
  3576. }
  3577. if (this.dataList[li].volumn) {
  3578. volumn = parseFloat(Number(volumn) + Number(this.dataList[li].volumn)).toFixed(2)
  3579. }
  3580. }
  3581. if (row.fFeeunitid === 1) {
  3582. this.$set(row, 'fQty', fQty)
  3583. } else if (row.fFeeunitid === 2) {
  3584. this.$set(row, 'fQty', fGrossweight)
  3585. }else if (row.fFeeunitid === 3) {
  3586. this.$set(row, 'fQty', fNetweight)
  3587. }else if (row.fFeeunitid === 4) {
  3588. this.$set(row, 'fQty', volumn)
  3589. }else if (row.fFeeunitid === 5) {
  3590. this.$set(row, 'fQty', fixed)
  3591. }
  3592. if (row.fUnitprice) {
  3593. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  3594. }
  3595. },
  3596. // 调拨确认
  3597. creditClick() {
  3598. this.$refs["form"].validate((valid) => {
  3599. for (let warehouse in this.dataListSelection) {
  3600. if (!this.dataListSelection[warehouse].fId) {
  3601. this.$message.error("请先保存");
  3602. return false;
  3603. }
  3604. if (!this.dataListSelection[warehouse].fGrossweight) {
  3605. this.$message.error("请选择调拨毛重");
  3606. return false;
  3607. } else if (!this.dataListSelection[warehouse].fTransferWarehouselocid) {
  3608. this.$message.error("请选择调拨库区");
  3609. return false;
  3610. } else if (!this.dataListSelection[warehouse].fNetweight) {
  3611. this.$message.error("请选择调拨净重");
  3612. return false;
  3613. } else if (!this.dataListSelection[warehouse].fQty) {
  3614. this.$message.error("请维护调拨件数");
  3615. return false;
  3616. }
  3617. }
  3618. if (valid) {
  3619. let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
  3620. let formData = new window.FormData();
  3621. formData.append("warehouseBills", JSON.stringify(this.form));
  3622. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3623. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  3624. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3625. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3626. addWhgenleg(formData).then((response) => {
  3627. this.fid = response.data.fPid
  3628. this.dataWithdrawList = []
  3629. this.dataListSelection = []
  3630. this.msgSuccess('调拨成功')
  3631. this.$refs.tableList.clearSelection()
  3632. this.formBrowseStatus = true
  3633. for (let li in listSelection) {
  3634. for (let i in this.dataList) {
  3635. if (listSelection[li].fId === this.dataList[i].fId) {
  3636. this.$set(this.dataList[i], 'fBillstatus', 6)
  3637. }
  3638. }
  3639. }
  3640. })
  3641. }
  3642. });
  3643. },
  3644. // 打印作业单
  3645. addList() {
  3646. this.$refs["form"].validate((valid) => {
  3647. if (valid) {
  3648. let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
  3649. let formData = new window.FormData();
  3650. formData.append("warehouseBills", JSON.stringify(this.form));
  3651. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3652. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  3653. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3654. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3655. addJoblist(formData).then((response) => {
  3656. this.formBrowseStatus = true;
  3657. this.$refs.tableDr.clearSelection();
  3658. this.$refs.tableList.clearSelection();
  3659. let dataitem = response.data.warehousebillsitems
  3660. for (let ite in dataitem) {
  3661. for (let li in this.dataList) {
  3662. if (this.dataList[li].fId === dataitem[ite].fId) {
  3663. this.$set(this.dataList[li], 'fBillstatus', dataitem[ite].fBillstatus)
  3664. this.$set(this.dataList[li], 'fSerialNumber', dataitem[ite].fSerialNumber)
  3665. }
  3666. }
  3667. }
  3668. });
  3669. }
  3670. });
  3671. },
  3672. // 撤回调拨
  3673. withdrawClick() {
  3674. for (let li in this.dataWithdrawList) {
  3675. if (this.dataWithdrawList[li].fBillstatus < 6) {
  3676. this.$message.error("所选信息中存在未调拨数据!");
  3677. return false
  3678. }
  3679. }
  3680. let formData = new window.FormData();
  3681. // 撤回调拨
  3682. let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
  3683. formData.append("warehouseBills", JSON.stringify(this.form));
  3684. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3685. formData.append("warehousebillsitems", JSON.stringify(this.dataWithdrawList));
  3686. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3687. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3688. updateCredit(formData).then((response) => {
  3689. this.fid = response.data;
  3690. this.formBrowseStatus = false;
  3691. this.msgSuccess("撤销入账成功");
  3692. this.$refs.tableList.clearSelection();
  3693. let mun = 0;
  3694. for (let i in this.dataList) {
  3695. for (let li in withdrawList) {
  3696. if (withdrawList[li].fId === this.dataList[i].fId) {
  3697. this.$set(this.dataList[i], 'fBillstatus', 1)
  3698. }
  3699. }
  3700. if (this.dataList[i].fBillstatus && this.dataList[i].fBillstatus > 1) {
  3701. mun ++;
  3702. }
  3703. }
  3704. if (mun > 0) {
  3705. this.formBrowseStatus = true
  3706. } else {
  3707. this.formBrowseStatus = false
  3708. }
  3709. });
  3710. },
  3711. // 装货按钮
  3712. discharge() {
  3713. if (this.printinglist.length <= 0) {
  3714. this.$message.error("请选择需要装货的明细!");
  3715. return false
  3716. }
  3717. for (let li in this.dataListSelection) {
  3718. if (!this.dataListSelection[li].fId) {
  3719. this.$message.error('请先保存!')
  3720. return false
  3721. } else if (this.dataListSelection[li].fBillstatus === 10) {
  3722. this.$message.error('请先打印')
  3723. return false
  3724. } else if (this.dataListSelection[li].fBillstatus >= 30) {
  3725. this.$message.error('请勿重复卸货')
  3726. return false
  3727. }
  3728. }
  3729. this.$refs['form'].validate((valid) => {
  3730. if (valid) {
  3731. let withdrawList = JSON.parse(JSON.stringify(this.dataListSelection))
  3732. let formData = new window.FormData()
  3733. formData.append("warehouseBills", JSON.stringify(this.form));
  3734. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3735. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  3736. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3737. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3738. for (let li in this.dataListSelection) {
  3739. this.dataListSelection[li].fBillstatus = 30
  3740. }
  3741. this.formBrowseStatus = true
  3742. this.$refs.tableList.clearSelection()
  3743. disChargelist(formData).then((response) => {
  3744. for (let li in withdrawList) {
  3745. for (let i in this.dataList) {
  3746. if (withdrawList.fId === this.dataList[i].fId) {
  3747. this.$set(this.dataList[i], 'fBillstatus', 30)
  3748. }
  3749. }
  3750. }
  3751. this.msgSuccess('装货成功')
  3752. })
  3753. }
  3754. })
  3755. },
  3756. // 付款信息计价单位合计
  3757. getwarehouseCrList(param) {
  3758. const { columns, data } = param
  3759. const sums = []
  3760. var values = []
  3761. columns.forEach((column, index) => {
  3762. if (index === 0) {
  3763. sums[index] = "合计";
  3764. return;
  3765. }
  3766. if (index === 3) {
  3767. // values = data.map((item) => Number(item["fFeeUnitid"]));
  3768. sums[index] = this.fFeeUnitids;
  3769. return;
  3770. }
  3771. });
  3772. this.sums = sums;
  3773. return sums;
  3774. },
  3775. // 库存明细多选
  3776. selectinventory(selection) {
  3777. this.printinglist = selection;
  3778. this.dataWithdrawList = [];
  3779. this.dataListSelection = [];
  3780. if (!selection || selection.length === 0) {
  3781. return false
  3782. }
  3783. for (let se in selection) {
  3784. if (!selection[se].fBillstatus || selection[se].fBillstatus !== 6) {
  3785. this.dataListSelection.push(selection[se])
  3786. } else if (selection[se].fBillstatus && selection[se].fBillstatus === 6) {
  3787. this.dataWithdrawList.push(selection[se])
  3788. }
  3789. }
  3790. this.fTruckno = selection[0].fTruckno
  3791. this.fCntrtype = selection[0].fCntrtype
  3792. this.fGoodsids = selection[0].fGoodsids
  3793. },
  3794. // 更新主表品名并去重
  3795. updateDeduplication: function() {
  3796. if (this.dataList.length === 0) {
  3797. return false
  3798. }
  3799. let fMarks = []
  3800. let fGoodsid = []
  3801. for (let li in this.dataList) {
  3802. fMarks.push(this.dataList[li].fMarks)
  3803. fGoodsid.push(this.dataList[li].fGoodsids)
  3804. }
  3805. this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
  3806. this.$set(this.form, 'fProductName', Array.from(new Set(fGoodsid)).join(","))
  3807. },
  3808. // 保存
  3809. saveForm () {
  3810. this.updateDeduplication()
  3811. this.$refs['form'].validate((valid) => {
  3812. if (this.dataList.length === 0) {
  3813. this.$message.error('请添加库存明细!')
  3814. return false
  3815. }
  3816. for (let list in this.dataList) {
  3817. this.changeStock(this.dataList[list])
  3818. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  3819. this.$message.error('请维护序号为' + (Number(list) + 1) + '的调拨件数!')
  3820. return false
  3821. }
  3822. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  3823. this.$message.error('请维护序号为' + (Number(list) + 1) + '的调拨毛重!')
  3824. return false
  3825. }
  3826. if (!this.dataList[list].fNetweight || Number(this.dataList[list].fNetweight) === 0) {
  3827. this.$message.error('请维护序号为' + (Number(list) + 1) + '的调拨净重!')
  3828. return false
  3829. }
  3830. }
  3831. if (valid) {
  3832. setTimeout(() => {
  3833. this.form.fBillstatus = 2
  3834. let formData = new window.FormData()
  3835. formData.append("warehouseBills", JSON.stringify(this.form));
  3836. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  3837. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3838. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3839. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3840. addStockTransfer(formData).then((response) => {
  3841. this.msgSuccess('保存成功')
  3842. this.form = response.data.warehouseBills
  3843. this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
  3844. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  3845. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  3846. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  3847. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  3848. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  3849. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  3850. this.dataList = response.data.warehousebillsitems
  3851. })
  3852. }, 200);
  3853. }
  3854. })
  3855. },
  3856. /** 提交按钮 */
  3857. submitForm() {
  3858. this.updateDeduplication()
  3859. this.$refs['form'].validate((valid) => {
  3860. if (this.dataList.length === 0) {
  3861. this.$message.error('请新增库存明细!')
  3862. return false
  3863. }
  3864. for (let list in this.dataList) {
  3865. this.changeStock(this.dataList[list])
  3866. if (!this.dataList[list].fQty || this.dataList[list].fQty === 0) {
  3867. this.$message.error('请输入调拨件数!')
  3868. return false
  3869. }
  3870. if (!this.dataList[list].fNetweight || this.dataList[list].fNetweight === 0) {
  3871. this.$message.error('请输入调拨净重!')
  3872. return false
  3873. }
  3874. if (!this.dataList[list].fGrossweight || this.dataList[list].fGrossweight === 0) {
  3875. this.$message.error('请输入调拨毛重!')
  3876. return false
  3877. }
  3878. if (!this.dataList[list].fTransferWarehouselocid || this.dataList[list].fTransferWarehouselocid === 0) {
  3879. this.$message.error('请选择调拨毛重!')
  3880. return false
  3881. }
  3882. if (this.dataList[list].fBillstatus !== 6) {
  3883. this.$message.error('请入账库存明细!')
  3884. return false
  3885. }
  3886. }
  3887. for (let list in this.warehouseDrList) {
  3888. if (!this.warehouseDrList[list].fCorpid) {
  3889. this.$message.error('请选择客户名称')
  3890. return false
  3891. }
  3892. }
  3893. for (let list in this.warehouseCrList) {
  3894. if (!this.warehouseCrList[list].fCorpid) {
  3895. this.$message.error('请选择客户名称')
  3896. return false
  3897. }
  3898. }
  3899. if (valid) {
  3900. setTimeout(() => {
  3901. this.form.fBillstatus = status
  3902. this.form.fNetweight = this.fNetweight
  3903. this.form.fPlangrossweight = this.fPlangrossweight
  3904. this.form.fPlannetweight = this.fPlannetweight
  3905. this.form.fPlanvolumn = this.fPlanvolumn
  3906. this.form.fPlanqty = this.fPlanqty
  3907. this.form.fGrossweight = this.fGrossweight
  3908. this.form.fQty = this.fQty
  3909. if (!this.form.fId) {
  3910. this.form.fId = this.fid
  3911. }
  3912. let formData = new window.FormData()
  3913. formData.append("warehouseBills", JSON.stringify(this.form));
  3914. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  3915. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3916. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3917. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3918. warehouseSubmission(formData).then((response) => {
  3919. this.msgSuccess('提交成功')
  3920. this.cancel()
  3921. this.getList()
  3922. })
  3923. }, 200);
  3924. }
  3925. })
  3926. },
  3927. /** 删除按钮操作 */
  3928. handleDelete(row) {
  3929. const fIds = row.fId || this.ids.fId;
  3930. this.$confirm(
  3931. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  3932. "警告",
  3933. {
  3934. confirmButtonText: "确定",
  3935. cancelButtonText: "取消",
  3936. type: "warning",
  3937. }
  3938. )
  3939. .then(function () {
  3940. return delStockTransfer(fIds);
  3941. })
  3942. .then(() => {
  3943. this.getList();
  3944. this.msgSuccess("删除成功");
  3945. });
  3946. },
  3947. /** 导出按钮操作 */
  3948. handleExport() {
  3949. const queryParams = this.queryParams;
  3950. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  3951. confirmButtonText: "确定",
  3952. cancelButtonText: "取消",
  3953. type: "warning",
  3954. })
  3955. .then(function () {
  3956. return exportStockTransfer(queryParams);
  3957. })
  3958. .then((response) => {
  3959. this.download(response.msg);
  3960. });
  3961. },
  3962. // 修改毛重净重
  3963. changeStock (row) {
  3964. let fNetweight = 0;
  3965. let fGrossweight = 0;
  3966. if (row.fNetweight) {
  3967. fNetweight = row.fNetweight
  3968. }
  3969. if (row.fGrossweight) {
  3970. fGrossweight = row.fGrossweight
  3971. }
  3972. if (row.fPlannetweight < fNetweight) {
  3973. this.$message({ message: '调拨净重超出结余净重', type: 'warning' })
  3974. return false
  3975. }
  3976. if (row.fPlangrossweight < fGrossweight) {
  3977. this.$message({ message: '调拨毛重超出结余毛重', type: 'warning' })
  3978. return false
  3979. }
  3980. },
  3981. // 调拨件数的计算
  3982. qtyChange(row) {
  3983. if (!row.fQty || row.fQty === "") {
  3984. this.$set(row, "fNetweight", 0);
  3985. this.$set(row, "fGrossweight", 0);
  3986. return false;
  3987. }
  3988. if (row.fPlanqty < row.fQty) {
  3989. this.$message.error("出库件数超出结余件数!");
  3990. this.$set(row, 'fQty', 0)
  3991. this.$set(row, 'fNetweight', 0)
  3992. this.$set(row, 'fGrossweight', 0)
  3993. return false;
  3994. }
  3995. let fVolumn = parseFloat(Number(row.fVolumn) / Number(row.fPlanqty)).toFixed(2);
  3996. let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(2);
  3997. let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(2);
  3998. this.$set(row, "fVolumn", parseFloat(Number(fVolumn) * Number(row.fQty)).toFixed(2));
  3999. this.$set(row, "fNetweight", parseFloat(Number(netweight) * Number(row.fQty)).toFixed(2));
  4000. this.$set(row, "fGrossweight", parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(2));
  4001. },
  4002. deleteRow(index, rows) {
  4003. rows.splice(index, 1);
  4004. },
  4005. /* 远程模糊查询用户 */
  4006. corpsRemoteMethod(name) {
  4007. if (name == null || name === "") {
  4008. return false;
  4009. }
  4010. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  4011. listCorps(queryParams).then((response) => {
  4012. this.fMblnoOptions = response.rows;
  4013. this.KHblnoOptions = response.rows;
  4014. });
  4015. },
  4016. /* 远程模糊查询商品 */
  4017. goodsRemoteMethod(name) {
  4018. if (name == null || name === "") {
  4019. return false;
  4020. }
  4021. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  4022. listGoods(queryParams).then((response) => {
  4023. this.goodsOptions = response.rows;
  4024. });
  4025. },
  4026. // 远程模糊查询费用名称
  4027. fWRemoteMethod(name) {
  4028. if (name == null || name === "") {
  4029. return false;
  4030. }
  4031. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  4032. listFees(queryParams).then((response) => {
  4033. this.fWbuOptions = response.rows;
  4034. });
  4035. },
  4036. /* 远程模糊查询经营单位 */
  4037. fSbuRemoteMethod(name) {
  4038. if (name == null || name === "") {
  4039. return false;
  4040. }
  4041. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  4042. listCorps(queryParams).then((response) => {
  4043. this.fSbuOptions = response.rows;
  4044. });
  4045. },
  4046. /* 远程模糊查询仓库 */
  4047. warehouseRemoteMethod(name) {
  4048. if (!name) {
  4049. return false;
  4050. }
  4051. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  4052. listWarehouse(queryParams).then((response) => {
  4053. this.warehouseOptions = response.rows;
  4054. });
  4055. },
  4056. /* 远程模糊查询库区 */
  4057. kqhouseRemoteMethod(name) {
  4058. if (!name) {
  4059. return false;
  4060. }
  4061. let queryParams = {
  4062. pageNum: 1,
  4063. pageSize: 10,
  4064. fWarehouseid: this.form.fWarehouseid,
  4065. fName: name
  4066. };
  4067. listArea(queryParams).then((response) => {
  4068. this.kqhouseOptions = response.rows;
  4069. });
  4070. },
  4071. /* 远程模糊查询操作用户 */
  4072. userRemoteMethod(name) {
  4073. if (name == null || name === "") {
  4074. return false;
  4075. }
  4076. let queryParams = { pageNum: 1, pageSize: 10, userName: name };
  4077. listUser(queryParams).then((response) => {
  4078. this.userOptions = response.rows;
  4079. });
  4080. },
  4081. },
  4082. };
  4083. </script>
  4084. <style lang="scss">
  4085. .juzhong > th {
  4086. text-align: center;
  4087. }
  4088. .biaoge > tr > td {
  4089. height: 50px;
  4090. text-align: center;
  4091. border-right: 1px solid #dfe6ec !important;
  4092. order-bottom: 1px solid #dfe6ec !important;
  4093. border-bottom: 1px solid #dfe6ec !important;
  4094. }
  4095. .el-table thead th {
  4096. background: #1890ff;
  4097. color: #fff;
  4098. }
  4099. .upload-demo {
  4100. margin-left: 50px;
  4101. }
  4102. .el-form-item {
  4103. margin-bottom: 5px !important;
  4104. }
  4105. .el-form-item__label {
  4106. font-size: 12px !important;
  4107. }
  4108. </style>