main.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. <template>
  2. <div>
  3. <containerTitle title="费用明细"></containerTitle>
  4. <basic-container>
  5. <avue-crud
  6. ref="feeCrud"
  7. :data="feeData"
  8. :option="feeOption"
  9. @saveColumn="saveColumn"
  10. @resetColumn="resetColumn"
  11. @selection-change="selectionChange"
  12. :summary-method="summaryMethod"
  13. :cell-style="cellStyle"
  14. >
  15. <template slot="menuLeft">
  16. <el-tabs v-model="activeName" @tab-click="tabHandle">
  17. <el-tab-pane label="应收" name="first" :key="'first'">
  18. </el-tab-pane>
  19. <el-tab-pane label="应付" name="second" :key="'second'">
  20. </el-tab-pane>
  21. </el-tabs>
  22. <el-button
  23. type="primary"
  24. icon="el-icon-plus"
  25. size="small"
  26. @click.stop="rowAdd"
  27. :loading="buttonLoading"
  28. :disabled="disabled"
  29. >录入明细</el-button
  30. >
  31. <el-button
  32. type="warning"
  33. size="small"
  34. @click.stop="billingDetails('收费')"
  35. :loading="buttonLoading"
  36. :disabled="(financeDisabled && disabled) || selectionList.length == 0"
  37. v-if="selectTab === 1"
  38. >生成账单</el-button>
  39. <el-button
  40. type="warning"
  41. size="small"
  42. @click.stop="billingDetails('申请')"
  43. :loading="buttonLoading"
  44. :disabled="(financeDisabled && disabled) || selectionList.length == 0"
  45. v-if="selectTab === 2"
  46. >申请付费</el-button>
  47. </template>
  48. <template slot="menu" slot-scope="{ row, index }">
  49. <el-button
  50. size="small"
  51. icon="el-icon-edit"
  52. type="text"
  53. @click="rowCell(row, index)"
  54. :disabled="disabled"
  55. >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
  56. >
  57. <el-button
  58. size="small"
  59. icon="el-icon-delete"
  60. type="text"
  61. @click="rowDel(row, index)"
  62. :disabled="disabled"
  63. >删 除</el-button
  64. >
  65. </template>
  66. <template slot="corpId" slot-scope="{ row, index }">
  67. <span v-if="row.$cellEdit" class="required_fields">*</span>
  68. <crop-select
  69. ref="corp"
  70. style="width: 90% !important;display: inline-block"
  71. v-if="row.$cellEdit"
  72. v-model="row.corpId"
  73. :cropIndex="index"
  74. @getCorpData="getCorpData"
  75. corpType="KG"
  76. ></crop-select>
  77. <span v-else>{{ row.corpName }}</span>
  78. </template>
  79. <template slot="feeName" slot-scope="{ row, index }">
  80. <span v-if="row.$cellEdit" class="required_fields">*</span>
  81. <breakdown-select
  82. v-if="row.$cellEdit"
  83. v-model="row.itemId"
  84. @selectValue="(value) => selectValue(value,row)"
  85. :configuration="breakConfiguration"
  86. >
  87. </breakdown-select>
  88. <span v-else>{{ row.feeName }}</span>
  89. </template>
  90. <template slot="billNo" slot-scope="{ row }">
  91. <el-select
  92. v-if="row.$cellEdit"
  93. v-model="row.billNo"
  94. size="small"
  95. filterable
  96. allow-create
  97. default-first-option
  98. clearable
  99. >
  100. <el-option
  101. v-for="(item,index) in billNoList"
  102. :key="index"
  103. :label="item"
  104. :value="item"
  105. >
  106. </el-option>
  107. </el-select>
  108. <span v-else>{{ row.billNo }}</span>
  109. </template>
  110. <template slot="price" slot-scope="{ row }">
  111. <el-input
  112. v-if="row.$cellEdit"
  113. v-model="row.price"
  114. placeholder="请输入"
  115. size="small"
  116. @input="countChange(row)"
  117. ></el-input>
  118. <span v-else>{{ row.price | micrometerFormat }}</span>
  119. </template>
  120. <template slot="quantity" slot-scope="{ row }">
  121. <el-input
  122. v-if="row.$cellEdit"
  123. v-model="row.quantity"
  124. size="small"
  125. placeholder="请输入"
  126. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
  127. @input="countChange(row)"
  128. ></el-input>
  129. <span v-else>{{ row.quantity }}</span>
  130. </template>
  131. <template slot="amount" slot-scope="{ row }">
  132. <span>{{ row.amount | micrometerFormat }}</span>
  133. </template>
  134. <template slot="exchangeRate" slot-scope="{ row }">
  135. <el-input
  136. v-if="row.$cellEdit"
  137. v-model="row.exchangeRate"
  138. size="small"
  139. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  140. @change="rateChange(row)"
  141. placeholder="请输入"
  142. ></el-input>
  143. <span v-else>{{ row.exchangeRate }}</span>
  144. </template>
  145. <template slot="currency" slot-scope="{ row }">
  146. <el-select
  147. v-if="row.$cellEdit"
  148. v-model="row.currency"
  149. filterable
  150. allow-create
  151. default-first-option
  152. placeholder="请选择"
  153. size="small"
  154. @change="currencyChange(row)"
  155. >
  156. <el-option
  157. v-for="(item, index) in currencyList"
  158. :key="index"
  159. :label="item.dictValue"
  160. :value="item.dictValue"
  161. >
  162. </el-option>
  163. </el-select>
  164. <span v-else>{{ row.currency }}</span>
  165. </template>
  166. <template slot="unit" slot-scope="{ row }">
  167. <el-select
  168. v-if="row.$cellEdit"
  169. v-model="row.unit"
  170. filterable
  171. placeholder="请选择"
  172. size="small"
  173. >
  174. <el-option
  175. v-for="(item, index) in unitList"
  176. :key="index"
  177. :label="item.dictValue"
  178. :value="item.dictValue"
  179. >
  180. </el-option>
  181. </el-select>
  182. <span v-else>{{ row.unit }}</span>
  183. </template>
  184. </avue-crud>
  185. </basic-container>
  186. <el-dialog
  187. title="导入费用"
  188. append-to-body
  189. :visible.sync="feeDialog"
  190. top="5vh"
  191. width="60%"
  192. :close-on-click-modal="false"
  193. @closed="feeClose"
  194. class="el-dialogDeep"
  195. v-dialog-drag
  196. >
  197. <el-row style="height: 0;">
  198. <el-col :span="5">
  199. <div style="margin-top:45px">
  200. <el-scrollbar>
  201. <basic-container>
  202. <avue-tree
  203. :option="treeOption"
  204. :data="treeData"
  205. @node-click="nodeClick"
  206. />
  207. </basic-container>
  208. </el-scrollbar>
  209. </div>
  210. </el-col>
  211. <el-col :span="19">
  212. <avue-crud
  213. :option="option"
  214. :table-loading="loading"
  215. :data="data"
  216. ref="crud"
  217. @refresh-change="refreshChange"
  218. @selection-change="selectionChange"
  219. @current-change="currentChange"
  220. @size-change="sizeChange"
  221. :page.sync="page"
  222. @on-load="onLoad"
  223. :cell-style="cellStyle"
  224. >
  225. </avue-crud>
  226. </el-col>
  227. </el-row>
  228. <div class="dialogButton">
  229. <el-button @click="feeDialog = false">取 消</el-button>
  230. <el-button
  231. type="primary"
  232. @click="importData"
  233. :disabled="this.selectionList.length == 0"
  234. >
  235. 导入
  236. </el-button>
  237. </div>
  238. </el-dialog>
  239. <crop-dialog ref="cropDialog" @importCorp="importCorp"></crop-dialog>
  240. </div>
  241. </template>
  242. <script>
  243. import feeOption from "./config/feeInfo.json";
  244. import option from "./config/feeList.json";
  245. import { getDeptLazyTree, customerList } from "@/api/basicData/basicFeesDesc";
  246. import { delItem } from "@/api/feeInfo/fee-info";
  247. import { isPercentage, micrometerFormat } from "@/util/validate";
  248. import cropDialog from "@/components/crop-dialog/main";
  249. import _ from "lodash";
  250. import ApplyPayment from "../finance/applyPayment";
  251. import {applyLoan,paymentApply} from "@/api/financialManagement/paymentRequest";
  252. import { contrastList } from "@/util/contrastData";
  253. import { allCropList } from "@/api/basicData/customerInformation";
  254. import { getCustomerCode, getCustomerName } from "@/enums/management-type";
  255. export default {
  256. name: "feeInfo",
  257. data() {
  258. return {
  259. option: option,
  260. feeOption: {},
  261. feeDialog: false,
  262. buttonLoading:false,
  263. treeOption: {
  264. nodeKey: "id",
  265. lazy: true,
  266. treeLoad: function(node, resolve) {
  267. const parentId = node.level === 0 ? 0 : node.data.id;
  268. getDeptLazyTree(parentId).then(res => {
  269. resolve(
  270. res.data.data.map(item => {
  271. return {
  272. ...item,
  273. leaf: !item.hasChildren
  274. };
  275. })
  276. );
  277. });
  278. },
  279. addBtn: false,
  280. menu: false,
  281. size: "small",
  282. props: {
  283. labelText: "标题",
  284. label: "title",
  285. value: "value",
  286. children: "children"
  287. }
  288. },
  289. page: {
  290. pageSize: 10,
  291. currentPage: 1,
  292. total: 0
  293. },
  294. treeDeptId: null,
  295. loading: false,
  296. receivableButton: "primary",
  297. copeWithButton: "",
  298. data: [],
  299. feeData: [],
  300. selectionList: [],
  301. reData: null,
  302. currencyList: [],
  303. unitList:[],
  304. breakConfiguration:{
  305. multipleChoices:false,
  306. multiple:false,
  307. disabled:false,
  308. searchShow:true,
  309. collapseTags:false,
  310. clearable:true,
  311. placeholder:'请点击右边按钮选择',
  312. dicData:[]
  313. },
  314. allData:[],
  315. data_one:[],
  316. data_two:[],
  317. selectTab:1,
  318. activeName:"first",
  319. enableName:"first",
  320. tab1:true,
  321. tab2:false,
  322. corpList: [],
  323. };
  324. },
  325. props: {
  326. orderFeesList: {
  327. type: Array
  328. },
  329. disabled: {
  330. type: Boolean
  331. },
  332. feeUrl: {
  333. type: String
  334. },
  335. billUrl: {
  336. type: String
  337. },
  338. optionType:{
  339. type: String
  340. },
  341. itemType: {
  342. type: String
  343. },
  344. srcType: {
  345. type: Number,
  346. default: 2,
  347. },
  348. corpId: {
  349. type: String
  350. },
  351. billNoList:{
  352. type:Array
  353. },
  354. financeDisabled: {
  355. type: Boolean,
  356. default: true
  357. },
  358. },
  359. filters: {
  360. isPercentage(val) {
  361. return isPercentage(val);
  362. },
  363. micrometerFormat(val) {
  364. return micrometerFormat(val);
  365. }
  366. },
  367. async created() {
  368. this.feeOption = await this.getColumnData(
  369. this.getColumnName(33),
  370. feeOption
  371. );
  372. if(this.$store.getters.userInfo.tenant_id === '888390'){
  373. this.feeOption.column.forEach(item =>{
  374. if(item.prop === 'billNo'){
  375. item.hide = false
  376. }
  377. })
  378. }
  379. this.getWorkDicts("currency").then(res => {
  380. this.currencyList = res.data.data;
  381. });
  382. this.getWorkDicts("unit").then(res =>{
  383. this.unitList = res.data.data
  384. })
  385. allCropList({
  386. corpType: getCustomerCode("KG")
  387. }).then(res => {
  388. this.corpList = res.data.data;
  389. });
  390. },
  391. components: {
  392. cropDialog,
  393. ApplyPayment
  394. },
  395. watch: {
  396. 'orderFeesList'(newVla,oldVal){
  397. if(newVla !== oldVal){
  398. this.allData = newVla
  399. this.data_one = newVla.filter(item => item.feesType === 1) //应收
  400. this.data_two = newVla.filter(item => item.feesType === 2) //应付
  401. if (this.selectTab === 1) {
  402. this.feeData = this.data_one
  403. } else {
  404. this.feeData = this.data_two
  405. }
  406. }
  407. },
  408. 'activeName'(newVla,oldVal){
  409. if(newVla !== oldVal){
  410. if(newVla === "first"){
  411. this.tab1 = true;
  412. this.tab2 = false;
  413. this.data_two = this.feeData
  414. this.selectTab = 1
  415. this.feeData = this.data_one
  416. }else{
  417. this.tab1 = false;
  418. this.tab2 = true;
  419. this.data_one = this.feeData
  420. this.selectTab = 2
  421. this.feeData = this.data_two
  422. }
  423. }
  424. },
  425. },
  426. methods: {
  427. //选择费用
  428. selectValue(value,row){
  429. this.$set(row,"feeName",value.cname)
  430. this.$set(row,"ename",value.ename)
  431. this.currencyChange(row)
  432. },
  433. //选择应收应付
  434. // handleClick(tab){
  435. // if(tab.name === "first"){
  436. // this.tab1 = true;
  437. // this.tab2 = false;
  438. //
  439. // this.data_two = this.feeData
  440. //
  441. // this.selectTab = 1
  442. // this.feeData = this.data_one
  443. // }else{
  444. // this.tab1 = false;
  445. // this.tab2 = true;
  446. //
  447. // this.data_one = this.feeData
  448. //
  449. // this.selectTab = 2
  450. // this.feeData = this.data_two
  451. // }
  452. // },
  453. cellStyle() {
  454. return "padding:0;height:40px;";
  455. },
  456. importCorp(row) {
  457. this.feeData.push({
  458. itemId: null,
  459. corpId: row.id,
  460. corpName: row.name,
  461. ename:null,
  462. feeName: null,
  463. price: null,
  464. unit: null,
  465. quantity: null,
  466. amount: null,
  467. currency:'CNY',
  468. exchangeRate: 1,
  469. remarks: null,
  470. $cellEdit: true,
  471. feesType:this.selectTab
  472. });
  473. },
  474. //带出汇率
  475. currencyChange(row){
  476. this.currencyList.forEach(item =>{
  477. if(item.dictValue === row.currency){
  478. this.$set(row,"exchangeRate",item.remark)
  479. }
  480. })
  481. },
  482. rowDel(row, index) {
  483. this.$confirm("确定删除数据?", {
  484. confirmButtonText: "确定",
  485. cancelButtonText: "取消",
  486. type: "warning"
  487. }).then(() => {
  488. //费用判断是否需要调用删除接口
  489. if (row.id) {
  490. delItem(row.id, this.feeUrl).then(res => {
  491. this.$message({
  492. type: "success",
  493. message: "删除成功!"
  494. });
  495. this.feeData.splice(index, 1);
  496. });
  497. } else {
  498. this.$message({
  499. type: "success",
  500. message: "删除成功!"
  501. });
  502. this.feeData.splice(index, 1);
  503. }
  504. });
  505. },
  506. getCorpData(row) {
  507. this.feeData[row.index].corpName = row.cname;
  508. },
  509. countChange(row) {
  510. if (row.price && row.quantity) {
  511. row.amount = _.multiply(row.quantity, row.price).toFixed(2);
  512. }
  513. },
  514. rateChange(row) {
  515. if (row.exchangeRate >= 100) {
  516. row.exchangeRate = 0;
  517. this.$message.error("汇率不能超过100%");
  518. }
  519. },
  520. currentChange(val) {
  521. this.page.currentPage = val;
  522. },
  523. sizeChange(val) {
  524. this.page.currentPage = 1;
  525. this.page.pageSize = val;
  526. },
  527. //刷新
  528. refreshChange() {
  529. this.page.currentPage = 1;
  530. this.onLoad(this.page);
  531. },
  532. //多选
  533. selectionChange(list) {
  534. this.selectionList = list;
  535. },
  536. rePick(row, index) {
  537. this.reData = {
  538. ...row,
  539. index: index
  540. };
  541. this.feeDialog = true;
  542. this.onLoad(this.page);
  543. },
  544. //费用编辑
  545. rowCell(row, index) {
  546. if (row.$cellEdit == true) {
  547. this.$set(row, "$cellEdit", false);
  548. } else {
  549. this.$set(row, "$cellEdit", true);
  550. }
  551. },
  552. //新增
  553. rowAdd() {
  554. if (!this.corpId) return this.$message.error('请选择往来单位')
  555. if(this.$store.getters.userInfo.tenant_id === '888390'){
  556. this.$emit("getBillNo")
  557. }
  558. let corpName = this.corpList.find(item => this.corpId == item.id).cname
  559. const params = {
  560. feesType:this.selectTab,
  561. corpId: this.corpId,
  562. corpName: corpName
  563. }
  564. this.$refs.feeCrud.rowCellAdd(params);
  565. },
  566. onLoad(page) {
  567. this.loading = true;
  568. let data = {
  569. size: page.pageSize,
  570. current: page.currentPage,
  571. parentId: 0,
  572. feesTypeId: this.treeDeptId
  573. };
  574. customerList(data).then(res => {
  575. const data = res.data.data;
  576. this.page.total = data.total;
  577. this.data = data.records;
  578. this.loading = false;
  579. if (this.page.total) {
  580. this.option.height = window.innerHeight - 350;
  581. }
  582. });
  583. },
  584. //导入页左费用类型查询
  585. nodeClick(data) {
  586. this.treeDeptId = data.id;
  587. this.page.currentPage = 1;
  588. this.onLoad(this.page);
  589. },
  590. feeClose() {
  591. this.selectionList = [];
  592. this.page = {
  593. pageSize: 10,
  594. currentPage: 1,
  595. total: 0
  596. };
  597. this.treeDeptId = null;
  598. this.loading = false;
  599. this.data = [];
  600. this.reData = null;
  601. },
  602. importData() {
  603. if (this.reData) {
  604. this.selectionList.length;
  605. if (this.selectionList.length != 1) {
  606. return this.$message.error("重新选择的时候只能选择一条数据");
  607. } else {
  608. this.selectionList.forEach(e => {
  609. this.feeData.forEach((item, index) => {
  610. if (index == this.reData.index) {
  611. item.itemId = e.id;
  612. item.corpId = this.reData.corpId;
  613. item.feeName = e.cname;
  614. item.price = this.reData.price;
  615. // item.unit = e.unitno;
  616. item.quantity = this.reData.quantity;
  617. item.amount = this.reData.amount;
  618. item.remarks = this.reData.remarks;
  619. item.$cellEdit = true;
  620. }
  621. });
  622. });
  623. }
  624. } else {
  625. this.selectionList.forEach(e => {
  626. this.feeData.push({
  627. itemId: e.id,
  628. corpId: null,
  629. feeName: e.cname,
  630. price: 0,
  631. // unit: e.unitno,
  632. quantity: 0,
  633. amount: 0,
  634. remarks: null,
  635. $cellEdit: true,
  636. });
  637. });
  638. }
  639. this.feeDialog = false;
  640. },
  641. submitData() {
  642. let list = []
  643. //保存时 将所出的tab页数据赋值到相应 data上
  644. if(this.selectTab === 1){
  645. this.data_one = this.feeData
  646. }else{
  647. this.data_two = this.feeData
  648. }
  649. list.push(...this.data_one,...this.data_two)
  650. return list
  651. },
  652. billingDetails(type){
  653. //查看是否改动过数据
  654. this.$emit("beforeFinance",this.submitData(),(params)=>{
  655. if(params.valid){
  656. for(let i=0;i<this.selectionList.length;i++){
  657. if(this.selectionList[i].corpId != this.selectionList[0].corpId){
  658. return this.$message.error('批量操作结算单位必须一致')
  659. }
  660. if(this.selectionList[i].isCheck == 1){
  661. return this.$message.error("选中的数据已"+type+",请勿重复操作!")
  662. }
  663. }
  664. this.selectionList.map(item =>{
  665. // item.url = this.billUrl
  666. item.srcOrderno = params.srcOrderno
  667. item.srcParentId = params.parentId
  668. item.corpsName = item.corpName
  669. item.srcFeesId = item.id
  670. item.costType = item.itemId
  671. item.itemType = this.itemType
  672. item.optionType = this.optionType
  673. item.srcType = this.srcType //费用明细申请
  674. item.tradeType = this.optionType
  675. })
  676. let data = {
  677. billType: type,
  678. itemsList : this.selectionList,
  679. }
  680. if(type === '申请'){
  681. this.$confirm("您确定申请付费吗?", "提示", {
  682. confirmButtonText: "确定",
  683. cancelButtonText: "取消",
  684. type: "warning",
  685. }).then(()=>{
  686. this.buttonLoading = true
  687. data.checkType = 'ffsq'
  688. data.url = '/financialManagement/paymentRequest/index'
  689. data.pageStatus = 'this.$store.getters.pqStatus'
  690. data.pageLabel = '付费申请'
  691. applyLoan(data).then(res=>{
  692. if(res.data.success){
  693. this.$message.success("操作成功!")
  694. this.$emit("afterFinance")
  695. //跳转付费申请页面
  696. // if(this.$store.getters.pqStatus){
  697. // this.$alert("无法自动跳转,因为付费申请页面已存在!", "温馨提示", {
  698. // confirmButtonText: "确定",
  699. // type: 'warning',
  700. // callback: action => {
  701. // }
  702. // });
  703. // }else{
  704. // //关闭一下存在的列表页 跳转
  705. // this.$router.$avueRouter.closeTag('/financialManagement/paymentRequest/index');
  706. // this.$router.push({
  707. // path: "/financialManagement/paymentRequest/index",
  708. // query: {params: res.data.data.id},
  709. // });
  710. // }
  711. }
  712. }).finally(()=>{
  713. this.buttonLoading = false
  714. })
  715. })
  716. }else{
  717. this.$confirm("您确定生成账单吗?", "提示", {
  718. confirmButtonText: "确定",
  719. cancelButtonText: "取消",
  720. type: "warning",
  721. }).then(()=>{
  722. this.buttonLoading = true
  723. paymentApply(data).then(res=>{
  724. if(res.data.success){
  725. this.$message.success("操作成功!")
  726. this.$emit("afterFinance")
  727. }
  728. }).finally(()=>{
  729. this.buttonLoading = false
  730. })
  731. })
  732. }
  733. }
  734. })
  735. },
  736. summaryMethod({ columns, data }) {
  737. const sums = [];
  738. if (columns.length > 0) {
  739. columns.forEach((item, index) => {
  740. sums[0] = "合计";
  741. if (item.property == "quantity" || item.property == "amount") {
  742. let qtySum = 0;
  743. let amountSum = 0;
  744. data.forEach(e => {
  745. qtySum = _.add(qtySum, Number(e.quantity));
  746. amountSum = _.add(amountSum, Number(e.amount));
  747. });
  748. //数量总计
  749. if (item.property == "quantity") {
  750. sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
  751. }
  752. //金额总计
  753. if (item.property == "amount") {
  754. sums[index] = micrometerFormat(amountSum);
  755. }
  756. }
  757. });
  758. }
  759. return sums;
  760. },
  761. async saveColumn() {
  762. const inSave = await this.saveColumnData(
  763. this.getColumnName(33),
  764. this.feeOption
  765. );
  766. if (inSave) {
  767. this.$message.success("保存成功");
  768. //关闭窗口
  769. this.$refs.feeCrud.$refs.dialogColumn.columnBox = false;
  770. }
  771. },
  772. async resetColumn() {
  773. const inSave = await this.delColumnData(
  774. this.getColumnName(33),
  775. feeOption
  776. );
  777. if (inSave) {
  778. this.$message.success("重置成功");
  779. this.feeOption = feeOption;
  780. //关闭窗口
  781. this.$refs.feeCrud.$refs.dialogColumn.columnBox = false;
  782. }
  783. },
  784. tabHandle(data) {
  785. // if (data.name == this.enableName) return
  786. // this.enableName = data.name
  787. },
  788. },
  789. };
  790. </script>
  791. <style lang="scss" scoped>
  792. .required_fields{
  793. color: #F56C6C;
  794. display:inline-block;
  795. width: 7%
  796. }
  797. </style>