index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-row>
  5. <el-form-item label="箱号" prop="fNo">
  6. <el-input style="width: 200px" v-model="queryParams.fNo" placeholder="请选择客户类别" clearable size="small">
  7. </el-input>
  8. </el-form-item>
  9. <el-form-item label="箱类型" prop="fTypeid">
  10. <el-select
  11. v-model="queryParams.fTypeid"
  12. style="width: 200px"
  13. placeholder="请输入名称"
  14. clearable
  15. size="small"
  16. filterable
  17. :remote-method="boxTypeMethod"
  18. >
  19. <el-option
  20. v-for="item in typeOptions"
  21. :key="item.fId"
  22. :label="item.fNo"
  23. :value="item.fId"
  24. />
  25. </el-select>
  26. </el-form-item>
  27. <el-form-item label="箱状态" prop="fCntrstatus">
  28. <el-select
  29. v-model="queryParams.fCntrstatus"
  30. style="width: 200px"
  31. placeholder="请输入或选择"
  32. clearable
  33. size="small"
  34. @keyup.enter.native="handleQuery"
  35. >
  36. <el-option
  37. v-for="dict in cntrstatusOptions"
  38. :key="dict.dictValue"
  39. :label="dict.dictLabel"
  40. :value="dict.dictValue"
  41. />
  42. </el-select>
  43. </el-form-item>
  44. <el-form-item label="箱主" prop="fOwner">
  45. <el-select
  46. v-model="queryParams.fOwner"
  47. style="width: 200px"
  48. placeholder="请输入或选择"
  49. clearable
  50. size="small"
  51. @keyup.enter.native="handleQuery"
  52. >
  53. <el-option
  54. v-for="dict in ownerOptions"
  55. :key="dict.dictValue"
  56. :label="dict.dictLabel"
  57. :value="dict.dictValue"
  58. />
  59. </el-select>
  60. </el-form-item>
  61. </el-row>
  62. <div v-show="queryParamsHidden">
  63. <el-row>
  64. <el-form-item label="录入人" prop="createBy">
  65. <el-input
  66. v-model="queryParams.createBy"
  67. style="width: 200px"
  68. placeholder="请输入电话"
  69. clearable
  70. size="small"
  71. @keyup.enter.native="handleQuery"
  72. />
  73. </el-form-item>
  74. <el-form-item label="备注" prop="remark">
  75. <el-input
  76. style="width: 200px"
  77. type="textarea"
  78. clearable
  79. size="small"
  80. v-model="queryParams.remark"
  81. />
  82. </el-form-item>
  83. <el-form-item label="录入区间" prop="cLoadDate">
  84. <el-date-picker
  85. v-model="queryParams.cLoadDate"
  86. type="daterange"
  87. value-format="yyyy-MM-dd"
  88. range-separator="至"
  89. start-placeholder="开始日期"
  90. end-placeholder="结束日期"
  91. style="width: 250px"
  92. >
  93. </el-date-picker>
  94. </el-form-item>
  95. </el-row>
  96. </div>
  97. </el-form>
  98. <el-row :gutter="10" class="mb8">
  99. <el-col :span="1.5">
  100. <el-button
  101. type="success"
  102. icon="el-icon-plus"
  103. size="mini"
  104. @click="handleAdd"
  105. >新增</el-button>
  106. </el-col>
  107. <el-col :span="1.5">
  108. <el-button
  109. type="warning"
  110. icon="el-icon-edit"
  111. size="mini"
  112. :disabled="single"
  113. @click="handleUpdate"
  114. >修改</el-button>
  115. </el-col>
  116. <el-col :span="1.5">
  117. <el-button
  118. type="danger"
  119. icon="el-icon-delete"
  120. size="mini"
  121. :disabled="multiple"
  122. @click="handleDelete"
  123. >删除</el-button>
  124. </el-col>
  125. <el-col :span="1.5">
  126. <el-button
  127. type="primary"
  128. icon="el-icon-download"
  129. size="mini"
  130. @click="handleExport"
  131. >导出</el-button>
  132. </el-col>
  133. <el-col :span="1.5">
  134. <el-button
  135. type="primary"
  136. icon="el-icon-download"
  137. size="mini"
  138. @click="handleExport"
  139. >导出</el-button>
  140. </el-col>
  141. <el-col :span="1.5">
  142. <el-button
  143. type="info"
  144. icon="el-icon-download"
  145. size="mini"
  146. @click="handleExport"
  147. >取消</el-button>
  148. </el-col>
  149. <el-col style="position: absolute;left:75%" :span="5" >
  150. <el-button size="small" @click="queryParamsHidden ? (queryParamsHidden = false) : (queryParamsHidden = true)">{{ queryParamsHidden ? '隐藏' : '更多' }}</el-button>
  151. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  152. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  153. </el-col>
  154. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  155. </el-row>
  156. <el-table v-loading="loading" :data="corpsList" @selection-change="handleSelectionChange">
  157. <el-table-column type="selection" align="center" />
  158. <el-table-column type="index" label="行号" align="center" fixed/>
  159. <el-table-column label="箱号" sortable fixed align="center" prop="fNo" fixed width="100px"/>
  160. <el-table-column label="地点" align="center" sortable prop="fUpdateaddress" fixed/>
  161. <el-table-column label="箱类型" align="center" sortable prop="typeidName" fixed width="100px"/>
  162. <el-table-column label="箱状态" align="center" sortable prop="cntrstatusName" fixed width="100px"/>
  163. <el-table-column label="空重" align="center" sortable prop="updateEFName" fixed/>
  164. <el-table-column :show-overflow-tooltip="true" label="箱主" align="center" prop="ownerName" />
  165. <el-table-column :show-overflow-tooltip="true" label="箱来源" align="center" prop="sourceName" />
  166. <el-table-column :show-overflow-tooltip="true" label="租赁方式" align="center" prop="rentName" />
  167. <el-table-column :show-overflow-tooltip="true" label="备注" align="center" prop="remark" />
  168. <el-table-column label="录入人" align="center" prop="createBy" />
  169. <el-table-column label="录入时间" align="center" prop="createTime" width="100px">
  170. <template slot-scope="scope">
  171. <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column label="最新修改人" align="center" prop="updateBy" width="100px"/>
  175. <el-table-column label="最新修改时间" align="center" prop="updateTime" width="120px">
  176. <template slot-scope="scope">
  177. <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
  178. </template>
  179. </el-table-column>
  180. <el-table-column label="操作" align="center" min-width="120px" fixed="right">
  181. <template slot-scope="scope">
  182. <el-button
  183. size="mini"
  184. type="text"
  185. icon="el-icon-edit"
  186. @click="handleUpdate(scope.row)"
  187. v-hasPermi="['basicdata:corps:edit']"
  188. >查看</el-button>
  189. <el-button
  190. size="mini"
  191. type="text"
  192. icon="el-icon-delete"
  193. @click="handleDelete(scope.row)"
  194. v-hasPermi="['basicdata:corps:remove']"
  195. >移除</el-button>
  196. </template>
  197. </el-table-column>
  198. </el-table>
  199. <pagination
  200. v-show="total>0"
  201. :total="total"
  202. :page.sync="queryParams.pageNum"
  203. :limit.sync="queryParams.pageSize"
  204. @pagination="getList"
  205. />
  206. <!-- 添加或修改客户详情对话框 -->
  207. <el-dialog
  208. v-dialogDrag
  209. :fullscreen="dialogFull"
  210. :title="title"
  211. :visible.sync="open"
  212. close-on-click-modal="false"
  213. width="60%"
  214. :close-on-click-modal="false"
  215. append-to-body>
  216. <template slot="title">
  217. <div class="avue-crud__dialog__header">
  218. <span class="el-dialog__title">
  219. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
  220. </span>
  221. <div class="avue-crud__dialog__menu enlarge" @click="full">
  222. <i style="cursor: pointer;display: block;width:12px;height:12px;border:1px solid #909399;border-top:3px solid #909399;margin-top: -3px;"></i>
  223. </div>
  224. </div>
  225. </template>
  226. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  227. <el-row>
  228. <el-col :span="24">
  229. <el-form-item label="箱类型" prop="fTypeid">
  230. <el-select
  231. style="width: 90%"
  232. v-model="form.fTypeid"
  233. placeholder="请选择箱类型"
  234. clearable
  235. :disabled="doNot"
  236. filterable
  237. :remote-method="boxTypeMethod"
  238. >
  239. <el-option
  240. v-for="item in typeOptions"
  241. :key="item.fId"
  242. :label="item.fNo"
  243. :value="item.fId"
  244. />
  245. </el-select>
  246. </el-form-item>
  247. </el-col>
  248. <el-col :span="12">
  249. <el-form-item label="最新地点" prop="fUpdateaddress">
  250. <el-input v-model="form.fUpdateaddress" style="width: 80%" placeholder="请输入最新地点" :disabled="doNot"/>
  251. </el-form-item>
  252. </el-col>
  253. <el-col :span="12">
  254. <el-form-item label="箱主" prop="fOwner">
  255. <el-select
  256. v-model="form.fOwner"
  257. style="width: 80%"
  258. :disabled="doNot"
  259. placeholder="请选择箱主"
  260. >
  261. <el-option
  262. v-for="dict in ownerOptions"
  263. :key="dict.dictValue"
  264. :label="dict.dictLabel"
  265. :value="dict.dictValue"
  266. />
  267. </el-select>
  268. </el-form-item>
  269. </el-col>
  270. </el-row>
  271. <el-row>
  272. <el-col :span="12">
  273. <el-form-item label="箱号" prop="fNo">
  274. <el-input v-model="form.fNo" style="width: 80%" placeholder="请输入箱号" :disabled="doNot" />
  275. </el-form-item>
  276. </el-col>
  277. <el-col :span="12">
  278. <el-form-item label="箱来源" prop="fSource">
  279. <el-select v-model="form.fSource" style="width: 78%" placeholder="请选择箱来源" :disabled="doNot">
  280. <el-option
  281. v-for="dict in sourceOptions"
  282. :key="dict.dictValue"
  283. :label="dict.dictLabel"
  284. :value="dict.dictValue"
  285. />
  286. </el-select>
  287. </el-form-item>
  288. </el-col>
  289. </el-row>
  290. <el-row>
  291. <el-col :span="12">
  292. <el-form-item label="租赁方式" prop="fRent">
  293. <el-select v-model="form.fRent" style="width: 80%" placeholder="请选择租赁方式" :disabled="doNot">
  294. <el-option
  295. v-for="dict in fRentOptions"
  296. :key="dict.dictValue"
  297. :label="dict.dictLabel"
  298. :value="dict.dictValue"
  299. />
  300. </el-select>
  301. </el-form-item>
  302. </el-col>
  303. <el-col :span="12">
  304. <el-form-item label="空重" prop="fUpdateef">
  305. <el-select v-model="form.fUpdateef" style="width: 80%" placeholder="请请选择空重" :disabled="doNot">
  306. <el-option
  307. v-for="dict in updateEFOptions"
  308. :key="dict.dictValue"
  309. :label="dict.dictLabel"
  310. :value="dict.dictValue"
  311. />
  312. </el-select>
  313. </el-form-item>
  314. </el-col>
  315. <el-col :span="12">
  316. <el-form-item label="箱状态" prop="fCntrstatus">
  317. <el-select v-model="form.fCntrstatus" style="width: 80%" placeholder="请选择箱状态" :disabled="doNot">
  318. <el-option
  319. v-for="dict in cntrstatusOptions"
  320. :key="dict.dictValue"
  321. :label="dict.dictLabel"
  322. :value="dict.dictValue"
  323. />
  324. </el-select>
  325. </el-form-item>
  326. </el-col>
  327. </el-row>
  328. <el-row>
  329. <el-col :span="24">
  330. <el-form-item label="备注" prop="remark">
  331. <el-input v-model="form.remark" style="width: 90%" placeholder="请输入备注" :disabled="doNot"/>
  332. </el-form-item>
  333. </el-col>
  334. </el-row>
  335. </el-form>
  336. <div slot="footer" class="dialog-footer">
  337. <el-button type="info" round @click="doNot = false">修 改</el-button>
  338. <el-button type="success" round @click="submitForm" :disabled="doNot">保 存</el-button>
  339. <el-button @click="cancel" round>关 闭</el-button>
  340. </div>
  341. </el-dialog>
  342. </div>
  343. </template>
  344. <script>
  345. import { listCorps, getInforma, delCorps, addboxinformation, getType,updateCorps, changeCorpsStatus,exportCorps } from "@/api/kaihe/containerNews/boxInformation";
  346. import {queryUserVal} from "@/api/system/user";
  347. import { isArray } from '@/utils/validate'
  348. import Vue from 'vue'
  349. import { getportinformation } from '@/api/kaihe/basicdata/portinformation'
  350. Vue.directive('dialogDrag', {
  351. bind(el, binding, vnode, oldVnode) {
  352. const dialogHeaderEl = el.querySelector('.el-dialog__header')
  353. const dragDom = el.querySelector('.el-dialog')
  354. const enlarge = el.querySelector('.enlarge')
  355. dialogHeaderEl.style.cursor = 'move'
  356. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  357. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
  358. if(enlarge){
  359. enlarge.onclick = (e) => {
  360. dragDom.style.top = '0px'
  361. dragDom.style.left = '0px'
  362. }
  363. }
  364. dialogHeaderEl.onmousedown = (e) => {
  365. // 鼠标按下,计算当前元素距离可视区的距离
  366. const disX = e.clientX - dialogHeaderEl.offsetLeft
  367. const disY = e.clientY - dialogHeaderEl.offsetTop
  368. // 获取到的值带px 正则匹配替换
  369. let styL, styT
  370. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  371. if (sty.left.includes('%')) {
  372. styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
  373. styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
  374. } else {
  375. styL = +sty.left.replace(/\px/g, '')
  376. styT = +sty.top.replace(/\px/g, '')
  377. }
  378. document.onmousemove = function(e) {
  379. // 通过事件委托,计算移动的距离
  380. const l = e.clientX - disX
  381. const t = e.clientY - disY
  382. // 移动当前元素
  383. if ((t + styT) >= 0){
  384. dragDom.style.top = `${t + styT}px`
  385. }
  386. dragDom.style.left = `${l + styL}px`
  387. // 将此时的位置传出去
  388. // binding.value({x:e.pageX,y:e.pageY})
  389. }
  390. document.onmouseup = function(e) {
  391. document.onmousemove = null
  392. document.onmouseup = null
  393. }
  394. }
  395. }
  396. })
  397. export default {
  398. name: "boxInformation",
  399. components: {
  400. },
  401. data() {
  402. return {
  403. //默认显示第一行
  404. queryParamsHidden:false,
  405. //字典表箱种类
  406. containerOptions:[],
  407. //集装箱主字典表
  408. ownerOptions:[],
  409. //箱来源字典表
  410. sourceOptions:[],
  411. //租赁方式字典表
  412. fRentOptions:[],
  413. //空重字典表
  414. updateEFOptions:[],
  415. //箱状态字典表
  416. cntrstatusOptions:[],
  417. //模糊查询箱类型
  418. typeOptions:[],
  419. //查看置灰
  420. doNot:true,
  421. //全屏放大
  422. dialogFull:false,
  423. contactList:[],
  424. // 遮罩层
  425. loading: true,
  426. // 选中数组
  427. ids: [],
  428. // 非单个禁用
  429. single: true,
  430. // 非多个禁用
  431. multiple: true,
  432. // 显示搜索条件
  433. showSearch: true,
  434. // 总条数
  435. total: 0,
  436. // 客户详情表格数据
  437. corpsList: [],
  438. // 弹出层标题
  439. title: "",
  440. // 状态数据字典
  441. statusOptions: [],
  442. // 是否显示弹出层
  443. open: false,
  444. // 客户类别字典
  445. fTypeidOptions: [],
  446. // 结算表票结、月结字典
  447. fStltypeidOptions: [],
  448. // 删除状态字典
  449. delFlagOptions: [],
  450. // 查询参数
  451. queryParams: {
  452. pageNum: 1,
  453. pageSize: 10,
  454. fNo:null,
  455. fTypeid:null,
  456. fCntrstatus:null,
  457. fOwner:null,
  458. createBy:null,
  459. cLoadDate:null,
  460. remark:null,
  461. },
  462. // 表单参数
  463. form: {
  464. fTypeid:null,
  465. fUpdateaddress:null,
  466. fOwner:null,
  467. fNo:null,
  468. fSource:null,
  469. fRent:null,
  470. fUpdateef:null,
  471. fCntrstatus:null,
  472. remark:null
  473. },
  474. // 表单校验
  475. rules: {
  476. fTypeid: [
  477. { required: true, message: "", trigger: "blur" }
  478. ],
  479. fNo: [
  480. { required: true, message: "箱号不能为空", trigger: "blur" }
  481. ],
  482. fUpdateaddress: [
  483. { required: true, message: "最新地点不能为空", trigger: "blur" }
  484. ],
  485. fOwner:[
  486. { required: true, message: "箱主不能为空", trigger: "blur" }
  487. ],
  488. fUpdateef: [
  489. { required: true, message: "空重不能为空", trigger: "blur" }
  490. ],
  491. fCntrstatus: [
  492. { required: true, message: "箱状态不能为空", trigger: "blur" }
  493. ],
  494. }
  495. };
  496. },
  497. created() {
  498. this.getList();
  499. this.getDicts("f_type").then(response => {
  500. this.containerOptions = response.data;
  501. });
  502. this.getDicts("f_owner").then(response => {
  503. this.ownerOptions = response.data;
  504. });
  505. this.getDicts("f_source").then(response => {
  506. this.sourceOptions = response.data;
  507. });
  508. this.getDicts("f_rent").then(response => {
  509. this.fRentOptions = response.data;
  510. });
  511. this.getDicts("f_updateEF").then(response => {
  512. this.updateEFOptions = response.data;
  513. });
  514. this.getDicts("f_cntrstatus").then(response => {
  515. this.cntrstatusOptions = response.data;
  516. });
  517. this.boxTypeMethod()
  518. },
  519. methods: {
  520. //模糊查询箱类型
  521. boxTypeMethod(){
  522. let queryParams = { pageNum: 1,};
  523. getType(queryParams).then(response =>{
  524. console.log(response)
  525. this.typeOptions = response.rows
  526. })
  527. },
  528. full(){
  529. this.dialogFull = !this.dialogFull
  530. },
  531. /** 查询客户详情列表 */
  532. getList() {
  533. this.loading = true;
  534. listCorps(this.queryParams).then(response => {
  535. this.corpsList = response.rows;
  536. this.total = response.total;
  537. this.loading = false;
  538. });
  539. },
  540. // 客户类别字典翻译
  541. fTypeidFormat(row, column) {
  542. return this.selectDictLabel(this.fTypeidOptions, row.fTypeid);
  543. },
  544. // 结算表票结、月结字典翻译
  545. fStltypeidFormat(row, column) {
  546. return this.selectDictLabel(this.fStltypeidOptions, row.fStltypeid);
  547. },
  548. // 删除状态字典翻译
  549. delFlagFormat(row, column) {
  550. return this.selectDictLabel(this.delFlagOptions, row.delFlag);
  551. },
  552. // 取消按钮
  553. cancel() {
  554. this.open = false;
  555. this.reset();
  556. },
  557. // 表单重置
  558. reset() {
  559. this.form = {
  560. fTypeid:null,
  561. fUpdateaddress:null,
  562. fOwner:null,
  563. fNo:null,
  564. fSource:null,
  565. fRent:null,
  566. fUpdateef:null,
  567. fCntrstatus:null,
  568. remark:null
  569. };
  570. this.resetForm("form");
  571. },
  572. // 从表重置
  573. contList() {
  574. this.contactList = []
  575. },
  576. // 状态修改
  577. handleStatusChange(row) {
  578. let text = row.fStatus === "0" ? "启用" : "停用";
  579. this.$confirm('确认要"' + text + '""' + row.fName + '"吗?', "警告", {
  580. confirmButtonText: "确定",
  581. cancelButtonText: "取消",
  582. type: "warning"
  583. }).then(function() {
  584. return changeCorpsStatus(row.fId, row.fStatus);
  585. }).then(() => {
  586. this.msgSuccess(text + "成功");
  587. }).catch(function() {
  588. row.fStatus = row.fStatus === "0" ? "1" : "0";
  589. });
  590. },
  591. /** 搜索按钮操作 */
  592. handleQuery() {
  593. this.queryParams.pageNum = 1;
  594. this.getList();
  595. },
  596. /** 重置按钮操作 */
  597. resetQuery() {
  598. this.resetForm("queryForm");
  599. this.handleQuery();
  600. },
  601. // 多选框选中数据
  602. handleSelectionChange(selection) {
  603. this.ids = selection.map(item => item.fId)
  604. this.single = selection.length!==1
  605. this.multiple = !selection.length
  606. },
  607. /** 新增按钮操作 */
  608. handleAdd() {
  609. this.doNot = false
  610. this.reset();
  611. this.open = true;
  612. this.title = "添加客户详情";
  613. },
  614. /** 修改按钮操作 */
  615. handleUpdate(row) {
  616. this.doNot = true
  617. this.reset();
  618. const fId = row.fId || this.ids
  619. getInforma(fId).then(response => {
  620. this.form = response.data;
  621. this.open = true;
  622. this.title = "修改客户详情";
  623. });
  624. },
  625. /** 提交按钮 */
  626. submitForm() {
  627. this.$refs["form"].validate(valid => {
  628. if (valid) {
  629. if (this.form.fId != null) {
  630. addboxinformation(this.form).then(response => {
  631. this.msgSuccess("修改成功");
  632. this.open = false;
  633. this.getList();
  634. });
  635. } else {
  636. addboxinformation(this.form).then(response => {
  637. this.msgSuccess("新增成功");
  638. this.open = false;
  639. this.getList();
  640. });
  641. }
  642. }
  643. });
  644. },
  645. /** 删除按钮操作 */
  646. handleDelete(row) {
  647. const fIds = row.fId || this.ids;
  648. this.$confirm('是否确认删除客户详情编号为"' + fIds + '"的数据项?', "警告", {
  649. confirmButtonText: "确定",
  650. cancelButtonText: "取消",
  651. type: "warning"
  652. }).then(function() {
  653. return delCorps(fIds);
  654. }).then(() => {
  655. this.getList();
  656. this.msgSuccess("删除成功");
  657. })
  658. },
  659. /** 导出按钮操作 */
  660. handleExport() {
  661. const queryParams = this.queryParams;
  662. this.$confirm('是否确认导出所有客户详情数据项?', "警告", {
  663. confirmButtonText: "确定",
  664. cancelButtonText: "取消",
  665. type: "warning"
  666. }).then(function() {
  667. return exportCorps(queryParams);
  668. }).then(response => {
  669. this.download(response.msg);
  670. })
  671. }
  672. }
  673. };
  674. </script>
  675. <style lang="scss">
  676. .avue-crud__dialog__header {
  677. display: -webkit-box;
  678. display: -ms-flexbox;
  679. display: flex;
  680. -webkit-box-align: center;
  681. -ms-flex-align: center;
  682. align-items: center;
  683. -webkit-box-pack: justify;
  684. -ms-flex-pack: justify;
  685. justify-content: space-between;
  686. }
  687. .el-dialog__title {
  688. color: rgba(0,0,0,.85);
  689. font-weight: 500;
  690. word-wrap: break-word;
  691. }
  692. .avue-crud__dialog__menu {
  693. padding-right: 20px;
  694. float: left;
  695. }
  696. .avue-crud__dialog__menu i {
  697. color: #909399;
  698. font-size: 15px;
  699. }
  700. .el-icon-full-screen{
  701. cursor: pointer;
  702. }
  703. .el-icon-full-screen:before {
  704. content: "\e719";
  705. }
  706. </style>