index.vue 134 KB

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