index.vue 25 KB

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