index.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586
  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. v-hasPermi="['warehouse:warehousebills:zc']"
  342. >转船</el-button
  343. >
  344. <el-button
  345. type="primary"
  346. icon="el-icon-search"
  347. size="mini"
  348. @click="transvoyage(true)"
  349. :disabled="selection.length == 0 ? true : false"
  350. v-hasPermi="['warehouse:warehousebills:zhc']"
  351. >转航次</el-button
  352. >
  353. <el-button type="warning" size="mini" @click="pickUpEDI">
  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. pickUpEDI,
  702. transship,
  703. transvoyage,
  704. } from "@/api/finance/applyForInvoice/chargeInvoice";
  705. import {
  706. getVoyageName,
  707. getVoyageName2,
  708. } from "@/api/finance/applyForInvoice/feeDetail";
  709. import { portInquiry } from "@/api/kaihe/domesticTrade/orderInformation";
  710. import { defaultDate } from "@/utils/date";
  711. Vue.directive("dialogDrag", {
  712. bind(el, binding, vnode, oldVnode) {
  713. const dialogHeaderEl = el.querySelector(".el-dialog__header");
  714. const dragDom = el.querySelector(".el-dialog");
  715. const enlarge = el.querySelector(".enlarge");
  716. dialogHeaderEl.style.cursor = "move";
  717. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  718. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
  719. if (enlarge) {
  720. enlarge.onclick = (e) => {
  721. dragDom.style.top = "0px";
  722. dragDom.style.left = "0px";
  723. };
  724. }
  725. dialogHeaderEl.onmousedown = (e) => {
  726. // 鼠标按下,计算当前元素距离可视区的距离
  727. const disX = e.clientX - dialogHeaderEl.offsetLeft;
  728. const disY = e.clientY - dialogHeaderEl.offsetTop;
  729. // 获取到的值带px 正则匹配替换
  730. let styL, styT;
  731. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  732. if (sty.left.includes("%")) {
  733. styL =
  734. +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
  735. styT =
  736. +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
  737. } else {
  738. styL = +sty.left.replace(/\px/g, "");
  739. styT = +sty.top.replace(/\px/g, "");
  740. }
  741. document.onmousemove = function (e) {
  742. // 通过事件委托,计算移动的距离
  743. const l = e.clientX - disX;
  744. const t = e.clientY - disY;
  745. // 移动当前元素
  746. if (t + styT >= 0) {
  747. dragDom.style.top = `${t + styT}px`;
  748. }
  749. dragDom.style.left = `${l + styL}px`;
  750. // 将此时的位置传出去
  751. // binding.value({x:e.pageX,y:e.pageY})
  752. };
  753. document.onmouseup = function (e) {
  754. document.onmousemove = null;
  755. document.onmouseup = null;
  756. };
  757. };
  758. },
  759. });
  760. export default {
  761. name: "myOrder",
  762. components: {
  763. draggable,
  764. },
  765. data() {
  766. return {
  767. transvoyageVisible: false,
  768. transshipVisible: false,
  769. voyageOptions: [],
  770. voyageOptions2: [],
  771. voyageOptions3: [],
  772. vesselOptions: [],
  773. show: false,
  774. activeIndex: "0",
  775. setRowList: [],
  776. getRowList: [],
  777. tableDate: [
  778. {
  779. surface: "1",
  780. label: "fBillno",
  781. name: "订舱号",
  782. checked: 0,
  783. width: 120,
  784. },
  785. {
  786. surface: "2",
  787. label: "fServiceitems",
  788. name: "运输条款",
  789. checked: 0,
  790. width: 140,
  791. },
  792. {
  793. surface: "3",
  794. label: "fConsigneername",
  795. name: "收货人",
  796. checked: 0,
  797. width: 120,
  798. },
  799. {
  800. surface: "4",
  801. label: "fName",
  802. name: "航线",
  803. checked: 0,
  804. width: 120,
  805. },
  806. {
  807. surface: "5",
  808. label: "fNo",
  809. name: "箱型",
  810. checked: 0,
  811. width: 120,
  812. },
  813. {
  814. surface: "6",
  815. label: "fCntrcount",
  816. name: "箱量",
  817. checked: 0,
  818. width: 120,
  819. },
  820. {
  821. surface: "7",
  822. label: "loadCntr",
  823. name: "返箱数",
  824. checked: 0,
  825. width: 120,
  826. },
  827. {
  828. surface: "8",
  829. label: "fBsdate",
  830. name: "装货时间",
  831. checked: 0,
  832. width: 120,
  833. },
  834. {
  835. surface: "9",
  836. label: "fAtd",
  837. name: "开船日期",
  838. checked: 0,
  839. width: 120,
  840. },
  841. {
  842. surface: "10",
  843. label: "fBillstatus",
  844. name: "状态",
  845. checked: 0,
  846. width: 120,
  847. },
  848. {
  849. surface: "11",
  850. label: "vslName",
  851. name: "船名",
  852. checked: 0,
  853. width: 120,
  854. },
  855. {
  856. surface: "12",
  857. label: "voyNo",
  858. name: "航次",
  859. checked: 0,
  860. width: 120,
  861. },
  862. {
  863. surface: "13",
  864. label: "fMblno",
  865. name: "提单号",
  866. checked: 0,
  867. width: 120,
  868. },
  869. {
  870. surface: "14",
  871. label: "corpName",
  872. name: "订舱单位",
  873. checked: 0,
  874. width: 120,
  875. },
  876. {
  877. surface: "15",
  878. label: "goodsName",
  879. name: "货名",
  880. checked: 0,
  881. width: 120,
  882. },
  883. {
  884. surface: "16",
  885. label: "createBy",
  886. name: "订舱人",
  887. checked: 0,
  888. width: 120,
  889. },
  890. {
  891. surface: "17",
  892. label: "createTime",
  893. name: "订舱时间",
  894. checked: 0,
  895. width: 120,
  896. },
  897. {
  898. surface: "18",
  899. label: "loadportName",
  900. name: "起运港",
  901. checked: 0,
  902. width: 120,
  903. },
  904. {
  905. surface: "19",
  906. label: "destportName",
  907. name: "目的港",
  908. checked: 0,
  909. width: 120,
  910. },
  911. {
  912. surface: "20",
  913. label: "moneyStatus",
  914. name: "费用状态",
  915. checked: 0,
  916. width: 120,
  917. },
  918. {
  919. surface: "21",
  920. label: "fReceivable",
  921. name: "应收",
  922. checked: 0,
  923. width: 120,
  924. },
  925. {
  926. surface: "22",
  927. label: "fRecycle",
  928. name: "实收",
  929. checked: 0,
  930. width: 120,
  931. },
  932. {
  933. surface: "23",
  934. label: "fDue",
  935. name: "应付",
  936. checked: 0,
  937. width: 120,
  938. },
  939. {
  940. surface: "24",
  941. label: "fPay",
  942. name: "实付",
  943. checked: 0,
  944. width: 120,
  945. },
  946. {
  947. surface: "25",
  948. label: "fCaregoStatus",
  949. name: "货物状态",
  950. checked: 0,
  951. width: 120,
  952. },
  953. {
  954. surface: "26",
  955. label: "fCargoPlanning",
  956. name: "配船",
  957. checked: 0,
  958. width: 120,
  959. },
  960. {
  961. surface: "27",
  962. label: "fArrivalStatus",
  963. name: "离港状态",
  964. checked: 0,
  965. width: 120,
  966. },
  967. {
  968. surface: "28",
  969. label: "fShipTwoName",
  970. name: "二程船名",
  971. checked: 0,
  972. width: 120,
  973. },
  974. {
  975. surface: "29",
  976. label: "fVoyTwoName",
  977. name: "二程航次",
  978. checked: 0,
  979. width: 120,
  980. },
  981. // {
  982. // surface: "30",
  983. // label: "fShipThreeName",
  984. // name: "三程船名",
  985. // checked: 0,
  986. // width: 120,
  987. // },
  988. // {
  989. // surface: "31",
  990. // label: "fVoyThreeName",
  991. // name: "三程航次",
  992. // checked: 0,
  993. // width: 120,
  994. // },
  995. {
  996. surface: "32",
  997. label: "remark",
  998. name: "备注",
  999. checked: 0,
  1000. width: 120,
  1001. },
  1002. ],
  1003. //自定义列宽
  1004. allCheck: false,
  1005. showSetting: false,
  1006. shipAllocation: false,
  1007. ship: {
  1008. fVoyid: "",
  1009. fVslid: "",
  1010. },
  1011. ship2: {
  1012. fVoyid: "",
  1013. fVslid: "",
  1014. },
  1015. ship3: {
  1016. fVoyid: "",
  1017. fVslid: "",
  1018. },
  1019. serviceitems: [],
  1020. container: [],
  1021. // 遮罩层
  1022. loading: true,
  1023. // 选中数组
  1024. ids: [],
  1025. selection: [],
  1026. // 非单个禁用
  1027. single: true,
  1028. // 非多个禁用
  1029. multiple: true,
  1030. // 显示搜索条件
  1031. showSearch: true,
  1032. // 总条数
  1033. total: 0,
  1034. // 客户详情表格数据
  1035. corpsList: [],
  1036. // 查询参数
  1037. queryParams: {
  1038. pageNum: 1,
  1039. pageSize: 10,
  1040. cLoadDate: defaultDate(),
  1041. },
  1042. fMblnoOptions: [],
  1043. createBy: [],
  1044. fCorpid: [],
  1045. caregoList: [],
  1046. };
  1047. },
  1048. created() {
  1049. this.setRowList = this.tableDate;
  1050. this.getRowList = this.tableDate;
  1051. portInquiry().then((res) => {
  1052. this.fMblnoOptions = res.rows;
  1053. });
  1054. selectUserByRole().then((res) => {
  1055. this.createBy = res.rows;
  1056. });
  1057. bookingParty().then((res) => {
  1058. this.fCorpid = res.rows;
  1059. });
  1060. this.getList();
  1061. this.cntrRemoteMethod();
  1062. this.vessleRemthod();
  1063. this.voyageRemthods();
  1064. this.getDicts("f_serviceitems").then((response) => {
  1065. if (response.data) {
  1066. this.serviceitems = response.data;
  1067. }
  1068. });
  1069. this.getDicts("carego_status").then((response) => {
  1070. if (response.data) {
  1071. this.caregoList = response.data;
  1072. }
  1073. });
  1074. this.getRow();
  1075. },
  1076. activated() {
  1077. this.getList();
  1078. // this.queryParams.timeInterval = this.queryParams.timeInterval
  1079. // ? this.queryParams.timeInterval
  1080. // : defaultDate();
  1081. },
  1082. filters: {
  1083. transshipName(row) {
  1084. if (row == 0) {
  1085. return "未离港";
  1086. } else if (row == 1) {
  1087. return "离港出运";
  1088. } else if (row == 2) {
  1089. return "到港卸船";
  1090. } else {
  1091. return "-";
  1092. }
  1093. },
  1094. },
  1095. methods: {
  1096. voyageRemthods() {
  1097. getVoyageName({ fPid: this.ship.fVslid }).then((response) => {
  1098. this.voyageOptions = response.rows;
  1099. if (this.ship.fVslid) this.ship.fVoyid = "";
  1100. });
  1101. },
  1102. voyageRemthods2() {
  1103. getVoyageName({ fPid: this.ship2.fVslid }).then((response) => {
  1104. this.voyageOptions2 = response.rows;
  1105. if (this.ship2.fVslid) this.ship2.fVoyid = "";
  1106. });
  1107. },
  1108. voyageRemthods3() {
  1109. getVoyageName({ fPid: this.ship3.fVslid }).then((response) => {
  1110. this.voyageOptions3 = response.rows;
  1111. if (this.ship3.fVslid) this.ship3.fVoyid = "";
  1112. });
  1113. },
  1114. transship(Bool) {
  1115. if (Bool) {
  1116. for (let i = 0; i < this.selection.length; i++) {
  1117. if (this.selection[i].fArrivalStatus != 2) {
  1118. return this.$message.error(
  1119. "订舱号:" + this.selection[i].fBillno + "未到港"
  1120. );
  1121. }
  1122. if (this.selection[i].fShipTwoName && this.selection[i].fVoyTwoName) {
  1123. return this.$message.error(
  1124. "订舱号:" + this.selection[i].fBillno + "已转船"
  1125. );
  1126. }
  1127. }
  1128. } else {
  1129. let ids = [];
  1130. this.selection.forEach((e) => {
  1131. ids.push(e.fId);
  1132. });
  1133. transship({
  1134. fVslid: this.ship2.fVslid,
  1135. fVoyid: this.ship2.fVoyid,
  1136. orderList: ids,
  1137. }).then((res) => {
  1138. if (res.code == 200) {
  1139. this.$message.success("转船成功");
  1140. this.getList();
  1141. }
  1142. });
  1143. }
  1144. this.transshipVisible = Bool;
  1145. },
  1146. transvoyage(Bool) {
  1147. if (Bool) {
  1148. // for (let i = 0; i < this.selection.length; i++) {
  1149. // if (this.selection[i].fArrivalStatus != 2) {
  1150. // return this.$message.error(
  1151. // "订舱号:" + this.selection[i].fBillno + "未到港"
  1152. // );
  1153. // }
  1154. // // if (this.selection[i].fShipTwoName && this.selection[i].fVoyTwoName) {
  1155. // // return this.$message.error(
  1156. // // "订舱号:" + this.selection[i].fBillno + "已转船"
  1157. // // );
  1158. // // }
  1159. // }
  1160. } else {
  1161. let ids = [];
  1162. this.selection.forEach((e) => {
  1163. ids.push(e.fId);
  1164. });
  1165. transvoyage({
  1166. fVslid: this.ship3.fVslid,
  1167. fVoyid: this.ship3.fVoyid,
  1168. orderList: ids,
  1169. }).then((res) => {
  1170. if (res.code == 200) {
  1171. this.$message.success("转船成功");
  1172. this.getList();
  1173. }
  1174. });
  1175. }
  1176. this.transvoyageVisible = Bool;
  1177. },
  1178. pickUpEDI() {
  1179. pickUpEDI().then((res) => {
  1180. console.log(res);
  1181. });
  1182. },
  1183. transshipClosed() {
  1184. this.ship2 = {
  1185. fVoyid: "",
  1186. fVslid: "",
  1187. };
  1188. this.voyageOptions2 = [];
  1189. },
  1190. transvoyageClosed() {
  1191. this.ship3 = {
  1192. fVoyid: "",
  1193. fVslid: "",
  1194. };
  1195. this.voyageOptions3 = [];
  1196. },
  1197. //获取船名
  1198. vessleRemthod() {
  1199. getVesselName().then((response) => {
  1200. this.vesselOptions = response.rows;
  1201. });
  1202. },
  1203. handleSelect(key, keyPath) {
  1204. if (key === "0") {
  1205. this.queryParams = {
  1206. pageNum: 1,
  1207. pageSize: 10,
  1208. };
  1209. } else if (key === "1") {
  1210. this.queryParams.fBillstatus = 4;
  1211. } else if (key === "2") {
  1212. this.queryParams.fBillstatus = 6;
  1213. } else if (key === "3") {
  1214. this.queryParams.fBillstatus = 9;
  1215. } else if (key === "4") {
  1216. this.queryParams.fBillstatus = 11;
  1217. } else if (key === "7") {
  1218. this.queryParams.fBillstatus = 12;
  1219. } else if (key === "10") {
  1220. this.queryParams.fBillstatus = 10;
  1221. } else if (key === "12") {
  1222. this.queryParams.fBillstatus = 12;
  1223. }
  1224. listCorps(this.queryParams).then((response) => {
  1225. this.corpsList = response.rows;
  1226. this.total = response.total;
  1227. this.loading = false;
  1228. });
  1229. },
  1230. //重置列表
  1231. delRow() {
  1232. this.data = {
  1233. tableName: "我的订单",
  1234. userId: Cookies.get("userName"),
  1235. };
  1236. resetModule(this.data).then((res) => {
  1237. if (res.code == 200) {
  1238. this.showSetting = false;
  1239. this.setRowList = this.tableDate;
  1240. this.getRowList = this.tableDate;
  1241. }
  1242. });
  1243. },
  1244. //列设置全选
  1245. allChecked() {
  1246. if (this.allCheck == true) {
  1247. this.setRowList.map((e) => {
  1248. return (e.checked = 0);
  1249. });
  1250. } else {
  1251. this.setRowList.map((e) => {
  1252. return (e.checked = 1);
  1253. });
  1254. }
  1255. },
  1256. //查询列数据
  1257. getRow() {
  1258. let that = this;
  1259. this.data = {
  1260. tableName: "我的订单",
  1261. userId: Cookies.get("userName"),
  1262. };
  1263. select(this.data).then((res) => {
  1264. if (res.data.length != 0) {
  1265. this.getRowList = res.data.filter((e) => e.checked == 0);
  1266. this.setRowList = res.data;
  1267. this.setRowList = this.setRowList.reduce((res, item) => {
  1268. res.push({
  1269. surface: item.surface,
  1270. label: item.label,
  1271. name: item.name,
  1272. checked: item.checked,
  1273. width: item.width,
  1274. fixed: item.fixed,
  1275. });
  1276. return res;
  1277. }, []);
  1278. }
  1279. });
  1280. },
  1281. //保存列设置
  1282. save() {
  1283. this.showSetting = false;
  1284. this.data = {
  1285. tableName: "我的订单",
  1286. userId: Cookies.get("userName"),
  1287. sysTableSetList: this.setRowList,
  1288. };
  1289. addSet(this.data).then((res) => {
  1290. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1291. });
  1292. },
  1293. //开始拖拽事件
  1294. onStart() {
  1295. this.drag = true;
  1296. },
  1297. //拖拽结束事件
  1298. onEnd() {
  1299. this.drag = false;
  1300. },
  1301. inDetention(type) {
  1302. let ids = [];
  1303. this.selection.forEach((e) => {
  1304. ids.push(e.fId);
  1305. });
  1306. detention({ fCaregoStatus: type, orderList: ids }).then((res) => {
  1307. if (res.code == 200) {
  1308. this.getList();
  1309. if (type == 3) {
  1310. this.$message.success("扣货成功");
  1311. } else {
  1312. this.$message.success("取消扣货成功");
  1313. }
  1314. }
  1315. });
  1316. },
  1317. //箱型下拉查询
  1318. cntrRemoteMethod() {
  1319. let queryParams = { pageNum: 1 };
  1320. getcntrName(queryParams).then((response) => {
  1321. this.container = response.rows;
  1322. });
  1323. },
  1324. vslidChange() {
  1325. getVoyageName({ fPid: this.queryParams.fVslid }).then((response) => {
  1326. this.voyageOptions = response.rows;
  1327. if (this.queryParams.fVoyid) {
  1328. this.queryParams.fVoyid = "";
  1329. }
  1330. });
  1331. },
  1332. /** 删除按钮操作 */
  1333. handleDelete(row) {
  1334. const fIds = row.fId || this.ids;
  1335. this.$confirm(
  1336. '是否确认删除客户详情编号为"' + fIds + '"的数据项?',
  1337. "警告",
  1338. {
  1339. confirmButtonText: "确定",
  1340. cancelButtonText: "取消",
  1341. type: "warning",
  1342. }
  1343. )
  1344. .then(function () {
  1345. return delCorps(fIds);
  1346. })
  1347. .then(() => {
  1348. this.getList();
  1349. this.msgSuccess("删除成功");
  1350. });
  1351. },
  1352. //查看跳转
  1353. handleUpdate(row, num) {
  1354. let res = {};
  1355. res = {
  1356. fId: row.fId,
  1357. num: num,
  1358. };
  1359. this.$router.push({
  1360. path: "/domesticTrade/orderInformation",
  1361. query: { data: JSON.stringify(res) },
  1362. });
  1363. },
  1364. //模糊查询地点
  1365. addressMethod() {
  1366. let queryParams = { pageNum: 1 };
  1367. getaddress(queryParams).then((response) => {
  1368. this.addressOptions = response.rows;
  1369. });
  1370. },
  1371. /** 查询客户详情列表 */
  1372. getList() {
  1373. listCorps(this.queryParams).then((response) => {
  1374. if (response.rows) {
  1375. response.rows.forEach((e) => {
  1376. e.fServiceitems = e.fServiceitems + "-" + e.fDestportMode;
  1377. if (e.fAtd) {
  1378. e.fAtd = e.fAtd.slice(0, 10);
  1379. }
  1380. });
  1381. }
  1382. this.corpsList = response.rows;
  1383. this.total = response.total;
  1384. this.loading = false;
  1385. });
  1386. },
  1387. // 从表重置
  1388. contList() {
  1389. this.contactList = [];
  1390. },
  1391. // 状态修改
  1392. handleStatusChange(row) {
  1393. let text = row.fStatus === "0" ? "启用" : "停用";
  1394. this.$confirm('确认要"' + text + '""' + row.fName + '"吗?', "警告", {
  1395. confirmButtonText: "确定",
  1396. cancelButtonText: "取消",
  1397. type: "warning",
  1398. })
  1399. .then(function () {
  1400. return changeCorpsStatus(row.fId, row.fStatus);
  1401. })
  1402. .then(() => {
  1403. this.msgSuccess(text + "成功");
  1404. })
  1405. .catch(function () {
  1406. row.fStatus = row.fStatus === "0" ? "1" : "0";
  1407. });
  1408. },
  1409. /** 配船按钮操作 */
  1410. matchingShip(type) {
  1411. if (type === false) {
  1412. this.shipAllocation = true;
  1413. this.ship.fVoyid = this.selection[0].fVoyid;
  1414. this.ship.fVslid = this.selection[0].fVslid;
  1415. // this.ship.fPid = this.selection[0].fVslid
  1416. } else {
  1417. this.ship.fCargoPlanning = 0;
  1418. this.ship.orderId = [];
  1419. this.selection.forEach((item) => this.ship.orderId.push(item.fId));
  1420. confirmAllocation(this.ship).then((res) => {
  1421. console.log(res);
  1422. this.shipAllocation = false;
  1423. this.getList();
  1424. this.$message({
  1425. showClose: true,
  1426. message: "配船成功",
  1427. type: "success",
  1428. });
  1429. });
  1430. }
  1431. },
  1432. /** 取消配船按钮操作 */
  1433. cancelShip() {
  1434. let data = [];
  1435. this.selection.forEach((item) => data.push(item.fId));
  1436. cancelAllocation(data).then((res) => {
  1437. this.$message({
  1438. showClose: true,
  1439. message: "取消配船成功",
  1440. type: "success",
  1441. });
  1442. this.getList();
  1443. });
  1444. },
  1445. /** 导出按钮操作 */
  1446. handleExport() {
  1447. // exportInventory(this.queryParams).then((response) => {
  1448. // this.download(response.msg);
  1449. // });
  1450. const queryParams = this.queryParams;
  1451. this.$confirm("是否选择船名航次?", "警告", {
  1452. confirmButtonText: "确定",
  1453. cancelButtonText: "取消",
  1454. type: "warning",
  1455. })
  1456. .then(function () {
  1457. return exportInventory(queryParams);
  1458. })
  1459. .then((response) => {
  1460. this.download(response.msg);
  1461. });
  1462. },
  1463. handleExportItem() {
  1464. exportItem(this.queryParams).then((response) => {
  1465. this.download(response.msg);
  1466. });
  1467. // const queryParams = this.queryParams;
  1468. // this.$confirm("是否选择船名航次?", "警告", {
  1469. // confirmButtonText: "确定",
  1470. // cancelButtonText: "取消",
  1471. // type: "warning",
  1472. // })
  1473. // .then(function () {
  1474. // return exportItem(queryParams);
  1475. // })
  1476. // .then((response) => {
  1477. // this.download(response.msg);
  1478. // });
  1479. },
  1480. /** 搜索按钮操作 */
  1481. handleQuery() {
  1482. this.queryParams.pageNum = 1;
  1483. this.queryParams.pageSize = 10;
  1484. this.getList();
  1485. },
  1486. /** 重置按钮操作 */
  1487. resetQuery() {
  1488. this.queryParams = {
  1489. fBillno: null,
  1490. fServiceitems: null,
  1491. fConsigneername: null,
  1492. fCntrid: null,
  1493. fCntrcount: null,
  1494. cLoadDate: null,
  1495. fCntrno: null,
  1496. timeInterval: null,
  1497. };
  1498. this.resetForm("queryForm");
  1499. this.handleQuery();
  1500. getVoyageName({ fPid: this.queryParams.fVslid }).then((response) => {
  1501. this.voyageOptions = response.rows;
  1502. if (this.queryParams.fVoyid) {
  1503. this.queryParams.fVoyid = "";
  1504. }
  1505. });
  1506. },
  1507. // 多选框选中数据
  1508. handleSelectionChange(selection) {
  1509. this.selection = selection;
  1510. this.ids = selection.map((item) => item.fId);
  1511. this.single = selection.length !== 1;
  1512. this.multiple = !selection.length;
  1513. },
  1514. getSummaries(param) {
  1515. const { columns, data } = param;
  1516. const sums = [];
  1517. columns.forEach((item, index) => {
  1518. if (index === 0) {
  1519. sums[index] = "合计";
  1520. return;
  1521. }
  1522. if (item.property == "fCntrcount" || item.property == "loadCntr") {
  1523. let num1 = 0;
  1524. let num2 = 0;
  1525. data.forEach((e) => {
  1526. num1 += e.fCntrcount;
  1527. num2 += e.loadCntr;
  1528. });
  1529. if (item.property == "fCntrcount") {
  1530. sums[index] = num1 ? num1 : "0";
  1531. }
  1532. if (item.property == "loadCntr") {
  1533. sums[index] = num2 ? num2 : "0";
  1534. }
  1535. }
  1536. });
  1537. return sums;
  1538. },
  1539. },
  1540. };
  1541. </script>
  1542. <style lang="scss" scoped>
  1543. .tabSetting {
  1544. display: flex;
  1545. justify-content: flex-end;
  1546. }
  1547. .listStyle {
  1548. display: flex;
  1549. border-top: 1px solid #dcdfe6;
  1550. border-left: 1px solid #dcdfe6;
  1551. border-right: 1px solid #dcdfe6;
  1552. }
  1553. .listStyle:last-child {
  1554. border-bottom: 1px solid #dcdfe6;
  1555. }
  1556. .progress {
  1557. display: flex;
  1558. align-items: center;
  1559. padding: 2px;
  1560. background-color: rgba(0, 0, 0, 0.05);
  1561. height: 100%;
  1562. }
  1563. </style>
  1564. <style lang="scss">
  1565. .el-table {
  1566. .el-table__body-wrapper {
  1567. z-index: 2;
  1568. }
  1569. }
  1570. </style>