paymentSettleDetailsPage.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791
  1. <template>
  2. <div class="borderless">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  6. @click="backToList">返回列表
  7. </el-button>
  8. <div class="upper_right_button">
  9. <el-button
  10. type="primary"
  11. size="small"
  12. @click="editHandle"
  13. v-if="editDisable"
  14. >编 辑</el-button>
  15. <el-button type="warning"
  16. class="el-button--small-yh"
  17. size="small"
  18. :loading="buttonLoading"
  19. :disabled="!form.id || editDisable"
  20. @click.stop="confirmSettlement"
  21. >{{financeButton?"付费":"撤销付费"}}
  22. </el-button>
  23. <el-button class="el-button--small-yh"
  24. type="primary"
  25. size="small"
  26. :loading="buttonLoading"
  27. @click.stop="saveSettlement"
  28. :disabled="editDisable"
  29. >保存数据
  30. </el-button>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="customer-main">
  35. <containerTitle title="基础信息"></containerTitle>
  36. <basic-container>
  37. <avue-form class="trading-form" ref="form" v-model="form" :option="option">
  38. <template slot="corpId">
  39. <crop-select
  40. v-model="form.corpId"
  41. corpType="KG"
  42. :disabled="(!financeDisabled && form.id) || editDisable"
  43. @getCorpData="returnBack"
  44. style="width: 100%"
  45. ></crop-select>
  46. </template>
  47. <template slot="salesCompany">
  48. <crop-select
  49. v-model="form.salesCompany"
  50. corpType="GS"
  51. :disabled="(!financeDisabled && form.id) || editDisable"
  52. @getCorpData="getGSName"
  53. style="width: 100%"
  54. ></crop-select>
  55. </template>
  56. <template slot="accountNo">
  57. <el-select v-model="form.accountNo"
  58. placeholder="请选择"
  59. :disabled="(!financeDisabled && form.id) || editDisable"
  60. @change="accountNoChange"
  61. clearable
  62. filterable>
  63. <el-option v-for="(item,index) in form.bankList"
  64. :key="index"
  65. :label="item.accountNo"
  66. :value="item.accountNo"
  67. >
  68. </el-option>
  69. </el-select>
  70. </template>
  71. <template slot="remark">
  72. <el-input type="textarea"
  73. v-model="form.remark"
  74. size="small"
  75. rows="2"
  76. autocomplete="off"
  77. placeholder="">
  78. </el-input>
  79. </template>
  80. </avue-form>
  81. </basic-container>
  82. <containerTitle title="明细列表"></containerTitle>
  83. <basic-container>
  84. <avue-crud :option="itemsOption"
  85. :data="dataList"
  86. ref="crud"
  87. v-model="itemsForm"
  88. :page.sync="page"
  89. @search-reset="searchReset"
  90. @row-update="rowUpdate"
  91. @selection-change="selectionChange"
  92. >
  93. <template slot="menuLeft">
  94. <el-button type="primary"
  95. size="small"
  96. :loading="buttonLoading"
  97. icon="el-icon-shopping-cart-2"
  98. :disabled="!financeButton || editDisable"
  99. @click="selectPurchase">选择采购合同
  100. </el-button>
  101. </template>
  102. <template slot-scope="scope" slot="menu">
  103. <el-button
  104. type="text"
  105. size="small"
  106. icon="el-icon-edit"
  107. :disabled="!financeButton || editDisable"
  108. @click.stop="rowCell(scope.row,scope.index)"
  109. > {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
  110. </el-button>
  111. <el-button
  112. type="text"
  113. size="small"
  114. icon="el-icon-delete"
  115. :disabled="!financeButton || editDisable"
  116. @click.stop="rowDel(scope.row,scope.index)"
  117. >删除
  118. </el-button>
  119. </template>
  120. <template slot-scope="{ row }" slot="currency">
  121. <el-select v-if="row.$cellEdit" v-model="row.currency" size="small" placeholder="请选择 币别" clearable filterable>
  122. <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
  123. </el-select>
  124. <span v-else>{{ row.currency }}</span>
  125. </template>
  126. <template slot="thisAmount" slot-scope="{ row }">
  127. <span v-if="row.$cellEdit" class="required_fields">*</span>
  128. <el-input
  129. v-if="row.$cellEdit"
  130. v-model="row.thisAmount"
  131. style="width: 90%"
  132. placeholder="请输入"
  133. size="small"
  134. @input="thisAmountVerify(row)"
  135. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  136. ></el-input>
  137. <span v-else>{{ row.thisAmount }}</span>
  138. </template>
  139. <template slot="caseOverPayment">
  140. <el-input
  141. placeholder="请输入"
  142. clearable
  143. v-model="form.caseOverPayment"
  144. @change="caseOverPaymentChange"
  145. v-input-limit="2"
  146. :disabled="dataList.length == 0"
  147. ></el-input>
  148. </template>
  149. </avue-crud>
  150. </basic-container>
  151. <el-dialog
  152. title="导入采购"
  153. append-to-body
  154. class="el-dialogDeep"
  155. :visible.sync="billDetailDialog"
  156. width="60%"
  157. :close-on-click-modal="false"
  158. :destroy-on-close="true"
  159. :close-on-press-escape="false"
  160. top="10vh"
  161. v-dialog-drag>
  162. <bill-detail
  163. :params="params"
  164. :billType="billType"
  165. :flag="1"
  166. @closeFun="closeBillDetail"
  167. @importProMent="importProMent"
  168. >
  169. </bill-detail>
  170. </el-dialog>
  171. </div>
  172. </div>
  173. </template>
  174. <script>
  175. import option from "./configuration/detailsPage.json";
  176. import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
  177. import { getDetails,modify,cancelModify,saveOrEdit } from "@/api/financialManagement/paymentRequest";
  178. import { contrastObj,contrastList } from "@/util/contrastData";
  179. import billDetail from "@/components/bill/billDetailList";
  180. import { getlistBankBy } from "@/api/financialManagement/paymentRequest";
  181. import _ from "lodash";
  182. import {getUserInfo} from "@/api/system/user";
  183. import {getCorpDetail} from "@/api/maintenance/overpayment";
  184. export default {
  185. name: "paymentDetailsPage",
  186. props: {
  187. detailData: {
  188. type: Object
  189. }
  190. },
  191. data() {
  192. return {
  193. form: {},
  194. itemsForm:{},
  195. itemsOption: option,
  196. billDetailDialog:false,
  197. buttonLoading:false,
  198. financeDisabled:false,
  199. financeButton:true,
  200. billType:"申请",
  201. params:{},
  202. id:"",
  203. dataList: [],
  204. currencyDic:[],
  205. page: {
  206. pageSize: 10,
  207. pagerCount: 5,
  208. total: 0,
  209. },
  210. query:{},
  211. option: {
  212. menuBtn: false,
  213. labelWidth: 100,
  214. column: [
  215. {
  216. label: '系统号',
  217. prop: 'sysNo',
  218. span: 8,
  219. disabled: true
  220. },{
  221. label: '合同号',
  222. prop: 'srcOrderno',
  223. span: 8,
  224. rules: [
  225. {
  226. required: false,
  227. message: ' ',
  228. trigger: 'blur'
  229. }
  230. ]
  231. }, {
  232. label: '往来单位',
  233. prop: 'corpId',
  234. sort:true,
  235. span: 8,
  236. rules: [
  237. {
  238. required: true,
  239. message: ' ',
  240. trigger: 'blur'
  241. }
  242. ]
  243. },
  244. {
  245. label: '银行账号',
  246. prop: 'accountNo',
  247. span: 8,
  248. rules: [
  249. {
  250. required: false,
  251. message: ' ',
  252. trigger: 'blur'
  253. }
  254. ]
  255. },
  256. {
  257. label: '开户银行',
  258. prop: 'accountBank',
  259. span: 8,
  260. rules: [
  261. {
  262. required: false,
  263. message: ' ',
  264. trigger: 'blur'
  265. }
  266. ]
  267. }, {
  268. label: '银行户头',
  269. prop: 'accountName',
  270. span: 8,
  271. rules: [
  272. {
  273. required: false,
  274. message: ' ',
  275. trigger: 'blur'
  276. }
  277. ]
  278. },
  279. {
  280. label: '人民币金额',
  281. prop: 'amount',
  282. span: 8,
  283. rules: [
  284. {
  285. pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  286. message: ' ',
  287. trigger: 'blur'
  288. },
  289. {
  290. required: false,
  291. message: ' ',
  292. trigger: 'blur'
  293. }
  294. ]
  295. },
  296. {
  297. label: '外币金额',
  298. prop: 'foreignAmount',
  299. span: 8,
  300. rules: [
  301. {
  302. pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  303. message: ' ',
  304. trigger: 'blur'
  305. }
  306. ]
  307. },
  308. {
  309. label: '使用溢付款',
  310. prop: 'caseOverPayment',
  311. display: false,
  312. span: 8,
  313. rules: [
  314. {
  315. pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  316. message: ' ',
  317. trigger: 'blur'
  318. }
  319. ]
  320. },
  321. {
  322. label: '溢付款余额',
  323. prop: 'overPayment',
  324. display: false,
  325. disabled: true,
  326. span: 8,
  327. rules: [
  328. {
  329. pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  330. message: ' ',
  331. trigger: 'blur'
  332. }
  333. ]
  334. },
  335. {
  336. label: '所属公司',
  337. prop: 'salesCompany',
  338. sort:true,
  339. span: 8,
  340. rules: [
  341. {
  342. required: true,
  343. message: ' ',
  344. trigger: 'blur'
  345. }
  346. ]
  347. },
  348. {
  349. label: '付款日期',
  350. prop: 'settlementDate',
  351. format:"yyyy-MM-dd",
  352. valueFormat:"yyyy-MM-dd 00:00:00",
  353. span: 8,
  354. type:"date",
  355. rules: [
  356. {
  357. required: true,
  358. message: ' ',
  359. trigger: 'blur'
  360. }
  361. ]
  362. },
  363. {
  364. label: '制单人',
  365. prop: 'createUserName',
  366. span: 8,
  367. disabled:true,
  368. rules: [
  369. {
  370. required: false,
  371. message: ' ',
  372. trigger: 'blur'
  373. }
  374. ]
  375. },
  376. {
  377. label: '制单日期',
  378. prop: 'createTime',
  379. span: 8,
  380. type:"date",
  381. disabled:true,
  382. rules: [
  383. {
  384. required: false,
  385. message: ' ',
  386. trigger: 'blur'
  387. }
  388. ]
  389. },
  390. {
  391. label: '备注',
  392. prop: 'remark',
  393. span:24,
  394. minRows: 2,
  395. rules: [
  396. {
  397. required: false,
  398. message: ' ',
  399. trigger: 'blur'
  400. }
  401. ]
  402. },
  403. ],
  404. },
  405. financeStatusDic:[{
  406. label:'正常',
  407. value:0
  408. },{
  409. label:'停用',
  410. value:1
  411. }],
  412. //顶部from数据
  413. oldForm:{},
  414. oldDataList:[],
  415. category: '',
  416. allAmount: 0,
  417. editDisable: false,
  418. }
  419. },
  420. components:{
  421. billDetail
  422. },
  423. created() {
  424. // 人民币金额默认为0
  425. this.$set(this.form,"amount", 0)
  426. getUserInfo().then(res=>{
  427. this.category = res.data.data.billType
  428. if (this.category == 2) {
  429. this.$set(this.form,"overPayment", 0)
  430. this.$set(this.form,"caseOverPayment", 0)
  431. this.option.column.forEach(item => {
  432. if (item.prop == 'caseOverPayment' || item.prop == 'overPayment') {
  433. item.display = true
  434. }
  435. if (item.prop == 'foreignAmount') {
  436. item.display = false
  437. }
  438. })
  439. }
  440. })
  441. //币别
  442. this.getWorkDicts("currency").then(res =>{
  443. this.currencyDic = res.data.data
  444. })
  445. this.detailData.disabled && (this.editDisable = true)
  446. if (this.detailData.id) {
  447. this.buttonLoading = true
  448. this.id = this.detailData.id;//字符串转数字 超长用BigInt
  449. getDetail(this.id).then(res => {
  450. this.afterEcho(res.data.data)
  451. }).finally(()=>{
  452. this.buttonLoading = false
  453. })
  454. }else{
  455. this.form.financeStatus = "待结算"
  456. this.oldForm.financeStatus = "待结算"
  457. }
  458. if(this.detailData.params){
  459. this.buttonLoading = true
  460. getDetails(this.detailData.params).then(res =>{
  461. delete res.data.data.id;
  462. delete res.data.data.sysNo;
  463. delete res.data.data.billType;
  464. res.data.data.itemsList.map((items)=>{
  465. delete items.id ;
  466. items.thisAmount = items.amount
  467. })
  468. this.afterEcho(res.data.data)
  469. }).finally(()=>{
  470. this.buttonLoading = false
  471. })
  472. }
  473. },
  474. mounted() {
  475. },
  476. methods: {
  477. //选择客户
  478. returnBack(corpValue){
  479. this.corpId = corpValue.id
  480. getlistBankBy(corpValue.id).then(res =>{
  481. this.$set(this.form,"bankList",res.data)
  482. })
  483. // 溢付款余额获取
  484. if (this.category == 2) {
  485. getCorpDetail({corpId:corpValue.id}).then(res => {
  486. this.form.overPayment = res.data.data? res.data.data.balanceOverpaymen: 0
  487. })
  488. }
  489. },
  490. //选择卡号
  491. accountNoChange(value){
  492. this.form.bankList.forEach(item =>{
  493. if(item.accountNo == value){
  494. this.$set(this.form,"accountBank",item.accountBank)
  495. this.$set(this.form,"accountName",item.accountName)
  496. }
  497. })
  498. },
  499. //本次金额验证
  500. thisAmountVerify(row){
  501. if(parseFloat(row.thisAmount) > parseFloat(row.amount)){
  502. this.$message.warning('本次金额不得大于金额!')
  503. this.$set(row,'thisAmount','')
  504. }
  505. },
  506. selectPurchase(){
  507. if(!this.form.corpId){
  508. this.$message.warning("请先选择客户!")
  509. return
  510. }
  511. this.params = {
  512. corpId: this.form.corpId
  513. }
  514. this.billDetailDialog = true;
  515. },
  516. closeBillDetail(){
  517. this.billDetailDialog = false;
  518. },
  519. importProMent(list){
  520. list.forEach((item,index) =>{
  521. item.accId = item.id;
  522. item.srcOrderno = item.accSysNo
  523. item.billNo = item.srcBillNo
  524. item.thisAmount = item.amount
  525. delete item.id;
  526. this.$refs.crud.rowCellAdd(item);
  527. })
  528. this.$set(this.form,'srcOrderno',Array.from(new Set(this.dataList.map(item =>{ if(item.srcOrderno){return item.srcOrderno}}))).join(','))
  529. this.billDetailDialog = false;
  530. },
  531. rowUpdate(row, index, done) {
  532. done(row);
  533. },
  534. rowCell(row,index){
  535. this.$refs.crud.rowCell(row, index)
  536. // row.$cellEdit = !row.$cellEdit
  537. },
  538. rowDel(row,index){
  539. this.dataList.splice(index, 1);
  540. },
  541. searchReset() {
  542. console.log('1')
  543. },
  544. selectionChange() {
  545. console.log('1')
  546. },
  547. confirmSettlement(status){
  548. this.$refs["form"].validate((valid,done) => {
  549. done();
  550. if(valid && this.verificationData()){
  551. this.$confirm("是否确认付费?", "提示", {
  552. confirmButtonText: "确认",
  553. cancelButtonText: "取消",
  554. type: "warning",
  555. }).then(()=>{
  556. for (let i = 0; i < this.dataList.length; i++) {
  557. if (this.dataList[i].thisAmount == null || this.dataList[i].thisAmount == 0) {
  558. return this.$message.error(`第${i + 1}行的本次金额不能为空`);
  559. }
  560. }
  561. this.buttonLoading = true
  562. this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
  563. if (this.category == 2 && this.financeDisabled) {
  564. this.allAmount = 0;
  565. this.form.amount = this.form.amount? this.form.amount: 0
  566. this.dataList.forEach(e => {
  567. this.allAmount = Number(this.allAmount) + Number(e.thisAmount)
  568. })
  569. if (this.allAmount == 0 && this.form.amount == 0) {
  570. return this.$message.error('人民币金额不能为空')
  571. } else if (Number(this.allAmount) > 0 && (Number(this.form.amount) > Number(this.allAmount))) {
  572. this.form.caseOverPayment = 0;
  573. } else if (Number(this.allAmount) > 0 && (Number(this.form.amount) < Number(this.allAmount))) {
  574. this.form.caseOverPayment = Number(this.allAmount) - Number(this.form.amount)
  575. if (Number(this.form.caseOverPayment) > Number(this.form.overPayment)) {
  576. return this.$message.error('溢付款余额不足,无法付费')
  577. }
  578. }
  579. }
  580. const params = {
  581. ...this.form,
  582. billType:"付费",
  583. itemsList:this.dataList
  584. }
  585. if(this.financeButton){
  586. modify(params).then(res =>{
  587. this.$message.success("操作成功!")
  588. this.afterEcho(res.data.data)
  589. }).finally(()=>{
  590. this.buttonLoading = false
  591. })
  592. }else{
  593. cancelModify(params).then(res =>{
  594. this.$message.success("操作成功!")
  595. this.afterEcho(res.data.data)
  596. }).finally(()=>{
  597. this.buttonLoading = false
  598. })
  599. }
  600. })
  601. if(status === true){
  602. this.$emit("goBack");
  603. this.leaveDetailsKey(this.$route.name)
  604. }
  605. }
  606. })
  607. },
  608. saveSettlement(){
  609. this.$refs["form"].validate((valid,done) => {
  610. if(valid){
  611. for (let i = 0; i < this.dataList.length; i++) {
  612. if (this.dataList[i].thisAmount == (null || "")) {
  613. return this.$message.error(`第输入${i + 1}行的本次金额`);
  614. }
  615. }
  616. this.buttonLoading = true
  617. this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
  618. const params = {
  619. ...this.form,
  620. billType:"付费",
  621. itemsList:this.dataList,
  622. settlementType:1
  623. }
  624. // 如果有id解锁,没有跳过
  625. // this.form.id && this.unLock({moduleName: 'ff',tableName: 'finance_settlement', billId: this.form.id})
  626. saveOrEdit(params).then(res=>{
  627. this.$message.success("操作成功!")
  628. // this.detailData.disabled = true
  629. // this.editDisable = true
  630. this.afterEcho(res.data.data)
  631. done();
  632. }).finally(()=>{
  633. this.buttonLoading = false
  634. })
  635. }})
  636. },
  637. async afterEcho(data){
  638. this.form = data;
  639. if (this.category == 2) {
  640. await getCorpDetail({corpId: this.form.corpId}).then(res => {
  641. if (Number(this.form.overPayment) != (res.data.data? res.data.data.balanceOverpaymen: '0.00')) {
  642. this.form.overPayment = res.data.data? res.data.data.balanceOverpaymen: '0.00'
  643. }
  644. })
  645. }
  646. this.oldForm = Object.assign({},this.form);
  647. this.financeDisabled = this.form.financeStatus == "待结算"?true:false;
  648. //审核状态为空时 说明为新单进来
  649. if(this.financeDisabled || !this.editDisable){
  650. this.financeButton = true
  651. this.option.column.forEach(item =>{
  652. if( item.prop === "remark" || item.prop === "settlementDate"){
  653. this.$set(item,"disabled",false)
  654. }else if( item.prop === "createUserName" || item.prop === "createTime" || item.prop === "sysNo" ){
  655. this.$set(item,"disabled",true)
  656. }else{
  657. this.$set(item,"disabled",false)
  658. }
  659. })
  660. }
  661. if (!this.financeDisabled || this.editDisable){
  662. this.financeButton = false
  663. this.option.column.forEach(item =>{
  664. if( item.prop === "remark"){
  665. this.$set(item,"disabled",false)
  666. }else if( item.prop === "createUserName" || item.prop === "createTime" || item.prop === "sysNo"){
  667. this.$set(item,"disabled",true)
  668. }else{
  669. this.$set(item,"disabled",true)
  670. }
  671. })
  672. }
  673. if(data.itemsList){
  674. this.dataList = data.itemsList
  675. this.oldDataList = this.deepClone(data.itemsList)
  676. }
  677. },
  678. verificationData(){
  679. if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
  680. ){
  681. this.$confirm("数据发生变化,请先提交保存!", "提示", {
  682. confirmButtonText: "保存",
  683. cancelButtonText: "取消",
  684. type: "warning",
  685. }).then(() => {
  686. this.saveSettlement()
  687. }).catch(()=>{
  688. return false
  689. })
  690. }else{
  691. return true
  692. }
  693. },
  694. backToList() {
  695. if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
  696. ){
  697. this.$confirm("是否保存当前页面?", "提示", {
  698. confirmButtonText: "保存",
  699. cancelButtonText: "取消",
  700. type: "warning",
  701. }).then(() => {
  702. this.saveSettlement()
  703. }).catch(()=>{
  704. !this.editDisable && this.form.id && this.unLock({moduleName: 'ff',tableName: 'finance_settlement', billId: this.form.id})
  705. this.$emit("goBack");
  706. this.leaveDetailsKey(this.$route.name)
  707. })
  708. }else{
  709. !this.editDisable && this.form.id && this.unLock({moduleName: 'ff',tableName: 'finance_settlement', billId: this.form.id})
  710. this.$emit("goBack");
  711. this.leaveDetailsKey(this.$route.name)
  712. }
  713. },
  714. // 溢付款更改时
  715. caseOverPaymentChange() {
  716. if (!this.form.caseOverPayment) this.form.caseOverPayment = 0;
  717. if (Number(this.form.caseOverPayment) > Number(this.form.overPayment)) {
  718. this.form.caseOverPayment = 0;
  719. return this.$message.error('本次使用的溢付款不能超过总溢付款')
  720. }
  721. },
  722. editHandle() {
  723. const data = {
  724. moduleName: 'ff',
  725. tableName: 'finance_settlement',
  726. billId: this.form.id,
  727. no: localStorage.getItem('browserID'),
  728. billNo: this.form.srcOrderno
  729. }
  730. this.checkLock(data).then(res => {
  731. if (res.data.code == 200) {
  732. this.onLock(data).then(response => {
  733. })
  734. this.inDetailsKey(this.$route.name, {
  735. moduleName: 'ff',
  736. tableName: 'finance_settlement',
  737. billId: this.form.id,
  738. })
  739. this.detailData.disabled = false;
  740. this.editDisable = false;
  741. this.buttonLoading = true
  742. getDetail(this.form.id).then(data => {
  743. this.afterEcho(data.data.data)
  744. }).finally(()=>{
  745. this.buttonLoading = false
  746. })
  747. }
  748. }).catch(error => {
  749. }).finally(() => {
  750. this.buttonLoading = false
  751. })
  752. },
  753. getGSName(row) {
  754. this.form.belongCompany = row.cname
  755. },
  756. }
  757. }
  758. </script>
  759. <style lang="scss" scoped>
  760. ::v-deep .el-form-item {
  761. margin-bottom: 0;
  762. }
  763. .trading-form ::v-deep .el-form-item {
  764. margin-bottom: 8px !important;
  765. }
  766. .required_fields{
  767. color: #F56C6C;
  768. display:inline-block;
  769. width: 7%
  770. }
  771. .upper_right_button{
  772. display: flex;
  773. position: fixed;
  774. right: 12px;
  775. top: 47px;
  776. }
  777. </style>