优化单据多账户
This commit is contained in:
@@ -150,6 +150,7 @@
|
|||||||
that.accountMoneyList.push(formData.threeAccountPrice)
|
that.accountMoneyList.push(formData.threeAccountPrice)
|
||||||
allPrice = allPrice + formData.threeAccountPrice
|
allPrice = allPrice + formData.threeAccountPrice
|
||||||
}
|
}
|
||||||
|
debugger
|
||||||
that.$emit('ok', that.accountIdList, that.accountMoneyList, allPrice);
|
that.$emit('ok', that.accountIdList, that.accountMoneyList, allPrice);
|
||||||
that.confirmLoading = false;
|
that.confirmLoading = false;
|
||||||
that.close();
|
that.close();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { VALIDATE_NO_PASSED, validateFormAndTables } from '@/utils/JEditableTableUtil'
|
import { VALIDATE_NO_PASSED, validateFormAndTables } from '@/utils/JEditableTableUtil'
|
||||||
import {findBySelectSup,findBySelectCus,findBySelectRetail,getMaterialByBarCode,findStockByDepotAndBarCode,getAccount,getPersonByNumType} from '@/api/api'
|
import {findBySelectSup,findBySelectCus,findBySelectRetail,getMaterialByBarCode,findStockByDepotAndBarCode,getAccount,getPersonByNumType} from '@/api/api'
|
||||||
import { getAction,putAction } from '@/api/manage'
|
import { getAction,putAction } from '@/api/manage'
|
||||||
import { getMpListShort, getNowFormatDateTime, changeListFmtMinus } from "@/utils/util"
|
import { getMpListShort, getNowFormatDateTime } from "@/utils/util"
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
export const BillModalMixin = {
|
export const BillModalMixin = {
|
||||||
@@ -152,7 +152,7 @@ export const BillModalMixin = {
|
|||||||
},
|
},
|
||||||
manyAccountModalFormOk(idList, moneyList, allPrice) {
|
manyAccountModalFormOk(idList, moneyList, allPrice) {
|
||||||
this.accountIdList = idList
|
this.accountIdList = idList
|
||||||
this.accountMoneyList = changeListFmtMinus(moneyList)
|
this.accountMoneyList = moneyList
|
||||||
let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0
|
let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0
|
||||||
let otherMoney = this.form.getFieldValue('otherMoney')-0
|
let otherMoney = this.form.getFieldValue('otherMoney')-0
|
||||||
let debt = (discountLastMoney + otherMoney - allPrice).toFixed(2)
|
let debt = (discountLastMoney + otherMoney - allPrice).toFixed(2)
|
||||||
|
|||||||
@@ -264,6 +264,11 @@
|
|||||||
totalPrice += item.allPrice-0
|
totalPrice += item.allPrice-0
|
||||||
}
|
}
|
||||||
billMain.totalPrice = totalPrice
|
billMain.totalPrice = totalPrice
|
||||||
|
if(billMain.accountId === 0) {
|
||||||
|
billMain.accountId = ''
|
||||||
|
}
|
||||||
|
billMain.accountIdList = this.accountIdList.length>0 ? JSON.stringify(this.accountIdList) : ""
|
||||||
|
billMain.accountMoneyList = this.accountMoneyList.length>0 ? JSON.stringify(this.accountMoneyList) : ""
|
||||||
if(this.fileList && this.fileList.length > 0) {
|
if(this.fileList && this.fileList.length > 0) {
|
||||||
billMain.fileName = this.fileList
|
billMain.fileName = this.fileList
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||||
import { getMpListShort} from "@/utils/util"
|
import { getMpListShort, changeListFmtMinus } from "@/utils/util"
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
import JUpload from '@/components/jeecg/JUpload'
|
import JUpload from '@/components/jeecg/JUpload'
|
||||||
import JDate from '@/components/jeecg/JDate'
|
import JDate from '@/components/jeecg/JDate'
|
||||||
@@ -269,6 +269,7 @@
|
|||||||
if(billMain.accountId === 0) {
|
if(billMain.accountId === 0) {
|
||||||
billMain.accountId = ''
|
billMain.accountId = ''
|
||||||
}
|
}
|
||||||
|
this.accountMoneyList = changeListFmtMinus(this.accountMoneyList)
|
||||||
billMain.accountIdList = this.accountIdList.length>0 ? JSON.stringify(this.accountIdList) : ""
|
billMain.accountIdList = this.accountIdList.length>0 ? JSON.stringify(this.accountIdList) : ""
|
||||||
billMain.accountMoneyList = this.accountMoneyList.length>0 ? JSON.stringify(this.accountMoneyList) : ""
|
billMain.accountMoneyList = this.accountMoneyList.length>0 ? JSON.stringify(this.accountMoneyList) : ""
|
||||||
if(this.fileList && this.fileList.length > 0) {
|
if(this.fileList && this.fileList.length > 0) {
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||||
import { BillModalMixin } from '../mixins/BillModalMixin'
|
import { BillModalMixin } from '../mixins/BillModalMixin'
|
||||||
import { getMpListShort } from "@/utils/util"
|
import { getMpListShort,changeListFmtMinus } from "@/utils/util"
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
|
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
|
||||||
import JUpload from '@/components/jeecg/JUpload'
|
import JUpload from '@/components/jeecg/JUpload'
|
||||||
@@ -275,6 +275,7 @@
|
|||||||
if(billMain.accountId === 0) {
|
if(billMain.accountId === 0) {
|
||||||
billMain.accountId = ''
|
billMain.accountId = ''
|
||||||
}
|
}
|
||||||
|
this.accountMoneyList = changeListFmtMinus(this.accountMoneyList)
|
||||||
billMain.accountIdList = this.accountIdList.length>0 ? JSON.stringify(this.accountIdList) : ""
|
billMain.accountIdList = this.accountIdList.length>0 ? JSON.stringify(this.accountIdList) : ""
|
||||||
billMain.accountMoneyList = this.accountMoneyList.length>0 ? JSON.stringify(this.accountMoneyList) : ""
|
billMain.accountMoneyList = this.accountMoneyList.length>0 ? JSON.stringify(this.accountMoneyList) : ""
|
||||||
if(this.fileList && this.fileList.length > 0) {
|
if(this.fileList && this.fileList.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user