AddOrUpdate.vue 119 KB

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