index.vue 133 KB

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