解决单据中多账户金额修改的bug
This commit is contained in:
parent
f682cee831
commit
ff9e778a76
@ -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) => {
|
||||
|
||||
@ -130,7 +130,7 @@
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
import { getMpListShort, changeListFmtMinus} from "@/utils/util"
|
||||
import { getMpListShort} from "@/utils/util"
|
||||
import { getAction } from '@/api/manage'
|
||||
import JUpload from '@/components/jeecg/JUpload'
|
||||
import JDate from '@/components/jeecg/JDate'
|
||||
@ -275,13 +275,6 @@
|
||||
rows: JSON.stringify(detailArr),
|
||||
}
|
||||
},
|
||||
manyAccountModalFormOk(idList, moneyList, allPrice) {
|
||||
this.accountIdList = idList
|
||||
this.accountMoneyList = changeListFmtMinus(moneyList)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({'changeAmount':allPrice})
|
||||
});
|
||||
},
|
||||
onSearchLinkNumber() {
|
||||
this.$refs.linkBillList.show('入库', '采购', '供应商', "0")
|
||||
this.$refs.linkBillList.title = "选择采购入库"
|
||||
|
||||
@ -131,7 +131,7 @@
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
import { getMpListShort, changeListFmtMinus} from "@/utils/util"
|
||||
import { getMpListShort} from "@/utils/util"
|
||||
import { getAction } from '@/api/manage'
|
||||
import JUpload from '@/components/jeecg/JUpload'
|
||||
import JDate from '@/components/jeecg/JDate'
|
||||
@ -282,13 +282,6 @@
|
||||
rows: JSON.stringify(detailArr),
|
||||
}
|
||||
},
|
||||
manyAccountModalFormOk(idList, moneyList, allPrice) {
|
||||
this.accountIdList = idList
|
||||
this.accountMoneyList = changeListFmtMinus(moneyList)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({'changeAmount':allPrice})
|
||||
});
|
||||
},
|
||||
onSearchLinkNumber() {
|
||||
this.$refs.linkBillList.show('其它', '采购订单', '供应商', "1")
|
||||
this.$refs.linkBillList.title = "选择采购订单"
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||
import { getMpListShort, changeListFmtMinus } from "@/utils/util"
|
||||
import { getMpListShort } from "@/utils/util"
|
||||
import { getAction } from '@/api/manage'
|
||||
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
|
||||
import JUpload from '@/components/jeecg/JUpload'
|
||||
@ -289,13 +289,6 @@
|
||||
rows: JSON.stringify(detailArr),
|
||||
}
|
||||
},
|
||||
manyAccountModalFormOk(idList, moneyList, allPrice) {
|
||||
this.accountIdList = idList
|
||||
this.accountMoneyList = changeListFmtMinus(moneyList)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({'changeAmount':allPrice})
|
||||
});
|
||||
},
|
||||
onSearchLinkNumber() {
|
||||
this.$refs.linkBillList.show('出库', '销售', '客户', "0")
|
||||
this.$refs.linkBillList.title = "选择销售出库"
|
||||
|
||||
@ -288,13 +288,6 @@
|
||||
rows: JSON.stringify(detailArr),
|
||||
}
|
||||
},
|
||||
manyAccountModalFormOk(idList, moneyList, allPrice) {
|
||||
this.accountIdList = idList
|
||||
this.accountMoneyList = moneyList
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({'changeAmount':allPrice})
|
||||
});
|
||||
},
|
||||
onSearchLinkNumber() {
|
||||
this.$refs.linkBillList.show('其它', '销售订单', '客户', "1")
|
||||
this.$refs.linkBillList.title = "选择销售订单"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user