财务单据优化
This commit is contained in:
@@ -63,6 +63,16 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
<a-row class="form-row" :gutter="24">
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠金额">
|
||||||
|
{{model.changeAmount}}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6"></a-col>
|
||||||
|
<a-col :span="6"></a-col>
|
||||||
|
<a-col :span="6"></a-col>
|
||||||
|
</a-row>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
<!--转账-->
|
<!--转账-->
|
||||||
|
|||||||
@@ -41,14 +41,25 @@ export const FinancialModalMixin = {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addInit(amountNum) {
|
addInit(amountNum) {
|
||||||
this.$nextTick(() => {
|
|
||||||
this.form.setFieldsValue({'billTime':getNowFormatDateTime()})
|
|
||||||
});
|
|
||||||
getAction('/sequence/buildNumber').then((res) => {
|
getAction('/sequence/buildNumber').then((res) => {
|
||||||
if (res && res.code === 200) {
|
if (res && res.code === 200) {
|
||||||
this.form.setFieldsValue({'billNo':amountNum + res.data.defaultNumber})
|
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() {
|
initSupplier() {
|
||||||
let that = this;
|
let that = this;
|
||||||
@@ -133,31 +144,10 @@ export const FinancialModalMixin = {
|
|||||||
onValueChange(event) {
|
onValueChange(event) {
|
||||||
let that = this
|
let that = this
|
||||||
const { type, row, column, value, target } = event
|
const { type, row, column, value, target } = event
|
||||||
let param,operNumber,unitPrice,allPrice,taxRate,taxMoney,taxLastMoney
|
|
||||||
switch(column.key) {
|
switch(column.key) {
|
||||||
case "operNumber":
|
case "eachAmount":
|
||||||
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}}])
|
|
||||||
target.recalcAllStatisticsColumns()
|
target.recalcAllStatisticsColumns()
|
||||||
|
that.autoChangePrice(target)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -169,6 +159,13 @@ export const FinancialModalMixin = {
|
|||||||
target.recalcAllStatisticsColumns()
|
target.recalcAllStatisticsColumns()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
//改变优惠、本次付款、欠款的值
|
||||||
|
autoChangePrice(target) {
|
||||||
|
let allEachAmount = target.statisticsColumns.eachAmount-0
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue({'changeAmount':allEachAmount})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,8 +52,7 @@
|
|||||||
:maxHeight="300"
|
:maxHeight="300"
|
||||||
:rowNumber="false"
|
:rowNumber="false"
|
||||||
:rowSelection="true"
|
:rowSelection="true"
|
||||||
:actionButton="true"
|
:actionButton="true" />
|
||||||
@valueChange="onValueChange" />
|
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="24" :md="24" :sm="24">
|
<a-col :lg="24" :md="24" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
|
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
|
||||||
|
|||||||
@@ -52,8 +52,7 @@
|
|||||||
:maxHeight="300"
|
:maxHeight="300"
|
||||||
:rowNumber="false"
|
:rowNumber="false"
|
||||||
:rowSelection="true"
|
:rowSelection="true"
|
||||||
:actionButton="true"
|
:actionButton="true" />
|
||||||
@valueChange="onValueChange" />
|
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="24" :md="24" :sm="24">
|
<a-col :lg="24" :md="24" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
|
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
|
||||||
|
|||||||
@@ -52,8 +52,7 @@
|
|||||||
:maxHeight="300"
|
:maxHeight="300"
|
||||||
:rowNumber="false"
|
:rowNumber="false"
|
||||||
:rowSelection="true"
|
:rowSelection="true"
|
||||||
:actionButton="true"
|
:actionButton="true" />
|
||||||
@valueChange="onValueChange" />
|
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="24" :md="24" :sm="24">
|
<a-col :lg="24" :md="24" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
|
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
|
||||||
|
|||||||
Reference in New Issue
Block a user