index.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954
  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. <el-menu-item index="0">全部</el-menu-item>
  11. <el-menu-item index="1">待审核</el-menu-item>
  12. <el-menu-item index="2">订舱审核通过</el-menu-item>
  13. <el-menu-item index="3">待配船</el-menu-item>
  14. <el-menu-item index="4">配船审核通过</el-menu-item>
  15. <!-- <el-menu-item index="5">已撤销</el-menu-item>-->
  16. <el-menu-item index="10">已驳回</el-menu-item>
  17. <el-menu-item index="12">运单变更</el-menu-item>
  18. </el-menu>
  19. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"
  20. style="margin-top:20px">
  21. <el-row>
  22. <el-col :span="6">
  23. <el-form-item label="船名" prop="fVslid">
  24. <el-select
  25. size="small"
  26. style="width: 240px;"
  27. v-model="queryParams.fVslid"
  28. >
  29. <el-option
  30. v-for="item in vesselOptions"
  31. :key="item.fId"
  32. :label="item.fName"
  33. :value="item.fId"
  34. />
  35. </el-select>
  36. </el-form-item>
  37. </el-col>
  38. <el-col :span="6">
  39. <el-form-item label="航次" prop="fVoyid">
  40. <el-select
  41. v-model="queryParams.fVoyid"
  42. filterable
  43. clearable
  44. remote
  45. size="small"
  46. style="width: 240px"
  47. >
  48. <el-option
  49. v-for="item in voyageOptions"
  50. :key="item.fId"
  51. :label="item.fNo"
  52. :value="item.fId"/>
  53. </el-select>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="6">
  57. <el-form-item label="起运港口" prop="fLoadportid">
  58. <el-select
  59. v-model="queryParams.fLoadportid"
  60. filterable
  61. remote
  62. clearable
  63. size="small"
  64. style="width: 240px;"
  65. class="elSelect"
  66. placeholder="请输入模糊查找目的港口"
  67. >
  68. <el-scrollbar>
  69. <el-option
  70. v-for="(dict, index) in fMblnoOptions"
  71. :key="dict.fId"
  72. :label="dict.fName"
  73. :value="dict.fId"
  74. ></el-option>
  75. </el-scrollbar>
  76. </el-select>
  77. </el-form-item>
  78. </el-col>
  79. <el-col :span="6">
  80. <el-form-item label="目的港口" prop="fDestportid">
  81. <el-select
  82. v-model="queryParams.fDestportid"
  83. filterable
  84. clearable
  85. remote
  86. size="small"
  87. style="width: 240px;"
  88. class="elSelect"
  89. placeholder="请输入模糊查找目的港口"
  90. >
  91. <el-scrollbar>
  92. <el-option
  93. v-for="(dict, index) in fMblnoOptions"
  94. :key="dict.fId"
  95. :label="dict.fName"
  96. :value="dict.fId"
  97. ></el-option>
  98. </el-scrollbar>
  99. </el-select>
  100. </el-form-item>
  101. </el-col>
  102. </el-row>
  103. <el-collapse-transition>
  104. <div v-show="show">
  105. <el-row>
  106. <el-col :span="6">
  107. <el-form-item label="提单号" prop="fMblno">
  108. <el-input size="small" style="width: 240px" clearable v-model="queryParams.fMblno"></el-input>
  109. </el-form-item>
  110. </el-col>
  111. <el-col :span="6">
  112. <el-form-item label="订舱单位" prop="fCorpid">
  113. <el-select
  114. v-model="queryParams.fCorpid"
  115. clearable
  116. filterable
  117. size="small"
  118. placeholder="请选择订舱单位"
  119. style="width: 240px"
  120. >
  121. <el-option
  122. v-for="(item, index) in fCorpid"
  123. :key="index.fId"
  124. :label="item.fName"
  125. :value="item.fId"
  126. ></el-option>
  127. </el-select>
  128. </el-form-item>
  129. </el-col>
  130. <el-col :span="6">
  131. <el-form-item label="业务员" prop="createBy">
  132. <el-select
  133. v-model="queryParams.createBy"
  134. clearable
  135. filterable
  136. size="small"
  137. placeholder="请选择业务员"
  138. style="width: 240px"
  139. >
  140. <el-option
  141. v-for="(item, index) in createBy"
  142. :key="index.userId"
  143. :label="item.userName"
  144. :value="item.userId"
  145. ></el-option>
  146. </el-select>
  147. </el-form-item>
  148. </el-col>
  149. <el-col :span="6">
  150. <el-form-item label="箱号" prop="fCntrno">
  151. <el-input size="small" style="width: 240px" clearable v-model="queryParams.fCntrno" placeholder="请输入箱号"></el-input>
  152. </el-form-item>
  153. </el-col>
  154. </el-row>
  155. <el-row>
  156. <el-col :span="6">
  157. <el-form-item label="开船日期" prop="timeInterval">
  158. <el-date-picker
  159. v-model="queryParams.timeInterval"
  160. type="daterange"
  161. range-separator="至"
  162. style="width: 240px"
  163. value-format="yyyy-MM-dd HH:mm:ss"
  164. :default-time="['00:00:00', '23:59:59']"
  165. start-placeholder="开始日期"
  166. end-placeholder="结束日期">
  167. </el-date-picker>
  168. </el-form-item>
  169. </el-col>
  170. <el-col :span="6">
  171. <el-form-item label="订舱日期" prop="cLoadDate">
  172. <el-date-picker
  173. v-model="queryParams.cLoadDate"
  174. type="daterange"
  175. range-separator="至"
  176. style="width: 240px"
  177. value-format="yyyy-MM-dd HH:mm:ss"
  178. :default-time="['00:00:00', '23:59:59']"
  179. start-placeholder="开始日期"
  180. end-placeholder="结束日期">
  181. </el-date-picker>
  182. </el-form-item>
  183. </el-col>
  184. </el-row>
  185. </div>
  186. </el-collapse-transition>
  187. </el-form>
  188. <el-row :gutter="10" class="mb8">
  189. <div style="float: left">
  190. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  191. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  192. <el-button v-show="show" @click="show = !show" icon="el-icon-arrow-up" size="mini">展开</el-button>
  193. <el-button v-show="!show" @click="show = !show" icon="el-icon-arrow-down" size="mini">展开</el-button>
  194. <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
  195. <el-button type="primary" plain icon="el-icon-search" size="mini" @click="matchingShip(false)" :disabled="selection.length == 0?true:false || selection.findIndex(function(item){return item.vslName !== selection[0].vslName}) === -1?selection.findIndex(function(item){return item.voyNo !== selection[0].voyNo}) === -1?false:true:true">配船</el-button>
  196. <el-button type="info" plain icon="el-icon-search" size="mini" @click="cancelShip" :disabled="selection.length == 0?true:false">取消配船</el-button>
  197. </div>
  198. <div class="tabSetting">
  199. <right-toolbar
  200. :showSearch.sync="showSearch"
  201. @queryTable="getList"
  202. ></right-toolbar>
  203. <div style="margin: 0 12px">
  204. <el-button
  205. icon="el-icon-setting"
  206. size="mini"
  207. circle
  208. @click="showSetting = !showSetting"
  209. ></el-button>
  210. </div>
  211. </div>
  212. </el-row>
  213. <el-dialog title="提示" :visible.sync="showSetting" width="700px" v-dialogDrag>
  214. <template slot="title">
  215. <div class="avue-crud__dialog__header">
  216. <span class="el-dialog__title">
  217. <span
  218. style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
  219. </span>
  220. </div>
  221. </template>
  222. <div>配置排序列数据(拖动调整顺序)</div>
  223. <div style="margin-left: 17px">
  224. <el-checkbox
  225. v-model="allCheck"
  226. label="全选"
  227. @change="allChecked"
  228. ></el-checkbox>
  229. </div>
  230. <div style="padding: 4px; display: flex; justify-content: center">
  231. <draggable
  232. v-model="setRowList"
  233. group="site"
  234. animation="300"
  235. @start="onStart"
  236. @end="onEnd"
  237. handle=".indraggable"
  238. >
  239. <transition-group>
  240. <div
  241. v-for="item in setRowList"
  242. :key="item.surface"
  243. class="listStyle"
  244. >
  245. <div style="width: 500px" class="indraggable">
  246. <div class="progress" :style="{ width: item.width + 'px' }">
  247. <el-checkbox
  248. :label="item.name"
  249. v-model="item.checked"
  250. :true-label="0"
  251. :false-label="1"
  252. >{{ item.name }}
  253. </el-checkbox>
  254. </div>
  255. </div>
  256. <el-input-number
  257. v-model.number="item.width"
  258. controls-position="right"
  259. :min="1"
  260. :max="500"
  261. size="mini"
  262. ></el-input-number>
  263. </div>
  264. </transition-group>
  265. </draggable>
  266. </div>
  267. <span slot="footer" class="dialog-footer">
  268. <el-button @click="showSetting = false">取 消</el-button>
  269. <el-button @click="delRow" type="danger">重 置</el-button>
  270. <el-button type="primary" @click="save()">确 定</el-button>
  271. </span>
  272. </el-dialog>
  273. <el-table v-loading="loading" :data="corpsList" @selection-change="handleSelectionChange">
  274. <el-table-column type="selection" width="55" align="center"/>
  275. <el-table-column label="行号" align="center" type="index"/>
  276. <el-table-column
  277. v-for="(item, index) in getRowList"
  278. :key="index"
  279. :label="item.name"
  280. :width="item.width"
  281. :prop="item.label"
  282. align="center"
  283. :fixed="item.fixed"
  284. :show-overflow-tooltip="true"
  285. sortable>
  286. <template slot-scope="scope">
  287. <span v-if="item.label == 'createTime'">{{ (scope.row.createTime).slice(0, 10) }}</span>
  288. <span v-if="item.label == 'fCargoPlanning'">{{scope.row.fCargoPlanning == '1'?'否':'是'}}</span>
  289. <span v-else>{{ scope.row[item.label] }}</span>
  290. </template>
  291. </el-table-column>
  292. <!-- <el-table-column label="订舱号" align="center" prop="fBillno"/>-->
  293. <!-- <el-table-column label="运输条款" align="center" prop="fServiceitems" />-->
  294. <!-- <el-table-column label="收货人" align="center" prop="fConsigneername"/>-->
  295. <!-- <el-table-column label="航线" align="center" prop="fName"/>-->
  296. <!-- <el-table-column label="箱型" align="center" prop="fNo"/>-->
  297. <!-- <el-table-column label="箱量" align="center" prop="fCntrcount"/>-->
  298. <!-- <el-table-column label="装货时间" align="center" prop="fBsdate"/>-->
  299. <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" min-width="160px">
  300. <template slot-scope="scope">
  301. <el-button
  302. size="mini"
  303. type="text"
  304. icon="el-icon-edit"
  305. @click="handleUpdate(scope.row,1)"
  306. v-hasPermi="['warehouse:warehousebills:webVersionOrderDetails']"
  307. >查看
  308. </el-button>
  309. <!-- <el-button-->
  310. <!-- size="mini"-->
  311. <!-- type="text"-->
  312. <!-- icon="el-icon-delete"-->
  313. <!-- @click="handleDelete(scope.row)"-->
  314. <!-- >移除</el-button>-->
  315. </template>
  316. </el-table-column>
  317. <!-- <el-table-column-->
  318. <!-- class-name="small-padding fixed-width"-->
  319. <!-- v-for="(item,index) in boxDistributionName"-->
  320. <!-- :key="item.index"-->
  321. <!-- :label="item"-->
  322. <!-- :value="item.index"-->
  323. <!-- :prop="item"-->
  324. <!-- >-->
  325. <!-- </el-table-column>-->
  326. </el-table>
  327. <pagination
  328. v-show="total>0"
  329. :total="total"
  330. :page.sync="queryParams.pageNum"
  331. :limit.sync="queryParams.pageSize"
  332. @pagination="getList"
  333. />
  334. <el-dialog
  335. title="配船"
  336. :visible.sync="shipAllocation"
  337. width="50%">
  338. <el-form :inline="true" :model="ship" class="demo-form-inline">
  339. <el-row>
  340. <el-col :span="12">
  341. <el-form-item label="船名">
  342. <el-select
  343. size="small"
  344. width="240px"
  345. v-model="ship.fVslid"
  346. @change="voyageRemthods"
  347. >
  348. <el-option
  349. v-for="item in vesselOptions"
  350. :key="item.fId"
  351. :label="item.fName"
  352. :value="item.fId"
  353. />
  354. </el-select>
  355. </el-form-item>
  356. </el-col>
  357. <el-col :span="12">
  358. <el-form-item label="航次">
  359. <el-select
  360. v-model="ship.fVoyid"
  361. filterable
  362. remote
  363. size="small"
  364. style="width: 200px"
  365. >
  366. <el-option
  367. v-for="item in voyageOptions"
  368. :key="item.fId"
  369. :label="item.fNo"
  370. :value="item.fId"/>
  371. </el-select>
  372. </el-form-item>
  373. </el-col>
  374. </el-row>
  375. </el-form>
  376. <span slot="footer" class="dialog-footer">
  377. <el-button @click="shipAllocation = false">取 消</el-button>
  378. <el-button type="primary" @click="matchingShip(true)">确 定</el-button>
  379. </span>
  380. </el-dialog>
  381. </div>
  382. </template>
  383. <script>
  384. import {bookingParty,selectUserByRole,listCorps, getcntrName, delCorps, changeCorpsStatus, exportInventory,cancelAllocation,confirmAllocation} from "@/api/kaihe/domesticTrade/myOrder";
  385. import Cookies from 'js-cookie'
  386. import {addSet, resetModule, select} from '@/api/system/set'
  387. import Vue from 'vue'
  388. import draggable from "vuedraggable";
  389. import {getVesselName} from '@/api/finance/applyForInvoice/chargeInvoice'
  390. import {getVoyageName} from '@/api/finance/applyForInvoice/feeDetail'
  391. import {portInquiry} from "@/api/kaihe/domesticTrade/orderInformation";
  392. Vue.directive('dialogDrag', {
  393. bind(el, binding, vnode, oldVnode) {
  394. const dialogHeaderEl = el.querySelector('.el-dialog__header')
  395. const dragDom = el.querySelector('.el-dialog')
  396. const enlarge = el.querySelector('.enlarge')
  397. dialogHeaderEl.style.cursor = 'move'
  398. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  399. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
  400. if (enlarge) {
  401. enlarge.onclick = (e) => {
  402. dragDom.style.top = '0px'
  403. dragDom.style.left = '0px'
  404. }
  405. }
  406. dialogHeaderEl.onmousedown = (e) => {
  407. // 鼠标按下,计算当前元素距离可视区的距离
  408. const disX = e.clientX - dialogHeaderEl.offsetLeft
  409. const disY = e.clientY - dialogHeaderEl.offsetTop
  410. // 获取到的值带px 正则匹配替换
  411. let styL, styT
  412. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  413. if (sty.left.includes('%')) {
  414. styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
  415. styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
  416. } else {
  417. styL = +sty.left.replace(/\px/g, '')
  418. styT = +sty.top.replace(/\px/g, '')
  419. }
  420. document.onmousemove = function (e) {
  421. // 通过事件委托,计算移动的距离
  422. const l = e.clientX - disX
  423. const t = e.clientY - disY
  424. // 移动当前元素
  425. if ((t + styT) >= 0) {
  426. dragDom.style.top = `${t + styT}px`
  427. }
  428. dragDom.style.left = `${l + styL}px`
  429. // 将此时的位置传出去
  430. // binding.value({x:e.pageX,y:e.pageY})
  431. }
  432. document.onmouseup = function (e) {
  433. document.onmousemove = null
  434. document.onmouseup = null
  435. }
  436. }
  437. }
  438. })
  439. export default {
  440. name: "myOrder",
  441. components: {
  442. draggable,
  443. },
  444. data() {
  445. return {
  446. voyageOptions: [],
  447. vesselOptions: [],
  448. show: false,
  449. activeIndex: '0',
  450. setRowList: [],
  451. getRowList: [],
  452. tableDate: [
  453. {
  454. surface: "1",
  455. label: "fBillno",
  456. name: "订舱号",
  457. checked: 0,
  458. width: 120,
  459. },
  460. {
  461. surface: "2",
  462. label: "fServiceitems",
  463. name: "运输条款",
  464. checked: 0,
  465. width: 120,
  466. },
  467. {
  468. surface: "3",
  469. label: "fConsigneername",
  470. name: "收货人",
  471. checked: 0,
  472. width: 120,
  473. },
  474. {
  475. surface: "4",
  476. label: "fName",
  477. name: "航线",
  478. checked: 0,
  479. width: 120,
  480. },
  481. {
  482. surface: "5",
  483. label: "fNo",
  484. name: "箱型",
  485. checked: 0,
  486. width: 120,
  487. },
  488. {
  489. surface: "6",
  490. label: "fCntrcount",
  491. name: "箱量",
  492. checked: 0,
  493. width: 120,
  494. },
  495. {
  496. surface: "7",
  497. label: "fBsdate",
  498. name: "装货时间",
  499. checked: 0,
  500. width: 120,
  501. },
  502. {
  503. surface: "8",
  504. label: "fBillstatus",
  505. name: "状态",
  506. checked: 0,
  507. width: 120,
  508. },
  509. {
  510. surface: "9",
  511. label: "vslName",
  512. name: "船名",
  513. checked: 0,
  514. width: 120,
  515. },
  516. {
  517. surface: "10",
  518. label: "voyNo",
  519. name: "航次",
  520. checked: 0,
  521. width: 120,
  522. },
  523. {
  524. surface: "11",
  525. label: "fMblno",
  526. name: "提单号",
  527. checked: 0,
  528. width: 120,
  529. },
  530. {
  531. surface: "12",
  532. label: "corpName",
  533. name: "订舱单位",
  534. checked: 0,
  535. width: 120,
  536. },
  537. {
  538. surface: "13",
  539. label: "goodsName",
  540. name: "货名",
  541. checked: 0,
  542. width: 120,
  543. },
  544. {
  545. surface: "14",
  546. label: "createBy",
  547. name: "订舱人",
  548. checked: 0,
  549. width: 120,
  550. },
  551. {
  552. surface: "15",
  553. label: "createTime",
  554. name: "订舱时间",
  555. checked: 0,
  556. width: 120,
  557. },
  558. {
  559. surface: "16",
  560. label: "loadportName",
  561. name: "起运港",
  562. checked: 0,
  563. width: 120,
  564. },
  565. {
  566. surface: "17",
  567. label: "destportName",
  568. name: "目的港",
  569. checked: 0,
  570. width: 120,
  571. },
  572. {
  573. surface: "18",
  574. label: "moneyStatus",
  575. name: "费用状态",
  576. checked: 0,
  577. width: 120,
  578. },
  579. {
  580. surface: "19",
  581. label: "fCargoPlanning",
  582. name: "配船",
  583. checked: 0,
  584. width: 120,
  585. }
  586. ],
  587. //自定义列宽
  588. allCheck: false,
  589. showSetting: false,
  590. shipAllocation: false,
  591. ship:{
  592. fVoyid:'',
  593. fVslid:''
  594. },
  595. serviceitems: [],
  596. container: [],
  597. // 遮罩层
  598. loading: true,
  599. // 选中数组
  600. ids: [],
  601. selection: [],
  602. // 非单个禁用
  603. single: true,
  604. // 非多个禁用
  605. multiple: true,
  606. // 显示搜索条件
  607. showSearch: true,
  608. // 总条数
  609. total: 0,
  610. // 客户详情表格数据
  611. corpsList: [],
  612. // 查询参数
  613. queryParams: {
  614. pageNum: 1,
  615. pageSize: 10,
  616. },
  617. fMblnoOptions:[],
  618. createBy:[],
  619. fCorpid:[]
  620. };
  621. },
  622. created() {
  623. this.setRowList = this.tableDate;
  624. this.getRowList = this.tableDate;
  625. portInquiry().then(res =>{
  626. this.fMblnoOptions = res.rows;
  627. })
  628. selectUserByRole().then(res => {
  629. this.createBy = res.rows
  630. })
  631. bookingParty().then(res=>{
  632. this.fCorpid = res.rows
  633. })
  634. this.getList();
  635. this.cntrRemoteMethod()
  636. this.vessleRemthod()
  637. this.voyageRemthods()
  638. this.getDicts("f_serviceitems").then((response) => {
  639. if (response.data) {
  640. this.serviceitems = response.data;
  641. }
  642. });
  643. this.getRow()
  644. },
  645. activated() {
  646. this.getList()
  647. },
  648. methods: {
  649. voyageRemthods() {
  650. getVoyageName({fPid:this.ship.fVslid}).then(response => {
  651. this.voyageOptions = response.rows
  652. if (this.ship.fVslid) this.ship.fVoyid = ''
  653. })
  654. },
  655. //获取船名
  656. vessleRemthod() {
  657. getVesselName().then(response => {
  658. this.vesselOptions = response.rows
  659. })
  660. },
  661. handleSelect(key, keyPath) {
  662. if (key === '0') {
  663. this.queryParams = {
  664. pageNum: 1,
  665. pageSize: 10,
  666. }
  667. } else if (key === '1') {
  668. this.queryParams.fBillstatus = 4
  669. } else if (key === '2') {
  670. this.queryParams.fBillstatus = 6
  671. } else if (key === '3') {
  672. this.queryParams.fBillstatus = 9
  673. } else if (key === '4') {
  674. this.queryParams.fBillstatus = 11
  675. } else if (key === '7') {
  676. this.queryParams.fBillstatus = 12
  677. } else if (key === '10') {
  678. this.queryParams.fBillstatus = 10
  679. } else if (key === '12') {
  680. this.queryParams.fBillstatus = 12
  681. }
  682. listCorps(this.queryParams).then(response => {
  683. this.corpsList = response.rows;
  684. this.total = response.total;
  685. this.loading = false;
  686. });
  687. },
  688. //重置列表
  689. delRow() {
  690. this.data = {
  691. tableName: "我的订单",
  692. userId: Cookies.get("userName"),
  693. };
  694. resetModule(this.data).then((res) => {
  695. if (res.code == 200) {
  696. this.showSetting = false;
  697. this.setRowList = this.tableDate;
  698. this.getRowList = this.tableDate;
  699. }
  700. });
  701. },
  702. //列设置全选
  703. allChecked() {
  704. if (this.allCheck == true) {
  705. this.setRowList.map((e) => {
  706. return (e.checked = 0);
  707. });
  708. } else {
  709. this.setRowList.map((e) => {
  710. return (e.checked = 1);
  711. });
  712. }
  713. },
  714. //查询列数据
  715. getRow() {
  716. let that = this;
  717. this.data = {
  718. tableName: "我的订单",
  719. userId: Cookies.get("userName"),
  720. };
  721. select(this.data).then((res) => {
  722. if (res.data.length != 0) {
  723. this.getRowList = res.data.filter((e) => e.checked == 0);
  724. this.setRowList = res.data;
  725. this.setRowList = this.setRowList.reduce((res, item) => {
  726. res.push({
  727. surface: item.surface,
  728. label: item.label,
  729. name: item.name,
  730. checked: item.checked,
  731. width: item.width,
  732. fixed: item.fixed
  733. });
  734. return res;
  735. }, []);
  736. }
  737. });
  738. },
  739. //保存列设置
  740. save() {
  741. this.showSetting = false;
  742. this.data = {
  743. tableName: "我的订单",
  744. userId: Cookies.get("userName"),
  745. sysTableSetList: this.setRowList,
  746. };
  747. addSet(this.data).then((res) => {
  748. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  749. });
  750. },
  751. //开始拖拽事件
  752. onStart() {
  753. this.drag = true;
  754. },
  755. //拖拽结束事件
  756. onEnd() {
  757. this.drag = false;
  758. },
  759. //箱型下拉查询
  760. cntrRemoteMethod() {
  761. let queryParams = {pageNum: 1,};
  762. getcntrName(queryParams).then(response => {
  763. this.container = response.rows
  764. })
  765. },
  766. /** 删除按钮操作 */
  767. handleDelete(row) {
  768. const fIds = row.fId || this.ids;
  769. this.$confirm('是否确认删除客户详情编号为"' + fIds + '"的数据项?', "警告", {
  770. confirmButtonText: "确定",
  771. cancelButtonText: "取消",
  772. type: "warning"
  773. }).then(function () {
  774. return delCorps(fIds);
  775. }).then(() => {
  776. this.getList();
  777. this.msgSuccess("删除成功");
  778. })
  779. },
  780. //查看跳转
  781. handleUpdate(row, num) {
  782. let res = {}
  783. res = {
  784. fId: row.fId,
  785. num: num
  786. }
  787. this.$router.push({
  788. path: "/domesticTrade/orderInformation",
  789. query: {data: JSON.stringify(res)},
  790. });
  791. },
  792. //模糊查询地点
  793. addressMethod() {
  794. let queryParams = {pageNum: 1,};
  795. getaddress(queryParams).then(response => {
  796. this.addressOptions = response.rows
  797. })
  798. },
  799. /** 查询客户详情列表 */
  800. getList() {
  801. listCorps(this.queryParams).then(response => {
  802. this.corpsList = response.rows;
  803. this.total = response.total;
  804. this.loading = false;
  805. });
  806. },
  807. // 从表重置
  808. contList() {
  809. this.contactList = []
  810. },
  811. // 状态修改
  812. handleStatusChange(row) {
  813. let text = row.fStatus === "0" ? "启用" : "停用";
  814. this.$confirm('确认要"' + text + '""' + row.fName + '"吗?', "警告", {
  815. confirmButtonText: "确定",
  816. cancelButtonText: "取消",
  817. type: "warning"
  818. }).then(function () {
  819. return changeCorpsStatus(row.fId, row.fStatus);
  820. }).then(() => {
  821. this.msgSuccess(text + "成功");
  822. }).catch(function () {
  823. row.fStatus = row.fStatus === "0" ? "1" : "0";
  824. });
  825. },
  826. /** 配船按钮操作 */
  827. matchingShip(type){
  828. if (type === false){
  829. this.shipAllocation = true
  830. this.ship.fVoyid = this.selection[0].fVoyid
  831. this.ship.fVslid = this.selection[0].fVslid
  832. // this.ship.fPid = this.selection[0].fVslid
  833. }else {
  834. this.ship.fCargoPlanning = 0
  835. this.ship.orderId = []
  836. this.selection.forEach(item => this.ship.orderId.push(item.fId))
  837. confirmAllocation(this.ship).then(res=>{
  838. console.log(res)
  839. this.shipAllocation = false
  840. this.getList()
  841. this.$message({
  842. showClose: true,
  843. message: '配船成功',
  844. type: 'success'
  845. });
  846. })
  847. }
  848. },
  849. /** 取消配船按钮操作 */
  850. cancelShip(){
  851. let data = []
  852. this.selection.forEach(item => data.push(item.fId))
  853. cancelAllocation(data).then(res=>{
  854. this.$message({
  855. showClose: true,
  856. message: '取消配船成功',
  857. type: 'success'
  858. });
  859. this.getList()
  860. })
  861. },
  862. /** 导出按钮操作 */
  863. handleExport() {
  864. const queryParams = this.queryParams
  865. this.$confirm('是否选择船名航次?', '警告', {
  866. confirmButtonText: '确定',
  867. cancelButtonText: '取消',
  868. type: 'warning'
  869. }).then(function () {
  870. return exportInventory(queryParams)
  871. }).then(response => {
  872. this.download(response.msg)
  873. })
  874. },
  875. /** 搜索按钮操作 */
  876. handleQuery() {
  877. this.queryParams.pageNum = 1;
  878. this.queryParams.pageSize = 10;
  879. this.getList();
  880. },
  881. /** 重置按钮操作 */
  882. resetQuery() {
  883. this.queryParams = {
  884. fBillno: null,
  885. fServiceitems: null,
  886. fConsigneername: null,
  887. fCntrid: null,
  888. fCntrcount: null,
  889. cLoadDate: null,
  890. fCntrno: null
  891. }
  892. this.resetForm("queryForm");
  893. this.handleQuery();
  894. },
  895. // 多选框选中数据
  896. handleSelectionChange(selection) {
  897. this.selection = selection
  898. this.ids = selection.map(item => item.fId)
  899. this.single = selection.length !== 1
  900. this.multiple = !selection.length
  901. },
  902. }
  903. };
  904. </script>
  905. <style lang="scss" scoped>
  906. .tabSetting {
  907. display: flex;
  908. justify-content: flex-end;
  909. }
  910. .listStyle {
  911. display: flex;
  912. border-top: 1px solid #dcdfe6;
  913. border-left: 1px solid #dcdfe6;
  914. border-right: 1px solid #dcdfe6;
  915. }
  916. .listStyle:last-child {
  917. border-bottom: 1px solid #dcdfe6;
  918. }
  919. .progress {
  920. display: flex;
  921. align-items: center;
  922. padding: 2px;
  923. background-color: rgba(0, 0, 0, 0.05);
  924. height: 100%;
  925. }
  926. </style>
  927. <style lang="scss">
  928. .el-table {
  929. .el-table__body-wrapper {
  930. z-index: 2;
  931. }
  932. }
  933. </style>