index.vue 118 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713
  1. <template>
  2. <div class="app-container">
  3. <el-button
  4. icon="el-icon-arrow-left"
  5. type="danger"
  6. v-if="cancelButton === true"
  7. @click="cancel"
  8. style="margin-bottom: 5px"
  9. >返回列表
  10. </el-button>
  11. <el-collapse v-model="activeNames">
  12. <el-collapse-item title="基础资料" name="1">
  13. <el-form
  14. ref="form"
  15. :model="form"
  16. label-width="130px"
  17. size="mini"
  18. class="selectForm"
  19. :rules="rules"
  20. >
  21. <el-row>
  22. <el-col :span="6">
  23. <el-form-item label="订舱单位" prop="corpName">
  24. <el-input
  25. v-model="form.corpName"
  26. :disabled="modify"
  27. size="small"
  28. style="width: 100%"
  29. />
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="6">
  33. <el-form-item label="提单号" prop="fMblno">
  34. <el-input
  35. v-model="form.fMblno"
  36. :disabled="changeNum"
  37. size="small"
  38. style="width: 100%"
  39. placeholder="手工输入"
  40. />
  41. </el-form-item>
  42. </el-col>
  43. <el-col :span="6">
  44. <el-form-item label="起运港口" prop="fDestportid">
  45. <el-select
  46. v-model="form.fLoadportid"
  47. filterable
  48. remote
  49. style="width: 100%"
  50. :disabled="modify"
  51. class="elSelect"
  52. placeholder="请输入模糊查找目的港口"
  53. >
  54. <el-scrollbar>
  55. <el-option
  56. v-for="dict in fMblnoOptions"
  57. :key="dict.fId"
  58. :label="dict.fName"
  59. :value="dict.fId"
  60. ></el-option>
  61. </el-scrollbar>
  62. </el-select>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :span="6">
  66. <el-form-item label="目的港口" prop="destportid">
  67. <el-select
  68. v-model="form.fDestportid"
  69. filterable
  70. remote
  71. style="width: 100%"
  72. :disabled="modify"
  73. class="elSelect"
  74. placeholder="请输入模糊查找目的港口"
  75. >
  76. <el-scrollbar>
  77. <el-option
  78. v-for="dict in fMblnoOptions"
  79. :key="dict.fId"
  80. :label="dict.fName"
  81. :value="dict.fId"
  82. ></el-option>
  83. </el-scrollbar>
  84. </el-select>
  85. </el-form-item>
  86. </el-col>
  87. </el-row>
  88. <el-row>
  89. <el-col :span="6">
  90. <el-form-item label="预计装货时间" prop="fBsdate">
  91. <el-date-picker
  92. v-model="form.fBsdate"
  93. type="date"
  94. size="small"
  95. style="width: 100%"
  96. :disabled="modify"
  97. placeholder="选择日期"
  98. format="yyyy-MM-dd"
  99. >
  100. </el-date-picker>
  101. </el-form-item>
  102. </el-col>
  103. <el-col :span="6">
  104. <el-form-item label="起运港运输条款" prop="fServiceitems">
  105. <el-select
  106. v-model="form.fServiceitems"
  107. :disabled="modify"
  108. size="small"
  109. style="width: 100%"
  110. >
  111. <el-option
  112. v-for="dict in transport"
  113. :key="dict.dictValue"
  114. :label="dict.dictLabel"
  115. :value="dict.dictValue"
  116. ></el-option>
  117. </el-select>
  118. </el-form-item>
  119. </el-col>
  120. <el-col :span="6">
  121. <el-form-item label="目的港运输条款" prop="fServiceitemsNew">
  122. <el-select
  123. v-model="form.fServiceitemsNew"
  124. :disabled="modify"
  125. size="small"
  126. style="width: 100%"
  127. >
  128. <el-option
  129. v-for="dict in fServiceitemsNews"
  130. :key="dict.dictValue"
  131. :label="dict.dictLabel"
  132. :value="dict.dictValue"
  133. ></el-option>
  134. </el-select>
  135. </el-form-item>
  136. </el-col>
  137. </el-row>
  138. <el-row>
  139. <el-col :span="6">
  140. <el-form-item label="付款方式" prop="fPaymode">
  141. <el-select
  142. v-model="form.fPaymode"
  143. :disabled="modify"
  144. size="small"
  145. style="width: 100%"
  146. >
  147. <el-option
  148. v-for="dict in paymentMethod"
  149. :key="dict.dictValue"
  150. :label="dict.dictLabel"
  151. :value="dict.dictValue"
  152. ></el-option>
  153. </el-select>
  154. </el-form-item>
  155. </el-col>
  156. <el-col :span="6">
  157. <el-form-item label="售票方" prop="fInvoceobj">
  158. <el-select
  159. v-model="form.fInvoceobj"
  160. :disabled="modify"
  161. size="small"
  162. style="width: 100%"
  163. >
  164. <el-option
  165. v-for="dict in drawee"
  166. :key="dict.dictValue"
  167. :label="dict.dictLabel"
  168. :value="dict.dictValue"
  169. ></el-option>
  170. </el-select>
  171. </el-form-item>
  172. </el-col>
  173. <el-col :span="6">
  174. <el-form-item label="箱内签收单" prop="fSign">
  175. <el-select
  176. v-model="form.fSign"
  177. :disabled="modify"
  178. size="small"
  179. style="width: 100%"
  180. >
  181. <el-option
  182. v-for="dict in cEsign"
  183. :key="dict.dictValue"
  184. :label="dict.dictLabel"
  185. :value="dict.dictValue"
  186. ></el-option>
  187. </el-select>
  188. </el-form-item>
  189. </el-col>
  190. <el-col :span="6">
  191. <el-form-item label="订舱人扣货" prop="fDetentioncargo">
  192. <el-select
  193. v-model="form.fDetentioncargo"
  194. :disabled="modify"
  195. style="width: 100%"
  196. size="small"
  197. >
  198. <el-option
  199. v-for="dict in etentioncargo"
  200. :key="dict.dictValue"
  201. :label="dict.dictLabel"
  202. :value="dict.dictValue"
  203. ></el-option>
  204. </el-select>
  205. </el-form-item>
  206. </el-col>
  207. <el-col :span="6">
  208. <el-form-item label="船名" prop="vslid">
  209. <el-select
  210. v-model="form.fVslid"
  211. filterable
  212. remote
  213. style="width: 100%"
  214. :disabled="modify"
  215. class="elSelect"
  216. placeholder="请输入模糊查找目的船名"
  217. >
  218. <el-scrollbar>
  219. <el-option
  220. v-for="dict in vslidList"
  221. :key="dict.fId"
  222. :label="dict.fName"
  223. :value="dict.fId"
  224. ></el-option>
  225. </el-scrollbar>
  226. </el-select>
  227. </el-form-item>
  228. </el-col>
  229. <el-col :span="6">
  230. <el-form-item label="航次" prop="voyidName">
  231. <el-select
  232. v-model="form.fVoyid"
  233. filterable
  234. remote
  235. style="width: 100%"
  236. :disabled="modify"
  237. class="elSelect"
  238. placeholder="请输入模糊查找目的船名"
  239. >
  240. <el-scrollbar>
  241. <el-option
  242. v-for="dict in voyidList"
  243. :key="dict.fId"
  244. :label="dict.fNo"
  245. :value="dict.fId"
  246. ></el-option>
  247. </el-scrollbar>
  248. </el-select>
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="6">
  252. <el-form-item label="航线" prop="fLaneid">
  253. <el-select
  254. v-model="form.fLaneid"
  255. filterable
  256. remote
  257. style="width: 100%"
  258. :disabled="modify"
  259. placeholder="请选择航线"
  260. >
  261. <el-scrollbar>
  262. <el-option
  263. v-for="dict in fLaneList"
  264. :key="dict.fId"
  265. :label="dict.fName"
  266. :value="dict.fId"
  267. ></el-option>
  268. </el-scrollbar>
  269. </el-select>
  270. </el-form-item>
  271. </el-col>
  272. <el-col :span="14">
  273. <el-form-item label="备注" prop="remarks">
  274. <el-input
  275. v-model="form.remark"
  276. :disabled="modify"
  277. size="small"
  278. style="width: 75%"
  279. >
  280. </el-input>
  281. <el-button type="primary" size="small" @click="check(1)"
  282. >查看</el-button
  283. >
  284. </el-form-item>
  285. </el-col>
  286. </el-row>
  287. </el-form>
  288. </el-collapse-item>
  289. <el-collapse-item title="预计时间" name="2">
  290. <el-form v-model="estimatedTime" label-width="130px" size="mini">
  291. <el-row>
  292. <el-col :span="6">
  293. <el-form-item label="起运港口" prop="portofloadidName">
  294. <el-input
  295. v-model="estimatedTime.portofloadidName"
  296. :disabled="doNot"
  297. size="small"
  298. style="width: 100%"
  299. />
  300. </el-form-item>
  301. </el-col>
  302. <el-col :span="6">
  303. <el-form-item label="中转港口" prop="portoftransshipmentName">
  304. <el-input
  305. v-model="estimatedTime.portoftransshipmentName"
  306. :disabled="doNot"
  307. size="small"
  308. style="width: 100%"
  309. />
  310. </el-form-item>
  311. </el-col>
  312. <!-- <el-col :span="6">-->
  313. <!-- <el-form-item label="预计中转抵港日期" prop="fMblno">-->
  314. <!-- <el-input-->
  315. <!-- v-model="form.fMblno"-->
  316. <!-- :disabled="modify"-->
  317. <!-- size="small"-->
  318. <!-- style="width: 100%"-->
  319. <!-- placeholder="手工输入"-->
  320. <!-- />-->
  321. <!-- </el-form-item>-->
  322. <!-- </el-col>-->
  323. <!-- <el-col :span="6">-->
  324. <!-- <el-form-item label="预计中转开航日期" prop="fMblno">-->
  325. <!-- <el-input-->
  326. <!-- v-model="form.fMblno"-->
  327. <!-- :disabled="modify"-->
  328. <!-- size="small"-->
  329. <!-- style="width: 100%"-->
  330. <!-- placeholder="手工输入"-->
  331. <!-- />-->
  332. <!-- </el-form-item>-->
  333. <!-- </el-col>-->
  334. <el-col :span="6">
  335. <el-form-item label="目的港口" prop="distinationidName">
  336. <el-input
  337. v-model="estimatedTime.distinationidName"
  338. :disabled="doNot"
  339. size="small"
  340. style="width: 100%"
  341. />
  342. </el-form-item>
  343. </el-col>
  344. <el-col :span="6">
  345. <el-form-item label="预计开航日期" prop="fEtd">
  346. <el-input
  347. v-model="estimatedTime.fEtd"
  348. :disabled="doNot"
  349. size="small"
  350. style="width: 100%"
  351. />
  352. </el-form-item>
  353. </el-col>
  354. <el-col :span="6">
  355. <el-form-item label="预计抵港日期" prop="fEta">
  356. <el-input
  357. v-model="estimatedTime.fEta"
  358. :disabled="doNot"
  359. size="small"
  360. style="width: 100%"
  361. />
  362. </el-form-item>
  363. </el-col>
  364. </el-row>
  365. </el-form>
  366. </el-collapse-item>
  367. <el-collapse-item title="收发货人信息" name="3">
  368. <el-form v-model="form" label-width="130px" size="mini">
  369. <el-row>
  370. <el-col :span="6">
  371. <el-form-item label="发货人公司全称" prop="fShippername">
  372. <el-input
  373. v-model="form.fShippername"
  374. :disabled="modify"
  375. size="small"
  376. style="width: 100%"
  377. placeholder="手工输入"
  378. />
  379. </el-form-item>
  380. </el-col>
  381. <el-col :span="6">
  382. <el-form-item label="发货人详细地址" prop="fShipperattn">
  383. <el-input
  384. v-model="form.fShipperattn"
  385. :disabled="modify"
  386. style="width: 100%"
  387. size="small"
  388. placeholder="手工输入"
  389. />
  390. </el-form-item>
  391. </el-col>
  392. <el-col :span="6">
  393. <el-form-item label="发货人姓名和电话" prop="fShippertel">
  394. <el-input
  395. v-model="form.fShippertel"
  396. :disabled="modify"
  397. size="small"
  398. style="width: 100%"
  399. placeholder="手工输入"
  400. />
  401. </el-form-item>
  402. </el-col>
  403. </el-row>
  404. <el-row>
  405. <el-col :span="6">
  406. <el-form-item label="收货人公司全称" prop="fConsigneername">
  407. <el-input
  408. v-model="form.fConsigneername"
  409. :disabled="modify"
  410. size="small"
  411. style="width: 100%"
  412. placeholder="手工输入"
  413. />
  414. </el-form-item>
  415. </el-col>
  416. <el-col :span="6">
  417. <el-form-item label="收货人详细地址" prop="fConsigneeattn">
  418. <el-input
  419. v-model="form.fConsigneeattn"
  420. :disabled="modify"
  421. style="width: 100%"
  422. size="small"
  423. placeholder="手工输入"
  424. />
  425. </el-form-item>
  426. </el-col>
  427. <el-col :span="6">
  428. <el-form-item label="收货人姓名和电话" prop="fConsigneetel">
  429. <el-input
  430. v-model="form.fConsigneetel"
  431. :disabled="modify"
  432. style="width: 100%"
  433. size="small"
  434. placeholder="手工输入"
  435. />
  436. </el-form-item>
  437. </el-col>
  438. </el-row>
  439. </el-form>
  440. </el-collapse-item>
  441. <el-collapse-item title="费用信息" name="5" class="minHeight">
  442. <el-form v-model="form" label-width="130px" size="mini">
  443. <el-row>
  444. <el-col :span="6">
  445. <el-form-item label="是否办理保险" prop="fInsurance">
  446. <el-select
  447. v-model="form.fInsurance"
  448. :disabled="modify"
  449. size="small"
  450. style="width: 100%"
  451. >
  452. <el-option
  453. v-for="dict in insurance"
  454. :key="dict.dictValue"
  455. :label="dict.dictLabel"
  456. :value="dict.dictValue"
  457. ></el-option>
  458. </el-select>
  459. </el-form-item>
  460. </el-col>
  461. <el-col :span="6">
  462. <el-form-item label="保险货值(万元)" prop="fInsuranceamt">
  463. <el-input
  464. v-model="form.fInsuranceamt"
  465. :disabled="modify"
  466. style="width: 100%"
  467. size="small"
  468. />
  469. </el-form-item>
  470. </el-col>
  471. </el-row>
  472. </el-form>
  473. </el-collapse-item>
  474. <el-collapse-item title="货物信息" name="4">
  475. <el-table :data="goodsList" style="width: 100%" align="center">
  476. <el-table-column label="行号" type="index" min-width="100px" />
  477. <el-table-column label="货物名称" prop="fGoodsid" min-width="100px">
  478. <template slot-scope="scope">
  479. <el-select
  480. v-model="scope.row.fGoodsid"
  481. @change="selectChange(scope)"
  482. :disabled="modify"
  483. >
  484. <el-option
  485. v-for="(item, index) in goods"
  486. :key="index"
  487. :label="item.fName"
  488. :value="item.fId"
  489. />
  490. </el-select>
  491. </template>
  492. </el-table-column>
  493. <el-table-column label="货类" prop="typeidName" min-width="100px">
  494. <template slot-scope="scope">
  495. <el-input
  496. v-model="scope.row.typeidName"
  497. :disabled="modify"
  498. ></el-input>
  499. </template>
  500. </el-table-column>
  501. <el-table-column label="包装类型" prop="fPackageid" min-width="100px">
  502. <template slot-scope="scope">
  503. <el-select v-model="scope.row.fPackageid" :disabled="modify">
  504. <el-option
  505. v-for="item in packgeOptions"
  506. :key="item.dictValue"
  507. :label="item.dictLabel"
  508. :value="item.dictValue"
  509. />
  510. </el-select>
  511. </template>
  512. </el-table-column>
  513. <el-table-column label="箱型" prop="fCntrid" min-width="100px">
  514. <template slot-scope="scope">
  515. <el-select
  516. v-model="scope.row.fCntrid"
  517. @change="seleEt(scope)"
  518. :disabled="modify"
  519. >
  520. <el-option
  521. v-for="item in cntrOptions"
  522. :key="item.fId"
  523. :label="item.fNo"
  524. :value="item.fId"
  525. />
  526. </el-select>
  527. </template>
  528. </el-table-column>
  529. <el-table-column label="箱量" prop="fCntrcount" min-width="100px">
  530. <template slot-scope="scope">
  531. <el-input
  532. v-model="scope.row.fCntrcount"
  533. :disabled="modify"
  534. :maxlength="3"
  535. oninput='this.value=this.value.replace(/[^\d.]/g,"")'
  536. ></el-input>
  537. </template>
  538. </el-table-column>
  539. <el-table-column
  540. label="单箱重量(吨)"
  541. prop="fCntrweight"
  542. min-width="120px"
  543. >
  544. <template slot-scope="scope">
  545. <el-input
  546. v-model="scope.row.fCntrweight"
  547. :disabled="modify"
  548. @input="cntrWeight"
  549. ></el-input>
  550. </template>
  551. </el-table-column>
  552. <el-table-column label="箱态" prop="fCntrstatus" min-width="100px">
  553. <template slot-scope="scope">
  554. <el-select v-model="scope.row.fCntrstatus" :disabled="modify">
  555. <el-option
  556. v-for="item in fStatus"
  557. :key="item.dictValue"
  558. :label="item.dictLabel"
  559. :value="item.dictValue"
  560. />
  561. </el-select>
  562. </template>
  563. </el-table-column>
  564. <el-table-column label="自备货柜" prop="fSoc" min-width="100px">
  565. <template slot-scope="scope">
  566. <el-select v-model="scope.row.fSoc" :disabled="modify">
  567. <el-option label="是" value="0"></el-option>
  568. <el-option label="否" value="1"></el-option>
  569. </el-select>
  570. </template>
  571. </el-table-column>
  572. <div v-if="whether === true">
  573. <el-table-column
  574. label="设置温度(℃)"
  575. prop="fTemperature"
  576. min-width="120px"
  577. >
  578. <template slot-scope="scope">
  579. <el-input
  580. v-model="scope.row.fTemperature"
  581. :disabled="modify"
  582. @input="temperature"
  583. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"")'
  584. ></el-input>
  585. </template>
  586. </el-table-column>
  587. <el-table-column
  588. label="风门开度(%)"
  589. prop="fDraught"
  590. min-width="120px"
  591. >
  592. <template slot-scope="scope">
  593. <el-input
  594. v-model="scope.row.fDraught"
  595. :disabled="modify"
  596. @input="throttleOpening"
  597. oninput='this.value=this.value.replace(/[^\d.]/g,"")'
  598. ></el-input>
  599. </template>
  600. </el-table-column>
  601. <el-table-column
  602. label="湿度设置(%)"
  603. prop="fHumidity"
  604. min-width="120px"
  605. >
  606. <template slot-scope="scope">
  607. <el-input
  608. v-model="scope.row.fHumidity"
  609. :disabled="modify"
  610. @input="throttleOpening"
  611. oninput='this.value=this.value.replace(/[^\d.]/g,"")'
  612. ></el-input>
  613. </template>
  614. </el-table-column>
  615. <el-table-column
  616. label="预冷要求"
  617. prop="fPrecooling"
  618. min-width="100px"
  619. >
  620. <template slot-scope="scope">
  621. <el-select v-model="scope.row.fPrecooling" :disabled="modify">
  622. <el-option label="是" value="1"></el-option>
  623. <el-option label="否" value="2"></el-option>
  624. </el-select>
  625. </template>
  626. </el-table-column>
  627. </div>
  628. <el-table-column
  629. label="是否危险品"
  630. prop="ifdangerName"
  631. min-width="100px"
  632. >
  633. <template slot-scope="scope">
  634. <span>{{ scope.row.ifdangerName }}</span>
  635. <el-button
  636. type="primary"
  637. size="small"
  638. @click="check(2)"
  639. style="margin-left: 5px"
  640. >查看</el-button
  641. >
  642. </template>
  643. </el-table-column>
  644. <el-table-column label="备注" prop="remark" min-width="100px" />
  645. </el-table>
  646. </el-collapse-item>
  647. <el-collapse-item title="箱信息" name="6" class="minHeight">
  648. <div
  649. class="dialogTableTitle flex a-center jlr"
  650. style="
  651. display: flex;
  652. justify-content: space-between;
  653. align-items: center;
  654. margin: 10px 0;
  655. font-size: 16px;
  656. font-weight: bolder;
  657. "
  658. >
  659. <div>
  660. <el-button
  661. size="small"
  662. type="primary"
  663. :disabled="modify"
  664. @click.prevent="addList()"
  665. >新行
  666. </el-button>
  667. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  668. >删除
  669. </el-button> -->
  670. <el-button
  671. type="primary"
  672. size="small"
  673. :disabled="modify"
  674. @click="approval(1)"
  675. >保 存
  676. </el-button>
  677. <el-button
  678. type="danger"
  679. size="small"
  680. :disabled="selection.length === 0"
  681. @click="deleteAll"
  682. v-if="form.fCargoPlanning == 1"
  683. >批量删除</el-button
  684. >
  685. <el-button
  686. type="warning"
  687. size="small"
  688. @click="dialogPrint"
  689. :disabled="dataList.length === 0"
  690. >打印运单</el-button
  691. >
  692. <el-upload
  693. class="upload-demo"
  694. :action="baseURL"
  695. :headers="headers"
  696. :on-progress="uploading"
  697. :show-file-list="false"
  698. :data="{
  699. fId: goodsList[0].fId,
  700. }"
  701. :on-success="importTemplate"
  702. accept=".xls,.xlsx"
  703. :disabled="modify"
  704. multiple
  705. style="float: right; margin-right: 20px"
  706. >
  707. <el-button
  708. size="small"
  709. style="margin-left: 5px"
  710. type="warning"
  711. :disabled="modify"
  712. >导入</el-button
  713. >
  714. </el-upload>
  715. </div>
  716. </div>
  717. <el-table
  718. :data="dataList"
  719. style="width: 100%"
  720. @selection-change="Selectinventory"
  721. >
  722. <el-table-column type="selection" width="55" align="center" />
  723. <el-table-column label="序号" type="index" width="80" />
  724. <el-table-column label="箱号" align="center" prop="fCntrno">
  725. <template slot-scope="scope">
  726. <el-input v-model="scope.row.fCntrno" :disabled="modify" />
  727. </template>
  728. </el-table-column>
  729. <el-table-column label="铅封号" align="center" prop="fSealno">
  730. <template slot-scope="scope">
  731. <el-input v-model="scope.row.fSealno" :disabled="modify" />
  732. </template>
  733. </el-table-column>
  734. <el-table-column
  735. prop="fCntrweight"
  736. label="单箱重量(吨)"
  737. align="center"
  738. >
  739. <template slot-scope="scope">
  740. <el-input
  741. v-model="scope.row.fCntrweight"
  742. :disabled="modify"
  743. @input="cntrWeight"
  744. />
  745. </template>
  746. </el-table-column>
  747. <el-table-column prop="fGoodsid" label="货名" align="center">
  748. <template slot-scope="scope">
  749. <el-select
  750. clearable
  751. v-model="scope.row.fGoodsid"
  752. :disabled="modify"
  753. >
  754. <el-option
  755. v-for="item in goodsOptions"
  756. :key="item.fId"
  757. :label="item.fName"
  758. :value="item.fId"
  759. />
  760. </el-select>
  761. </template>
  762. </el-table-column>
  763. <el-table-column prop="fPackageid" label="包装类型" align="center">
  764. <template slot-scope="scope">
  765. <el-select
  766. clearable
  767. v-model="scope.row.fPackageid"
  768. :disabled="modify"
  769. >
  770. <el-option
  771. v-for="dict in packgeOptions"
  772. :key="dict.dictValue"
  773. :label="dict.dictLabel"
  774. :value="dict.dictValue"
  775. />
  776. </el-select>
  777. </template>
  778. </el-table-column>
  779. <el-table-column prop="fCntrid" label="箱型" align="center">
  780. <template slot-scope="scope">
  781. <el-select
  782. clearable
  783. v-model="scope.row.fCntrid"
  784. :disabled="modify"
  785. >
  786. <el-option
  787. v-for="item in cntrOptions"
  788. :key="item.fId"
  789. :label="item.fNo"
  790. :value="item.fId"
  791. />
  792. </el-select>
  793. </template>
  794. </el-table-column>
  795. <!-- <el-table-column prop="fManual" label="来源" align="center">-->
  796. <!-- <template slot-scope="scope">-->
  797. <!-- <el-select clearable v-model="scope.row.fManual" :disabled="modify">-->
  798. <!-- <el-option />-->
  799. <!-- </el-select>-->
  800. <!-- </template>-->
  801. <!-- </el-table-column>-->
  802. <el-table-column prop="address" label="操作" align="center">
  803. <template slot-scope="scope">
  804. <el-button
  805. size="small"
  806. :disabled="modify"
  807. @click="deleteRow(scope.$index, dataList)"
  808. >移除
  809. </el-button>
  810. </template>
  811. </el-table-column>
  812. </el-table>
  813. </el-collapse-item>
  814. <el-collapse-item name="7">
  815. <template slot="title">
  816. <i class="el-icon-circle-plus"></i>应收费用
  817. </template>
  818. <div
  819. class="dialogTableTitle flex a-center jlr"
  820. style="
  821. display: flex;
  822. justify-content: space-between;
  823. align-items: center;
  824. margin: 10px 0;
  825. "
  826. >
  827. <div>
  828. <el-button
  829. size="small"
  830. type="primary"
  831. :disabled="modify"
  832. @click.prevent="addCollection()"
  833. >新行
  834. </el-button>
  835. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  836. >删除
  837. </el-button> -->
  838. <el-button
  839. type="primary"
  840. size="small"
  841. :disabled="modify"
  842. @click="approval(1)"
  843. >保 存
  844. </el-button>
  845. <!-- <el-button @click.prevent="addAgreement()" type="warning">仓储费协议</el-button> -->
  846. <el-button
  847. size="small"
  848. @click.prevent="handleSelect('收费')"
  849. :disabled="modify"
  850. type="danger"
  851. >导入协议
  852. </el-button>
  853. <el-button
  854. type="primary"
  855. size="small"
  856. @click="feeChange('D')"
  857. >费用变更</el-button>
  858. </div>
  859. </div>
  860. <el-table
  861. :data="warehouseDrList"
  862. ref="table"
  863. tooltip-effect="dark"
  864. border
  865. stripe
  866. show-summary
  867. :summary-method="warehouseDrSummaries"
  868. >
  869. <el-table-column type="selection" width="55" align="center" />
  870. <el-table-column label="序号" type="index" width="80">
  871. </el-table-column>
  872. <el-table-column
  873. prop="fBusinessType"
  874. header-align="center"
  875. align="center"
  876. width="180px"
  877. label="业务类型"
  878. >
  879. <template slot-scope="scope">
  880. <el-select
  881. v-model="scope.row.fBusinessType"
  882. filterable
  883. remote
  884. :disabled="modify"
  885. placeholder="请选择业务类型"
  886. >
  887. <el-option
  888. v-for="dict in businessTypeOptions"
  889. :key="dict.dictValue"
  890. :label="dict.dictLabel"
  891. :value="dict.dictValue"
  892. ></el-option>
  893. </el-select>
  894. </template>
  895. </el-table-column>
  896. <el-table-column
  897. prop="fCorpid"
  898. header-align="center"
  899. align="center"
  900. width="180px"
  901. label="客户名称"
  902. >
  903. <template slot-scope="scope">
  904. <el-select
  905. v-model="scope.row.fCorpid"
  906. filterable
  907. remote
  908. :disabled="modify"
  909. placeholder="请选择客户名称"
  910. >
  911. <el-option
  912. v-for="item in nameOptions"
  913. :key="item.fId"
  914. :label="item.fName"
  915. :value="item.fId"
  916. ></el-option>
  917. </el-select>
  918. </template>
  919. </el-table-column>
  920. <el-table-column
  921. prop="fFeeid"
  922. header-align="center"
  923. align="center"
  924. width="180px"
  925. label="费用名称"
  926. >
  927. <template slot-scope="scope">
  928. <el-select
  929. v-model="scope.row.fFeeid"
  930. filterable
  931. remote
  932. :disabled="modify"
  933. placeholder="请选择费用名称"
  934. >
  935. <el-option
  936. v-for="(dict, index) in fDNameOptions"
  937. :key="index.fId"
  938. :label="dict.fName"
  939. :value="dict.fId"
  940. ></el-option>
  941. </el-select>
  942. </template>
  943. </el-table-column>
  944. <el-table-column
  945. prop="fFeeUnitid"
  946. header-align="center"
  947. align="center"
  948. width="180px"
  949. label="计价单位"
  950. >
  951. <template slot-scope="scope">
  952. <el-select
  953. v-model="scope.row.fFeeUnitid"
  954. placeholder="请选择计价单位"
  955. @change="changeFeeUnit(scope.row)"
  956. clearable
  957. :disabled="modify"
  958. >
  959. <el-option
  960. v-for="(dict, index) in jFeetunitOptions"
  961. :key="index.dictValue"
  962. :label="dict.dictLabel"
  963. :value="dict.dictValue"
  964. />
  965. </el-select>
  966. </template>
  967. </el-table-column>
  968. <el-table-column
  969. prop="fQty"
  970. header-align="center"
  971. align="center"
  972. width="130px"
  973. label="数量"
  974. >
  975. <template slot-scope="scope">
  976. <el-input
  977. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  978. v-model="scope.row.fQty"
  979. placeholder="数量"
  980. :disabled="modify"
  981. @change="changeContractAmt(scope.row)"
  982. show-word-limit
  983. />
  984. </template>
  985. </el-table-column>
  986. <el-table-column
  987. prop="fUnitprice"
  988. header-align="center"
  989. align="center"
  990. width="130px"
  991. label="单价"
  992. >
  993. <template slot-scope="scope">
  994. <el-input
  995. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  996. v-model="scope.row.fUnitprice"
  997. placeholder="单价"
  998. :disabled="modify"
  999. @change="changeContractAmt(scope.row)"
  1000. show-word-limit
  1001. />
  1002. </template>
  1003. </el-table-column>
  1004. <el-table-column
  1005. prop="fAmount"
  1006. header-align="center"
  1007. align="center"
  1008. width="130px"
  1009. label="金额"
  1010. >
  1011. <template slot-scope="scope">
  1012. <el-input
  1013. disabled
  1014. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1015. v-model="scope.row.fAmount"
  1016. placeholder="金额"
  1017. show-word-limit
  1018. />
  1019. </template>
  1020. </el-table-column>
  1021. <el-table-column
  1022. prop="fStltypeid"
  1023. header-align="center"
  1024. align="center"
  1025. width="130px"
  1026. label="结算方式"
  1027. >
  1028. <template slot-scope="scope">
  1029. <el-select
  1030. v-model="scope.row.fStltypeid"
  1031. placeholder="请选择结算表票结、月结"
  1032. :disabled="modify"
  1033. >
  1034. <el-option
  1035. v-for="(dict, index) in fStltypeOptions"
  1036. :key="index.dictValue"
  1037. :label="dict.dictLabel"
  1038. :value="parseInt(dict.dictValue)"
  1039. ></el-option>
  1040. </el-select>
  1041. </template>
  1042. </el-table-column>
  1043. <el-table-column
  1044. prop="fCurrency"
  1045. header-align="center"
  1046. align="center"
  1047. width="130px"
  1048. label="币别"
  1049. >
  1050. <template slot-scope="scope">
  1051. <el-input
  1052. v-model="scope.row.fCurrency"
  1053. :disabled="modify"
  1054. placeholder="币别"
  1055. show-word-limit
  1056. />
  1057. </template>
  1058. </el-table-column>
  1059. <el-table-column
  1060. prop="fExrate"
  1061. header-align="center"
  1062. align="center"
  1063. width="130px"
  1064. label="汇率"
  1065. >
  1066. <template slot-scope="scope">
  1067. <el-input
  1068. v-model="scope.row.fExrate"
  1069. :disabled="modify"
  1070. placeholder="汇率"
  1071. show-word-limit
  1072. />
  1073. </template>
  1074. </el-table-column>
  1075. <el-table-column
  1076. prop="fTaxrate"
  1077. header-align="center"
  1078. align="center"
  1079. width="130px"
  1080. label="税率"
  1081. >
  1082. <template slot-scope="scope">
  1083. <el-input
  1084. v-model="scope.row.fTaxrate"
  1085. :disabled="modify"
  1086. placeholder="税率"
  1087. show-word-limit
  1088. />
  1089. </template>
  1090. </el-table-column>
  1091. <el-table-column
  1092. prop="fSrcTypeId"
  1093. header-align="center"
  1094. align="center"
  1095. width="130px"
  1096. label="来源"
  1097. >
  1098. <template slot-scope="scope">
  1099. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  1100. <span v-if="scope.row.fSrcTypeId === 1">协议</span>
  1101. <span v-if="scope.row.fSrcTypeId === 2">订舱</span>
  1102. <span v-if="scope.row.fSrcTypeId == 10">变更</span>
  1103. </template>
  1104. </el-table-column>
  1105. <el-table-column
  1106. prop="remark"
  1107. header-align="center"
  1108. align="center"
  1109. width="150px"
  1110. label="备注"
  1111. >
  1112. <template slot-scope="scope">
  1113. <el-input
  1114. v-model="scope.row.remark"
  1115. :disabled="modify"
  1116. placeholder="备注"
  1117. show-word-limit
  1118. />
  1119. </template>
  1120. </el-table-column>
  1121. <el-table-column
  1122. header-align="center"
  1123. align="center"
  1124. label="操作"
  1125. width="200px"
  1126. >
  1127. <template slot-scope="scope">
  1128. <el-button
  1129. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1130. size="small"
  1131. :disabled="modify"
  1132. >移除
  1133. </el-button>
  1134. </template>
  1135. </el-table-column>
  1136. </el-table>
  1137. </el-collapse-item>
  1138. <el-collapse-item name="8">
  1139. <template slot="title">
  1140. <i class="el-icon-remove"></i>应付费用
  1141. </template>
  1142. <div
  1143. class="dialogTableTitle flex a-center jlr"
  1144. style="
  1145. display: flex;
  1146. justify-content: space-between;
  1147. align-items: center;
  1148. margin: 10px 0;
  1149. "
  1150. >
  1151. <div>
  1152. <el-button
  1153. type="primary"
  1154. :disabled="modify"
  1155. @click.prevent="addpayment()"
  1156. size="small"
  1157. >新行
  1158. </el-button>
  1159. <el-button
  1160. type="primary"
  1161. size="small"
  1162. @click="approval(1)"
  1163. :disabled="modify"
  1164. >保 存
  1165. </el-button>
  1166. <el-button
  1167. type="danger"
  1168. size="small"
  1169. @click.prevent="handleSelect('付费')"
  1170. :disabled="modify"
  1171. >导入协议
  1172. </el-button>
  1173. <el-button
  1174. type="primary"
  1175. size="small"
  1176. @click="feeChange('C')"
  1177. >费用变更</el-button>
  1178. </div>
  1179. </div>
  1180. <el-table
  1181. :data="warehouseCrList"
  1182. ref="table"
  1183. tooltip-effect="dark"
  1184. border
  1185. stripe
  1186. show-summary
  1187. :summary-method="warehouseCrSummaries"
  1188. >
  1189. <el-table-column type="selection" width="55" align="center" />
  1190. <el-table-column label="序号" type="index" width="80">
  1191. </el-table-column>
  1192. <el-table-column
  1193. prop="fCorpid"
  1194. header-align="center"
  1195. align="center"
  1196. width="180px"
  1197. label="业务类型"
  1198. >
  1199. <template slot-scope="scope">
  1200. <el-select
  1201. v-model="scope.row.fBusinessType"
  1202. filterable
  1203. remote
  1204. :disabled="modify || scope.row.fSrcTypeId != 0"
  1205. placeholder="请选择业务类型"
  1206. >
  1207. <el-option
  1208. v-for="dict in businessTypeOptions"
  1209. :key="dict.dictValue"
  1210. :label="dict.dictLabel"
  1211. :value="dict.dictValue"
  1212. ></el-option>
  1213. </el-select>
  1214. </template>
  1215. </el-table-column>
  1216. <el-table-column
  1217. prop="fCorpid"
  1218. header-align="center"
  1219. align="center"
  1220. width="180px"
  1221. label="客户名称"
  1222. >
  1223. <template slot-scope="scope">
  1224. <el-select
  1225. v-model="scope.row.fCorpid"
  1226. filterable
  1227. remote
  1228. :disabled="modify || scope.row.fSrcTypeId != 0"
  1229. placeholder="请选择客户名称"
  1230. >
  1231. <el-option
  1232. v-for="item in nameOptions"
  1233. :key="item.fId"
  1234. :label="item.fName"
  1235. :value="item.fId"
  1236. ></el-option>
  1237. </el-select>
  1238. </template>
  1239. </el-table-column>
  1240. <el-table-column
  1241. prop="fFeeid"
  1242. header-align="center"
  1243. align="center"
  1244. width="180px"
  1245. label="费用名称"
  1246. >
  1247. <template slot-scope="scope">
  1248. <el-select
  1249. v-model="scope.row.fFeeid"
  1250. filterable
  1251. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1252. remote
  1253. placeholder="请选择费用名称"
  1254. >
  1255. <el-option
  1256. v-for="(dict, index) in fCNameOptions"
  1257. :key="index.fId"
  1258. :label="dict.fName"
  1259. :value="dict.fId"
  1260. ></el-option>
  1261. </el-select>
  1262. </template>
  1263. </el-table-column>
  1264. <el-table-column
  1265. prop="fFeeUnitid"
  1266. header-align="center"
  1267. align="center"
  1268. width="180px"
  1269. label="计价单位"
  1270. >
  1271. <template slot-scope="scope">
  1272. <el-select
  1273. v-model="scope.row.fFeeUnitid"
  1274. filterable
  1275. remote
  1276. @change="changeFeeUnit(scope.row)"
  1277. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1278. placeholder="请选择计价单位"
  1279. >
  1280. <el-option
  1281. v-for="(dict, index) in jFeetunitOptions"
  1282. :key="index.dictValue"
  1283. :label="dict.dictLabel"
  1284. :value="dict.dictValue"
  1285. ></el-option>
  1286. </el-select>
  1287. </template>
  1288. </el-table-column>
  1289. <el-table-column
  1290. prop="fQty"
  1291. header-align="center"
  1292. align="center"
  1293. width="150px"
  1294. label="数量"
  1295. >
  1296. <template slot-scope="scope">
  1297. <el-input
  1298. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1299. v-model="scope.row.fQty"
  1300. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1301. @change="changeContractAmt(scope.row)"
  1302. placeholder="数量"
  1303. show-word-limit
  1304. />
  1305. </template>
  1306. </el-table-column>
  1307. <el-table-column
  1308. prop="fUnitprice"
  1309. header-align="center"
  1310. align="center"
  1311. width="150px"
  1312. label="单价"
  1313. >
  1314. <template slot-scope="scope">
  1315. <el-input
  1316. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1317. v-model="scope.row.fUnitprice"
  1318. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1319. @change="changeContractAmt(scope.row)"
  1320. placeholder="单价"
  1321. show-word-limit
  1322. />
  1323. </template>
  1324. </el-table-column>
  1325. <el-table-column
  1326. prop="fAmount"
  1327. header-align="center"
  1328. align="center"
  1329. width="150px"
  1330. label="金额"
  1331. >
  1332. <template slot-scope="scope">
  1333. <el-input
  1334. disabled
  1335. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1336. v-model="scope.row.fAmount"
  1337. placeholder="金额"
  1338. show-word-limit
  1339. />
  1340. </template>
  1341. </el-table-column>
  1342. <el-table-column
  1343. prop="fStltypeid"
  1344. header-align="center"
  1345. align="center"
  1346. width="130px"
  1347. label="结算方式"
  1348. >
  1349. <template slot-scope="scope">
  1350. <el-select
  1351. v-model="scope.row.fStltypeid"
  1352. placeholder="请选择结算表票结、月结"
  1353. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1354. >
  1355. <el-option
  1356. v-for="(dict, index) in fStltypeOptions"
  1357. :key="index.dictValue"
  1358. :label="dict.dictLabel"
  1359. :value="parseInt(dict.dictValue)"
  1360. ></el-option>
  1361. </el-select>
  1362. </template>
  1363. </el-table-column>
  1364. <el-table-column
  1365. prop="fCurrency"
  1366. header-align="center"
  1367. align="center"
  1368. width="150px"
  1369. label="币别"
  1370. >
  1371. <template slot-scope="scope">
  1372. <el-input
  1373. v-model="scope.row.fCurrency"
  1374. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1375. placeholder="币别"
  1376. show-word-limit
  1377. />
  1378. </template>
  1379. </el-table-column>
  1380. <el-table-column
  1381. prop="fExrate"
  1382. header-align="center"
  1383. align="center"
  1384. width="150px"
  1385. label="汇率"
  1386. >
  1387. <template slot-scope="scope">
  1388. <el-input
  1389. v-model="scope.row.fExrate"
  1390. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1391. placeholder="汇率"
  1392. show-word-limit
  1393. />
  1394. </template>
  1395. </el-table-column>
  1396. <el-table-column
  1397. prop="fTaxrate"
  1398. header-align="center"
  1399. align="center"
  1400. width="150px"
  1401. label="税率"
  1402. >
  1403. <template slot-scope="scope">
  1404. <el-input
  1405. v-model="scope.row.fTaxrate"
  1406. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1407. placeholder="税率"
  1408. show-word-limit
  1409. />
  1410. </template>
  1411. </el-table-column>
  1412. <el-table-column
  1413. prop="fSrcTypeId"
  1414. header-align="center"
  1415. align="center"
  1416. width="130px"
  1417. label="来源"
  1418. >
  1419. <template slot-scope="scope">
  1420. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  1421. <span v-if="scope.row.fSrcTypeId === 1">协议</span>
  1422. <span v-if="scope.row.fSrcTypeId === 2">订舱</span>
  1423. <span v-if="scope.row.fSrcTypeId == 10">变更</span>
  1424. </template>
  1425. </el-table-column>
  1426. <el-table-column
  1427. prop="remark"
  1428. header-align="center"
  1429. align="center"
  1430. width="150px"
  1431. label="备注"
  1432. >
  1433. <template slot-scope="scope">
  1434. <el-input
  1435. v-model="scope.row.remark"
  1436. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1437. placeholder="备注"
  1438. show-word-limit
  1439. />
  1440. </template>
  1441. </el-table-column>
  1442. <el-table-column
  1443. header-align="center"
  1444. align="center"
  1445. width="200px"
  1446. label="操作"
  1447. >
  1448. <template slot-scope="scope">
  1449. <!-- <el-button size="small">审核费用</el-button> -->
  1450. <el-button
  1451. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  1452. size="small"
  1453. :disabled="modify"
  1454. >移除
  1455. </el-button>
  1456. </template>
  1457. </el-table-column>
  1458. </el-table>
  1459. </el-collapse-item>
  1460. <el-collapse-item name="9" class="minHeight" title="箱信息">
  1461. <template slot="title">
  1462. <i class="el-icon-circle-plus"></i>利润合计:
  1463. {{
  1464. this.amountDr != null && this.amountCr != null
  1465. ? this.amountDr - this.amountCr
  1466. : !this.amountDr && this.amountCr
  1467. ? 0 - this.amountCr
  1468. : !this.amountDr && !this.amountCr
  1469. ? ""
  1470. : this.amountDr
  1471. }}
  1472. </template>
  1473. </el-collapse-item>
  1474. </el-collapse>
  1475. <div style="margin: 60px; float: right">
  1476. <add-or-update
  1477. v-if="addOrUpdateVisible"
  1478. ref="addOrUpdate"
  1479. @refreshDataList="getDataList"
  1480. ></add-or-update>
  1481. <approval-comments
  1482. v-if="addOrUpdateVisib"
  1483. ref="ApprovalComments"
  1484. @refreshDataList="returnData"
  1485. ></approval-comments>
  1486. <el-button
  1487. type="info"
  1488. :disabled="jumpDonot"
  1489. v-if="form.fBillstatus <= 11 && form.fBillstatus >= 6"
  1490. @click="modify = false"
  1491. >修 改
  1492. </el-button>
  1493. <el-button
  1494. type="success"
  1495. :disabled="modify"
  1496. v-if="form.fBillstatus <= 11 || form.fBillstatus >= 6"
  1497. @click="approval(1)"
  1498. >保 存
  1499. </el-button>
  1500. <el-button
  1501. type="primary"
  1502. :disabled="modify"
  1503. v-if="form.fBillstatus == 11 && this.form.moneyStatus < 4"
  1504. @click="feeSubmission"
  1505. v-loading="auditLoading"
  1506. >费用请核
  1507. </el-button>
  1508. <el-button
  1509. type="primary"
  1510. v-if="form.fBillstatus == 11 && this.form.moneyStatus >= 4"
  1511. @click="revokeSubmission"
  1512. v-loading="auditLoading"
  1513. v-hasPermi="['warehouseBusiness:revoke']"
  1514. >
  1515. 撤销费用请核
  1516. </el-button>
  1517. <el-button
  1518. type="success"
  1519. v-if="approVal"
  1520. @click="addOrUpdateHand(form, 'f_billstatus')"
  1521. >审 批</el-button
  1522. >
  1523. <el-button
  1524. type="primary"
  1525. v-if="
  1526. form.fUpdeteStatus >= 2 &&
  1527. form.fUpdeteStatus <= 6 &&
  1528. form.fSubmitUpdate >= 2 &&
  1529. form.fSubmitUpdate <= 6 &&
  1530. form.fDeleteStatus >= 2 &&
  1531. form.fDeleteStatus <= 5 &&
  1532. approvalTwo
  1533. "
  1534. @click="modifyApproval()"
  1535. >审批
  1536. </el-button>
  1537. <el-button
  1538. v-if="!form.fMblno && form.fBillstatus < 5"
  1539. type="danger"
  1540. @click="rejectDeletion"
  1541. >
  1542. 驳回并删除
  1543. </el-button>
  1544. <el-button
  1545. type="danger"
  1546. :disabled="disappear"
  1547. v-if="form.moneyStatus === 4 && current == before"
  1548. @click="revokeTwo('f_billstatus')"
  1549. v-hasPermi="['warehouseBusiness:revoke']"
  1550. >撤销请核
  1551. </el-button>
  1552. <el-button
  1553. type="primary"
  1554. v-if="
  1555. form.fUpdeteStatus !== 4 &&
  1556. form.fUpdeteStatus !== 5 &&
  1557. form.fUpdeteStatus !== 6 &&
  1558. (form.fBillstatus !== 11 ||
  1559. form.moneyStatus == 1 ||
  1560. (form.moneyStatus != null && form.moneyStatus >= 4))
  1561. "
  1562. @click="addOrUpdateHandle('f_billstatus')"
  1563. >查看审批
  1564. </el-button>
  1565. <el-button
  1566. type="primary"
  1567. v-if="
  1568. form.fUpdeteStatus >= 2 &&
  1569. form.fUpdeteStatus <= 6 &&
  1570. form.fSubmitUpdate >= 2 &&
  1571. form.fSubmitUpdate <= 6 &&
  1572. form.fDeleteStatus >= 2 &&
  1573. form.fDeleteStatus <= 5 &&
  1574. dataElist
  1575. "
  1576. @click="revisionApproval()"
  1577. >查看审批
  1578. </el-button>
  1579. <el-button
  1580. icon="el-icon-arrow-left"
  1581. type="danger"
  1582. v-if="cancelButton === true"
  1583. @click="cancel"
  1584. >返回列表</el-button
  1585. >
  1586. <el-button
  1587. icon="el-icon-arrow-left"
  1588. type="danger"
  1589. v-if="cancelButton === false"
  1590. @click="cancelTwo"
  1591. >返回首页
  1592. </el-button>
  1593. </div>
  1594. <!-- 附件查看-->
  1595. <el-dialog
  1596. title="查看附件"
  1597. :visible.sync="dialogVisible"
  1598. width="60%"
  1599. v-dialogDrag
  1600. >
  1601. <el-table
  1602. :data="relevantAttachments"
  1603. ref="table"
  1604. tooltip-effect="dark"
  1605. border
  1606. stripe
  1607. style="width: 100%"
  1608. height="150"
  1609. >
  1610. <el-table-column label="序号" type="index" width="80">
  1611. </el-table-column>
  1612. <el-table-column
  1613. prop="fName"
  1614. header-align="center"
  1615. align="center"
  1616. width="250px"
  1617. label="附件名称"
  1618. >
  1619. <template slot-scope="scope">
  1620. <el-input
  1621. v-model="scope.row.fName"
  1622. placeholder="附件名称"
  1623. show-word-limit
  1624. />
  1625. </template>
  1626. </el-table-column>
  1627. <el-table-column
  1628. prop="createTime"
  1629. header-align="center"
  1630. align="center"
  1631. width="250px"
  1632. label="上传时间"
  1633. >
  1634. <template slot-scope="scope">
  1635. <el-input
  1636. v-model="scope.row.createTime"
  1637. disabled
  1638. placeholder="上传时间"
  1639. ></el-input>
  1640. </template>
  1641. </el-table-column>
  1642. <el-table-column
  1643. prop="createBy"
  1644. header-align="center"
  1645. align="center"
  1646. width="150px"
  1647. label="上传人"
  1648. >
  1649. <template slot-scope="scope">
  1650. <el-input
  1651. v-model="scope.row.createBy"
  1652. disabled
  1653. placeholder="上传人"
  1654. show-word-limit
  1655. />
  1656. </template>
  1657. </el-table-column>
  1658. <el-table-column
  1659. prop="fUrl"
  1660. header-align="center"
  1661. align="center"
  1662. width="150px"
  1663. label="操作"
  1664. >
  1665. <template slot-scope="scope">
  1666. <!-- <el-upload-->
  1667. <!-- class="upload-demo"-->
  1668. <!-- :action="uploadImgUrl"-->
  1669. <!-- :on-success="(res,file)=>{handleSucces(scope,res,file)}"-->
  1670. <!-- :headers="headers"-->
  1671. <!-- style="width:25%;float: left"-->
  1672. <!-- :show-file-list="false"-->
  1673. <!-- :limit="1"-->
  1674. <!-- >-->
  1675. <!-- <el-button size="small" type="primary" style="margin-left:20px">点击上传</el-button>-->
  1676. <!-- </el-upload>-->
  1677. <el-button size="small" type="primary" @click="checkFile(scope)"
  1678. >查看</el-button
  1679. >
  1680. <!-- <el-button size="small" type="primary" @click="deleteFile(scope)">删除</el-button>-->
  1681. </template>
  1682. </el-table-column>
  1683. </el-table>
  1684. <span slot="footer" class="dialog-footer">
  1685. <el-button @click="dialogVisible = false">取 消</el-button>
  1686. <el-button type="primary" @click="dialogVisible = false"
  1687. >确 定</el-button
  1688. >
  1689. </span>
  1690. </el-dialog>
  1691. <!-- 打印运单-->
  1692. <el-dialog
  1693. :visible.sync="dialogPrinting"
  1694. width="30%"
  1695. append-to-body
  1696. fullscreen
  1697. :show-close="false"
  1698. :close-on-press-escape="false"
  1699. :before-close="(dialogVisible = false)"
  1700. >
  1701. <div ref="print" style="width: 99%; margin: 1px auto auto">
  1702. <div style="width: 100%">
  1703. <div
  1704. style="
  1705. width: 50%;
  1706. height: 160px;
  1707. float: left;
  1708. justify-content: center;
  1709. align-items: center;
  1710. display: -webkit-flex;
  1711. "
  1712. >
  1713. <div>
  1714. <h1>青岛凯和志诚物流有限公司</h1>
  1715. <h3 style="text-align: center">水路集装箱货物运单</h3>
  1716. </div>
  1717. </div>
  1718. <div
  1719. style="
  1720. width: 50%;
  1721. height: 160px;
  1722. float: left;
  1723. justify-content: center;
  1724. align-items: center;
  1725. display: -webkit-flex;
  1726. "
  1727. >
  1728. <div style="width: 500px; border: 1px solid #cccccc; padding: 10px">
  1729. <h4 style="margin: 0">
  1730. 1、本运单一式四联,第一联退回发货人或托运人,做为目的港收货人提货凭证。
  1731. </h4>
  1732. <h4 style="margin: 0">2、运单一经提取货物后即失去提货效力。</h4>
  1733. <h4 style="margin: 0">
  1734. 3、运单非有价证券,不得流通或转让给非本运单指定的第三方。
  1735. </h4>
  1736. <h4 style="margin: 0">
  1737. 4、托运人必须投保货物运输综合险,否则由此产生的损失由托运人自负。
  1738. </h4>
  1739. <h4 style="margin: 0">
  1740. 5、船东过失承运人不承担责任,由过失方承担。
  1741. </h4>
  1742. </div>
  1743. </div>
  1744. </div>
  1745. <div
  1746. style="
  1747. display: flex;
  1748. justify-content: space-between;
  1749. width: 61.3%;
  1750. margin-left: 10px;
  1751. "
  1752. >
  1753. <p>离港日:{{ estimatedTime.fEtd }}</p>
  1754. <p>运单号:{{ form.fMblno }}</p>
  1755. <p>
  1756. 运输条款:{{
  1757. form.fServiceitems | fServiceitemsNameFormat(transport)
  1758. }}
  1759. </p>
  1760. <p>
  1761. 箱型箱量:{{
  1762. goodsList && goodsList.length > 0
  1763. ? goodsList[0].cntrName + "*" + goodsList[0].fCntrcount
  1764. : "—"
  1765. }}
  1766. </p>
  1767. <p>业务号:{{ form.fBillno }}</p>
  1768. </div>
  1769. <table
  1770. border="1"
  1771. style="border-collapse: collapse; width: 100%; text-align: center"
  1772. >
  1773. <tr class="listTd">
  1774. <td style="width: 9%">船名</td>
  1775. <td style="width: 9%">
  1776. {{ form.fVslid | fVslidFormat(vslidList) }}
  1777. </td>
  1778. <td style="width: 9%">航次</td>
  1779. <td style="width: 11%" colspan="2">
  1780. {{ form.fVoyid | voyidNameFormat(voyidList) }}
  1781. </td>
  1782. <td style="width: 9%">装货港</td>
  1783. <td style="width: 9%">
  1784. {{ form.fLoadportid | portFormat(fMblnoOptions) }}
  1785. </td>
  1786. <td style="width: 9%">卸货港</td>
  1787. <td style="width: 11%" colspan="2">
  1788. {{ form.fDestportid | portFormat(fMblnoOptions) }}
  1789. </td>
  1790. <td style="width: 12%" rowspan="4" colspan="2">卸货人日期(章)</td>
  1791. <td style="width: 12%" rowspan="4" colspan="2">收货人(章)</td>
  1792. </tr>
  1793. <tr class="listTd">
  1794. <td>第一接驳船</td>
  1795. <td></td>
  1796. <td>航次</td>
  1797. <td colspan="2"></td>
  1798. <td>第一换装港</td>
  1799. <td colspan="4"></td>
  1800. </tr>
  1801. <tr class="listTd">
  1802. <td>第二接驳船</td>
  1803. <td></td>
  1804. <td>航次</td>
  1805. <td colspan="2"></td>
  1806. <td>第二换装港</td>
  1807. <td colspan="4"></td>
  1808. </tr>
  1809. <tr class="listTd">
  1810. <td rowspan="3">托运人</td>
  1811. <td>全称</td>
  1812. <td rowspan="3" colspan="2">
  1813. {{ form.fShippername
  1814. }}{{ form.fShipperattn ? "," + form.fShipperattn : ""
  1815. }}{{ form.fShippertel ? "," + form.fShippertel : "" }}
  1816. </td>
  1817. <td rowspan="3">收货人</td>
  1818. <td>全称</td>
  1819. <td colspan="4" rowspan="3">
  1820. {{ form.fConsigneername
  1821. }}{{ form.fConsigneeattn ? "," + form.fConsigneeattn : ""
  1822. }}{{ form.fConsigneetel ? "," + form.fConsigneetel : "" }}
  1823. </td>
  1824. </tr>
  1825. <tr class="listTd">
  1826. <td>地址:电话</td>
  1827. <td>地址:电话</td>
  1828. <td rowspan="3" colspan="2">托运人(签盖)</td>
  1829. <td rowspan="3" colspan="2">承运人(签盖)</td>
  1830. </tr>
  1831. <tr class="listTd">
  1832. <td>银行:帐号</td>
  1833. <td>银行:帐号</td>
  1834. </tr>
  1835. <tr class="listTd">
  1836. <td rowspan="2" colspan="2">箱号</td>
  1837. <td rowspan="2" colspan="2">铅封号</td>
  1838. <td rowspan="2">批号</td>
  1839. <td rowspan="2">货名</td>
  1840. <td rowspan="2">箱型</td>
  1841. <td rowspan="2">价值</td>
  1842. <td rowspan="2">托运人确定重量(吨)</td>
  1843. <td rowspan="2">计算重量(吨)</td>
  1844. </tr>
  1845. <tr>
  1846. <td :rowspan="dataList.length + 2" align="center" colspan="4">
  1847. <img
  1848. src="../../../../assets/images/chapter.png"
  1849. alt="无图片"
  1850. style="width: 50%"
  1851. />
  1852. </td>
  1853. </tr>
  1854. <!-- 此处为遍历列表-->
  1855. <tr class="listTd" v-for="(item, index) in dataList" :key="index">
  1856. <td colspan="2">{{ item.fCntrno }}</td>
  1857. <td colspan="2">{{ item.fSealno }}</td>
  1858. <td></td>
  1859. <td>{{ item.fGoodsid | goodsFormat(goodsOptions) }}</td>
  1860. <td>{{ item.fCntrid | cntrFormat(cntrOptions) }}</td>
  1861. <td></td>
  1862. <td></td>
  1863. <td>{{ item.fCntrweight }}</td>
  1864. </tr>
  1865. <tr class="listTd">
  1866. <td rowspan="5">托运人/发货人须知</td>
  1867. <td colspan="4" rowspan="5" style="text-align: left; padding: 10px">
  1868. 1、粗线内各栏由发货人填写,如有更改时,须在更改处盖章;订舱委托书下条款及运单均为本运输合同组成部分,发货人已充分阅读并同意该部分条款。<br />2、按规定正确、清楚填写;并逐张盖上账号、公章,货名、件数、重量不得省略。由于申报不实给承运人、港口经营人造成损失的,托运人应当负赔偿责任;<br />3、托运人负责封箱,承运人对上述箱内货物的描述不知。<br />4、如超载引起事故,由装箱人负责;<br />5、为确保货物安全,货物装箱前请先验箱,无异议视为集装箱箱况完好;<br />6、严禁将危险货物、腐蚀箱体的货物及国家禁运货物装入箱内。<br />7、与本运单有关的任何争议,各方当事人一致同意选择由青岛海事法院管辖
  1869. </td>
  1870. <td rowspan="4">箱量合计:</td>
  1871. <td rowspan="4"></td>
  1872. <td rowspan="4">备注:</td>
  1873. <td rowspan="4" colspan="2"></td>
  1874. </tr>
  1875. <tr></tr>
  1876. <tr></tr>
  1877. <tr></tr>
  1878. <tr class="listTd">
  1879. <td style="height: 40px">收费项目</td>
  1880. <td>收费明细</td>
  1881. <td></td>
  1882. <td>收费金额</td>
  1883. <td colspan="2"></td>
  1884. <td colspan="2">预付/到付</td>
  1885. </tr>
  1886. </table>
  1887. </div>
  1888. <span slot="footer" class="dialog-footer">
  1889. <el-button @click="dialogPrinting = false">取 消</el-button>
  1890. <el-button type="primary" @click="Printing">打 印</el-button>
  1891. </span>
  1892. </el-dialog>
  1893. <fee-dialog ref="feeDialog" @importFee="importFee" />
  1894. </div>
  1895. </template>
  1896. <script>
  1897. import {
  1898. listCorps,
  1899. addmodify,
  1900. getCntr,
  1901. postApproval,
  1902. listFees,
  1903. getGoodName,
  1904. getFName,
  1905. getfee,
  1906. getName,
  1907. portInquiry,
  1908. nameOfVessel,
  1909. voyageNumber,
  1910. reject,
  1911. deleteAll,
  1912. shippingList,
  1913. cancellationFees,
  1914. getfLaneName,
  1915. } from "@/api/kaihe/domesticTrade/orderInformation";
  1916. import Global from "@/layout/components/global";
  1917. import { getToken } from "@/utils/auth";
  1918. import Cookies from "js-cookie";
  1919. import draggable from "vuedraggable";
  1920. import Vue from "vue";
  1921. import AddOrUpdate from "@/views/viewApproval";
  1922. import ApprovalComments from "@/views/startApproval";
  1923. import { revoke, revokeTwo } from "@/api/warehouseBusiness/warehouseInStock";
  1924. import { queryUserVal } from "@/api/system/user";
  1925. import request from "@/utils/request";
  1926. import feeDialog from "./feeDialog";
  1927. Vue.directive("dialogDrag", {
  1928. bind(el, binding, vnode, oldVnode) {
  1929. const dialogHeaderEl = el.querySelector(".el-dialog__header");
  1930. const dragDom = el.querySelector(".el-dialog");
  1931. const enlarge = el.querySelector(".enlarge");
  1932. dialogHeaderEl.style.cursor = "move";
  1933. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  1934. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
  1935. if (enlarge) {
  1936. enlarge.onclick = (e) => {
  1937. dragDom.style.top = "0px";
  1938. dragDom.style.left = "0px";
  1939. };
  1940. }
  1941. dialogHeaderEl.onmousedown = (e) => {
  1942. // 鼠标按下,计算当前元素距离可视区的距离
  1943. const disX = e.clientX - dialogHeaderEl.offsetLeft;
  1944. const disY = e.clientY - dialogHeaderEl.offsetTop;
  1945. // 获取到的值带px 正则匹配替换
  1946. let styL, styT;
  1947. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  1948. if (sty.left.includes("%")) {
  1949. styL =
  1950. +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
  1951. styT =
  1952. +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
  1953. } else {
  1954. styL = +sty.left.replace(/\px/g, "");
  1955. styT = +sty.top.replace(/\px/g, "");
  1956. }
  1957. document.onmousemove = function (e) {
  1958. // 通过事件委托,计算移动的距离
  1959. const l = e.clientX - disX;
  1960. const t = e.clientY - disY;
  1961. // 移动当前元素
  1962. if (t + styT >= 0) {
  1963. dragDom.style.top = `${t + styT}px`;
  1964. }
  1965. dragDom.style.left = `${l + styL}px`;
  1966. // 将此时的位置传出去
  1967. // binding.value({x:e.pageX,y:e.pageY})
  1968. };
  1969. document.onmouseup = function (e) {
  1970. document.onmousemove = null;
  1971. document.onmouseup = null;
  1972. };
  1973. };
  1974. },
  1975. });
  1976. export default {
  1977. name: "orderInformation",
  1978. components: {
  1979. AddOrUpdate,
  1980. ApprovalComments,
  1981. feeDialog,
  1982. },
  1983. data() {
  1984. return {
  1985. auditLoading:false,
  1986. selection: [],
  1987. insurance: [],
  1988. etentioncargo: [],
  1989. vslidList: [],
  1990. voyidList: [],
  1991. fLaneList: [],
  1992. cEsign: [],
  1993. transport: [],
  1994. fServiceitemsNews:[],
  1995. paymentMethod: [],
  1996. drawee: [],
  1997. whether: false,
  1998. fStatus: [],
  1999. goods: [],
  2000. rules: {
  2001. fMblno: [{ required: true, message: " ", trigger: "blur" }],
  2002. },
  2003. changeNum: true,
  2004. cancelButton: true,
  2005. jumpDonot: false,
  2006. disappear: false,
  2007. businessTypeOptions: [],
  2008. id: null,
  2009. current: "",
  2010. before: "",
  2011. approVal: false,
  2012. //客户名称下拉模糊
  2013. nameOptions: [],
  2014. //字典表包装类型
  2015. packgeOptions: [],
  2016. //货名下拉
  2017. goodsOptions: [],
  2018. //箱型下拉
  2019. cntrOptions: [],
  2020. fTaxrate: "",
  2021. //结算方式
  2022. fStltypeOptions: [],
  2023. //计价单位
  2024. jFeetunitOptions: [],
  2025. //收付款费用名称字典表
  2026. fDNameOptions: [],
  2027. fCNameOptions: [],
  2028. warehouseCrList: [],
  2029. estimatedTime: {},
  2030. addOrUpdateVisible: false,
  2031. dataElist: false,
  2032. addOrUpdateVisib: false,
  2033. warehouseDrList: [],
  2034. goodsList: [],
  2035. dataList: [],
  2036. visible: false,
  2037. dataForm: {},
  2038. modify: true,
  2039. doNot: true,
  2040. activeNames: ["1", "2", "3", "4", "5", "6"],
  2041. form: {},
  2042. fMblnoOptions: [],
  2043. uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
  2044. relevantAttachments: [],
  2045. headers: { Authorization: "Bearer " + getToken() },
  2046. baseURL:
  2047. process.env.VUE_APP_BASE_API +
  2048. "/khwarehouse/warehousebills/importCreate",
  2049. //集装箱尺码字典表
  2050. CntrsizeOptions: [],
  2051. //模糊查询箱类型
  2052. typeOptions: [],
  2053. //附件上传弹窗
  2054. dialogVisible: false,
  2055. //调箱动作字典表
  2056. boxActionOptions: [],
  2057. //集装箱主字典表
  2058. ownerOptions: [],
  2059. //模糊下拉查询地点
  2060. addressOptions: [],
  2061. //空重字典表
  2062. updateEFOptions: [],
  2063. //状态字典表
  2064. cntrstatusOptions: [],
  2065. // 遮罩层
  2066. loading: true,
  2067. // 选中数组
  2068. ids: [],
  2069. // 显示搜索条件
  2070. showSearch: true,
  2071. // 总条数
  2072. total: 0,
  2073. // 客户详情表格数据
  2074. corpsList: [],
  2075. // 查询参数
  2076. select: "",
  2077. querDate: [],
  2078. file: [],
  2079. row: [],
  2080. res: [],
  2081. formList: {},
  2082. approvalTwo: false,
  2083. amountDr: null,
  2084. amountCr: null,
  2085. actId: null,
  2086. // 打印弹窗
  2087. dialogPrinting: false,
  2088. boxSorting: {
  2089. pageNum: 1,
  2090. pageSize: 30,
  2091. total: null,
  2092. },
  2093. // 上传loading
  2094. uploadLoading: false,
  2095. };
  2096. },
  2097. //页面跳转后传递参数
  2098. activated() {
  2099. this.jumpDonot = false;
  2100. if (this.$route.query.testing) this.dataElist = true;
  2101. this.modify = true;
  2102. let formDate;
  2103. if (this.$route.query.list) {
  2104. formDate = {
  2105. fId: JSON.parse(this.$route.query.list).billId,
  2106. };
  2107. this.actId = JSON.parse(this.$route.query.list).actId;
  2108. this.formList = formDate;
  2109. this.approVal = true;
  2110. this.cancelButton = false;
  2111. } else if (this.$route.query.data) {
  2112. formDate = {
  2113. fId: JSON.parse(this.$route.query.data).fId,
  2114. num: JSON.parse(this.$route.query.data).num,
  2115. };
  2116. if (this.$route.query.data.fMblno) {
  2117. formDate = {
  2118. fMblno: JSON.parse(this.$route.query.data).fMblno,
  2119. num: JSON.parse(this.$route.query.data).num,
  2120. };
  2121. }
  2122. this.id = formDate.fId;
  2123. this.formList = {
  2124. fId: formDate.fId,
  2125. };
  2126. this.approVal = false;
  2127. } else if (this.$route.query.testing) {
  2128. console.log(this.$route.query.testing);
  2129. formDate = {
  2130. fId: JSON.parse(this.$route.query.testing).billId,
  2131. };
  2132. this.formList = formDate;
  2133. this.approvalTwo = true;
  2134. this.approVal = false;
  2135. this.cancelButton = false;
  2136. } else if (this.$route.query.DC) {
  2137. formDate = {
  2138. fMblno: JSON.parse(this.$route.query.DC).fMblno,
  2139. num: JSON.parse(this.$route.query.DC).num,
  2140. };
  2141. }
  2142. if (formDate) {
  2143. addmodify(formDate).then((response) => {
  2144. console.log(response);
  2145. if (response.code == 200) {
  2146. this.form = response.rows[0];
  2147. console.log(this.form);
  2148. if (this.form.fMblno == null) {
  2149. this.changeNum = false;
  2150. } else {
  2151. this.changeNum = true;
  2152. }
  2153. let data = {
  2154. actId: 460,
  2155. id: this.form.fId,
  2156. };
  2157. getName(data).then((response) => {
  2158. if (response.data.length != 0) {
  2159. this.before = response.data[0].userName;
  2160. }
  2161. });
  2162. queryUserVal().then((response) => {
  2163. this.current = response.user.userName;
  2164. if (formDate.num) {
  2165. if (this.form.moneyStatus >= 4) {
  2166. this.jumpDonot = true;
  2167. }
  2168. if (this.current == this.before) {
  2169. this.disappear = false;
  2170. }
  2171. } else {
  2172. this.jumpDonot = true;
  2173. this.disappear = true;
  2174. }
  2175. });
  2176. this.$set(this.form, "fPaymode", JSON.stringify(this.form.fPaymode));
  2177. this.$set(this.form, "fSign", JSON.stringify(this.form.fSign));
  2178. this.$set(
  2179. this.form,
  2180. "fDetentioncargo",
  2181. JSON.stringify(this.form.fDetentioncargo)
  2182. );
  2183. this.goodsList = response.rows[0].tWarehousebillsCntrList;
  2184. this.estimatedTime = response.rows[0].tVoyageL;
  2185. if (response.rows[0].tWarehousebillsCntritemsList !== null) {
  2186. this.dataList = response.rows[0].tWarehousebillsCntritemsList;
  2187. } else this.dataList = [];
  2188. this.loading = false;
  2189. if (response.rows[0].tWarehousebillsfeesDr) {
  2190. this.warehouseDrList = response.rows[0].tWarehousebillsfeesDr;
  2191. for (let item in this.warehouseDrList) {
  2192. this.$set(
  2193. this.warehouseDrList[item],
  2194. "fFeeUnitid",
  2195. JSON.stringify(this.warehouseDrList[item].fFeeunitid)
  2196. );
  2197. // this.$set(this.warehouseDrList[item], 'fCorpid', JSON.stringify(this.warehouseDrList[item].fCorpid))
  2198. }
  2199. }
  2200. if (response.rows[0].warehousebillsfeesCr) {
  2201. this.warehouseCrList = response.rows[0].warehousebillsfeesCr;
  2202. for (let item in this.warehouseCrList) {
  2203. this.$set(
  2204. this.warehouseCrList[item],
  2205. "fFeeUnitid",
  2206. JSON.stringify(this.warehouseCrList[item].fFeeunitid)
  2207. );
  2208. }
  2209. }
  2210. }
  2211. });
  2212. }
  2213. },
  2214. created() {
  2215. nameOfVessel().then((res) => {
  2216. this.vslidList = res.rows;
  2217. });
  2218. voyageNumber().then((res) => {
  2219. this.voyidList = res.rows;
  2220. });
  2221. getfLaneName().then((res) => {
  2222. this.fLaneList = res.rows;
  2223. });
  2224. portInquiry().then((res) => {
  2225. this.fMblnoOptions = res.rows;
  2226. });
  2227. this.getDicts("data_unitfees").then((response) => {
  2228. if (response.data) {
  2229. this.jFeetunitOptions = response.data;
  2230. }
  2231. });
  2232. this.getDicts("data_stltype_type").then((response) => {
  2233. if (response.data) {
  2234. this.fStltypeOptions = response.data;
  2235. }
  2236. });
  2237. this.getDicts("tax_rate").then((response) => {
  2238. if (response.data) {
  2239. this.fTaxrate = response.data[0].dictValue;
  2240. }
  2241. });
  2242. this.getDicts("f_packageid").then((response) => {
  2243. if (response.data) {
  2244. this.packgeOptions = response.data;
  2245. }
  2246. });
  2247. this.getDicts("data_billType").then((response) => {
  2248. if (response.data) {
  2249. this.businessTypeOptions = response.data;
  2250. }
  2251. });
  2252. this.getDicts("f_updateEF").then((response) => {
  2253. if (response.data) {
  2254. this.fStatus = response.data;
  2255. }
  2256. });
  2257. this.getDicts("f_serviceitems").then((response) => {
  2258. if (response.data) {
  2259. this.transport = response.data;
  2260. }
  2261. });
  2262. this.getDicts("f_serviceitemsNew").then((response) => {
  2263. this.fServiceitemsNews = response.data;
  2264. });
  2265. this.getDicts("f_paymode").then((response) => {
  2266. if (response.data) {
  2267. this.paymentMethod = response.data;
  2268. }
  2269. });
  2270. this.getDicts("f_invoceobj").then((response) => {
  2271. if (response.data) {
  2272. this.drawee = response.data;
  2273. }
  2274. });
  2275. this.getDicts("f_sign").then((response) => {
  2276. if (response.data) {
  2277. this.cEsign = response.data;
  2278. }
  2279. });
  2280. this.getDicts("f_detentioncargo").then((response) => {
  2281. if (response.data) {
  2282. this.etentioncargo = response.data;
  2283. }
  2284. });
  2285. this.getDicts("f_insurance").then((response) => {
  2286. if (response.data) {
  2287. this.insurance = response.data;
  2288. }
  2289. });
  2290. this.cntrtypeRemoteMethod();
  2291. this.goodRemoteMethod();
  2292. this.nameRemoteMethod();
  2293. this.fWRemoteMethod();
  2294. this.queryGoods();
  2295. let queryParams = { pageNum: 1, fDc: "C" };
  2296. listFees(queryParams).then((response) => {
  2297. this.fCNameOptions = response.rows;
  2298. });
  2299. let query = { pageNum: 1, fDc: "D" };
  2300. listFees(query).then((response) => {
  2301. this.fDNameOptions = response.rows;
  2302. });
  2303. },
  2304. filters: {
  2305. fServiceitemsNameFormat(row, transport) {
  2306. let name;
  2307. transport.map((e) => {
  2308. if (row == e.dictValue) {
  2309. name = e.dictLabel;
  2310. }
  2311. });
  2312. return name;
  2313. },
  2314. fVslidFormat(row, vslidList) {
  2315. let name;
  2316. vslidList.map((e) => {
  2317. if (row == e.fId) {
  2318. name = e.fName;
  2319. }
  2320. });
  2321. return name;
  2322. },
  2323. voyidNameFormat(row, voyidList) {
  2324. let name;
  2325. voyidList.map((e) => {
  2326. if (row == e.fId) {
  2327. name = e.fNo;
  2328. }
  2329. });
  2330. return name;
  2331. },
  2332. portFormat(row, fMblnoOptions) {
  2333. let name;
  2334. fMblnoOptions.map((e) => {
  2335. if (row == e.fId) {
  2336. name = e.fName;
  2337. }
  2338. });
  2339. return name;
  2340. },
  2341. goodsFormat(row, goodsOptions) {
  2342. let name;
  2343. goodsOptions.map((e) => {
  2344. if (row == e.fId) {
  2345. name = e.fName;
  2346. }
  2347. });
  2348. return name;
  2349. },
  2350. cntrFormat(row, cntrOptions) {
  2351. let name;
  2352. cntrOptions.map((e) => {
  2353. if (row == e.fId) {
  2354. name = e.fNo;
  2355. }
  2356. });
  2357. return name;
  2358. },
  2359. },
  2360. methods: {
  2361. rejectDeletion() {
  2362. this.$confirm("驳回并删除, 是否继续?", "提示", {
  2363. confirmButtonText: "确定",
  2364. cancelButtonText: "取消",
  2365. type: "warning",
  2366. })
  2367. .then(() => {
  2368. reject(this.form.fId).then((res) => {
  2369. if (res.code === 200) {
  2370. this.$message({
  2371. type: "success",
  2372. message: "删除成功!",
  2373. });
  2374. this.cancelTwo();
  2375. }
  2376. });
  2377. })
  2378. .catch(() => {
  2379. this.$message({
  2380. type: "info",
  2381. message: "已取消",
  2382. });
  2383. });
  2384. },
  2385. seleEt(scope) {
  2386. console.log(scope);
  2387. for (let item in this.cntrOptions) {
  2388. if (this.cntrOptions[item].fId === scope.row.fCntrid) {
  2389. if (this.cntrOptions[item].fType === 2) {
  2390. this.whether = true;
  2391. return;
  2392. } else {
  2393. this.whether = false;
  2394. return;
  2395. }
  2396. }
  2397. }
  2398. },
  2399. throttleOpening(res) {
  2400. if (res <= 100) {
  2401. } else {
  2402. this.list.fDraught = "";
  2403. this.$message({
  2404. showClose: true,
  2405. message: "不能大于100%或小于0%",
  2406. type: "error",
  2407. offset: 90,
  2408. });
  2409. }
  2410. },
  2411. temperature(res) {
  2412. if (res < 20 && res > -30) {
  2413. } else if (res == "-") {
  2414. } else {
  2415. this.list.fTemperature = "";
  2416. this.$message({
  2417. showClose: true,
  2418. message: "冷藏箱温度为-30℃至20℃之间的整数",
  2419. type: "error",
  2420. offset: 90,
  2421. });
  2422. }
  2423. },
  2424. selectChange(scope) {
  2425. for (let item in this.goods) {
  2426. if (this.goods[item].fId === scope.row.fGoodsid) {
  2427. scope.row.typeidName = this.goods[item].typeName;
  2428. }
  2429. }
  2430. },
  2431. queryGoods() {
  2432. getGoodName().then((res) => {
  2433. if (res.code == 200) {
  2434. this.goods = res.data;
  2435. }
  2436. });
  2437. },
  2438. homePage() {
  2439. this.open = false;
  2440. let view = {
  2441. fullPath: "/finance/contrast",
  2442. hash: "",
  2443. matched: Array(2),
  2444. meta: Object,
  2445. name: "Contrast",
  2446. params: Object,
  2447. path: "/finance/contrast",
  2448. query: Object,
  2449. title: "对账",
  2450. };
  2451. this.$router.push({ path: "/index" });
  2452. this.$store
  2453. .dispatch("tagsView/delView", view)
  2454. .then(({ visitedViews }) => {
  2455. if (this.isActive(view)) {
  2456. this.toLastView(visitedViews, view);
  2457. }
  2458. });
  2459. Global.$emit("removeCache", "closeSelectedTag", view);
  2460. },
  2461. cancel() {
  2462. if (
  2463. this.form.moneyStatus === 4 ||
  2464. this.form.fBillstatus === 4 ||
  2465. this.form.fBillstatus === 9 ||
  2466. this.modify == true
  2467. ) {
  2468. if (this.$route.query.DC) {
  2469. if (JSON.parse(this.$route.query.DC).type == "D") {
  2470. this.$router.push({ path: "/analysis/generalLedgerDr" });
  2471. } else {
  2472. this.$router.push({ path: "/analysis/generalLedgerCr" });
  2473. }
  2474. } else {
  2475. this.$router.push({ path: "/domesticTrade/myOrder" });
  2476. }
  2477. } else {
  2478. this.$confirm("返回列表,是否保存?", "提示", {
  2479. confirmButtonText: "保存",
  2480. cancelButtonText: "取消",
  2481. type: "warning",
  2482. })
  2483. .then(() => {
  2484. this.approval();
  2485. })
  2486. .catch(() => {
  2487. if (this.$route.query.DC) {
  2488. if (JSON.parse(this.$route.query.DC).type == "D") {
  2489. this.$router.push({ path: "/analysis/generalLedgerDr" });
  2490. } else {
  2491. this.$router.push({ path: "/analysis/generalLedgerCr" });
  2492. }
  2493. } else {
  2494. this.$router.push({ path: "/domesticTrade/myOrder" });
  2495. }
  2496. this.modify = true;
  2497. });
  2498. }
  2499. },
  2500. //撤销审批
  2501. revokeTwo(status) {
  2502. let data = {
  2503. actId: 460,
  2504. billId: this.form.fId,
  2505. id: this.form.fId,
  2506. fidStatus: status,
  2507. };
  2508. revokeTwo(data).then((data) => {
  2509. if (data.code === 200) {
  2510. this.msgSuccess("撤销成功");
  2511. this.jumpDonot = false;
  2512. if (this.formList) {
  2513. addmodify(this.formList).then((response) => {
  2514. this.form = response.rows[0];
  2515. let data = {
  2516. actId: 460,
  2517. id: this.form.fId,
  2518. };
  2519. getName(data).then((response) => {
  2520. if (response.data.length != 0) {
  2521. this.before = response.data[0].userName;
  2522. }
  2523. });
  2524. queryUserVal().then((response) => {
  2525. this.current = response.user.userName;
  2526. });
  2527. this.goodsList = response.rows[0].tWarehousebillsCntrList;
  2528. this.estimatedTime = response.rows[0].tVoyageL;
  2529. if (response.rows[0].tWarehousebillsCntritemsList !== null) {
  2530. this.dataList = response.rows[0].tWarehousebillsCntritemsList;
  2531. } else this.dataList = [];
  2532. this.loading = false;
  2533. if (response.rows[0].tWarehousebillsfeesDr) {
  2534. this.warehouseDrList = response.rows[0].tWarehousebillsfeesDr;
  2535. for (let item in this.warehouseDrList) {
  2536. this.$set(
  2537. this.warehouseDrList[item],
  2538. "fFeeUnitid",
  2539. JSON.stringify(this.warehouseDrList[item].fFeeunitid)
  2540. );
  2541. }
  2542. }
  2543. if (response.rows[0].warehousebillsfeesCr) {
  2544. this.warehouseCrList = response.rows[0].warehousebillsfeesCr;
  2545. for (let item in this.warehouseCrList) {
  2546. this.$set(
  2547. this.warehouseCrList[item],
  2548. "fFeeUnitid",
  2549. JSON.stringify(this.warehouseCrList[item].fFeeunitid)
  2550. );
  2551. }
  2552. }
  2553. // if(this.current == this.before)
  2554. // this.disappear = false;
  2555. });
  2556. }
  2557. this.reset();
  2558. }
  2559. });
  2560. },
  2561. //费用提交审核
  2562. feeSubmission() {
  2563. if (!this.warehouseDrList && !this.warehouseCrList) {
  2564. this.$message.error("请维护费用");
  2565. return false;
  2566. }
  2567. if (this.warehouseDrList) {
  2568. for (let li in this.warehouseDrList) {
  2569. if (!this.warehouseDrList[li].fBusinessType) {
  2570. this.$message.error(
  2571. "应收费用第" + (Number(li) + 1) + "行业务类型为空,请维护业务类型"
  2572. );
  2573. return false;
  2574. } else if (!this.warehouseDrList[li].fCorpid) {
  2575. this.$message.error(
  2576. "应收费用第" + (Number(li) + 1) + "行客户名称为空,请维护客户名称"
  2577. );
  2578. return false;
  2579. } else if (!this.warehouseDrList[li].fFeeid) {
  2580. this.$message.error(
  2581. "应收费用第" + (Number(li) + 1) + "行费用名称为空,请维护费用名称"
  2582. );
  2583. return false;
  2584. } else if (!this.warehouseDrList[li].fQty) {
  2585. this.$message.error(
  2586. "应收费用第" + (Number(li) + 1) + "行数量为空,请维护数量"
  2587. );
  2588. return false;
  2589. } else if (
  2590. this.warehouseDrList[li].fUnitprice === "" ||
  2591. this.warehouseDrList[li].fUnitprice == undefined
  2592. ) {
  2593. this.$message.error(
  2594. "应收费用第" + (Number(li) + 1) + "行单价为空,请维护单价"
  2595. );
  2596. return false;
  2597. }
  2598. }
  2599. }
  2600. if (this.warehouseCrList) {
  2601. // console.log(this.warehouseCrList[1].fCorpid);
  2602. for (let li in this.warehouseCrList) {
  2603. if (!this.warehouseCrList[li].fBusinessType) {
  2604. this.$message.error(
  2605. "应付费用第" + (Number(li) + 1) + "行业务类型为空,请维护业务类型"
  2606. );
  2607. return false;
  2608. } else if (!this.warehouseCrList[li].fCorpid) {
  2609. this.$message.error(
  2610. "应付费用第" + (Number(li) + 1) + "行客户名称为空,请维护客户名称"
  2611. );
  2612. return false;
  2613. } else if (!this.warehouseCrList[li].fFeeid) {
  2614. this.$message.error(
  2615. "应付费用第" + (Number(li) + 1) + "行费用名称为空,请维护费用名称"
  2616. );
  2617. return false;
  2618. } else if (!this.warehouseCrList[li].fQty) {
  2619. this.$message.error(
  2620. "应付费用第" + (Number(li) + 1) + "行数量为空,请维护数量"
  2621. );
  2622. return false;
  2623. } else if (
  2624. this.warehouseCrList[li].fUnitprice === "" ||
  2625. this.warehouseCrList[li].fUnitprice == undefined
  2626. ) {
  2627. this.$message.error(
  2628. "应付费用第" + (Number(li) + 1) + "行单价为空,请维护单价"
  2629. );
  2630. return false;
  2631. }
  2632. }
  2633. }
  2634. let form = {
  2635. fId: this.form.fId,
  2636. fMblno: this.form.fMblno,
  2637. };
  2638. let formData = new window.FormData();
  2639. for (let li in this.warehouseDrList) {
  2640. this.warehouseDrList[li].fMblno = this.form.fMblno;
  2641. for (let item in this.nameOptions) {
  2642. if (
  2643. this.warehouseDrList[li].fCorpid == this.nameOptions[item].fName
  2644. ) {
  2645. this.warehouseDrList[li].fCorpid = this.nameOptions[item].fId;
  2646. }
  2647. }
  2648. }
  2649. for (let li in this.warehouseCrList) {
  2650. this.warehouseCrList[li].fMblno = this.form.fMblno;
  2651. }
  2652. formData.append("tWarehousebills", JSON.stringify(form));
  2653. formData.append(
  2654. "tWarehousebillsCntritems",
  2655. JSON.stringify(this.dataList)
  2656. );
  2657. formData.append(
  2658. "tWarehousebillsfeesDr",
  2659. JSON.stringify(this.warehouseDrList)
  2660. );
  2661. formData.append(
  2662. "tWarehousebillsfeesCr",
  2663. JSON.stringify(this.warehouseCrList)
  2664. );
  2665. this.auditLoading=true
  2666. getfee(formData).then((response) => {
  2667. this.$message.success("操作成功");
  2668. this.form.moneyStatus = 4;
  2669. this.jumpDonot = true;
  2670. this.modify = true;
  2671. let data = {
  2672. actId: 460,
  2673. id: this.form.fId,
  2674. };
  2675. getName(data).then((response) => {
  2676. if (response.data.length != 0) {
  2677. this.before = response.data[0].userName;
  2678. if (this.current == this.before) {
  2679. this.disappear = false;
  2680. }
  2681. }
  2682. });
  2683. })
  2684. .finally(() => {
  2685. this.auditLoading= false;
  2686. });
  2687. },
  2688. //箱信息操作限制
  2689. cntrWeight(res) {
  2690. if (res < 40 && res > 0) {
  2691. return;
  2692. } else if (res == "" || res == null) {
  2693. } else {
  2694. this.$message({
  2695. showClose: true,
  2696. message: "单箱重量应在0-40吨之间",
  2697. type: "error",
  2698. offset: 90,
  2699. });
  2700. }
  2701. },
  2702. //获取客户名称下拉
  2703. nameRemoteMethod() {
  2704. let queryParams = { pageNum: 1 };
  2705. getFName(queryParams).then((response) => {
  2706. this.nameOptions = response.data;
  2707. });
  2708. },
  2709. //货名下拉
  2710. goodRemoteMethod() {
  2711. let queryParams = { pageNum: 1 };
  2712. getGoodName(queryParams).then((response) => {
  2713. this.goodsOptions = response.data;
  2714. });
  2715. },
  2716. //箱型下拉获取
  2717. cntrtypeRemoteMethod() {
  2718. let queryParams = { pageNum: 1 };
  2719. getCntr(queryParams).then((response) => {
  2720. this.cntrOptions = response.rows;
  2721. });
  2722. },
  2723. //计价单位
  2724. // corpsRemoteMethod(name) {
  2725. // if (name == null || name === "") {
  2726. // return false;
  2727. // }
  2728. // let queryParams = { pageNum: 1, fName: name, type: 1 };
  2729. // listCorps(queryParams).then((response) => {
  2730. // this.fMblnoOptions = response.rows;
  2731. // this.KHblnoOptions = response.rows;
  2732. // });
  2733. // },
  2734. //应付信息新行
  2735. addpayment() {
  2736. this.warehouseCrList.push({
  2737. fBusinessType: null,
  2738. fCorpid: null,
  2739. fFeeid: null,
  2740. fFeeUnitid: "7",
  2741. fQty: null,
  2742. fUnitprice: null,
  2743. fAmount: null,
  2744. fStltypeid: null,
  2745. fCurrency: "RMB",
  2746. fExrate: "1",
  2747. fTaxrate: this.fTaxrate,
  2748. fSrcTypeId: 0,
  2749. remark: null,
  2750. });
  2751. },
  2752. // 数量计算
  2753. changeContractAmt(row) {
  2754. let fQty = 0;
  2755. let fUnitprice = 0;
  2756. if (row.fUnitprice) {
  2757. fUnitprice = row.fUnitprice;
  2758. }
  2759. if (row.fQty) {
  2760. fQty = row.fQty;
  2761. }
  2762. this.$set(
  2763. row,
  2764. "fAmount",
  2765. parseFloat(Number(fUnitprice) * Number(fQty)).toFixed(2)
  2766. );
  2767. },
  2768. // 变更计价单位
  2769. changeFeeUnit(row) {
  2770. if (!row.fFeeUnitid) {
  2771. return false;
  2772. }
  2773. // if (row.fFeeUnitid === "2") {
  2774. // this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
  2775. // } else if (row.fFeeUnitid === "1") {
  2776. // this.$set(row, "fQty", this.fQty);
  2777. // } else if (row.fFeeUnitid === "3") {
  2778. // this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
  2779. // } else if (row.fFeeUnitid === "7") {
  2780. // this.$set(row, "fQty", this.fCntqty);
  2781. // } else {
  2782. // this.$set(row, "fQty", 0);
  2783. // }
  2784. if (row.fUnitprice) {
  2785. this.$set(
  2786. row,
  2787. "fAmount",
  2788. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  2789. );
  2790. }
  2791. },
  2792. // 选择费用信息时获取计价单位
  2793. // changeFeeId(row) {
  2794. // for (let li in this.fWbuOptions) {
  2795. // if (row.fFeeid === this.fWbuOptions[li].fId) {
  2796. // this.$set(row, "fFeeUnitid", this.fWbuOptions[li].fFeeunitid + "");
  2797. // this.changeFeeUnit(row);
  2798. // break;
  2799. // }
  2800. // }
  2801. // },
  2802. // 远程模糊查询费用名称
  2803. fWRemoteMethod(name) {
  2804. if (name == null || name === "") {
  2805. return false;
  2806. }
  2807. let queryParams = { pageNum: 1, fDc: "C", fName: name };
  2808. listFees(queryParams).then((response) => {
  2809. this.fCNameOptions = response.rows;
  2810. });
  2811. let query = { pageNum: 1, fDc: "D", fName: name };
  2812. listFees(query).then((response) => {
  2813. this.fDNameOptions = response.rows;
  2814. });
  2815. },
  2816. // 收款合计
  2817. warehouseDrSummaries(param) {
  2818. const { columns, data } = param;
  2819. const sums = [];
  2820. columns.forEach((column, index) => {
  2821. if (index === 0) {
  2822. sums[index] = "合计";
  2823. return;
  2824. } else if (
  2825. column.label == "单价" ||
  2826. column.label == "数量" ||
  2827. column.label == "金额"
  2828. ) {
  2829. const values = data.map((item) => Number(item[column.property]));
  2830. if (!values.every((value) => isNaN(value))) {
  2831. sums[index] = values.reduce((prev, curr) => {
  2832. const value = Number(curr);
  2833. if (!isNaN(value)) {
  2834. return prev + curr;
  2835. } else {
  2836. return prev;
  2837. }
  2838. }, 0);
  2839. }
  2840. }
  2841. });
  2842. this.amountDr = sums[8];
  2843. return sums;
  2844. },
  2845. //付款合计
  2846. warehouseCrSummaries(param) {
  2847. const { columns, data } = param;
  2848. const sums = [];
  2849. columns.forEach((column, index) => {
  2850. if (index === 0) {
  2851. sums[index] = "合计";
  2852. return;
  2853. } else if (
  2854. column.label == "单价" ||
  2855. column.label == "数量" ||
  2856. column.label == "金额"
  2857. ) {
  2858. const values = data.map((item) => Number(item[column.property]));
  2859. if (!values.every((value) => isNaN(value))) {
  2860. sums[index] = values.reduce((prev, curr) => {
  2861. const value = Number(curr);
  2862. if (!isNaN(value)) {
  2863. return prev + curr;
  2864. } else {
  2865. return prev;
  2866. }
  2867. }, 0);
  2868. }
  2869. }
  2870. });
  2871. this.amountCr = sums[8];
  2872. return sums;
  2873. },
  2874. addOrUpdateHand(form, status) {
  2875. // if(form.fMblno == null){
  2876. // this.addOrUpdateVisib = false;
  2877. // this.$message.error("提单号为空,请维护提单号")
  2878. // return false
  2879. // }else{
  2880. // this.addOrUpdateVisib = true;
  2881. // }
  2882. this.$refs["form"].validate((valid) => {
  2883. if (valid) {
  2884. this.addOrUpdateVisib = true;
  2885. this.$nextTick(() => {
  2886. // let actId = ''
  2887. // if (this.form.fBillstatus < 6) {
  2888. // actId = '410'
  2889. // this.$refs.ApprovalComments.init(form.fId,status,actId,this.form.fMblno)
  2890. // } else if(this.form.fBillstatus > 6 && this.form.fBillstatus <= 11 && this.form.moneyStatus < 4){
  2891. // actId = '420'
  2892. // this.$refs.ApprovalComments.init(form.fId, status,actId)
  2893. // }else if (this.form.fBillstatus == 11 && this.form.moneyStatus >= 4 && this.form.moneyStatus < 6) {
  2894. // actId = '460'
  2895. // this.$refs.ApprovalComments.init(form.fId,status,actId)
  2896. // }
  2897. if (this.actId == "410") {
  2898. this.$refs.ApprovalComments.init(
  2899. form.fId,
  2900. status,
  2901. this.actId,
  2902. this.form.fMblno
  2903. );
  2904. } else if (this.actId == "474") {
  2905. this.$refs.ApprovalComments.init(
  2906. form.fId,
  2907. "f_dismount_status",
  2908. this.actId
  2909. );
  2910. } else {
  2911. this.$refs.ApprovalComments.init(form.fId, status, this.actId);
  2912. }
  2913. });
  2914. } else {
  2915. this.$message.error("提单号为空,请维护提单号");
  2916. }
  2917. });
  2918. },
  2919. modifyApproval() {
  2920. this.addOrUpdateVisib = true;
  2921. let list = JSON.parse(this.$route.query.testing);
  2922. this.$nextTick(() => {
  2923. let actId = "";
  2924. console.log(list);
  2925. this.addOrUpdateVisible = true;
  2926. if (list.refno4 == "XGDD") {
  2927. actId = 471;
  2928. } else if (list.refno4 == "XGTJ") {
  2929. actId = 472;
  2930. } else if (list.refno4 == "DDSC") {
  2931. actId = 473;
  2932. }
  2933. this.$refs.ApprovalComments.init(
  2934. this.form.fId,
  2935. status,
  2936. actId,
  2937. this.form.fMblno
  2938. );
  2939. });
  2940. },
  2941. //首页审批跳转关闭返回首页
  2942. cancelTwo() {
  2943. this.open = false;
  2944. let view = {
  2945. fullPath: "/domesticTrade/orderInformation?data=%7B%22fId%22%3A687%7D",
  2946. hash: "",
  2947. matched: Array(2),
  2948. meta: Object,
  2949. name: "OrderInformation",
  2950. params: Object,
  2951. path: "/domesticTrade/orderInformation",
  2952. query: Object,
  2953. title: "订单信息",
  2954. };
  2955. this.$router.push({ path: "/index" });
  2956. this.$store
  2957. .dispatch("tagsView/delView", view)
  2958. .then(({ visitedViews }) => {
  2959. if (this.isActive(view)) {
  2960. this.toLastView(visitedViews, view);
  2961. }
  2962. });
  2963. Global.$emit("removeCache", "closeSelectedTag", view);
  2964. },
  2965. // 查看审批流
  2966. getDataList() {
  2967. this.addOrUpdateVisible = false;
  2968. },
  2969. returnData() {
  2970. this.addOrUpdateVisib = false;
  2971. this.open = false;
  2972. this.cancelTwo();
  2973. },
  2974. revisionApproval() {
  2975. let list = JSON.parse(this.$route.query.testing);
  2976. let actId = "";
  2977. this.addOrUpdateVisible = true;
  2978. if (list.refno4 == "XGDD") {
  2979. actId = 471;
  2980. } else if (list.refno4 == "XGTJ") {
  2981. actId = 472;
  2982. } else if (list.refno4 == "DDSC") {
  2983. actId = 473;
  2984. }
  2985. this.$nextTick(() => {
  2986. this.$refs.addOrUpdate.init(this.form.fId, actId, list.fidStatus);
  2987. });
  2988. },
  2989. addOrUpdateHandle(status) {
  2990. this.addOrUpdateVisible = true;
  2991. let id = "448";
  2992. let actId = "";
  2993. if (!this.actId) {
  2994. if (this.form.fBillstatus < 6) {
  2995. actId = "410";
  2996. } else if (this.form.moneyStatus != null && this.form.moneyStatus < 6) {
  2997. actId = "460";
  2998. } else {
  2999. actId = "420";
  3000. }
  3001. } else {
  3002. actId = this.actId;
  3003. }
  3004. if (this.actId == "474") status = "f_dismount_status";
  3005. this.$nextTick(() => {
  3006. this.$refs.addOrUpdate.init(this.form.fId, actId, status);
  3007. });
  3008. },
  3009. handleSelect(type) {
  3010. this.$refs.feeDialog.init(type);
  3011. },
  3012. importFee(list, type) {
  3013. if (type == "收费") {
  3014. console.log(list);
  3015. list.forEach((e) => {
  3016. this.warehouseDrList.push({
  3017. fBusinessType:"3",
  3018. fCorpid: this.form.corpName,
  3019. fFeeid: e.fFeeId,
  3020. fFeeUnitid: e.fFeeunitId + "",
  3021. fQty:
  3022. this.goodsList && this.goodsList.length > 0
  3023. ? this.goodsList[0].fCntrcount
  3024. : 0,
  3025. fUnitprice: e.fPrice,
  3026. fAmount:
  3027. e.fPrice *
  3028. (this.goodsList && this.goodsList.length > 0
  3029. ? this.goodsList[0].fCntrcount
  3030. : 0),
  3031. fStltypeid:1,
  3032. fCurrency: "RMB",
  3033. fExrate: "1",
  3034. fTaxrate: this.fTaxrate,
  3035. fSrcTypeId: 0,
  3036. remark: null,
  3037. });
  3038. });
  3039. } else {
  3040. list.forEach((e) => {
  3041. this.warehouseCrList.push({
  3042. fBusinessType:"3",
  3043. fCorpid: null,
  3044. fFeeid: e.fFeeId,
  3045. fFeeUnitid: e.fFeeunitId + "",
  3046. fQty:
  3047. this.goodsList && this.goodsList.length > 0
  3048. ? this.goodsList[0].fCntrcount
  3049. : 0,
  3050. fUnitprice: e.fPrice,
  3051. fAmount:
  3052. e.fPrice *
  3053. (this.goodsList && this.goodsList.length > 0
  3054. ? this.goodsList[0].fCntrcount
  3055. : 0),
  3056. fStltypeid:1,
  3057. fCurrency: "RMB",
  3058. fExrate: "1",
  3059. fTaxrate: this.fTaxrate,
  3060. fSrcTypeId: 0,
  3061. remark: null,
  3062. });
  3063. });
  3064. }
  3065. console.log(list);
  3066. },
  3067. //应收新行
  3068. addCollection() {
  3069. this.warehouseDrList.push({
  3070. fBusinessType: null,
  3071. fCorpid: this.form.corpName,
  3072. fFeeid: null,
  3073. fFeeUnitid: "7",
  3074. fQty: null,
  3075. fUnitprice: null,
  3076. fAmount: null,
  3077. fStltypeid: null,
  3078. fCurrency: "RMB",
  3079. fExrate: "1",
  3080. fTaxrate: this.fTaxrate,
  3081. fSrcTypeId: 0,
  3082. remark: null,
  3083. });
  3084. },
  3085. //撤销审核
  3086. revokeSubmission() {
  3087. if (!this.warehouseDrList && !this.warehouseCrList) {
  3088. this.$message.error("请维护费用");
  3089. return false;
  3090. }
  3091. if (this.warehouseDrList) {
  3092. for (let li in this.warehouseDrList) {
  3093. if (!this.warehouseDrList[li].fBusinessType) {
  3094. this.$message.error(
  3095. "应收费用第" + (Number(li) + 1) + "行业务类型为空,请维护业务类型"
  3096. );
  3097. return false;
  3098. } else if (!this.warehouseDrList[li].fCorpid) {
  3099. this.$message.error(
  3100. "应收费用第" + (Number(li) + 1) + "行客户名称为空,请维护客户名称"
  3101. );
  3102. return false;
  3103. } else if (!this.warehouseDrList[li].fFeeid) {
  3104. this.$message.error(
  3105. "应收费用第" + (Number(li) + 1) + "行费用名称为空,请维护费用名称"
  3106. );
  3107. return false;
  3108. } else if (!this.warehouseDrList[li].fQty) {
  3109. this.$message.error(
  3110. "应收费用第" + (Number(li) + 1) + "行数量为空,请维护数量"
  3111. );
  3112. return false;
  3113. } else if (
  3114. this.warehouseDrList[li].fUnitprice === "" ||
  3115. this.warehouseDrList[li].fUnitprice == undefined
  3116. ) {
  3117. this.$message.error(
  3118. "应收费用第" + (Number(li) + 1) + "行单价为空,请维护单价"
  3119. );
  3120. return false;
  3121. }
  3122. }
  3123. }
  3124. if (this.warehouseCrList) {
  3125. // console.log(this.warehouseCrList[1].fCorpid);
  3126. for (let li in this.warehouseCrList) {
  3127. if (!this.warehouseCrList[li].fBusinessType) {
  3128. this.$message.error(
  3129. "应付费用第" + (Number(li) + 1) + "行业务类型为空,请维护业务类型"
  3130. );
  3131. return false;
  3132. } else if (!this.warehouseCrList[li].fCorpid) {
  3133. this.$message.error(
  3134. "应付费用第" + (Number(li) + 1) + "行客户名称为空,请维护客户名称"
  3135. );
  3136. return false;
  3137. } else if (!this.warehouseCrList[li].fFeeid) {
  3138. this.$message.error(
  3139. "应付费用第" + (Number(li) + 1) + "行费用名称为空,请维护费用名称"
  3140. );
  3141. return false;
  3142. } else if (!this.warehouseCrList[li].fQty) {
  3143. this.$message.error(
  3144. "应付费用第" + (Number(li) + 1) + "行数量为空,请维护数量"
  3145. );
  3146. return false;
  3147. } else if (
  3148. this.warehouseCrList[li].fUnitprice === "" ||
  3149. this.warehouseCrList[li].fUnitprice == undefined
  3150. ) {
  3151. this.$message.error(
  3152. "应付费用第" + (Number(li) + 1) + "行单价为空,请维护单价"
  3153. );
  3154. return false;
  3155. }
  3156. }
  3157. }
  3158. let form = {
  3159. fId: this.form.fId,
  3160. fMblno: this.form.fMblno,
  3161. };
  3162. let formData = new window.FormData();
  3163. for (let li in this.warehouseDrList) {
  3164. this.warehouseDrList[li].fMblno = this.form.fMblno;
  3165. for (let item in this.nameOptions) {
  3166. if (
  3167. this.warehouseDrList[li].fCorpid == this.nameOptions[item].fName
  3168. ) {
  3169. this.warehouseDrList[li].fCorpid = this.nameOptions[item].fId;
  3170. }
  3171. }
  3172. }
  3173. for (let li in this.warehouseCrList) {
  3174. this.warehouseCrList[li].fMblno = this.form.fMblno;
  3175. }
  3176. formData.append("tWarehousebills", JSON.stringify(form));
  3177. formData.append(
  3178. "tWarehousebillsCntritems",
  3179. JSON.stringify(this.dataList)
  3180. );
  3181. formData.append(
  3182. "tWarehousebillsfeesDr",
  3183. JSON.stringify(this.warehouseDrList)
  3184. );
  3185. formData.append(
  3186. "tWarehousebillsfeesCr",
  3187. JSON.stringify(this.warehouseCrList)
  3188. );
  3189. this.auditLoading=true
  3190. cancellationFees(formData).then((response) => {
  3191. this.$message.success("操作成功");
  3192. this.form.moneyStatus = 4;
  3193. this.jumpDonot = false;
  3194. this.modify = true;
  3195. let data = {
  3196. actId: 460,
  3197. id: this.form.fId,
  3198. };
  3199. getName(data).then((response) => {
  3200. if (response.data.length != 0) {
  3201. this.before = response.data[0].userName;
  3202. if (this.current == this.before) {
  3203. this.disappear = false;
  3204. }
  3205. }
  3206. });
  3207. if (response.data.tWarehouseBills) {
  3208. this.form = response.data.tWarehouseBills;
  3209. this.$set(this.form, "fPaymode", JSON.stringify(this.form.fPaymode));
  3210. this.$set(this.form, "fSign", JSON.stringify(this.form.fSign));
  3211. this.$set(
  3212. this.form,
  3213. "fDetentioncargo",
  3214. JSON.stringify(this.form.fDetentioncargo)
  3215. );
  3216. }
  3217. if (response.data.tWarehousebillsCntrList) {
  3218. this.goodsList = response.data.tWarehousebillsCntrList;
  3219. }
  3220. if (response.data.tWarehousebillsCntritemsList !== null) {
  3221. this.dataList = response.data.tWarehousebillsCntritemsList;
  3222. } else this.dataList = [];
  3223. if (response.data.warehousebillsfeesCrList) {
  3224. this.warehouseCrList = response.data.warehousebillsfeesCrList;
  3225. for (let item in this.warehouseCrList) {
  3226. this.$set(
  3227. this.warehouseCrList[item],
  3228. "fFeeUnitid",
  3229. JSON.stringify(this.warehouseCrList[item].fFeeunitid)
  3230. );
  3231. }
  3232. }
  3233. if (response.data.warehousebillsfeesDrList) {
  3234. this.warehouseDrList = response.data.warehousebillsfeesDrList;
  3235. for (let item in this.warehouseDrList) {
  3236. this.$set(
  3237. this.warehouseDrList[item],
  3238. "fFeeUnitid",
  3239. JSON.stringify(this.warehouseDrList[item].fFeeunitid)
  3240. );
  3241. }
  3242. }
  3243. })
  3244. .finally(() => {
  3245. this.auditLoading= false;
  3246. });
  3247. },
  3248. //提交审批
  3249. approval(res) {
  3250. if (!this.form.fMblno) {
  3251. this.$message.error("请维护提单号");
  3252. return false;
  3253. }
  3254. // if (this.dataList.length === 0) {
  3255. // this.$message.error('请维护箱信息')
  3256. // return false
  3257. // }
  3258. if (
  3259. (res != 1 && this.form.fMblno) ||
  3260. (res != 1 && this.dataList.length != 0)
  3261. ) {
  3262. this.$router.push({ path: "/domesticTrade/myOrder" });
  3263. this.modify = true;
  3264. }
  3265. let form = {
  3266. fId: this.form.fId,
  3267. fMblno: this.form.fMblno,
  3268. };
  3269. let formData = new window.FormData();
  3270. for (let li in this.warehouseDrList) {
  3271. this.warehouseDrList[li].fMblno = this.form.fMblno;
  3272. for (let item in this.nameOptions) {
  3273. if (
  3274. this.warehouseDrList[li].fCorpid == this.nameOptions[item].fName
  3275. ) {
  3276. this.warehouseDrList[li].fCorpid = this.nameOptions[item].fId;
  3277. }
  3278. }
  3279. }
  3280. for (let item in this.warehouseCrList) {
  3281. this.warehouseCrList[item].fMblno = this.form.fMblno;
  3282. }
  3283. formData.append("tWarehousebills", JSON.stringify(this.form));
  3284. formData.append("tWarehousebillsCntr", JSON.stringify(this.goodsList));
  3285. formData.append(
  3286. "tWarehousebillsCntritems",
  3287. JSON.stringify(this.dataList)
  3288. );
  3289. formData.append(
  3290. "tWarehousebillsfeesDr",
  3291. JSON.stringify(this.warehouseDrList)
  3292. );
  3293. formData.append(
  3294. "tWarehousebillsfeesCr",
  3295. JSON.stringify(this.warehouseCrList)
  3296. );
  3297. postApproval(formData).then((response) => {
  3298. this.msgSuccess("操作成功");
  3299. if (response.data.tWarehouseBills) {
  3300. this.form = response.data.tWarehouseBills;
  3301. this.$set(this.form, "fPaymode", JSON.stringify(this.form.fPaymode));
  3302. this.$set(this.form, "fSign", JSON.stringify(this.form.fSign));
  3303. this.$set(
  3304. this.form,
  3305. "fDetentioncargo",
  3306. JSON.stringify(this.form.fDetentioncargo)
  3307. );
  3308. }
  3309. if (response.data.tWarehousebillsCntrList) {
  3310. this.goodsList = response.data.tWarehousebillsCntrList;
  3311. }
  3312. if (response.data.tWarehousebillsCntritemsList !== null) {
  3313. this.dataList = response.data.tWarehousebillsCntritemsList;
  3314. } else this.dataList = [];
  3315. if (response.data.warehousebillsfeesCrList) {
  3316. this.warehouseCrList = response.data.warehousebillsfeesCrList;
  3317. for (let item in this.warehouseCrList) {
  3318. this.$set(
  3319. this.warehouseCrList[item],
  3320. "fFeeUnitid",
  3321. JSON.stringify(this.warehouseCrList[item].fFeeunitid)
  3322. );
  3323. }
  3324. }
  3325. if (response.data.warehousebillsfeesDrList) {
  3326. this.warehouseDrList = response.data.warehousebillsfeesDrList;
  3327. for (let item in this.warehouseDrList) {
  3328. this.$set(
  3329. this.warehouseDrList[item],
  3330. "fFeeUnitid",
  3331. JSON.stringify(this.warehouseDrList[item].fFeeunitid)
  3332. );
  3333. }
  3334. }
  3335. });
  3336. },
  3337. //新行
  3338. addList() {
  3339. this.dataList.push({
  3340. fManual: "1",
  3341. fCntrno: null,
  3342. fSealno: null,
  3343. fCntrweight: null,
  3344. fGoodsid: null,
  3345. fPackageid: null,
  3346. fCntrid: null,
  3347. });
  3348. },
  3349. //查看附件
  3350. check(status) {
  3351. this.dialogVisible = true;
  3352. if (status === 1) {
  3353. } else {
  3354. }
  3355. },
  3356. saveFile() {
  3357. this.row.accessoryList = this.file;
  3358. this.dialogVisible = false;
  3359. this.relevantAttachments = [];
  3360. },
  3361. deleteRow(index, rows) {
  3362. rows.splice(index, 1);
  3363. },
  3364. //多选框选中
  3365. handleSelectionChange(selection) {
  3366. this.ids = selection.map((item) => item.fId);
  3367. this.select = selection;
  3368. },
  3369. dialogPrint() {
  3370. // for (let item in this.transport) {
  3371. // if (this.transport[item].dictValue == this.form.fServiceitems) {
  3372. // this.$set(this.form, 'fServiceitemsName', this.transport[item].dictLabel);
  3373. // }
  3374. // }
  3375. // this.fMblnoOptions.forEach(item => {
  3376. // if (item.fId == this.form.fLoadportid) {
  3377. // this.$set(this.form, 'fLoadportidName', item.fName);
  3378. // }
  3379. // if (item.fId == this.form.fDestportid) {
  3380. // this.$set(this.form, 'fDestportidName', item.fName);
  3381. // }
  3382. // });
  3383. // this.tableData.forEach(term => {
  3384. // this.goods.forEach(item => {
  3385. // if (item.fId == term.fGoodsid) {
  3386. // term.fGoodsid = item.fName;
  3387. // }
  3388. // });
  3389. // this.container.forEach(item => {
  3390. // if (item.fId == term.fCntrid) {
  3391. // term.fCntrid = item.fNo;
  3392. // }
  3393. // });
  3394. // });
  3395. this.dialogPrinting = true;
  3396. },
  3397. //确认打印
  3398. Printing() {
  3399. this.$printE(this.$refs.print);
  3400. },
  3401. Selectinventory(selection) {
  3402. this.selection = selection;
  3403. },
  3404. deleteAll() {
  3405. for (let item in this.selection) {
  3406. if (!this.selection[item].fId)
  3407. return this.$message.error("存在未保存的数据,请先保存再批量删除!");
  3408. }
  3409. let list = [];
  3410. this.selection.forEach((item) => list.push(item.fId));
  3411. list = JSON.stringify(list).replace(/\[|]/g, "");
  3412. this.$confirm(
  3413. "此操作将永久删除已选" + this.selection.length + "条箱信息, 是否继续?",
  3414. "提示",
  3415. {
  3416. confirmButtonText: "确定",
  3417. cancelButtonText: "取消",
  3418. type: "warning",
  3419. }
  3420. )
  3421. .then(() => {
  3422. deleteAll(list).then((res) => {
  3423. shippingList({ fPid: this.form.fId }).then((res) => {
  3424. this.dataList = res.rows;
  3425. });
  3426. });
  3427. this.$message({
  3428. type: "success",
  3429. message: "删除成功!",
  3430. });
  3431. })
  3432. .catch(() => {
  3433. this.$message({
  3434. type: "info",
  3435. message: "已取消删除",
  3436. });
  3437. });
  3438. },
  3439. //文件上传时
  3440. uploading(event, file, fileList) {
  3441. this.uploadLoading = true;
  3442. this.openFullScreen(false, "文件正在解析中");
  3443. },
  3444. //遮罩层
  3445. openFullScreen(res, text) {
  3446. const loading = this.$loading({
  3447. lock: true,
  3448. text: text,
  3449. spinner: "el-icon-loading",
  3450. background: "rgba(0, 0, 0, 0.7)",
  3451. });
  3452. if (res === true) loading.close();
  3453. // setTimeout(() => {
  3454. // loading.close();
  3455. // }, 1000);
  3456. },
  3457. //导入模板
  3458. importTemplate(res, file) {
  3459. console.log(res.data);
  3460. if (res.data == 500) {
  3461. this.$message.error(res.msg);
  3462. return (this.loading = false);
  3463. } else if (res.code == 200) {
  3464. if (res.msg === "error") {
  3465. console.log(res.data.List);
  3466. if (res.data.tCnTrNoList && res.data.List) {
  3467. this.$message({
  3468. showClose: true,
  3469. dangerouslyUseHTMLString: true,
  3470. type: "error",
  3471. duration: 10000,
  3472. message:
  3473. '<h3>导入数据有误</h3><h4 style="width: 80%;">' +
  3474. res.data.tCnTrNoList +
  3475. '</h4><h4 style="width: 80%;">' +
  3476. res.data.List +
  3477. "</h4>",
  3478. });
  3479. } else if (res.data.tCnTrNoList && !res.data.List) {
  3480. this.$message({
  3481. showClose: true,
  3482. dangerouslyUseHTMLString: true,
  3483. type: "error",
  3484. duration: 10000,
  3485. message:
  3486. '<h3>导入数据有误</h3><h4 style="width: 80%;">' +
  3487. res.data.tCnTrNoList +
  3488. "</h4>",
  3489. });
  3490. } else {
  3491. this.$message({
  3492. showClose: true,
  3493. dangerouslyUseHTMLString: true,
  3494. type: "error",
  3495. duration: 10000,
  3496. message:
  3497. '<h3>导入数据有误</h3><h4 style="width: 80%;">' +
  3498. res.data.List +
  3499. "</h4>",
  3500. });
  3501. }
  3502. this.uploadLoading = false;
  3503. return this.openFullScreen(true);
  3504. }
  3505. this.boxSorting = {
  3506. pageNum: 1,
  3507. total: null,
  3508. };
  3509. request({
  3510. url: "/system/config/configKey/data_excel_pagenum",
  3511. method: "get",
  3512. }).then((resErr) => {
  3513. console.log(resErr);
  3514. if (resErr.msg) {
  3515. this.boxSorting.pageSize = resErr.msg;
  3516. } else {
  3517. this.boxSorting.pageSize = 10;
  3518. }
  3519. request({
  3520. url: "/warehouse/file/list",
  3521. method: "get",
  3522. params: {
  3523. fileName: res.data.fileName,
  3524. pageNum: this.boxSorting.pageNum,
  3525. pageSize: this.boxSorting.pageSize,
  3526. },
  3527. }).then((response) => {
  3528. console.log(response);
  3529. let i = this.dataList.length;
  3530. this.boxSorting.total = response.total;
  3531. let data = response.rows;
  3532. data.forEach((item) => {
  3533. item.fCntrid = this.goodsList[0].fCntrid;
  3534. item.fGoodsid = this.goodsList[0].fGoodsid;
  3535. item.fPackageid = this.goodsList[0].fPackageid;
  3536. });
  3537. this.dataList = this.dataList.concat(data);
  3538. if (this.boxSorting.total > 1) {
  3539. this.boxSorting.pageNum++;
  3540. this.boxInformatiNO(res, i);
  3541. } else {
  3542. console.log(res);
  3543. request({
  3544. url: "/warehouse/file/delete/" + res.data.fileName,
  3545. method: "delete",
  3546. });
  3547. this.loading = false;
  3548. this.openFullScreen(true);
  3549. }
  3550. });
  3551. });
  3552. } else {
  3553. this.$message.error(res.msg);
  3554. }
  3555. },
  3556. storageBox(res, i) {
  3557. this.boxInformatiNO(res, i);
  3558. },
  3559. boxInformatiNO(res, i) {
  3560. if (Number(this.dataList.length) - i < this.boxSorting.total) {
  3561. request({
  3562. url: "/warehouse/file/list",
  3563. method: "get",
  3564. params: {
  3565. fileName: res.data.fileName,
  3566. pageNum: this.boxSorting.pageNum,
  3567. pageSize: this.boxSorting.pageSize,
  3568. },
  3569. }).then((response) => {
  3570. // this.tableData = this.tableData.concat(response.data.rows);
  3571. // console.log(this.tableData);
  3572. this.boxSorting.pageNum++;
  3573. let data = response.rows;
  3574. data.forEach((item) => {
  3575. item.fCntrid = this.goodsList[0].fCntrid;
  3576. item.fGoodsid = this.goodsList[0].fGoodsid;
  3577. item.fPackageid = this.goodsList[0].fPackageid;
  3578. });
  3579. this.dataList = this.dataList.concat(data);
  3580. // console.log(this.tableData.length+1,i);
  3581. // if (Number(Number(this.tableData.length+1)-i) === this.boxSorting.total){
  3582. // this.loading = false
  3583. // this.openFullScreen(true)
  3584. // request({
  3585. // url: '/warehouse/file/delete/'+res.fileName,
  3586. // method: 'delete',
  3587. // })
  3588. // }
  3589. // console.log(this.boxSorting.total);
  3590. this.storageBox(res, i);
  3591. // this.tableData = this.tableData.concat(response.data.data);
  3592. // let obj = {};
  3593. // this.tableData = this.tableData.reduce((current, next) => {
  3594. // obj[next.fCntrno] ? '' : obj[next.fCntrno] = true && current.push(next);
  3595. // return current;
  3596. // }, []);
  3597. });
  3598. } else {
  3599. let obj = {};
  3600. this.dataList = this.dataList.reduce((current, next) => {
  3601. obj[next.fCntrno]
  3602. ? ""
  3603. : (obj[next.fCntrno] = true && current.push(next));
  3604. return current;
  3605. }, []);
  3606. request({
  3607. url: "/warehouse/file/delete/" + res.data.fileName,
  3608. method: "delete",
  3609. });
  3610. this.uploading = false;
  3611. this.openFullScreen(true);
  3612. }
  3613. },
  3614. // 费用变更
  3615. feeChange(fDC) {
  3616. let data = {
  3617. form: {},
  3618. warehousebillsfeesCr: [],
  3619. warehousebillsfeesDr: [],
  3620. billType: 'outStock',
  3621. fDc: fDC
  3622. }
  3623. data.form = this.form
  3624. data.form.fId = this.formList.fId;
  3625. if (fDC == 'C') {
  3626. data.warehousebillsfeesCr = this.warehouseCrList
  3627. } else {
  3628. data.warehousebillsfeesDr = this.warehouseDrList
  3629. }
  3630. this.$router.push({
  3631. path: "/domesticTrade/costModify",
  3632. query: { data: data},
  3633. });
  3634. },
  3635. },
  3636. };
  3637. </script>
  3638. <style lang="scss" scoped>
  3639. .tabSetting {
  3640. display: flex;
  3641. justify-content: flex-end;
  3642. }
  3643. .listStyle {
  3644. display: flex;
  3645. border-top: 1px solid #dcdfe6;
  3646. border-left: 1px solid #dcdfe6;
  3647. border-right: 1px solid #dcdfe6;
  3648. }
  3649. .listStyle:last-child {
  3650. border-bottom: 1px solid #dcdfe6;
  3651. }
  3652. .progress {
  3653. display: flex;
  3654. align-items: center;
  3655. padding: 2px;
  3656. background-color: rgba(0, 0, 0, 0.05);
  3657. height: 100%;
  3658. }
  3659. .el-form {
  3660. padding-top: 20px;
  3661. //border-top:1px dashed #ccc;
  3662. }
  3663. .selectForm >>> .el-form-item__label {
  3664. font-size: 12px !important;
  3665. }
  3666. .app-container /deep/ .el-collapse-item__content {
  3667. padding-bottom: 0;
  3668. }
  3669. </style>
  3670. <style lang="scss">
  3671. .el-collapse-item__header {
  3672. font-size: 16px;
  3673. font-weight: bolder;
  3674. padding-left: 5px;
  3675. background-color: #f8f8f9;
  3676. }
  3677. .el-form-item__label {
  3678. font-size: 12px;
  3679. }
  3680. </style>