index.vue 132 KB

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