index.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580
  1. <template>
  2. <div class="app-container">
  3. <el-menu
  4. :default-active="activeIndex"
  5. class="el-menu-demo"
  6. mode="horizontal"
  7. @select="handleSelect"
  8. text-color="#000"
  9. active-text-color="#ffd04b"
  10. >
  11. <el-menu-item index="0">全部</el-menu-item>
  12. <el-menu-item index="1">待审核</el-menu-item>
  13. <el-menu-item index="2">订舱审核通过</el-menu-item>
  14. <el-menu-item index="3">待配船</el-menu-item>
  15. <el-menu-item index="4">配船审核通过</el-menu-item>
  16. <!-- <el-menu-item index="5">已撤销</el-menu-item>-->
  17. <el-menu-item index="10">已驳回</el-menu-item>
  18. <el-menu-item index="12">运单变更</el-menu-item>
  19. </el-menu>
  20. <el-form
  21. :model="queryParams"
  22. ref="queryForm"
  23. :inline="true"
  24. v-show="showSearch"
  25. label-width="68px"
  26. style="margin-top: 20px"
  27. >
  28. <el-row>
  29. <el-col :span="6">
  30. <el-form-item label="船名" prop="fVslid">
  31. <el-select
  32. size="small"
  33. style="width: 240px"
  34. v-model="queryParams.fVslid"
  35. @change="vslidChange"
  36. clearable
  37. >
  38. <el-option
  39. v-for="item in vesselOptions"
  40. :key="item.fId"
  41. :label="item.fName"
  42. :value="item.fId"
  43. />
  44. </el-select>
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="6">
  48. <el-form-item label="航次" prop="fVoyid">
  49. <el-select
  50. v-model="queryParams.fVoyid"
  51. filterable
  52. clearable
  53. remote
  54. size="small"
  55. style="width: 240px"
  56. >
  57. <el-option
  58. v-for="item in voyageOptions"
  59. :key="item.fId"
  60. :label="item.fNo"
  61. :value="item.fId"
  62. />
  63. </el-select>
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="6">
  67. <el-form-item label="订舱日期" prop="cLoadDate">
  68. <el-date-picker
  69. v-model="queryParams.cLoadDate"
  70. type="daterange"
  71. range-separator="至"
  72. style="width: 240px"
  73. value-format="yyyy-MM-dd HH:mm:ss"
  74. :default-time="['00:00:00', '23:59:59']"
  75. start-placeholder="开始日期"
  76. end-placeholder="结束日期"
  77. size="small"
  78. >
  79. </el-date-picker>
  80. </el-form-item>
  81. </el-col>
  82. <el-col :span="6">
  83. <el-form-item label="起运港口" prop="fLoadportid">
  84. <el-select
  85. v-model="queryParams.fLoadportid"
  86. filterable
  87. remote
  88. clearable
  89. size="small"
  90. style="width: 240px"
  91. class="elSelect"
  92. placeholder="请输入模糊查找目的港口"
  93. >
  94. <el-scrollbar>
  95. <el-option
  96. v-for="(dict, index) in fMblnoOptions"
  97. :key="index"
  98. :label="dict.fName"
  99. :value="dict.fId"
  100. ></el-option>
  101. </el-scrollbar>
  102. </el-select>
  103. </el-form-item>
  104. </el-col>
  105. </el-row>
  106. <el-collapse-transition>
  107. <div v-show="show">
  108. <el-row>
  109. <el-col :span="6">
  110. <el-form-item label="目的港口" prop="fDestportid">
  111. <el-select
  112. v-model="queryParams.fDestportid"
  113. filterable
  114. clearable
  115. remote
  116. size="small"
  117. style="width: 240px"
  118. class="elSelect"
  119. placeholder="请输入模糊查找目的港口"
  120. >
  121. <el-scrollbar>
  122. <el-option
  123. v-for="(dict, index) in fMblnoOptions"
  124. :key="index"
  125. :label="dict.fName"
  126. :value="dict.fId"
  127. ></el-option>
  128. </el-scrollbar>
  129. </el-select>
  130. </el-form-item>
  131. </el-col>
  132. <el-col :span="6">
  133. <el-form-item label="提单号" prop="fMblno">
  134. <el-input
  135. size="small"
  136. style="width: 240px"
  137. clearable
  138. v-model="queryParams.fMblno"
  139. ></el-input>
  140. </el-form-item>
  141. </el-col>
  142. <el-col :span="6">
  143. <el-form-item label="订舱单位" prop="fCorpid">
  144. <el-select
  145. v-model="queryParams.fCorpid"
  146. clearable
  147. filterable
  148. size="small"
  149. placeholder="请选择订舱单位"
  150. style="width: 240px"
  151. >
  152. <el-option
  153. v-for="(item, index) in fCorpid"
  154. :key="index.fId"
  155. :label="item.fName"
  156. :value="item.fId"
  157. ></el-option>
  158. </el-select>
  159. </el-form-item>
  160. </el-col>
  161. <el-col :span="6">
  162. <el-form-item label="货物状态" prop="fCaregoStatus">
  163. <el-select
  164. v-model="queryParams.fCaregoStatus"
  165. clearable
  166. filterable
  167. size="small"
  168. placeholder="请选择货物状态"
  169. style="width: 240px"
  170. >
  171. <el-option
  172. v-for="(item, index) in caregoList"
  173. :key="index.dictValue"
  174. :label="item.dictLabel"
  175. :value="item.dictValue"
  176. ></el-option>
  177. </el-select>
  178. </el-form-item>
  179. </el-col>
  180. </el-row>
  181. <el-row>
  182. <el-col :span="6">
  183. <el-form-item label="业务员" prop="createBy">
  184. <el-select
  185. v-model="queryParams.createBy"
  186. clearable
  187. filterable
  188. size="small"
  189. placeholder="请选择业务员"
  190. style="width: 240px"
  191. >
  192. <el-option
  193. v-for="(item, index) in createBy"
  194. :key="index.userId"
  195. :label="item.userName"
  196. :value="item.userId"
  197. ></el-option>
  198. </el-select>
  199. </el-form-item>
  200. </el-col>
  201. <el-col :span="6">
  202. <el-form-item label="箱号" prop="fCntrno">
  203. <el-input
  204. size="small"
  205. style="width: 240px"
  206. clearable
  207. v-model="queryParams.fCntrno"
  208. placeholder="请输入箱号"
  209. ></el-input>
  210. </el-form-item>
  211. </el-col>
  212. <el-col :span="6">
  213. <el-form-item label="开船日期" prop="timeInterval">
  214. <el-date-picker
  215. v-model="queryParams.timeInterval"
  216. type="daterange"
  217. range-separator="至"
  218. style="width: 240px"
  219. value-format="yyyy-MM-dd HH:mm:ss"
  220. :default-time="['00:00:00', '23:59:59']"
  221. start-placeholder="开始日期"
  222. end-placeholder="结束日期"
  223. size="small"
  224. >
  225. </el-date-picker>
  226. </el-form-item>
  227. </el-col>
  228. </el-row>
  229. </div>
  230. </el-collapse-transition>
  231. </el-form>
  232. <el-row :gutter="10" class="mb8">
  233. <div style="float: left">
  234. <el-button
  235. type="cyan"
  236. icon="el-icon-search"
  237. size="mini"
  238. @click="handleQuery"
  239. >搜索</el-button
  240. >
  241. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  242. >重置</el-button
  243. >
  244. <el-button
  245. v-show="show"
  246. @click="show = !show"
  247. icon="el-icon-arrow-up"
  248. size="mini"
  249. >展开</el-button
  250. >
  251. <el-button
  252. v-show="!show"
  253. @click="show = !show"
  254. icon="el-icon-arrow-down"
  255. size="mini"
  256. >展开</el-button
  257. >
  258. <el-button
  259. type="primary"
  260. icon="el-icon-download"
  261. size="mini"
  262. @click="handleExport"
  263. >导出</el-button
  264. >
  265. <el-button
  266. type="primary"
  267. icon="el-icon-download"
  268. size="mini"
  269. @click="handleExportItem"
  270. >导出明细</el-button
  271. >
  272. <el-button
  273. type="primary"
  274. plain
  275. icon="el-icon-search"
  276. size="mini"
  277. @click="matchingShip(false)"
  278. :disabled="
  279. selection.length == 0
  280. ? true
  281. : false ||
  282. selection.findIndex(function (item) {
  283. return item.vslName !== selection[0].vslName;
  284. }) === -1
  285. ? selection.findIndex(function (item) {
  286. return item.voyNo !== selection[0].voyNo;
  287. }) === -1
  288. ? false
  289. : true
  290. : true
  291. "
  292. >配船</el-button
  293. >
  294. <el-button
  295. type="info"
  296. plain
  297. icon="el-icon-search"
  298. size="mini"
  299. @click="cancelShip"
  300. :disabled="selection.length == 0 ? true : false"
  301. >取消配船</el-button
  302. >
  303. <el-button
  304. type="primary"
  305. plain
  306. icon="el-icon-search"
  307. size="mini"
  308. @click="inDetention(3)"
  309. :disabled="
  310. selection.length == 0
  311. ? true
  312. : false ||
  313. selection.findIndex(function (item) {
  314. return item.fCaregoStatus == '放货';
  315. }) === -1
  316. "
  317. >扣货</el-button
  318. >
  319. <el-button
  320. type="info"
  321. plain
  322. icon="el-icon-search"
  323. size="mini"
  324. @click="inDetention(2)"
  325. :disabled="
  326. selection.length == 0
  327. ? true
  328. : false ||
  329. selection.findIndex(function (item) {
  330. return item.fCaregoStatus == '扣货';
  331. }) === -1
  332. "
  333. >取消扣货</el-button
  334. >
  335. <el-button
  336. type="primary"
  337. icon="el-icon-search"
  338. size="mini"
  339. @click="transship(true)"
  340. :disabled="selection.length == 0 ? true : false"
  341. >转船</el-button
  342. >
  343. <el-button
  344. type="primary"
  345. icon="el-icon-search"
  346. size="mini"
  347. @click="transvoyage(true)"
  348. :disabled="selection.length == 0 ? true : false"
  349. >转航次</el-button
  350. >
  351. <el-button
  352. type="warning"
  353. size="mini">
  354. 提货EDI
  355. </el-button>
  356. </div>
  357. <div class="tabSetting">
  358. <right-toolbar
  359. :showSearch.sync="showSearch"
  360. @queryTable="getList"
  361. ></right-toolbar>
  362. <div style="margin: 0 12px">
  363. <el-button
  364. icon="el-icon-setting"
  365. size="mini"
  366. circle
  367. @click="showSetting = !showSetting"
  368. ></el-button>
  369. </div>
  370. </div>
  371. </el-row>
  372. <el-dialog
  373. title="提示"
  374. :visible.sync="showSetting"
  375. width="700px"
  376. v-dialogDrag
  377. >
  378. <template slot="title">
  379. <div class="avue-crud__dialog__header">
  380. <span class="el-dialog__title">
  381. <span
  382. style="
  383. display: inline-block;
  384. width: 3px;
  385. height: 20px;
  386. margin-right: 5px;
  387. float: left;
  388. margin-top: 2px;
  389. "
  390. ></span>
  391. </span>
  392. </div>
  393. </template>
  394. <div>配置排序列数据(拖动调整顺序)</div>
  395. <div style="margin-left: 17px">
  396. <el-checkbox
  397. v-model="allCheck"
  398. label="全选"
  399. @change="allChecked"
  400. ></el-checkbox>
  401. </div>
  402. <div style="padding: 4px; display: flex; justify-content: center">
  403. <draggable
  404. v-model="setRowList"
  405. group="site"
  406. animation="300"
  407. @start="onStart"
  408. @end="onEnd"
  409. handle=".indraggable"
  410. >
  411. <transition-group>
  412. <div
  413. v-for="item in setRowList"
  414. :key="item.surface"
  415. class="listStyle"
  416. >
  417. <div style="width: 500px" class="indraggable">
  418. <div class="progress" :style="{ width: item.width + 'px' }">
  419. <el-checkbox
  420. :label="item.name"
  421. v-model="item.checked"
  422. :true-label="0"
  423. :false-label="1"
  424. >{{ item.name }}
  425. </el-checkbox>
  426. </div>
  427. </div>
  428. <el-input-number
  429. v-model.number="item.width"
  430. controls-position="right"
  431. :min="1"
  432. :max="500"
  433. size="mini"
  434. ></el-input-number>
  435. </div>
  436. </transition-group>
  437. </draggable>
  438. </div>
  439. <span slot="footer" class="dialog-footer">
  440. <el-button @click="showSetting = false">取 消</el-button>
  441. <el-button @click="delRow" type="danger">重 置</el-button>
  442. <el-button type="primary" @click="save()">确 定</el-button>
  443. </span>
  444. </el-dialog>
  445. <el-table
  446. v-loading="loading"
  447. :data="corpsList"
  448. show-summary
  449. :summary-method="getSummaries"
  450. @selection-change="handleSelectionChange"
  451. >
  452. <el-table-column type="selection" width="60" align="center" />
  453. <el-table-column label="行号" align="center" type="index" />
  454. <el-table-column
  455. v-for="(item, index) in getRowList"
  456. :key="index"
  457. :label="item.name"
  458. :width="item.width"
  459. :prop="item.label"
  460. align="center"
  461. :fixed="item.fixed"
  462. :show-overflow-tooltip="true"
  463. sortable
  464. >
  465. <template slot-scope="scope">
  466. <span v-if="item.label == 'createTime'">{{
  467. scope.row.createTime.slice(0, 10)
  468. }}</span>
  469. <span v-else-if="item.label == 'fCargoPlanning'">{{
  470. scope.row.fCargoPlanning == "1" ? "否" : "是"
  471. }}</span>
  472. <span v-else-if="item.label == 'fCaregoStatus'">
  473. <p style="color: #67c23a" v-if="scope.row.fCaregoStatus == '放货'">
  474. {{ scope.row.fCaregoStatus }}
  475. </p>
  476. <p
  477. style="color: #f56c6c"
  478. v-else-if="scope.row.fCaregoStatus == '扣货'"
  479. >
  480. {{ scope.row.fCaregoStatus }}
  481. </p>
  482. <p v-else>{{ scope.row.fCaregoStatus }}</p>
  483. </span>
  484. <span v-else-if="item.label == 'fArrivalStatus'">{{
  485. scope.row.fArrivalStatus | transshipName
  486. }}</span>
  487. <span v-else>{{ scope.row[item.label] }}</span>
  488. </template>
  489. </el-table-column>
  490. <!-- <el-table-column label="订舱号" align="center" prop="fBillno"/>-->
  491. <!-- <el-table-column label="运输条款" align="center" prop="fServiceitems" />-->
  492. <!-- <el-table-column label="收货人" align="center" prop="fConsigneername"/>-->
  493. <!-- <el-table-column label="航线" align="center" prop="fName"/>-->
  494. <!-- <el-table-column label="箱型" align="center" prop="fNo"/>-->
  495. <!-- <el-table-column label="箱量" align="center" prop="fCntrcount"/>-->
  496. <!-- <el-table-column label="装货时间" align="center" prop="fBsdate"/>-->
  497. <el-table-column
  498. label="操作"
  499. fixed="right"
  500. align="center"
  501. class-name="small-padding fixed-width"
  502. min-width="160px"
  503. >
  504. <template slot-scope="scope">
  505. <el-button
  506. size="mini"
  507. type="text"
  508. icon="el-icon-edit"
  509. @click="handleUpdate(scope.row, 1)"
  510. v-hasPermi="['warehouse:warehousebills:webVersionOrderDetails']"
  511. >查看
  512. </el-button>
  513. <!-- <el-button-->
  514. <!-- size="mini"-->
  515. <!-- type="text"-->
  516. <!-- icon="el-icon-delete"-->
  517. <!-- @click="handleDelete(scope.row)"-->
  518. <!-- >移除</el-button>-->
  519. </template>
  520. </el-table-column>
  521. <!-- <el-table-column-->
  522. <!-- class-name="small-padding fixed-width"-->
  523. <!-- v-for="(item,index) in boxDistributionName"-->
  524. <!-- :key="item.index"-->
  525. <!-- :label="item"-->
  526. <!-- :value="item.index"-->
  527. <!-- :prop="item"-->
  528. <!-- >-->
  529. <!-- </el-table-column>-->
  530. </el-table>
  531. <pagination
  532. v-show="total > 0"
  533. :total="total"
  534. :page.sync="queryParams.pageNum"
  535. :limit.sync="queryParams.pageSize"
  536. @pagination="getList"
  537. />
  538. <el-dialog title="配船" :visible.sync="shipAllocation" width="50%">
  539. <el-form :inline="true" :model="ship" class="demo-form-inline">
  540. <el-row>
  541. <el-col :span="12">
  542. <el-form-item label="船名">
  543. <el-select
  544. size="small"
  545. width="240px"
  546. v-model="ship.fVslid"
  547. @change="voyageRemthods"
  548. >
  549. <el-option
  550. v-for="item in vesselOptions"
  551. :key="item.fId"
  552. :label="item.fName"
  553. :value="item.fId"
  554. />
  555. </el-select>
  556. </el-form-item>
  557. </el-col>
  558. <el-col :span="12">
  559. <el-form-item label="航次">
  560. <el-select
  561. v-model="ship.fVoyid"
  562. filterable
  563. remote
  564. size="small"
  565. style="width: 200px"
  566. >
  567. <el-option
  568. v-for="item in voyageOptions"
  569. :key="item.fId"
  570. :label="item.fNo"
  571. :value="item.fId"
  572. />
  573. </el-select>
  574. </el-form-item>
  575. </el-col>
  576. </el-row>
  577. </el-form>
  578. <span slot="footer" class="dialog-footer">
  579. <el-button @click="shipAllocation = false">取 消</el-button>
  580. <el-button type="primary" @click="matchingShip(true)">确 定</el-button>
  581. </span>
  582. </el-dialog>
  583. <el-dialog
  584. title="转船"
  585. :visible.sync="transshipVisible"
  586. width="50%"
  587. @closed="transshipClosed"
  588. >
  589. <el-form :inline="true" :model="ship2" class="demo-form-inline">
  590. <el-row>
  591. <el-col :span="12">
  592. <el-form-item label="船名">
  593. <el-select
  594. size="small"
  595. width="240px"
  596. v-model="ship2.fVslid"
  597. @change="voyageRemthods2"
  598. >
  599. <el-option
  600. v-for="item in vesselOptions"
  601. :key="item.fId"
  602. :label="item.fName"
  603. :value="item.fId"
  604. />
  605. </el-select>
  606. </el-form-item>
  607. </el-col>
  608. <el-col :span="12">
  609. <el-form-item label="航次">
  610. <el-select
  611. v-model="ship2.fVoyid"
  612. size="small"
  613. style="width: 200px"
  614. >
  615. <el-option
  616. v-for="item in voyageOptions2"
  617. :key="item.fId"
  618. :label="item.fNo"
  619. :value="item.fId"
  620. />
  621. </el-select>
  622. </el-form-item>
  623. </el-col>
  624. </el-row>
  625. </el-form>
  626. <span slot="footer" class="dialog-footer">
  627. <el-button @click="transshipVisible = false">取 消</el-button>
  628. <el-button type="primary" @click="transship(false)">确 定</el-button>
  629. </span>
  630. </el-dialog>
  631. <el-dialog
  632. title="转船"
  633. :visible.sync="transvoyageVisible"
  634. width="50%"
  635. @closed="transvoyageClosed"
  636. >
  637. <el-form :inline="true" :model="ship3" class="demo-form-inline">
  638. <el-row>
  639. <el-col :span="12">
  640. <el-form-item label="船名">
  641. <el-select
  642. size="small"
  643. width="240px"
  644. v-model="ship3.fVslid"
  645. @change="voyageRemthods3"
  646. >
  647. <el-option
  648. v-for="item in vesselOptions"
  649. :key="item.fId"
  650. :label="item.fName"
  651. :value="item.fId"
  652. />
  653. </el-select>
  654. </el-form-item>
  655. </el-col>
  656. <el-col :span="12">
  657. <el-form-item label="航次">
  658. <el-select
  659. v-model="ship3.fVoyid"
  660. size="small"
  661. style="width: 200px"
  662. >
  663. <el-option
  664. v-for="item in voyageOptions3"
  665. :key="item.fId"
  666. :label="item.fNo"
  667. :value="item.fId"
  668. />
  669. </el-select>
  670. </el-form-item>
  671. </el-col>
  672. </el-row>
  673. </el-form>
  674. <span slot="footer" class="dialog-footer">
  675. <el-button @click="transvoyageVisible = false">取 消</el-button>
  676. <el-button type="primary" @click="transvoyage(false)">确 定</el-button>
  677. </span>
  678. </el-dialog>
  679. </div>
  680. </template>
  681. <script>
  682. import {
  683. bookingParty,
  684. selectUserByRole,
  685. listCorps,
  686. getcntrName,
  687. delCorps,
  688. changeCorpsStatus,
  689. exportInventory,
  690. cancelAllocation,
  691. confirmAllocation,
  692. exportItem,
  693. detention,
  694. } from "@/api/kaihe/domesticTrade/myOrder";
  695. import Cookies from "js-cookie";
  696. import { addSet, resetModule, select } from "@/api/system/set";
  697. import Vue from "vue";
  698. import draggable from "vuedraggable";
  699. import {
  700. getVesselName,
  701. transship,
  702. transvoyage
  703. } from "@/api/finance/applyForInvoice/chargeInvoice";
  704. import {
  705. getVoyageName,
  706. getVoyageName2,
  707. } from "@/api/finance/applyForInvoice/feeDetail";
  708. import { portInquiry } from "@/api/kaihe/domesticTrade/orderInformation";
  709. import { defaultDate } from "@/utils/date";
  710. Vue.directive("dialogDrag", {
  711. bind(el, binding, vnode, oldVnode) {
  712. const dialogHeaderEl = el.querySelector(".el-dialog__header");
  713. const dragDom = el.querySelector(".el-dialog");
  714. const enlarge = el.querySelector(".enlarge");
  715. dialogHeaderEl.style.cursor = "move";
  716. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  717. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
  718. if (enlarge) {
  719. enlarge.onclick = (e) => {
  720. dragDom.style.top = "0px";
  721. dragDom.style.left = "0px";
  722. };
  723. }
  724. dialogHeaderEl.onmousedown = (e) => {
  725. // 鼠标按下,计算当前元素距离可视区的距离
  726. const disX = e.clientX - dialogHeaderEl.offsetLeft;
  727. const disY = e.clientY - dialogHeaderEl.offsetTop;
  728. // 获取到的值带px 正则匹配替换
  729. let styL, styT;
  730. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  731. if (sty.left.includes("%")) {
  732. styL =
  733. +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
  734. styT =
  735. +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
  736. } else {
  737. styL = +sty.left.replace(/\px/g, "");
  738. styT = +sty.top.replace(/\px/g, "");
  739. }
  740. document.onmousemove = function (e) {
  741. // 通过事件委托,计算移动的距离
  742. const l = e.clientX - disX;
  743. const t = e.clientY - disY;
  744. // 移动当前元素
  745. if (t + styT >= 0) {
  746. dragDom.style.top = `${t + styT}px`;
  747. }
  748. dragDom.style.left = `${l + styL}px`;
  749. // 将此时的位置传出去
  750. // binding.value({x:e.pageX,y:e.pageY})
  751. };
  752. document.onmouseup = function (e) {
  753. document.onmousemove = null;
  754. document.onmouseup = null;
  755. };
  756. };
  757. },
  758. });
  759. export default {
  760. name: "myOrder",
  761. components: {
  762. draggable,
  763. },
  764. data() {
  765. return {
  766. transvoyageVisible: false,
  767. transshipVisible: false,
  768. voyageOptions: [],
  769. voyageOptions2: [],
  770. voyageOptions3: [],
  771. vesselOptions: [],
  772. show: false,
  773. activeIndex: "0",
  774. setRowList: [],
  775. getRowList: [],
  776. tableDate: [
  777. {
  778. surface: "1",
  779. label: "fBillno",
  780. name: "订舱号",
  781. checked: 0,
  782. width: 120,
  783. },
  784. {
  785. surface: "2",
  786. label: "fServiceitems",
  787. name: "运输条款",
  788. checked: 0,
  789. width: 140,
  790. },
  791. {
  792. surface: "3",
  793. label: "fConsigneername",
  794. name: "收货人",
  795. checked: 0,
  796. width: 120,
  797. },
  798. {
  799. surface: "4",
  800. label: "fName",
  801. name: "航线",
  802. checked: 0,
  803. width: 120,
  804. },
  805. {
  806. surface: "5",
  807. label: "fNo",
  808. name: "箱型",
  809. checked: 0,
  810. width: 120,
  811. },
  812. {
  813. surface: "6",
  814. label: "fCntrcount",
  815. name: "箱量",
  816. checked: 0,
  817. width: 120,
  818. },
  819. {
  820. surface: "7",
  821. label: "loadCntr",
  822. name: "返箱数",
  823. checked: 0,
  824. width: 120,
  825. },
  826. {
  827. surface: "8",
  828. label: "fBsdate",
  829. name: "装货时间",
  830. checked: 0,
  831. width: 120,
  832. },
  833. {
  834. surface: "9",
  835. label: "fAtd",
  836. name: "开船日期",
  837. checked: 0,
  838. width: 120,
  839. },
  840. {
  841. surface: "10",
  842. label: "fBillstatus",
  843. name: "状态",
  844. checked: 0,
  845. width: 120,
  846. },
  847. {
  848. surface: "11",
  849. label: "vslName",
  850. name: "船名",
  851. checked: 0,
  852. width: 120,
  853. },
  854. {
  855. surface: "12",
  856. label: "voyNo",
  857. name: "航次",
  858. checked: 0,
  859. width: 120,
  860. },
  861. {
  862. surface: "13",
  863. label: "fMblno",
  864. name: "提单号",
  865. checked: 0,
  866. width: 120,
  867. },
  868. {
  869. surface: "14",
  870. label: "corpName",
  871. name: "订舱单位",
  872. checked: 0,
  873. width: 120,
  874. },
  875. {
  876. surface: "15",
  877. label: "goodsName",
  878. name: "货名",
  879. checked: 0,
  880. width: 120,
  881. },
  882. {
  883. surface: "16",
  884. label: "createBy",
  885. name: "订舱人",
  886. checked: 0,
  887. width: 120,
  888. },
  889. {
  890. surface: "17",
  891. label: "createTime",
  892. name: "订舱时间",
  893. checked: 0,
  894. width: 120,
  895. },
  896. {
  897. surface: "18",
  898. label: "loadportName",
  899. name: "起运港",
  900. checked: 0,
  901. width: 120,
  902. },
  903. {
  904. surface: "19",
  905. label: "destportName",
  906. name: "目的港",
  907. checked: 0,
  908. width: 120,
  909. },
  910. {
  911. surface: "20",
  912. label: "moneyStatus",
  913. name: "费用状态",
  914. checked: 0,
  915. width: 120,
  916. },
  917. {
  918. surface: "21",
  919. label: "fReceivable",
  920. name: "应收",
  921. checked: 0,
  922. width: 120,
  923. },
  924. {
  925. surface: "22",
  926. label: "fRecycle",
  927. name: "实收",
  928. checked: 0,
  929. width: 120,
  930. },
  931. {
  932. surface: "23",
  933. label: "fDue",
  934. name: "应付",
  935. checked: 0,
  936. width: 120,
  937. },
  938. {
  939. surface: "24",
  940. label: "fPay",
  941. name: "实付",
  942. checked: 0,
  943. width: 120,
  944. },
  945. {
  946. surface: "25",
  947. label: "fCaregoStatus",
  948. name: "货物状态",
  949. checked: 0,
  950. width: 120,
  951. },
  952. {
  953. surface: "26",
  954. label: "fCargoPlanning",
  955. name: "配船",
  956. checked: 0,
  957. width: 120,
  958. },
  959. {
  960. surface: "27",
  961. label: "fArrivalStatus",
  962. name: "离港状态",
  963. checked: 0,
  964. width: 120,
  965. },
  966. {
  967. surface: "28",
  968. label: "fShipTwoName",
  969. name: "二程船名",
  970. checked: 0,
  971. width: 120,
  972. },
  973. {
  974. surface: "29",
  975. label: "fVoyTwoName",
  976. name: "二程航次",
  977. checked: 0,
  978. width: 120,
  979. },
  980. // {
  981. // surface: "30",
  982. // label: "fShipThreeName",
  983. // name: "三程船名",
  984. // checked: 0,
  985. // width: 120,
  986. // },
  987. // {
  988. // surface: "31",
  989. // label: "fVoyThreeName",
  990. // name: "三程航次",
  991. // checked: 0,
  992. // width: 120,
  993. // },
  994. {
  995. surface: "32",
  996. label: "remark",
  997. name: "备注",
  998. checked: 0,
  999. width: 120,
  1000. },
  1001. ],
  1002. //自定义列宽
  1003. allCheck: false,
  1004. showSetting: false,
  1005. shipAllocation: false,
  1006. ship: {
  1007. fVoyid: "",
  1008. fVslid: "",
  1009. },
  1010. ship2: {
  1011. fVoyid: "",
  1012. fVslid: "",
  1013. },
  1014. ship3: {
  1015. fVoyid: "",
  1016. fVslid: "",
  1017. },
  1018. serviceitems: [],
  1019. container: [],
  1020. // 遮罩层
  1021. loading: true,
  1022. // 选中数组
  1023. ids: [],
  1024. selection: [],
  1025. // 非单个禁用
  1026. single: true,
  1027. // 非多个禁用
  1028. multiple: true,
  1029. // 显示搜索条件
  1030. showSearch: true,
  1031. // 总条数
  1032. total: 0,
  1033. // 客户详情表格数据
  1034. corpsList: [],
  1035. // 查询参数
  1036. queryParams: {
  1037. pageNum: 1,
  1038. pageSize: 10,
  1039. cLoadDate: defaultDate(),
  1040. },
  1041. fMblnoOptions: [],
  1042. createBy: [],
  1043. fCorpid: [],
  1044. caregoList: [],
  1045. };
  1046. },
  1047. created() {
  1048. this.setRowList = this.tableDate;
  1049. this.getRowList = this.tableDate;
  1050. portInquiry().then((res) => {
  1051. this.fMblnoOptions = res.rows;
  1052. });
  1053. selectUserByRole().then((res) => {
  1054. this.createBy = res.rows;
  1055. });
  1056. bookingParty().then((res) => {
  1057. this.fCorpid = res.rows;
  1058. });
  1059. this.getList();
  1060. this.cntrRemoteMethod();
  1061. this.vessleRemthod();
  1062. this.voyageRemthods();
  1063. this.getDicts("f_serviceitems").then((response) => {
  1064. if (response.data) {
  1065. this.serviceitems = response.data;
  1066. }
  1067. });
  1068. this.getDicts("carego_status").then((response) => {
  1069. if (response.data) {
  1070. this.caregoList = response.data;
  1071. }
  1072. });
  1073. this.getRow();
  1074. },
  1075. activated() {
  1076. this.getList();
  1077. // this.queryParams.timeInterval = this.queryParams.timeInterval
  1078. // ? this.queryParams.timeInterval
  1079. // : defaultDate();
  1080. },
  1081. filters: {
  1082. transshipName(row) {
  1083. if (row == 0) {
  1084. return "未离港";
  1085. } else if (row == 1) {
  1086. return "离港出运";
  1087. } else if (row == 2) {
  1088. return "到港卸船";
  1089. } else {
  1090. return "-";
  1091. }
  1092. },
  1093. },
  1094. methods: {
  1095. voyageRemthods() {
  1096. getVoyageName({ fPid: this.ship.fVslid }).then((response) => {
  1097. this.voyageOptions = response.rows;
  1098. if (this.ship.fVslid) this.ship.fVoyid = "";
  1099. });
  1100. },
  1101. voyageRemthods2() {
  1102. getVoyageName({ fPid: this.ship2.fVslid }).then((response) => {
  1103. this.voyageOptions2 = response.rows;
  1104. if (this.ship2.fVslid) this.ship2.fVoyid = "";
  1105. });
  1106. },
  1107. voyageRemthods3() {
  1108. getVoyageName({ fPid: this.ship3.fVslid }).then((response) => {
  1109. this.voyageOptions3 = response.rows;
  1110. if (this.ship3.fVslid) this.ship3.fVoyid = "";
  1111. });
  1112. },
  1113. transship(Bool) {
  1114. if (Bool) {
  1115. for (let i = 0; i < this.selection.length; i++) {
  1116. if (this.selection[i].fArrivalStatus != 2) {
  1117. return this.$message.error(
  1118. "订舱号:" + this.selection[i].fBillno + "未到港"
  1119. );
  1120. }
  1121. if (this.selection[i].fShipTwoName && this.selection[i].fVoyTwoName) {
  1122. return this.$message.error(
  1123. "订舱号:" + this.selection[i].fBillno + "已转船"
  1124. );
  1125. }
  1126. }
  1127. } else {
  1128. let ids = [];
  1129. this.selection.forEach((e) => {
  1130. ids.push(e.fId);
  1131. });
  1132. transship({
  1133. fVslid: this.ship2.fVslid,
  1134. fVoyid: this.ship2.fVoyid,
  1135. orderList: ids,
  1136. }).then((res) => {
  1137. if (res.code == 200) {
  1138. this.$message.success("转船成功");
  1139. this.getList();
  1140. }
  1141. });
  1142. }
  1143. this.transshipVisible = Bool;
  1144. },
  1145. transvoyage(Bool) {
  1146. if (Bool) {
  1147. // for (let i = 0; i < this.selection.length; i++) {
  1148. // if (this.selection[i].fArrivalStatus != 2) {
  1149. // return this.$message.error(
  1150. // "订舱号:" + this.selection[i].fBillno + "未到港"
  1151. // );
  1152. // }
  1153. // // if (this.selection[i].fShipTwoName && this.selection[i].fVoyTwoName) {
  1154. // // return this.$message.error(
  1155. // // "订舱号:" + this.selection[i].fBillno + "已转船"
  1156. // // );
  1157. // // }
  1158. // }
  1159. } else {
  1160. let ids = [];
  1161. this.selection.forEach((e) => {
  1162. ids.push(e.fId);
  1163. });
  1164. transvoyage({
  1165. fVslid: this.ship3.fVslid,
  1166. fVoyid: this.ship3.fVoyid,
  1167. orderList: ids,
  1168. }).then((res) => {
  1169. if (res.code == 200) {
  1170. this.$message.success("转船成功");
  1171. this.getList();
  1172. }
  1173. });
  1174. }
  1175. this.transvoyageVisible = Bool;
  1176. },
  1177. transshipClosed() {
  1178. this.ship2 = {
  1179. fVoyid: "",
  1180. fVslid: "",
  1181. };
  1182. this.voyageOptions2 = [];
  1183. },
  1184. transvoyageClosed() {
  1185. this.ship3 = {
  1186. fVoyid: "",
  1187. fVslid: "",
  1188. };
  1189. this.voyageOptions3 = [];
  1190. },
  1191. //获取船名
  1192. vessleRemthod() {
  1193. getVesselName().then((response) => {
  1194. this.vesselOptions = response.rows;
  1195. });
  1196. },
  1197. handleSelect(key, keyPath) {
  1198. if (key === "0") {
  1199. this.queryParams = {
  1200. pageNum: 1,
  1201. pageSize: 10,
  1202. };
  1203. } else if (key === "1") {
  1204. this.queryParams.fBillstatus = 4;
  1205. } else if (key === "2") {
  1206. this.queryParams.fBillstatus = 6;
  1207. } else if (key === "3") {
  1208. this.queryParams.fBillstatus = 9;
  1209. } else if (key === "4") {
  1210. this.queryParams.fBillstatus = 11;
  1211. } else if (key === "7") {
  1212. this.queryParams.fBillstatus = 12;
  1213. } else if (key === "10") {
  1214. this.queryParams.fBillstatus = 10;
  1215. } else if (key === "12") {
  1216. this.queryParams.fBillstatus = 12;
  1217. }
  1218. listCorps(this.queryParams).then((response) => {
  1219. this.corpsList = response.rows;
  1220. this.total = response.total;
  1221. this.loading = false;
  1222. });
  1223. },
  1224. //重置列表
  1225. delRow() {
  1226. this.data = {
  1227. tableName: "我的订单",
  1228. userId: Cookies.get("userName"),
  1229. };
  1230. resetModule(this.data).then((res) => {
  1231. if (res.code == 200) {
  1232. this.showSetting = false;
  1233. this.setRowList = this.tableDate;
  1234. this.getRowList = this.tableDate;
  1235. }
  1236. });
  1237. },
  1238. //列设置全选
  1239. allChecked() {
  1240. if (this.allCheck == true) {
  1241. this.setRowList.map((e) => {
  1242. return (e.checked = 0);
  1243. });
  1244. } else {
  1245. this.setRowList.map((e) => {
  1246. return (e.checked = 1);
  1247. });
  1248. }
  1249. },
  1250. //查询列数据
  1251. getRow() {
  1252. let that = this;
  1253. this.data = {
  1254. tableName: "我的订单",
  1255. userId: Cookies.get("userName"),
  1256. };
  1257. select(this.data).then((res) => {
  1258. if (res.data.length != 0) {
  1259. this.getRowList = res.data.filter((e) => e.checked == 0);
  1260. this.setRowList = res.data;
  1261. this.setRowList = this.setRowList.reduce((res, item) => {
  1262. res.push({
  1263. surface: item.surface,
  1264. label: item.label,
  1265. name: item.name,
  1266. checked: item.checked,
  1267. width: item.width,
  1268. fixed: item.fixed,
  1269. });
  1270. return res;
  1271. }, []);
  1272. }
  1273. });
  1274. },
  1275. //保存列设置
  1276. save() {
  1277. this.showSetting = false;
  1278. this.data = {
  1279. tableName: "我的订单",
  1280. userId: Cookies.get("userName"),
  1281. sysTableSetList: this.setRowList,
  1282. };
  1283. addSet(this.data).then((res) => {
  1284. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1285. });
  1286. },
  1287. //开始拖拽事件
  1288. onStart() {
  1289. this.drag = true;
  1290. },
  1291. //拖拽结束事件
  1292. onEnd() {
  1293. this.drag = false;
  1294. },
  1295. inDetention(type) {
  1296. let ids = [];
  1297. this.selection.forEach((e) => {
  1298. ids.push(e.fId);
  1299. });
  1300. detention({ fCaregoStatus: type, orderList: ids }).then((res) => {
  1301. if (res.code == 200) {
  1302. this.getList();
  1303. if (type == 3) {
  1304. this.$message.success("扣货成功");
  1305. } else {
  1306. this.$message.success("取消扣货成功");
  1307. }
  1308. }
  1309. });
  1310. },
  1311. //箱型下拉查询
  1312. cntrRemoteMethod() {
  1313. let queryParams = { pageNum: 1 };
  1314. getcntrName(queryParams).then((response) => {
  1315. this.container = response.rows;
  1316. });
  1317. },
  1318. vslidChange() {
  1319. getVoyageName({ fPid: this.queryParams.fVslid }).then((response) => {
  1320. this.voyageOptions = response.rows;
  1321. if (this.queryParams.fVoyid) {
  1322. this.queryParams.fVoyid = "";
  1323. }
  1324. });
  1325. },
  1326. /** 删除按钮操作 */
  1327. handleDelete(row) {
  1328. const fIds = row.fId || this.ids;
  1329. this.$confirm(
  1330. '是否确认删除客户详情编号为"' + fIds + '"的数据项?',
  1331. "警告",
  1332. {
  1333. confirmButtonText: "确定",
  1334. cancelButtonText: "取消",
  1335. type: "warning",
  1336. }
  1337. )
  1338. .then(function () {
  1339. return delCorps(fIds);
  1340. })
  1341. .then(() => {
  1342. this.getList();
  1343. this.msgSuccess("删除成功");
  1344. });
  1345. },
  1346. //查看跳转
  1347. handleUpdate(row, num) {
  1348. let res = {};
  1349. res = {
  1350. fId: row.fId,
  1351. num: num,
  1352. };
  1353. this.$router.push({
  1354. path: "/domesticTrade/orderInformation",
  1355. query: { data: JSON.stringify(res) },
  1356. });
  1357. },
  1358. //模糊查询地点
  1359. addressMethod() {
  1360. let queryParams = { pageNum: 1 };
  1361. getaddress(queryParams).then((response) => {
  1362. this.addressOptions = response.rows;
  1363. });
  1364. },
  1365. /** 查询客户详情列表 */
  1366. getList() {
  1367. listCorps(this.queryParams).then((response) => {
  1368. if (response.rows) {
  1369. response.rows.forEach((e) => {
  1370. e.fServiceitems = e.fServiceitems + "-" + e.fDestportMode;
  1371. if (e.fAtd) {
  1372. e.fAtd = e.fAtd.slice(0, 10);
  1373. }
  1374. });
  1375. }
  1376. this.corpsList = response.rows;
  1377. this.total = response.total;
  1378. this.loading = false;
  1379. });
  1380. },
  1381. // 从表重置
  1382. contList() {
  1383. this.contactList = [];
  1384. },
  1385. // 状态修改
  1386. handleStatusChange(row) {
  1387. let text = row.fStatus === "0" ? "启用" : "停用";
  1388. this.$confirm('确认要"' + text + '""' + row.fName + '"吗?', "警告", {
  1389. confirmButtonText: "确定",
  1390. cancelButtonText: "取消",
  1391. type: "warning",
  1392. })
  1393. .then(function () {
  1394. return changeCorpsStatus(row.fId, row.fStatus);
  1395. })
  1396. .then(() => {
  1397. this.msgSuccess(text + "成功");
  1398. })
  1399. .catch(function () {
  1400. row.fStatus = row.fStatus === "0" ? "1" : "0";
  1401. });
  1402. },
  1403. /** 配船按钮操作 */
  1404. matchingShip(type) {
  1405. if (type === false) {
  1406. this.shipAllocation = true;
  1407. this.ship.fVoyid = this.selection[0].fVoyid;
  1408. this.ship.fVslid = this.selection[0].fVslid;
  1409. // this.ship.fPid = this.selection[0].fVslid
  1410. } else {
  1411. this.ship.fCargoPlanning = 0;
  1412. this.ship.orderId = [];
  1413. this.selection.forEach((item) => this.ship.orderId.push(item.fId));
  1414. confirmAllocation(this.ship).then((res) => {
  1415. console.log(res);
  1416. this.shipAllocation = false;
  1417. this.getList();
  1418. this.$message({
  1419. showClose: true,
  1420. message: "配船成功",
  1421. type: "success",
  1422. });
  1423. });
  1424. }
  1425. },
  1426. /** 取消配船按钮操作 */
  1427. cancelShip() {
  1428. let data = [];
  1429. this.selection.forEach((item) => data.push(item.fId));
  1430. cancelAllocation(data).then((res) => {
  1431. this.$message({
  1432. showClose: true,
  1433. message: "取消配船成功",
  1434. type: "success",
  1435. });
  1436. this.getList();
  1437. });
  1438. },
  1439. /** 导出按钮操作 */
  1440. handleExport() {
  1441. // exportInventory(this.queryParams).then((response) => {
  1442. // this.download(response.msg);
  1443. // });
  1444. const queryParams = this.queryParams;
  1445. this.$confirm("是否选择船名航次?", "警告", {
  1446. confirmButtonText: "确定",
  1447. cancelButtonText: "取消",
  1448. type: "warning",
  1449. })
  1450. .then(function () {
  1451. return exportInventory(queryParams);
  1452. })
  1453. .then((response) => {
  1454. this.download(response.msg);
  1455. });
  1456. },
  1457. handleExportItem() {
  1458. exportItem(this.queryParams).then((response) => {
  1459. this.download(response.msg);
  1460. });
  1461. // const queryParams = this.queryParams;
  1462. // this.$confirm("是否选择船名航次?", "警告", {
  1463. // confirmButtonText: "确定",
  1464. // cancelButtonText: "取消",
  1465. // type: "warning",
  1466. // })
  1467. // .then(function () {
  1468. // return exportItem(queryParams);
  1469. // })
  1470. // .then((response) => {
  1471. // this.download(response.msg);
  1472. // });
  1473. },
  1474. /** 搜索按钮操作 */
  1475. handleQuery() {
  1476. this.queryParams.pageNum = 1;
  1477. this.queryParams.pageSize = 10;
  1478. this.getList();
  1479. },
  1480. /** 重置按钮操作 */
  1481. resetQuery() {
  1482. this.queryParams = {
  1483. fBillno: null,
  1484. fServiceitems: null,
  1485. fConsigneername: null,
  1486. fCntrid: null,
  1487. fCntrcount: null,
  1488. cLoadDate: null,
  1489. fCntrno: null,
  1490. timeInterval: null,
  1491. };
  1492. this.resetForm("queryForm");
  1493. this.handleQuery();
  1494. getVoyageName({ fPid: this.queryParams.fVslid }).then((response) => {
  1495. this.voyageOptions = response.rows;
  1496. if (this.queryParams.fVoyid) {
  1497. this.queryParams.fVoyid = "";
  1498. }
  1499. });
  1500. },
  1501. // 多选框选中数据
  1502. handleSelectionChange(selection) {
  1503. this.selection = selection;
  1504. this.ids = selection.map((item) => item.fId);
  1505. this.single = selection.length !== 1;
  1506. this.multiple = !selection.length;
  1507. },
  1508. getSummaries(param) {
  1509. const { columns, data } = param;
  1510. const sums = [];
  1511. columns.forEach((item, index) => {
  1512. if (index === 0) {
  1513. sums[index] = "合计";
  1514. return;
  1515. }
  1516. if (item.property == "fCntrcount" || item.property == "loadCntr") {
  1517. let num1 = 0;
  1518. let num2 = 0;
  1519. data.forEach((e) => {
  1520. num1 += e.fCntrcount;
  1521. num2 += e.loadCntr;
  1522. });
  1523. if (item.property == "fCntrcount") {
  1524. sums[index] = num1 ? num1 : "0";
  1525. }
  1526. if (item.property == "loadCntr") {
  1527. sums[index] = num2 ? num2 : "0";
  1528. }
  1529. }
  1530. });
  1531. return sums;
  1532. },
  1533. },
  1534. };
  1535. </script>
  1536. <style lang="scss" scoped>
  1537. .tabSetting {
  1538. display: flex;
  1539. justify-content: flex-end;
  1540. }
  1541. .listStyle {
  1542. display: flex;
  1543. border-top: 1px solid #dcdfe6;
  1544. border-left: 1px solid #dcdfe6;
  1545. border-right: 1px solid #dcdfe6;
  1546. }
  1547. .listStyle:last-child {
  1548. border-bottom: 1px solid #dcdfe6;
  1549. }
  1550. .progress {
  1551. display: flex;
  1552. align-items: center;
  1553. padding: 2px;
  1554. background-color: rgba(0, 0, 0, 0.05);
  1555. height: 100%;
  1556. }
  1557. </style>
  1558. <style lang="scss">
  1559. .el-table {
  1560. .el-table__body-wrapper {
  1561. z-index: 2;
  1562. }
  1563. }
  1564. </style>