index.vue 102 KB

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