解决单据中多账户金额修改的bug

This commit is contained in:
季圣华
2021-07-10 21:40:02 +08:00
parent f682cee831
commit ff9e778a76
5 changed files with 14 additions and 32 deletions

View File

@@ -1,7 +1,7 @@
import { VALIDATE_NO_PASSED, validateFormAndTables } from '@/utils/JEditableTableUtil'
import {findBySelectSup,findBySelectCus,findBySelectRetail,getMaterialByBarCode,findStockByDepotAndBarCode,getAccount,getPersonByNumType} from '@/api/api'
import { getAction,putAction } from '@/api/manage'
import { getMpListShort, getNowFormatDateTime } from "@/utils/util"
import { getMpListShort, getNowFormatDateTime, changeListFmtMinus } from "@/utils/util"
import Vue from 'vue'
export const BillModalMixin = {
@@ -150,6 +150,16 @@ export const BillModalMixin = {
this.manyAccountBtnStatus = false
}
},
manyAccountModalFormOk(idList, moneyList, allPrice) {
this.accountIdList = idList
this.accountMoneyList = changeListFmtMinus(moneyList)
let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0
let otherMoney = this.form.getFieldValue('otherMoney')-0
let debt = (discountLastMoney + otherMoney - allPrice).toFixed(2)
this.$nextTick(() => {
this.form.setFieldsValue({'changeAmount':allPrice, 'debt':debt})
});
},
onAdded(event) {
const { row, target } = event
getAction('/depot/findDepotByCurrentUser').then((res) => {