diff --git a/jshERP-web/src/views/financial/dialog/FinancialDetail.vue b/jshERP-web/src/views/financial/dialog/FinancialDetail.vue
index f2278cd6..ba6e0b00 100644
--- a/jshERP-web/src/views/financial/dialog/FinancialDetail.vue
+++ b/jshERP-web/src/views/financial/dialog/FinancialDetail.vue
@@ -63,6 +63,16 @@
+
+
+
+ {{model.changeAmount}}
+
+
+
+
+
+
diff --git a/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js b/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js
index 39feee4c..c561669f 100644
--- a/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js
+++ b/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js
@@ -41,14 +41,25 @@ export const FinancialModalMixin = {
},
methods: {
addInit(amountNum) {
- this.$nextTick(() => {
- this.form.setFieldsValue({'billTime':getNowFormatDateTime()})
- });
getAction('/sequence/buildNumber').then((res) => {
if (res && res.code === 200) {
this.form.setFieldsValue({'billNo':amountNum + res.data.defaultNumber})
}
})
+ this.$nextTick(() => {
+ this.form.setFieldsValue({'billTime':getNowFormatDateTime()})
+ })
+ this.$nextTick(() => {
+ getAccount({}).then((res)=>{
+ if(res && res.code === 200) {
+ for (const item of res.data.accountList) {
+ if(item.isDefault){
+ this.form.setFieldsValue({'accountId': item.id})
+ }
+ }
+ }
+ })
+ })
},
initSupplier() {
let that = this;
@@ -133,31 +144,10 @@ export const FinancialModalMixin = {
onValueChange(event) {
let that = this
const { type, row, column, value, target } = event
- let param,operNumber,unitPrice,allPrice,taxRate,taxMoney,taxLastMoney
switch(column.key) {
- case "operNumber":
- unitPrice = row.unitPrice
- taxRate = row.taxRate
- allPrice = unitPrice*value
- taxMoney =(taxRate/100)*allPrice
- taxLastMoney = allPrice + taxMoney
- target.setValues([{rowKey: row.id, values: {allPrice: allPrice, taxMoney: taxMoney, taxLastMoney: taxLastMoney}}])
- target.recalcAllStatisticsColumns()
- let allTaxLastMoney = target.statisticsColumns.taxLastMoney
- this.$nextTick(() => {
- this.form.setFieldsValue({'discount':0,'discountMoney':0,'discountLastMoney':allTaxLastMoney,
- 'changeAmount':allTaxLastMoney,'debt':0})
- });
- break;
- case "unitPrice":
- operNumber = row.operNumber
- target.setValues([{rowKey: row.id, values: {allPrice: value*operNumber}}])
- target.recalcAllStatisticsColumns()
- break;
- case "allPrice":
- operNumber = row.operNumber
- target.setValues([{rowKey: row.id, values: {unitPrice: value/operNumber}}])
+ case "eachAmount":
target.recalcAllStatisticsColumns()
+ that.autoChangePrice(target)
break;
}
},
@@ -169,6 +159,13 @@ export const FinancialModalMixin = {
target.recalcAllStatisticsColumns()
}
})
+ },
+ //改变优惠、本次付款、欠款的值
+ autoChangePrice(target) {
+ let allEachAmount = target.statisticsColumns.eachAmount-0
+ this.$nextTick(() => {
+ this.form.setFieldsValue({'changeAmount':allEachAmount})
+ });
}
}
}
\ No newline at end of file
diff --git a/jshERP-web/src/views/financial/modules/AdvanceInModal.vue b/jshERP-web/src/views/financial/modules/AdvanceInModal.vue
index 04550c4e..f7783e65 100644
--- a/jshERP-web/src/views/financial/modules/AdvanceInModal.vue
+++ b/jshERP-web/src/views/financial/modules/AdvanceInModal.vue
@@ -52,8 +52,7 @@
:maxHeight="300"
:rowNumber="false"
:rowSelection="true"
- :actionButton="true"
- @valueChange="onValueChange" />
+ :actionButton="true" />
diff --git a/jshERP-web/src/views/financial/modules/MoneyInModal.vue b/jshERP-web/src/views/financial/modules/MoneyInModal.vue
index 3d9f4295..fb024511 100644
--- a/jshERP-web/src/views/financial/modules/MoneyInModal.vue
+++ b/jshERP-web/src/views/financial/modules/MoneyInModal.vue
@@ -52,8 +52,7 @@
:maxHeight="300"
:rowNumber="false"
:rowSelection="true"
- :actionButton="true"
- @valueChange="onValueChange" />
+ :actionButton="true" />
diff --git a/jshERP-web/src/views/financial/modules/MoneyOutModal.vue b/jshERP-web/src/views/financial/modules/MoneyOutModal.vue
index 57df3828..51d9077e 100644
--- a/jshERP-web/src/views/financial/modules/MoneyOutModal.vue
+++ b/jshERP-web/src/views/financial/modules/MoneyOutModal.vue
@@ -52,8 +52,7 @@
:maxHeight="300"
:rowNumber="false"
:rowSelection="true"
- :actionButton="true"
- @valueChange="onValueChange" />
+ :actionButton="true" />