index.vue 44 KB

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