index.vue 24 KB

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