index.vue 84 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507
  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="portofdischargeidName">
  285. <el-input
  286. v-model="estimatedTime.portofdischargeidName"
  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. </div>
  563. </div>
  564. <el-table :data="dataList" style="width: 100%;">
  565. <el-table-column type="selection" width="55" align="center"/>
  566. <el-table-column label="序号" type="index" width="80"/>
  567. <el-table-column label="箱号" align="center" prop="fCntrno">
  568. <template slot-scope="scope">
  569. <el-input v-model="scope.row.fCntrno" :disabled="modify"/>
  570. </template>
  571. </el-table-column>
  572. <el-table-column label="铅封号" align="center" prop="fSealno">
  573. <template slot-scope="scope">
  574. <el-input v-model="scope.row.fSealno" :disabled="modify"/>
  575. </template>
  576. </el-table-column>
  577. <el-table-column prop="fCntrweight" label="单箱重量(吨)" align="center">
  578. <template slot-scope="scope">
  579. <el-input v-model="scope.row.fCntrweight" :disabled="modify"
  580. @input="cntrWeight"
  581. />
  582. </template>
  583. </el-table-column>
  584. <el-table-column prop="fGoodsid" label="货名" align="center">
  585. <template slot-scope="scope">
  586. <el-select clearable v-model="scope.row.fGoodsid" :disabled="modify">
  587. <el-option
  588. v-for="item in goodsOptions"
  589. :key="item.fId"
  590. :label="item.fName"
  591. :value="item.fId"
  592. />
  593. </el-select>
  594. </template>
  595. </el-table-column>
  596. <el-table-column prop="fPackageid" label="包装类型" align="center">
  597. <template slot-scope="scope">
  598. <el-select clearable v-model="scope.row.fPackageid" :disabled="modify">
  599. <el-option
  600. v-for="dict in packgeOptions"
  601. :key="dict.dictValue"
  602. :label="dict.dictLabel"
  603. :value="dict.dictValue"
  604. />
  605. </el-select>
  606. </template>
  607. </el-table-column>
  608. <el-table-column prop="fCntrid" label="箱型" align="center">
  609. <template slot-scope="scope">
  610. <el-select clearable v-model="scope.row.fCntrid" :disabled="modify">
  611. <el-option
  612. v-for="item in cntrOptions"
  613. :key="item.fId"
  614. :label="item.fNo"
  615. :value="item.fId"
  616. />
  617. </el-select>
  618. </template>
  619. </el-table-column>
  620. <!-- <el-table-column prop="fManual" label="来源" align="center">-->
  621. <!-- <template slot-scope="scope">-->
  622. <!-- <el-select clearable v-model="scope.row.fManual" :disabled="modify">-->
  623. <!-- <el-option />-->
  624. <!-- </el-select>-->
  625. <!-- </template>-->
  626. <!-- </el-table-column>-->
  627. <el-table-column prop="address" label="操作" align="center">
  628. <template slot-scope="scope">
  629. <el-button size="small" :disabled="scope.row.fManual == 0 || modify"
  630. @click="deleteRow(scope.$index, dataList)"
  631. >移除
  632. </el-button>
  633. </template>
  634. </el-table-column>
  635. </el-table>
  636. </el-collapse-item>
  637. <el-collapse-item name="7">
  638. <template slot="title">
  639. <i class="el-icon-circle-plus"></i>应收费用
  640. </template>
  641. <div
  642. class="dialogTableTitle flex a-center jlr"
  643. style="
  644. display: flex;
  645. justify-content: space-between;
  646. align-items: center;
  647. margin: 10px 0;">
  648. <div>
  649. <el-button
  650. size="small"
  651. type="primary"
  652. :disabled="modify"
  653. @click.prevent="addCollection()"
  654. >新行
  655. </el-button>
  656. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  657. >删除
  658. </el-button> -->
  659. <el-button
  660. type="primary"
  661. size="small"
  662. :disabled="modify"
  663. @click="approval(1)"
  664. >保 存
  665. </el-button
  666. >
  667. <!-- <el-button @click.prevent="addAgreement()" type="warning">仓储费协议</el-button> -->
  668. <el-button
  669. size="small"
  670. @click.prevent="handleSelect(3)"
  671. :disabled="modify"
  672. type="danger"
  673. >导入协议
  674. </el-button
  675. >
  676. </div>
  677. </div>
  678. <el-table
  679. :data="warehouseDrList"
  680. ref="table"
  681. tooltip-effect="dark"
  682. border
  683. stripe
  684. show-summary
  685. @selection-change=""
  686. :summary-method="warehouseDrSummaries"
  687. >
  688. <el-table-column type="selection" width="55" align="center"/>
  689. <el-table-column label="序号" type="index" width="80">
  690. </el-table-column>
  691. <el-table-column
  692. prop="fBusinessType"
  693. header-align="center"
  694. align="center"
  695. width="180px"
  696. label="业务类型"
  697. >
  698. <template slot-scope="scope">
  699. <el-select
  700. v-model="scope.row.fBusinessType"
  701. filterable
  702. remote
  703. :disabled="modify || scope.row.fSrcTypeId != 0"
  704. placeholder="请选择业务类型"
  705. >
  706. <el-option
  707. v-for="dict in businessTypeOptions"
  708. :key="dict.dictValue"
  709. :label="dict.dictLabel"
  710. :value="dict.dictValue"
  711. ></el-option>
  712. </el-select>
  713. </template>
  714. </el-table-column>
  715. <el-table-column
  716. prop="fCorpid"
  717. header-align="center"
  718. align="center"
  719. width="180px"
  720. label="客户名称"
  721. >
  722. <template slot-scope="scope">
  723. <el-select
  724. v-model="scope.row.fCorpid"
  725. filterable
  726. remote
  727. :disabled="modify || scope.row.fSrcTypeId != 0"
  728. placeholder="请选择客户名称"
  729. >
  730. <el-option
  731. v-for="item in nameOptions"
  732. :key="item.fId"
  733. :label="item.fName"
  734. :value="item.fId"
  735. ></el-option>
  736. </el-select>
  737. </template>
  738. </el-table-column>
  739. <el-table-column
  740. prop="fFeeid"
  741. header-align="center"
  742. align="center"
  743. width="180px"
  744. label="费用名称"
  745. >
  746. <template slot-scope="scope">
  747. <el-select
  748. v-model="scope.row.fFeeid"
  749. filterable
  750. remote
  751. :disabled="modify || scope.row.fSrcTypeId !== 0"
  752. placeholder="请选择费用名称"
  753. >
  754. <el-option
  755. v-for="(dict, index) in fDNameOptions"
  756. :key="index.fId"
  757. :label="dict.fName"
  758. :value="dict.fId"
  759. ></el-option>
  760. </el-select>
  761. </template>
  762. </el-table-column>
  763. <el-table-column
  764. prop="fFeeUnitid"
  765. header-align="center"
  766. align="center"
  767. width="180px"
  768. label="计价单位"
  769. >
  770. <template slot-scope="scope">
  771. <el-select
  772. v-model="scope.row.fFeeUnitid"
  773. placeholder="请选择计价单位"
  774. @change="changeFeeUnit(scope.row)"
  775. clearable
  776. :disabled="modify || scope.row.fSrcTypeId !== 0"
  777. >
  778. <el-option
  779. v-for="(dict, index) in jFeetunitOptions"
  780. :key="index.dictValue"
  781. :label="dict.dictLabel"
  782. :value="dict.dictValue"
  783. />
  784. </el-select>
  785. </template>
  786. </el-table-column>
  787. <el-table-column
  788. prop="fQty"
  789. header-align="center"
  790. align="center"
  791. width="130px"
  792. label="数量"
  793. >
  794. <template slot-scope="scope">
  795. <el-input
  796. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  797. v-model="scope.row.fQty"
  798. placeholder="数量"
  799. :disabled="modify || scope.row.fSrcTypeId !== 0"
  800. @change="changeContractAmt(scope.row)"
  801. show-word-limit
  802. />
  803. </template>
  804. </el-table-column>
  805. <el-table-column
  806. prop="fUnitprice"
  807. header-align="center"
  808. align="center"
  809. width="130px"
  810. label="单价"
  811. >
  812. <template slot-scope="scope">
  813. <el-input
  814. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  815. v-model="scope.row.fUnitprice"
  816. placeholder="单价"
  817. :disabled="modify || scope.row.fSrcTypeId !== 0"
  818. @change="changeContractAmt(scope.row)"
  819. show-word-limit
  820. />
  821. </template>
  822. </el-table-column>
  823. <el-table-column
  824. prop="fAmount"
  825. header-align="center"
  826. align="center"
  827. width="130px"
  828. label="金额"
  829. >
  830. <template slot-scope="scope">
  831. <el-input
  832. disabled
  833. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  834. v-model="scope.row.fAmount"
  835. placeholder="金额"
  836. show-word-limit
  837. />
  838. </template>
  839. </el-table-column>
  840. <el-table-column
  841. prop="fStltypeid"
  842. header-align="center"
  843. align="center"
  844. width="130px"
  845. label="结算方式"
  846. >
  847. <template slot-scope="scope">
  848. <el-select
  849. v-model="scope.row.fStltypeid"
  850. placeholder="请选择结算表票结、月结"
  851. :disabled="modify || scope.row.fSrcTypeId !== 0"
  852. >
  853. <el-option
  854. v-for="(dict, index) in fStltypeOptions"
  855. :key="index.dictValue"
  856. :label="dict.dictLabel"
  857. :value="parseInt(dict.dictValue)"
  858. ></el-option>
  859. </el-select>
  860. </template>
  861. </el-table-column>
  862. <el-table-column
  863. prop="fCurrency"
  864. header-align="center"
  865. align="center"
  866. width="130px"
  867. label="币别"
  868. >
  869. <template slot-scope="scope">
  870. <el-input
  871. v-model="scope.row.fCurrency"
  872. :disabled="modify || scope.row.fSrcTypeId !== 0"
  873. placeholder="币别"
  874. show-word-limit
  875. />
  876. </template>
  877. </el-table-column>
  878. <el-table-column
  879. prop="fExrate"
  880. header-align="center"
  881. align="center"
  882. width="130px"
  883. label="汇率"
  884. >
  885. <template slot-scope="scope">
  886. <el-input
  887. v-model="scope.row.fExrate"
  888. :disabled="modify || scope.row.fSrcTypeId !== 0"
  889. placeholder="汇率"
  890. show-word-limit
  891. />
  892. </template>
  893. </el-table-column>
  894. <el-table-column
  895. prop="fTaxrate"
  896. header-align="center"
  897. align="center"
  898. width="130px"
  899. label="税率"
  900. >
  901. <template slot-scope="scope">
  902. <el-input
  903. v-model="scope.row.fTaxrate"
  904. :disabled="modify || scope.row.fSrcTypeId !== 0"
  905. placeholder="税率"
  906. show-word-limit
  907. />
  908. </template>
  909. </el-table-column>
  910. <el-table-column
  911. prop="fSrcTypeId"
  912. header-align="center"
  913. align="center"
  914. width="130px"
  915. label="来源"
  916. >
  917. <template slot-scope="scope">
  918. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  919. <span v-if="scope.row.fSrcTypeId !== 0">协议</span>
  920. </template>
  921. </el-table-column>
  922. <el-table-column
  923. prop="remarks"
  924. header-align="center"
  925. align="center"
  926. width="150px"
  927. label="备注"
  928. >
  929. <template slot-scope="scope">
  930. <el-input
  931. v-model="scope.row.Remarks"
  932. :disabled="modify || scope.row.fSrcTypeId !== 0"
  933. placeholder="备注"
  934. show-word-limit
  935. />
  936. </template>
  937. </el-table-column>
  938. <el-table-column
  939. header-align="center"
  940. align="center"
  941. label="操作"
  942. width="200px"
  943. >
  944. <template slot-scope="scope">
  945. <el-button
  946. @click.native.prevent="
  947. deleteRow(scope.$index, warehouseDrList)
  948. "
  949. size="small"
  950. :disabled="modify"
  951. >移除
  952. </el-button
  953. >
  954. </template>
  955. </el-table-column>
  956. </el-table>
  957. </el-collapse-item>
  958. <el-collapse-item name="8">
  959. <template slot="title">
  960. <i class="el-icon-remove"></i>应付费用
  961. </template>
  962. <div
  963. class="dialogTableTitle flex a-center jlr"
  964. style="
  965. display: flex;
  966. justify-content: space-between;
  967. align-items: center;
  968. margin: 10px 0;
  969. "
  970. >
  971. <div>
  972. <el-button
  973. type="primary"
  974. :disabled="modify"
  975. @click.prevent="addpayment()"
  976. size="small"
  977. >新行
  978. </el-button>
  979. <el-button
  980. type="primary"
  981. size="small"
  982. @click="approval(1)"
  983. :disabled="modify"
  984. >保 存
  985. </el-button
  986. >
  987. <el-button
  988. type="danger"
  989. size="small"
  990. @click.prevent="handleSelect(1)"
  991. :disabled="modify"
  992. >导入协议
  993. </el-button
  994. >
  995. </div>
  996. </div>
  997. <el-table
  998. :data="warehouseCrList"
  999. ref="table"
  1000. tooltip-effect="dark"
  1001. border
  1002. stripe
  1003. show-summary
  1004. @selection-change=""
  1005. :summary-method="warehouseCrSummaries"
  1006. >
  1007. <el-table-column type="selection" width="55" align="center"/>
  1008. <el-table-column label="序号" type="index" width="80">
  1009. </el-table-column>
  1010. <el-table-column
  1011. prop="fCorpid"
  1012. header-align="center"
  1013. align="center"
  1014. width="180px"
  1015. label="业务类型"
  1016. >
  1017. <template slot-scope="scope">
  1018. <el-select
  1019. v-model="scope.row.fBusinessType"
  1020. filterable
  1021. remote
  1022. :disabled="modify || scope.row.fSrcTypeId != 0"
  1023. placeholder="请选择业务类型"
  1024. >
  1025. <el-option
  1026. v-for="dict in businessTypeOptions"
  1027. :key="dict.dictValue"
  1028. :label="dict.dictLabel"
  1029. :value="dict.dictValue"
  1030. ></el-option>
  1031. </el-select>
  1032. </template>
  1033. </el-table-column>
  1034. <el-table-column
  1035. prop="fCorpid"
  1036. header-align="center"
  1037. align="center"
  1038. width="180px"
  1039. label="客户名称"
  1040. >
  1041. <template slot-scope="scope">
  1042. <el-select
  1043. v-model="scope.row.fCorpid"
  1044. filterable
  1045. remote
  1046. :disabled="modify || scope.row.fSrcTypeId != 0"
  1047. placeholder="请选择客户名称"
  1048. >
  1049. <el-option
  1050. v-for="item in nameOptions"
  1051. :key="item.fId"
  1052. :label="item.fName"
  1053. :value="item.fId"
  1054. ></el-option>
  1055. </el-select>
  1056. </template>
  1057. </el-table-column>
  1058. <el-table-column
  1059. prop="fFeeid"
  1060. header-align="center"
  1061. align="center"
  1062. width="180px"
  1063. label="费用名称"
  1064. >
  1065. <template slot-scope="scope">
  1066. <el-select
  1067. v-model="scope.row.fFeeid"
  1068. filterable
  1069. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1070. remote
  1071. placeholder="请选择费用名称"
  1072. >
  1073. <el-option
  1074. v-for="(dict, index) in fCNameOptions"
  1075. :key="index.fId"
  1076. :label="dict.fName"
  1077. :value="dict.fId"
  1078. ></el-option>
  1079. </el-select>
  1080. </template>
  1081. </el-table-column>
  1082. <el-table-column
  1083. prop="fFeeUnitid"
  1084. header-align="center"
  1085. align="center"
  1086. width="180px"
  1087. label="计价单位"
  1088. >
  1089. <template slot-scope="scope">
  1090. <el-select
  1091. v-model="scope.row.fFeeUnitid"
  1092. filterable
  1093. remote
  1094. @change="changeFeeUnit(scope.row)"
  1095. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1096. placeholder="请选择计价单位"
  1097. >
  1098. <el-option
  1099. v-for="(dict, index) in jFeetunitOptions"
  1100. :key="index.dictValue"
  1101. :label="dict.dictLabel"
  1102. :value="dict.dictValue"
  1103. ></el-option>
  1104. </el-select>
  1105. </template>
  1106. </el-table-column>
  1107. <el-table-column
  1108. prop="fQty"
  1109. header-align="center"
  1110. align="center"
  1111. width="150px"
  1112. label="数量"
  1113. >
  1114. <template slot-scope="scope">
  1115. <el-input
  1116. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1117. v-model="scope.row.fQty"
  1118. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1119. @change="changeContractAmt(scope.row)"
  1120. placeholder="数量"
  1121. show-word-limit
  1122. />
  1123. </template>
  1124. </el-table-column>
  1125. <el-table-column
  1126. prop="fUnitprice"
  1127. header-align="center"
  1128. align="center"
  1129. width="150px"
  1130. label="单价"
  1131. >
  1132. <template slot-scope="scope">
  1133. <el-input
  1134. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1135. v-model="scope.row.fUnitprice"
  1136. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1137. @change="changeContractAmt(scope.row)"
  1138. placeholder="单价"
  1139. show-word-limit
  1140. />
  1141. </template>
  1142. </el-table-column>
  1143. <el-table-column
  1144. prop="fAmount"
  1145. header-align="center"
  1146. align="center"
  1147. width="150px"
  1148. label="金额"
  1149. >
  1150. <template slot-scope="scope">
  1151. <el-input
  1152. disabled
  1153. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1154. v-model="scope.row.fAmount"
  1155. placeholder="金额"
  1156. show-word-limit
  1157. />
  1158. </template>
  1159. </el-table-column>
  1160. <el-table-column
  1161. prop="fStltypeid"
  1162. header-align="center"
  1163. align="center"
  1164. width="130px"
  1165. label="结算方式"
  1166. >
  1167. <template slot-scope="scope">
  1168. <el-select
  1169. v-model="scope.row.fStltypeid"
  1170. placeholder="请选择结算表票结、月结"
  1171. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1172. >
  1173. <el-option
  1174. v-for="(dict, index) in fStltypeOptions"
  1175. :key="index.dictValue"
  1176. :label="dict.dictLabel"
  1177. :value="parseInt(dict.dictValue)"
  1178. ></el-option>
  1179. </el-select>
  1180. </template>
  1181. </el-table-column>
  1182. <el-table-column
  1183. prop="fCurrency"
  1184. header-align="center"
  1185. align="center"
  1186. width="150px"
  1187. label="币别"
  1188. >
  1189. <template slot-scope="scope">
  1190. <el-input
  1191. v-model="scope.row.fCurrency"
  1192. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1193. placeholder="币别"
  1194. show-word-limit
  1195. />
  1196. </template>
  1197. </el-table-column>
  1198. <el-table-column
  1199. prop="fExrate"
  1200. header-align="center"
  1201. align="center"
  1202. width="150px"
  1203. label="汇率"
  1204. >
  1205. <template slot-scope="scope">
  1206. <el-input
  1207. v-model="scope.row.fExrate"
  1208. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1209. placeholder="汇率"
  1210. show-word-limit
  1211. />
  1212. </template>
  1213. </el-table-column>
  1214. <el-table-column
  1215. prop="fTaxrate"
  1216. header-align="center"
  1217. align="center"
  1218. width="150px"
  1219. label="税率"
  1220. >
  1221. <template slot-scope="scope">
  1222. <el-input
  1223. v-model="scope.row.fTaxrate"
  1224. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1225. placeholder="税率"
  1226. show-word-limit
  1227. />
  1228. </template>
  1229. </el-table-column>
  1230. <el-table-column
  1231. prop="fSrcTypeId"
  1232. header-align="center"
  1233. align="center"
  1234. width="130px"
  1235. label="来源"
  1236. >
  1237. <template slot-scope="scope">
  1238. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  1239. <span v-if="scope.row.fSrcTypeId !== 0">协议</span>
  1240. </template>
  1241. </el-table-column>
  1242. <el-table-column
  1243. prop="remarks"
  1244. header-align="center"
  1245. align="center"
  1246. width="150px"
  1247. label="备注"
  1248. >
  1249. <template slot-scope="scope">
  1250. <el-input
  1251. v-model="scope.row.remarks"
  1252. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1253. placeholder="备注"
  1254. show-word-limit
  1255. />
  1256. </template>
  1257. </el-table-column>
  1258. <el-table-column
  1259. header-align="center"
  1260. align="center"
  1261. width="200px"
  1262. label="操作"
  1263. >
  1264. <template slot-scope="scope">
  1265. <!-- <el-button size="small">审核费用</el-button> -->
  1266. <el-button
  1267. @click.native.prevent="
  1268. deleteRow(scope.$index, warehouseCrList)
  1269. "
  1270. size="small"
  1271. :disabled="modify"
  1272. >移除
  1273. </el-button
  1274. >
  1275. </template>
  1276. </el-table-column>
  1277. </el-table>
  1278. </el-collapse-item>
  1279. <el-collapse-item name="9" class="minHeight" title="箱信息">
  1280. <template slot="title">
  1281. <i class="el-icon-circle-plus"></i>利润合计:
  1282. {{this.amountDr != null && this.amountCr != null ? this.amountDr - this.amountCr :
  1283. (!this.amountDr && this.amountCr ? 0 - this.amountCr :
  1284. (!this.amountDr && !this.amountCr ? '' : this.amountDr))}}
  1285. </template>
  1286. </el-collapse-item>
  1287. </el-collapse>
  1288. <div style="margin:60px;float: right">
  1289. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  1290. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"
  1291. ></approval-comments>
  1292. <el-button type="info" :disabled="jumpDonot" v-if="form.fBillstatus == 11 || form.fBillstatus == 6" @click="modify = false">修 改
  1293. </el-button>
  1294. <el-button type="success" :disabled="modify" v-if="form.fBillstatus == 11 || form.fBillstatus == 6" @click="approval(1)">保 存
  1295. </el-button>
  1296. <el-button type="primary" :disabled="modify" v-if="form.fBillstatus == 11 && this.form.moneyStatus < 4"
  1297. @click="feeSubmission"
  1298. >费用请核
  1299. </el-button>
  1300. <el-button type="success" v-if="approVal" @click="addOrUpdateHand(form,'f_billstatus')">审 批</el-button>
  1301. <el-button type="primary"
  1302. 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"
  1303. @click="modifyApproval()"
  1304. >审批
  1305. </el-button>
  1306. <el-button v-if="!form.fMblno && form.fBillstatus < 5" type="danger" @click="rejectDeletion">
  1307. 驳回并删除
  1308. </el-button>
  1309. <el-button type="danger" :disabled="disappear" v-if="form.moneyStatus === 4 && current == before"
  1310. @click="revokeTwo('f_billstatus')"
  1311. >撤销请核
  1312. </el-button>
  1313. <el-button type="primary"
  1314. v-if="(form.fUpdeteStatus !== 4 && form.fUpdeteStatus !== 5 && form.fUpdeteStatus !== 6 && form.fUpdeteStatus !== 2) && (form.fBillstatus != 11 ||form.moneyStatus == null || form.moneyStatus != null && form.moneyStatus >= 4)"
  1315. @click="addOrUpdateHandle('f_billstatus')"
  1316. >查看审批
  1317. </el-button>
  1318. <el-button type="primary"
  1319. 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"
  1320. @click="revisionApproval()"
  1321. >查看审批
  1322. </el-button>
  1323. <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === true" @click="cancel">返回列表</el-button>
  1324. <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === false" @click="cancelTwo"
  1325. >返回首页
  1326. </el-button
  1327. >
  1328. </div>
  1329. <!-- 附件查看-->
  1330. <el-dialog
  1331. title="查看附件"
  1332. :visible.sync="dialogVisible"
  1333. width="60%"
  1334. v-dialogDrag
  1335. >
  1336. <el-table
  1337. :data="relevantAttachments"
  1338. ref="table"
  1339. tooltip-effect="dark"
  1340. border
  1341. stripe
  1342. style="width: 100%"
  1343. height="150"
  1344. >
  1345. <el-table-column label="序号" type="index" width="80">
  1346. </el-table-column>
  1347. <el-table-column
  1348. prop="fName"
  1349. header-align="center"
  1350. align="center"
  1351. width="250px"
  1352. label="附件名称"
  1353. >
  1354. <template slot-scope="scope">
  1355. <el-input
  1356. v-model="scope.row.fName"
  1357. placeholder="附件名称"
  1358. show-word-limit
  1359. />
  1360. </template>
  1361. </el-table-column>
  1362. <el-table-column
  1363. prop="createTime"
  1364. header-align="center"
  1365. align="center"
  1366. width="250px"
  1367. label="上传时间"
  1368. >
  1369. <template slot-scope="scope">
  1370. <el-input
  1371. v-model="scope.row.createTime"
  1372. disabled
  1373. placeholder="上传时间"
  1374. ></el-input>
  1375. </template>
  1376. </el-table-column>
  1377. <el-table-column
  1378. prop="createBy"
  1379. header-align="center"
  1380. align="center"
  1381. width="150px"
  1382. label="上传人"
  1383. >
  1384. <template slot-scope="scope">
  1385. <el-input
  1386. v-model="scope.row.createBy"
  1387. disabled
  1388. placeholder="上传人"
  1389. show-word-limit
  1390. />
  1391. </template>
  1392. </el-table-column>
  1393. <el-table-column
  1394. prop="fUrl"
  1395. header-align="center"
  1396. align="center"
  1397. width="150px"
  1398. label="操作"
  1399. >
  1400. <template slot-scope="scope">
  1401. <!-- <el-upload-->
  1402. <!-- class="upload-demo"-->
  1403. <!-- :action="uploadImgUrl"-->
  1404. <!-- :on-success="(res,file)=>{handleSucces(scope,res,file)}"-->
  1405. <!-- :headers="headers"-->
  1406. <!-- style="width:25%;float: left"-->
  1407. <!-- :show-file-list="false"-->
  1408. <!-- :limit="1"-->
  1409. <!-- >-->
  1410. <!-- <el-button size="small" type="primary" style="margin-left:20px">点击上传</el-button>-->
  1411. <!-- </el-upload>-->
  1412. <el-button size="small" type="primary" @click="checkFile(scope)">查看</el-button>
  1413. <!-- <el-button size="small" type="primary" @click="deleteFile(scope)">删除</el-button>-->
  1414. </template>
  1415. </el-table-column>
  1416. </el-table>
  1417. <span slot="footer" class="dialog-footer">
  1418. <el-button @click="dialogVisible = false">取 消</el-button>
  1419. <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  1420. </span>
  1421. </el-dialog>
  1422. </div>
  1423. </template>
  1424. <script>
  1425. import {
  1426. listCorps,
  1427. addmodify,
  1428. getCntr,
  1429. postApproval,
  1430. listFees,
  1431. getGoodName,
  1432. getFName,
  1433. getfee,
  1434. getName,
  1435. portInquiry,
  1436. nameOfVessel,
  1437. voyageNumber,
  1438. reject
  1439. } from '@/api/kaihe/domesticTrade/orderInformation'
  1440. import Global from '@/layout/components/global'
  1441. import { getToken } from '@/utils/auth'
  1442. import Cookies from 'js-cookie'
  1443. import draggable from 'vuedraggable'
  1444. import Vue from 'vue'
  1445. import AddOrUpdate from '@/views/viewApproval'
  1446. import ApprovalComments from '@/views/startApproval'
  1447. import { revoke, revokeTwo } from '@/api/warehouseBusiness/warehouseInStock'
  1448. import { queryUserVal } from '@/api/system/user'
  1449. Vue.directive('dialogDrag', {
  1450. bind(el, binding, vnode, oldVnode) {
  1451. const dialogHeaderEl = el.querySelector('.el-dialog__header')
  1452. const dragDom = el.querySelector('.el-dialog')
  1453. const enlarge = el.querySelector('.enlarge')
  1454. dialogHeaderEl.style.cursor = 'move'
  1455. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  1456. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
  1457. if (enlarge) {
  1458. enlarge.onclick = (e) => {
  1459. dragDom.style.top = '0px'
  1460. dragDom.style.left = '0px'
  1461. }
  1462. }
  1463. dialogHeaderEl.onmousedown = (e) => {
  1464. // 鼠标按下,计算当前元素距离可视区的距离
  1465. const disX = e.clientX - dialogHeaderEl.offsetLeft
  1466. const disY = e.clientY - dialogHeaderEl.offsetTop
  1467. // 获取到的值带px 正则匹配替换
  1468. let styL, styT
  1469. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  1470. if (sty.left.includes('%')) {
  1471. styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
  1472. styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
  1473. } else {
  1474. styL = +sty.left.replace(/\px/g, '')
  1475. styT = +sty.top.replace(/\px/g, '')
  1476. }
  1477. document.onmousemove = function(e) {
  1478. // 通过事件委托,计算移动的距离
  1479. const l = e.clientX - disX
  1480. const t = e.clientY - disY
  1481. // 移动当前元素
  1482. if ((t + styT) >= 0) {
  1483. dragDom.style.top = `${t + styT}px`
  1484. }
  1485. dragDom.style.left = `${l + styL}px`
  1486. // 将此时的位置传出去
  1487. // binding.value({x:e.pageX,y:e.pageY})
  1488. }
  1489. document.onmouseup = function(e) {
  1490. document.onmousemove = null
  1491. document.onmouseup = null
  1492. }
  1493. }
  1494. }
  1495. })
  1496. export default {
  1497. name: 'orderInformation',
  1498. components: {
  1499. AddOrUpdate,
  1500. ApprovalComments
  1501. },
  1502. data() {
  1503. return {
  1504. insurance:[],
  1505. etentioncargo:[],
  1506. vslidList:[],
  1507. voyidList:[],
  1508. cEsign:[],
  1509. transport:[],
  1510. paymentMethod:[],
  1511. drawee:[],
  1512. whether:false,
  1513. fStatus:[],
  1514. goods:[],
  1515. rules: {
  1516. fMblno: [{ required: true, message: ' ', trigger: 'blur' }]
  1517. },
  1518. changeNum: true,
  1519. cancelButton: true,
  1520. jumpDonot: false,
  1521. disappear: false,
  1522. businessTypeOptions: [],
  1523. id: null,
  1524. current: '',
  1525. before: '',
  1526. approVal: false,
  1527. //客户名称下拉模糊
  1528. nameOptions: [],
  1529. //字典表包装类型
  1530. packgeOptions: [],
  1531. //货名下拉
  1532. goodsOptions: [],
  1533. //箱型下拉
  1534. cntrOptions: [],
  1535. fTaxrate: '',
  1536. //结算方式
  1537. fStltypeOptions: [],
  1538. //计价单位
  1539. jFeetunitOptions: [],
  1540. //收付款费用名称字典表
  1541. fDNameOptions: [],
  1542. fCNameOptions: [],
  1543. warehouseCrList: [],
  1544. estimatedTime: {},
  1545. addOrUpdateVisible: false,
  1546. dataElist:false,
  1547. addOrUpdateVisib: false,
  1548. warehouseDrList: [],
  1549. goodsList: [],
  1550. dataList: [],
  1551. visible: false,
  1552. dataForm: {},
  1553. modify: true,
  1554. doNot: true,
  1555. activeNames: ['1', '2', '3', '4', '5', '6'],
  1556. form: {},
  1557. fMblnoOptions:[],
  1558. uploadImgUrl: process.env.VUE_APP_BASE_API + '/common/upload', // 上传的图片服务器地址
  1559. relevantAttachments: [],
  1560. headers: { Authorization: 'Bearer ' + getToken() },
  1561. //集装箱尺码字典表
  1562. CntrsizeOptions: [],
  1563. //模糊查询箱类型
  1564. typeOptions: [],
  1565. //附件上传弹窗
  1566. dialogVisible: false,
  1567. //调箱动作字典表
  1568. boxActionOptions: [],
  1569. //集装箱主字典表
  1570. ownerOptions: [],
  1571. //模糊下拉查询地点
  1572. addressOptions: [],
  1573. //空重字典表
  1574. updateEFOptions: [],
  1575. //状态字典表
  1576. cntrstatusOptions: [],
  1577. // 遮罩层
  1578. loading: true,
  1579. // 选中数组
  1580. ids: [],
  1581. // 显示搜索条件
  1582. showSearch: true,
  1583. // 总条数
  1584. total: 0,
  1585. // 客户详情表格数据
  1586. corpsList: [],
  1587. // 查询参数
  1588. select: '',
  1589. querDate: [],
  1590. file: [],
  1591. row: [],
  1592. res: [],
  1593. formList:{},
  1594. approvalTwo:false,
  1595. amountDr:null,
  1596. amountCr:null
  1597. }
  1598. },
  1599. //页面跳转后传递参数
  1600. activated() {
  1601. if (this.$route.query.testing)this.dataElist = true
  1602. this.modify = true
  1603. let formDate
  1604. if (this.$route.query.list) {
  1605. formDate = {
  1606. fId: JSON.parse(this.$route.query.list).billId
  1607. }
  1608. this.formList = formDate
  1609. this.approVal = true
  1610. this.cancelButton = false
  1611. } else if (this.$route.query.data) {
  1612. formDate = {
  1613. fId: JSON.parse(this.$route.query.data).fId,
  1614. num: JSON.parse(this.$route.query.data).num
  1615. }
  1616. this.id = formDate.fId
  1617. this.formList = {
  1618. fId: formDate.fId
  1619. }
  1620. this.approVal = false
  1621. }else if (this.$route.query.testing){
  1622. console.log(this.$route.query.testing)
  1623. formDate = {
  1624. fId:JSON.parse(this.$route.query.testing).billId
  1625. }
  1626. this.formList = formDate
  1627. this.approvalTwo = true
  1628. this.cancelButton = false
  1629. }
  1630. if (formDate) {
  1631. addmodify(formDate).then(response => {
  1632. console.log(response)
  1633. if(response.code == 200){
  1634. this.form = response.rows[0]
  1635. if (this.form.fMblno == null) {
  1636. this.changeNum = false
  1637. } else {
  1638. this.changeNum = true
  1639. }
  1640. let data = {
  1641. actId: 460,
  1642. id: this.form.fId
  1643. }
  1644. getName(data).then(response => {
  1645. if (response.data.length != 0) {
  1646. this.before = response.data[0].userName
  1647. }
  1648. })
  1649. queryUserVal().then((response) => {
  1650. this.current = response.user.userName
  1651. if (formDate.num) {
  1652. if (this.form.moneyStatus >= 4) {
  1653. this.jumpDonot = true
  1654. }
  1655. if (this.current == this.before) {
  1656. this.disappear = false
  1657. }
  1658. } else {
  1659. this.jumpDonot = true
  1660. this.disappear = true
  1661. }
  1662. })
  1663. this.$set(this.form,'fPaymode',JSON.stringify(this.form.fPaymode))
  1664. this.$set(this.form,'fSign',JSON.stringify(this.form.fSign))
  1665. this.$set(this.form,'fDetentioncargo',JSON.stringify(this.form.fDetentioncargo))
  1666. this.goodsList = response.rows[0].tWarehousebillsCntrList
  1667. this.estimatedTime = response.rows[0].tVoyageL
  1668. if (response.rows[0].tWarehousebillsCntritemsList !== null) {
  1669. this.dataList = response.rows[0].tWarehousebillsCntritemsList
  1670. }else this.dataList = []
  1671. this.loading = false
  1672. if (response.rows[0].tWarehousebillsfeesDr) {
  1673. this.warehouseDrList = response.rows[0].tWarehousebillsfeesDr
  1674. for (let item in this.warehouseDrList) {
  1675. this.$set(this.warehouseDrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseDrList[item].fFeeunitid))
  1676. // this.$set(this.warehouseDrList[item], 'fCorpid', JSON.stringify(this.warehouseDrList[item].fCorpid))
  1677. }
  1678. }
  1679. if (response.rows[0].warehousebillsfeesCr) {
  1680. this.warehouseCrList = response.rows[0].warehousebillsfeesCr
  1681. for (let item in this.warehouseCrList) {
  1682. this.$set(this.warehouseCrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseCrList[item].fFeeunitid))
  1683. }
  1684. }
  1685. }
  1686. })
  1687. }
  1688. },
  1689. created() {
  1690. nameOfVessel().then(res =>{
  1691. this.vslidList = res.rows
  1692. })
  1693. voyageNumber().then(res =>{
  1694. this.voyidList = res.rows
  1695. })
  1696. portInquiry().then(res =>{
  1697. this.fMblnoOptions = res.rows;
  1698. })
  1699. this.getDicts('data_unitfees').then((response) => {
  1700. if (response.data) {
  1701. this.jFeetunitOptions = response.data
  1702. }
  1703. })
  1704. this.getDicts('data_stltype_type').then((response) => {
  1705. if (response.data) {
  1706. this.fStltypeOptions = response.data
  1707. }
  1708. })
  1709. this.getDicts('tax_rate').then((response) => {
  1710. if (response.data) {
  1711. this.fTaxrate = response.data[0].dictValue
  1712. }
  1713. })
  1714. this.getDicts('f_packageid').then((response) => {
  1715. if (response.data) {
  1716. this.packgeOptions = response.data
  1717. }
  1718. })
  1719. this.getDicts('data_billType').then((response) => {
  1720. if (response.data) {
  1721. this.businessTypeOptions = response.data
  1722. }
  1723. })
  1724. this.getDicts('f_updateEF').then((response) => {
  1725. if (response.data) {
  1726. this.fStatus = response.data
  1727. }
  1728. })
  1729. this.getDicts('f_serviceitems').then((response) => {
  1730. if (response.data) {
  1731. this.transport = response.data
  1732. }
  1733. })
  1734. this.getDicts('f_paymode').then((response) => {
  1735. if (response.data) {
  1736. this.paymentMethod = response.data
  1737. }
  1738. })
  1739. this.getDicts('f_invoceobj').then((response) => {
  1740. if (response.data) {
  1741. this.drawee = response.data
  1742. }
  1743. })
  1744. this.getDicts('f_sign').then((response) => {
  1745. if (response.data) {
  1746. this.cEsign = response.data
  1747. }
  1748. })
  1749. this.getDicts('f_detentioncargo').then((response) => {
  1750. if (response.data) {
  1751. this.etentioncargo = response.data
  1752. }
  1753. })
  1754. this.getDicts('f_insurance').then((response) => {
  1755. if (response.data) {
  1756. this.insurance = response.data
  1757. }
  1758. })
  1759. this.cntrtypeRemoteMethod()
  1760. this.goodRemoteMethod()
  1761. this.nameRemoteMethod()
  1762. this.fWRemoteMethod()
  1763. this.queryGoods()
  1764. let queryParams = { pageNum: 1, fDc: 'C' }
  1765. listFees(queryParams).then((response) => {
  1766. this.fCNameOptions = response.rows
  1767. })
  1768. let query = { pageNum: 1, fDc: 'D' }
  1769. listFees(query).then((response) => {
  1770. this.fDNameOptions = response.rows
  1771. })
  1772. },
  1773. methods: {
  1774. rejectDeletion(){
  1775. this.$confirm('驳回并删除, 是否继续?', '提示', {
  1776. confirmButtonText: '确定',
  1777. cancelButtonText: '取消',
  1778. type: 'warning'
  1779. }).then(() => {
  1780. reject(this.form.fId).then(res =>{
  1781. if (res.code === 200) {
  1782. this.$message({
  1783. type: 'success',
  1784. message: '删除成功!'
  1785. });
  1786. this.cancelTwo()
  1787. }
  1788. })
  1789. }).catch(() => {
  1790. this.$message({
  1791. type: 'info',
  1792. message: '已取消'
  1793. });
  1794. });
  1795. },
  1796. seleEt(scope) {
  1797. console.log(scope)
  1798. for (let item in this.cntrOptions) {
  1799. if (this.cntrOptions[item].fId === scope.row.fCntrid) {
  1800. if (this.cntrOptions[item].fType === 2) {
  1801. this.whether = true;
  1802. return;
  1803. } else {
  1804. this.whether = false;
  1805. return;
  1806. }
  1807. }
  1808. }
  1809. },
  1810. throttleOpening(res) {
  1811. if (res <= 100) {
  1812. } else {
  1813. this.list.fDraught = '';
  1814. this.$message({
  1815. showClose: true,
  1816. message: '不能大于100%或小于0%',
  1817. type: 'error',
  1818. offset: 90
  1819. });
  1820. }
  1821. },
  1822. temperature(res) {
  1823. if (res < 20 && res > -30) {
  1824. } else if (res == '-') {
  1825. } else {
  1826. this.list.fTemperature = '';
  1827. this.$message({
  1828. showClose: true,
  1829. message: '冷藏箱温度为-30℃至20℃之间的整数',
  1830. type: 'error',
  1831. offset: 90
  1832. });
  1833. }
  1834. },
  1835. selectChange(scope) {
  1836. for (let item in this.goods) {
  1837. if (this.goods[item].fId === scope.row.fGoodsid) {
  1838. scope.row.typeidName = this.goods[item].typeName;
  1839. }
  1840. }
  1841. },
  1842. queryGoods() {
  1843. getGoodName().then(res=>{
  1844. if(res.code == 200){
  1845. this.goods = res.data
  1846. }
  1847. })
  1848. },
  1849. homePage() {
  1850. this.open = false
  1851. let view = {
  1852. fullPath: '/finance/contrast',
  1853. hash: '',
  1854. matched: Array(2),
  1855. meta: Object,
  1856. name: 'Contrast',
  1857. params: Object,
  1858. path: '/finance/contrast',
  1859. query: Object,
  1860. title: '对账'
  1861. }
  1862. this.$router.push({ path: '/index' })
  1863. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  1864. if (this.isActive(view)) {
  1865. this.toLastView(visitedViews, view)
  1866. }
  1867. })
  1868. Global.$emit('removeCache', 'closeSelectedTag', view)
  1869. },
  1870. cancel() {
  1871. if (this.form.moneyStatus === 4 ||
  1872. this.form.fBillstatus === 4 ||
  1873. this.form.fBillstatus === 9 ||
  1874. this.modify == true) {
  1875. this.$router.push({ path: '/domesticTrade/myOrder' })
  1876. } else {
  1877. this.$confirm('返回列表,是否保存?', '提示', {
  1878. confirmButtonText: '保存',
  1879. cancelButtonText: '取消',
  1880. type: 'warning'
  1881. })
  1882. .then(() => {
  1883. this.approval()
  1884. })
  1885. .catch(() => {
  1886. this.$router.push({ path: '/domesticTrade/myOrder' })
  1887. this.modify = true
  1888. })
  1889. }
  1890. },
  1891. //撤销审批
  1892. revokeTwo(status) {
  1893. let data = {
  1894. actId: 460,
  1895. billId: this.form.fId,
  1896. id: this.form.fId,
  1897. fidStatus: status,
  1898. }
  1899. revokeTwo(data).then((data) => {
  1900. if (data.code === 200) {
  1901. this.msgSuccess('撤销成功')
  1902. this.jumpDonot = false
  1903. if (this.formList) {
  1904. addmodify(this.formList).then(response => {
  1905. this.form = response.rows[0]
  1906. let data = {
  1907. actId: 460,
  1908. id: this.form.fId
  1909. }
  1910. getName(data).then(response => {
  1911. if (response.data.length != 0) {
  1912. this.before = response.data[0].userName
  1913. }
  1914. })
  1915. queryUserVal().then((response) => {
  1916. this.current = response.user.userName
  1917. })
  1918. this.goodsList = response.rows[0].tWarehousebillsCntrList
  1919. this.estimatedTime = response.rows[0].tVoyageL
  1920. if (response.rows[0].tWarehousebillsCntritemsList !== null) {
  1921. this.dataList = response.rows[0].tWarehousebillsCntritemsList
  1922. }else this.dataList = []
  1923. this.loading = false
  1924. if (response.rows[0].tWarehousebillsfeesDr) {
  1925. this.warehouseDrList = response.rows[0].tWarehousebillsfeesDr
  1926. for (let item in this.warehouseDrList) {
  1927. this.$set(this.warehouseDrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseDrList[item].fFeeunitid))
  1928. }
  1929. }
  1930. if (response.rows[0].warehousebillsfeesCr) {
  1931. this.warehouseCrList = response.rows[0].warehousebillsfeesCr
  1932. for (let item in this.warehouseCrList) {
  1933. this.$set(this.warehouseCrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseCrList[item].fFeeunitid))
  1934. }
  1935. }
  1936. // if(this.current == this.before)
  1937. // this.disappear = false;
  1938. })
  1939. }
  1940. this.reset()
  1941. }
  1942. })
  1943. },
  1944. //费用提交审核
  1945. feeSubmission() {
  1946. if (!this.warehouseDrList && !this.warehouseCrList) {
  1947. this.$message.error('请维护费用')
  1948. return false
  1949. }
  1950. if (this.warehouseDrList) {
  1951. for (let li in this.warehouseDrList) {
  1952. if (!this.warehouseDrList[li].fBusinessType) {
  1953. this.$message.error('应收费用第' + (Number(li) + 1) + '行业务类型为空,请维护业务类型')
  1954. return false
  1955. } else if (!this.warehouseDrList[li].fCorpid) {
  1956. this.$message.error('应收费用第' + (Number(li) + 1) + '行客户名称为空,请维护客户名称')
  1957. return false
  1958. } else if (!this.warehouseDrList[li].fFeeid) {
  1959. this.$message.error('应收费用第' + (Number(li) + 1) + '行费用名称为空,请维护费用名称')
  1960. return false
  1961. } else if (!this.warehouseDrList[li].fQty) {
  1962. this.$message.error('应收费用第' + (Number(li) + 1) + '行数量为空,请维护数量')
  1963. return false
  1964. } else if (!this.warehouseDrList[li].fUnitprice) {
  1965. this.$message.error('应收费用第' + (Number(li) + 1) + '行单价为空,请维护单价')
  1966. return false
  1967. }
  1968. }
  1969. }
  1970. if (this.warehouseCrList) {
  1971. for (let li in this.warehouseCrList) {
  1972. if (!this.warehouseCrList[li].fBusinessType) {
  1973. this.$message.error('应付费用第' + (Number(li) + 1) + '行业务类型为空,请维护业务类型')
  1974. return false
  1975. } else if (!this.warehouseDrList[li].fCorpid) {
  1976. this.$message.error('应付费用第' + (Number(li) + 1) + '行客户名称为空,请维护客户名称')
  1977. return false
  1978. } else if (!this.warehouseDrList[li].fFeeid) {
  1979. this.$message.error('应付费用第' + (Number(li) + 1) + '行费用名称为空,请维护费用名称')
  1980. return false
  1981. } else if (!this.warehouseDrList[li].fQty) {
  1982. this.$message.error('应付费用第' + (Number(li) + 1) + '行数量为空,请维护数量')
  1983. return false
  1984. } else if (!this.warehouseDrList[li].fUnitprice) {
  1985. this.$message.error('应付费用第' + (Number(li) + 1) + '行单价为空,请维护单价')
  1986. return false
  1987. }
  1988. }
  1989. }
  1990. let form = {
  1991. fId: this.form.fId,
  1992. fMblno: this.form.fMblno
  1993. }
  1994. let formData = new window.FormData()
  1995. for (let li in this.warehouseDrList) {
  1996. this.warehouseDrList[li].fMblno = this.form.fMblno
  1997. for (let item in this.nameOptions) {
  1998. if (this.warehouseDrList[li].fCorpid == this.nameOptions[item].fName) {
  1999. this.warehouseDrList[li].fCorpid = this.nameOptions[item].fId
  2000. }
  2001. }
  2002. }
  2003. for (let li in this.warehouseCrList) {
  2004. this.warehouseCrList[li].fMblno = this.form.fMblno
  2005. }
  2006. formData.append('tWarehousebills', JSON.stringify(form))
  2007. formData.append('tWarehousebillsCntritems', JSON.stringify(this.dataList))
  2008. formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
  2009. formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
  2010. getfee(formData).then(response => {
  2011. this.$message.success('操作成功')
  2012. this.form.moneyStatus = 4
  2013. this.jumpDonot = true
  2014. this.modify = true
  2015. let data = {
  2016. actId: 460,
  2017. id: this.form.fId
  2018. }
  2019. getName(data).then(response => {
  2020. if (response.data.length != 0) {
  2021. this.before = response.data[0].userName
  2022. if (this.current == this.before) {
  2023. this.disappear = false
  2024. }
  2025. }
  2026. })
  2027. })
  2028. },
  2029. //箱信息操作限制
  2030. cntrWeight(res) {
  2031. if (res < 40 && res > 0) {
  2032. return
  2033. } else if (res == '' || res == null) {
  2034. } else {
  2035. this.$message({
  2036. showClose: true,
  2037. message: '单箱重量应在0-40吨之间',
  2038. type: 'error',
  2039. offset: 90
  2040. })
  2041. }
  2042. },
  2043. //获取客户名称下拉
  2044. nameRemoteMethod() {
  2045. let queryParams = { pageNum: 1 }
  2046. getFName(queryParams).then(response => {
  2047. this.nameOptions = response.data
  2048. })
  2049. },
  2050. //货名下拉
  2051. goodRemoteMethod() {
  2052. let queryParams = { pageNum: 1 }
  2053. getGoodName(queryParams).then(response => {
  2054. this.goodsOptions = response.data
  2055. })
  2056. },
  2057. //箱型下拉获取
  2058. cntrtypeRemoteMethod() {
  2059. let queryParams = { pageNum: 1 }
  2060. getCntr(queryParams).then(response => {
  2061. this.cntrOptions = response.rows
  2062. })
  2063. },
  2064. //计价单位
  2065. // corpsRemoteMethod(name) {
  2066. // if (name == null || name === "") {
  2067. // return false;
  2068. // }
  2069. // let queryParams = { pageNum: 1, fName: name, type: 1 };
  2070. // listCorps(queryParams).then((response) => {
  2071. // this.fMblnoOptions = response.rows;
  2072. // this.KHblnoOptions = response.rows;
  2073. // });
  2074. // },
  2075. //应付信息新行
  2076. addpayment() {
  2077. this.warehouseCrList.push({
  2078. fBusinessType: null,
  2079. fCorpid: null,
  2080. fFeeid: null,
  2081. fFeeUnitid: '7',
  2082. fQty: null,
  2083. fUnitprice: null,
  2084. fAmount: null,
  2085. fStltypeid: null,
  2086. fCurrency: 'RMB',
  2087. fExrate: '1',
  2088. fTaxrate: this.fTaxrate,
  2089. fSrcTypeId: 0,
  2090. remarks: null
  2091. })
  2092. },
  2093. // 数量计算
  2094. changeContractAmt(row) {
  2095. let fQty = 0
  2096. let fUnitprice = 0
  2097. if (row.fUnitprice) {
  2098. fUnitprice = row.fUnitprice
  2099. }
  2100. if (row.fQty) {
  2101. fQty = row.fQty
  2102. }
  2103. this.$set(row, 'fAmount', parseFloat(Number(fUnitprice) * Number(fQty)).toFixed(2))
  2104. },
  2105. // 变更计价单位
  2106. changeFeeUnit(row) {
  2107. if (!row.fFeeUnitid) {
  2108. return false
  2109. }
  2110. // if (row.fFeeUnitid === "2") {
  2111. // this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
  2112. // } else if (row.fFeeUnitid === "1") {
  2113. // this.$set(row, "fQty", this.fQty);
  2114. // } else if (row.fFeeUnitid === "3") {
  2115. // this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
  2116. // } else if (row.fFeeUnitid === "7") {
  2117. // this.$set(row, "fQty", this.fCntqty);
  2118. // } else {
  2119. // this.$set(row, "fQty", 0);
  2120. // }
  2121. if (row.fUnitprice) {
  2122. this.$set(
  2123. row,
  2124. 'fAmount',
  2125. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  2126. )
  2127. }
  2128. },
  2129. // 选择费用信息时获取计价单位
  2130. // changeFeeId(row) {
  2131. // for (let li in this.fWbuOptions) {
  2132. // if (row.fFeeid === this.fWbuOptions[li].fId) {
  2133. // this.$set(row, "fFeeUnitid", this.fWbuOptions[li].fFeeunitid + "");
  2134. // this.changeFeeUnit(row);
  2135. // break;
  2136. // }
  2137. // }
  2138. // },
  2139. // 远程模糊查询费用名称
  2140. fWRemoteMethod(name) {
  2141. if (name == null || name === '') {
  2142. return false
  2143. }
  2144. let queryParams = { pageNum: 1, fDc: 'C', fName: name }
  2145. listFees(queryParams).then((response) => {
  2146. this.fCNameOptions = response.rows
  2147. })
  2148. let query = { pageNum: 1, fDc: 'D', fName: name }
  2149. listFees(query).then((response) => {
  2150. this.fDNameOptions = response.rows
  2151. })
  2152. },
  2153. // 收款合计
  2154. warehouseDrSummaries(param) {
  2155. const { columns, data } = param
  2156. const sums = []
  2157. columns.forEach((column, index) => {
  2158. if (index === 0) {
  2159. sums[index] = '合计'
  2160. return
  2161. } else if (column.label == '单价' || column.label == '数量' || column.label == '金额') {
  2162. const values = data.map((item) => Number(item[column.property]));
  2163. if (!values.every((value) => isNaN(value))) {
  2164. sums[index] = values.reduce((prev, curr) => {
  2165. const value = Number(curr);
  2166. if (!isNaN(value)) {
  2167. return prev + curr;
  2168. } else {
  2169. return prev;
  2170. }
  2171. }, 0);
  2172. }
  2173. }
  2174. });
  2175. this.amountDr = sums[8]
  2176. return sums
  2177. },
  2178. //付款合计
  2179. warehouseCrSummaries(param) {
  2180. const { columns, data } = param
  2181. const sums = []
  2182. columns.forEach((column, index) => {
  2183. if (index === 0) {
  2184. sums[index] = '合计'
  2185. return
  2186. } else if (column.label == '单价' || column.label == '数量' || column.label == '金额') {
  2187. const values = data.map((item) => Number(item[column.property]));
  2188. if (!values.every((value) => isNaN(value))) {
  2189. sums[index] = values.reduce((prev, curr) => {
  2190. const value = Number(curr);
  2191. if (!isNaN(value)) {
  2192. return prev + curr;
  2193. } else {
  2194. return prev;
  2195. }
  2196. }, 0);
  2197. }
  2198. }
  2199. });
  2200. this.amountCr = sums[8]
  2201. return sums
  2202. },
  2203. addOrUpdateHand(form,status) {
  2204. // if(form.fMblno == null){
  2205. // this.addOrUpdateVisib = false;
  2206. // this.$message.error("提单号为空,请维护提单号")
  2207. // return false
  2208. // }else{
  2209. // this.addOrUpdateVisib = true;
  2210. // }
  2211. this.$refs['form'].validate((valid) => {
  2212. if (valid) {
  2213. this.addOrUpdateVisib = true
  2214. this.$nextTick(() => {
  2215. let actId = ''
  2216. if (this.form.fBillstatus < 6) {
  2217. actId = '410'
  2218. this.$refs.ApprovalComments.init(form.fId,status,actId,this.form.fMblno)
  2219. } else if (this.form.moneyStatus != null && this.form.moneyStatus < 6) {
  2220. actId = '460'
  2221. this.$refs.ApprovalComments.init(form.fId,status,actId)
  2222. } else {
  2223. actId = '420'
  2224. this.$refs.ApprovalComments.init(form.fId, status,actId)
  2225. }
  2226. })
  2227. } else {
  2228. this.$message.error('提单号为空,请维护提单号')
  2229. }
  2230. })
  2231. },
  2232. modifyApproval(){
  2233. this.addOrUpdateVisib = true
  2234. let list = JSON.parse(this.$route.query.testing)
  2235. this.$nextTick(() => {
  2236. let actId = ''
  2237. console.log(list)
  2238. this.addOrUpdateVisible = true
  2239. if(list.refno4 == 'XGDD'){
  2240. actId = 471
  2241. }else if (list.refno4 == 'XGTJ'){
  2242. actId = 472
  2243. }else if(list.refno4 == 'DDSC'){
  2244. actId = 473
  2245. }
  2246. this.$refs.ApprovalComments.init(this.form.fId,status,actId,this.form.fMblno)
  2247. })
  2248. },
  2249. //首页审批跳转关闭返回首页
  2250. cancelTwo() {
  2251. this.open = false
  2252. let view = {
  2253. fullPath: '/domesticTrade/orderInformation?data=%7B%22fId%22%3A687%7D',
  2254. hash: '',
  2255. matched: Array(2),
  2256. meta: Object,
  2257. name: 'OrderInformation',
  2258. params: Object,
  2259. path: '/domesticTrade/orderInformation',
  2260. query: Object,
  2261. title: '订单信息'
  2262. }
  2263. this.$router.push({ path: '/index' })
  2264. this.$store
  2265. .dispatch('tagsView/delView', view)
  2266. .then(({ visitedViews }) => {
  2267. if (this.isActive(view)) {
  2268. this.toLastView(visitedViews, view)
  2269. }
  2270. })
  2271. Global.$emit('removeCache', 'closeSelectedTag', view)
  2272. },
  2273. // 查看审批流
  2274. getDataList() {
  2275. this.addOrUpdateVisible = false
  2276. },
  2277. returnData() {
  2278. this.addOrUpdateVisib = false
  2279. this.open = false
  2280. this.cancelTwo()
  2281. },
  2282. revisionApproval(){
  2283. let list = JSON.parse(this.$route.query.testing)
  2284. let actId = ''
  2285. console.log(list)
  2286. this.addOrUpdateVisible = true
  2287. if(list.refno4 == 'XGDD'){
  2288. actId = 471
  2289. }else if (list.refno4 == 'XGTJ'){
  2290. actId = 472
  2291. }else if(list.refno4 == 'DDSC'){
  2292. actId = 473
  2293. }
  2294. this.$nextTick(() => {
  2295. this.$refs.addOrUpdate.init(this.form.fId,actId,list.fidStatus)
  2296. })
  2297. },
  2298. addOrUpdateHandle(status) {
  2299. this.addOrUpdateVisible = true
  2300. let id = '448'
  2301. let actId = ''
  2302. if (this.form.fBillstatus < 6) {
  2303. actId = '410'
  2304. } else if (this.form.moneyStatus != null && this.form.moneyStatus < 6) {
  2305. actId = '460'
  2306. } else {
  2307. actId = '420'
  2308. }
  2309. this.$nextTick(() => {
  2310. this.$refs.addOrUpdate.init(this.form.fId, actId,status)
  2311. })
  2312. },
  2313. handleSelect() {
  2314. },
  2315. //应收新行
  2316. addCollection() {
  2317. this.warehouseDrList.push({
  2318. fBusinessType: null,
  2319. fCorpid: this.form.corpName,
  2320. fFeeid: null,
  2321. fFeeUnitid: '7',
  2322. fQty: null,
  2323. fUnitprice: null,
  2324. fAmount: null,
  2325. fStltypeid: null,
  2326. fCurrency: 'RMB',
  2327. fExrate: '1',
  2328. fTaxrate: this.fTaxrate,
  2329. fSrcTypeId: 0,
  2330. remarks: null
  2331. })
  2332. },
  2333. //提交审批
  2334. approval(res) {
  2335. if (!this.form.fMblno) {
  2336. this.$message.error('请维护提单号')
  2337. return false
  2338. }
  2339. // if (this.dataList.length === 0) {
  2340. // this.$message.error('请维护箱信息')
  2341. // return false
  2342. // }
  2343. if (res != 1 && this.form.fMblno || res != 1 && this.dataList.length != 0) {
  2344. this.$router.push({ path: '/domesticTrade/myOrder' })
  2345. this.modify = true
  2346. }
  2347. let form = {
  2348. fId: this.form.fId,
  2349. fMblno: this.form.fMblno
  2350. }
  2351. let formData = new window.FormData()
  2352. for (let li in this.warehouseDrList) {
  2353. this.warehouseDrList[li].fMblno = this.form.fMblno
  2354. for (let item in this.nameOptions) {
  2355. if (this.warehouseDrList[li].fCorpid == this.nameOptions[item].fName) {
  2356. this.warehouseDrList[li].fCorpid = this.nameOptions[item].fId
  2357. }
  2358. }
  2359. }
  2360. for (let item in this.warehouseCrList) {
  2361. this.warehouseCrList[item].fMblno = this.form.fMblno
  2362. }
  2363. formData.append('tWarehousebills', JSON.stringify(this.form))
  2364. formData.append("tWarehousebillsCntr",JSON.stringify(this.goodsList))
  2365. formData.append('tWarehousebillsCntritems', JSON.stringify(this.dataList))
  2366. formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
  2367. formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
  2368. postApproval(formData).then(response => {
  2369. this.msgSuccess('操作成功')
  2370. if (response.data.tWarehouseBills) {
  2371. this.form = response.data.tWarehouseBills
  2372. this.$set(this.form,'fPaymode',JSON.stringify(this.form.fPaymode))
  2373. this.$set(this.form,'fSign',JSON.stringify(this.form.fSign))
  2374. this.$set(this.form,'fDetentioncargo',JSON.stringify(this.form.fDetentioncargo))
  2375. }
  2376. if(response.data.tWarehousebillsCntrList){
  2377. this.goodsList = response.data.tWarehousebillsCntrList
  2378. }
  2379. if (response.data.tWarehousebillsCntritemsList !== null) {
  2380. this.dataList = response.data.tWarehousebillsCntritemsList
  2381. }else this.dataList = []
  2382. if (response.data.warehousebillsfeesCrList) {
  2383. this.warehouseCrList = response.data.warehousebillsfeesCrList
  2384. for (let item in this.warehouseCrList) {
  2385. this.$set(this.warehouseCrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseCrList[item].fFeeunitid))
  2386. }
  2387. }
  2388. if (response.data.warehousebillsfeesDrList) {
  2389. this.warehouseDrList = response.data.warehousebillsfeesDrList
  2390. for (let item in this.warehouseDrList) {
  2391. this.$set(this.warehouseDrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseDrList[item].fFeeunitid))
  2392. }
  2393. }
  2394. })
  2395. },
  2396. //新行
  2397. addList() {
  2398. this.dataList.push({
  2399. fManual: '1',
  2400. fCntrno: null,
  2401. fSealno: null,
  2402. fCntrweight: null,
  2403. fGoodsid: null,
  2404. fPackageid: null,
  2405. fCntrid: null
  2406. })
  2407. },
  2408. //查看附件
  2409. check(status) {
  2410. this.dialogVisible = true
  2411. if (status === 1) {
  2412. } else {
  2413. }
  2414. },
  2415. saveFile() {
  2416. this.row.accessoryList = this.file
  2417. this.dialogVisible = false
  2418. this.relevantAttachments = []
  2419. },
  2420. deleteRow(index, rows) {
  2421. rows.splice(index, 1)
  2422. },
  2423. //多选框选中
  2424. handleSelectionChange(selection) {
  2425. this.ids = selection.map(item => item.fId)
  2426. this.select = selection
  2427. }
  2428. }
  2429. }
  2430. </script>
  2431. <style lang="scss" scoped>
  2432. .tabSetting {
  2433. display: flex;
  2434. justify-content: flex-end;
  2435. }
  2436. .listStyle {
  2437. display: flex;
  2438. border-top: 1px solid #dcdfe6;
  2439. border-left: 1px solid #dcdfe6;
  2440. border-right: 1px solid #dcdfe6;
  2441. }
  2442. .listStyle:last-child {
  2443. border-bottom: 1px solid #dcdfe6;
  2444. }
  2445. .progress {
  2446. display: flex;
  2447. align-items: center;
  2448. padding: 2px;
  2449. background-color: rgba(0, 0, 0, 0.05);
  2450. height: 100%;
  2451. }
  2452. .el-form {
  2453. padding-top: 20px;
  2454. //border-top:1px dashed #ccc;
  2455. }
  2456. .selectForm > > > .el-form-item__label {
  2457. font-size: 12px !important;
  2458. }
  2459. .app-container /deep/ .el-collapse-item__content{
  2460. padding-bottom:0
  2461. }
  2462. </style>
  2463. <style lang="scss">
  2464. .el-collapse-item__header {
  2465. font-size: 16px;
  2466. font-weight: bolder;
  2467. padding-left: 5px;
  2468. background-color: #f8f8f9;
  2469. }
  2470. .el-form-item__label {
  2471. font-size: 12px;
  2472. }
  2473. </style>