Commit 71bf1848 authored by houjn@hikoon.cn's avatar houjn@hikoon.cn
parents 0615d1f4 f8ae4119
...@@ -56,7 +56,11 @@ ...@@ -56,7 +56,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="num" /> <el-table-column :label="$t('箱数')" align="center" prop="num" />
<el-table-column :label="$t('体积/重量')" align="center" prop="weight"></el-table-column> <el-table-column :label="$t('体积/重量')" align="center" prop="weight">
<template slot-scope="scope">
{{ scope.row.volume?(scope.row.volume + '/'+scope.row.weight):'' }}
</template>
</el-table-column>
<el-table-column :label="$t('收入类型')" align="center" prop="feeType"> <el-table-column :label="$t('收入类型')" align="center" prop="feeType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
...@@ -76,6 +80,16 @@ ...@@ -76,6 +80,16 @@
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span> <span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> --> <!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template> </template>
</el-table-column>
<el-table-column :label="$t('优惠金额')" align="center">
<template slot-scope="scope">
{{ scope.row.discountTotal ?scope.row.discountTotal : '' }}
</template>
</el-table-column>
<el-table-column :label="$t('优惠后金额')" align="center">
<template slot-scope="scope">
{{ scope.row.disCountAmount ?scope.row.disCountAmount :0 }}
</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('税额')" align="center" prop="tax"> <el-table-column :label="$t('税额')" align="center" prop="tax">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -157,14 +171,22 @@ export default { ...@@ -157,14 +171,22 @@ export default {
res.data.map(v => { res.data.map(v => {
v.tax = NP.times(v.totalAmount, this.invoiceData.taxRate/100) v.tax = NP.times(v.totalAmount, this.invoiceData.taxRate/100)
v.taxAndTotalAmount = NP.plus(v.totalAmount, NP.times(v.totalAmount, this.invoiceData.taxRate/100)) v.taxAndTotalAmount = NP.plus(v.totalAmount, NP.times(v.totalAmount, this.invoiceData.taxRate/100))
if(v.discountTotal){
v.disCountAmount = NP.minus(v.totalAmount,v.discountTotal)
}else{
v.disCountAmount = v.totalAmount
}
}) })
const t = { const t = {
orderNo: this.$t('合计'), orderNo: this.$t('合计'),
totalAmount: res.data.reduce((total, curr) => NP.plus(total, curr.totalAmount), 0), totalAmount: res.data.reduce((total, curr) => NP.plus(total, curr.totalAmount), 0),
disCountAmount:res.data.reduce((total, curr) => NP.plus(total, curr.disCountAmount), 0),
tax: res.data.reduce((total, curr) => NP.plus(total, curr.tax), 0), tax: res.data.reduce((total, curr) => NP.plus(total, curr.tax), 0),
taxAndTotalAmount: res.data.reduce((total, curr) => NP.plus(total, curr.taxAndTotalAmount), 0) taxAndTotalAmount: res.data.reduce((total, curr) => NP.plus(total, curr.taxAndTotalAmount), 0)
} }
this.list = [...res.data, t] this.list = [...res.data, t]
console.log(this.list)
}) })
}, },
submitForm() { submitForm() {
...@@ -180,7 +202,7 @@ export default { ...@@ -180,7 +202,7 @@ export default {
}, },
getSummaries(param) { getSummaries(param) {
const t = this.list[this.list.length - 1].taxAndTotalAmount const t = this.list[this.list.length - 1].taxAndTotalAmount
return [this.$t('收款人'), this.invoiceData.payeeName, this.$t('核销人'), this.invoiceData.writeOffName, this.$t('开票人'), this.invoiceData.issuerName, '', this.$t('价税合计大写'), this.convertCurrency(t)]; return [this.$t('收款人'), this.invoiceData.salesmanName, this.$t('核销人'), this.invoiceData.writeOffName, this.$t('开票人'), this.invoiceData.issuerName, '', this.$t('价税合计大写'), this.convertCurrency(t)];
}, },
convertCurrency(money) { convertCurrency(money) {
//汉字的数字 //汉字的数字
......
...@@ -508,7 +508,9 @@ export default { ...@@ -508,7 +508,9 @@ export default {
writeOffAmount(){ writeOffAmount(){
let total = 0 let total = 0
this.detailed.forEach(item => { this.detailed.forEach(item => {
if(item.status){
total = NP.plus(total, item.writeOffAmount) total = NP.plus(total, item.writeOffAmount)
}
}) })
return total.toFixed(2) return total.toFixed(2)
}, },
......
...@@ -52,9 +52,10 @@ ...@@ -52,9 +52,10 @@
<el-col style="width: 592px"> <el-col style="width: 592px">
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('创建时间')">
<el-date-picker <el-date-picker
v-model="queryParams.beginCreateTime" v-model="dateFilter"
type="datetimerange" type="datetimerange"
range-separator="-" range-separator="-"
value-format="yyyy-MM-dd HH:mm:ss"
:start-placeholder="$t('请选择日期')" :start-placeholder="$t('请选择日期')"
:end-placeholder="$t('请选择日期')" :end-placeholder="$t('请选择日期')"
> >
...@@ -301,6 +302,7 @@ export default { ...@@ -301,6 +302,7 @@ export default {
productRecord: null, productRecord: null,
followUpSalesmanId: null, followUpSalesmanId: null,
}, },
dateFilter:[],
downloading: false, // 导出状态 downloading: false, // 导出状态
}; };
}, },
...@@ -368,7 +370,14 @@ export default { ...@@ -368,7 +370,14 @@ export default {
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
console.log(11) if(this.dateFilter&&this.dateFilter.length>0){
this.queryParams.beginCreateTime = this.dateFilter[0]
this.queryParams.endCreateTime = this.dateFilter[1]
}else{
this.queryParams.beginCreateTime = ''
this.queryParams.endCreateTime = ''
}
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1;
this.getList(); this.getList();
}, },
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1" :prop="!tableData[$index].id && $index + '.boxGauge1'"> <el-form-item :rules="tableFormRules.boxGauge1" :prop="!tableData[$index].id && $index + '.boxGauge1'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[0] : '' }}</span> <span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else v-model.number="tableData[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input> <el-input v-else type="number" v-model="tableData[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2" :prop="!tableData[$index].id && $index + '.boxGauge2'"> <el-form-item :rules="tableFormRules.boxGauge2" :prop="!tableData[$index].id && $index + '.boxGauge2'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[1] : '' }}</span> <span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else v-model.number="tableData[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input> <el-input v-else type="number" v-model="tableData[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3" :prop="!tableData[$index].id && $index + '.boxGauge3'"> <el-form-item :rules="tableFormRules.boxGauge3" :prop="!tableData[$index].id && $index + '.boxGauge3'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[2] : '' }}</span> <span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else v-model.number="tableData[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input> <el-input v-else type="number" v-model="tableData[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment