|
@@ -146,9 +146,7 @@
|
|
|
fit
|
|
|
highlight-current-row
|
|
|
stripe
|
|
|
- max-height="400"
|
|
|
- show-summary
|
|
|
- :summary-method="$getSummaries">
|
|
|
+ max-height="400">
|
|
|
<el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
|
|
|
<el-table-column align="center" label="引用记录" prop="useRefCount" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
@@ -175,22 +173,56 @@
|
|
|
{{ scope.row.totalAmount | numToFixed }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
+ <!-- <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="right" label="使用返利金额" prop="rebateAmount" min-width="120" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.rebateAmount | numToFixed }}
|
|
|
</template>
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column align="center" label="返利类型" prop="customerWalletId2" min-width="160" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利类型" size="small" clearable @change="changeFlWallet(scope.$index)">
|
|
|
+ <el-option
|
|
|
+ v-for="item in scope.row.rebateWallets"
|
|
|
+ :key="item.customerWalletId"
|
|
|
+ :label="item.customerWalletName"
|
|
|
+ :value="item.customerWalletId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="right" label="返利金额" min-width="100" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{(scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100}}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.discAmount | numToFixed }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="现金钱包" prop="customerWalletName" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
+ <!-- <el-table-column align="center" label="现金钱包" prop="customerWalletName" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.payAmount | numToFixed }}
|
|
|
</template>
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column align="center" label="现金钱包" prop="customerWalletId" min-width="160" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select v-model="scope.row.customerWalletId" placeholder="选择现金钱包" size="small" clearable @change="changeXjWallet(scope.$index)">
|
|
|
+ <el-option
|
|
|
+ v-for="item in scope.row.wallets"
|
|
|
+ :key="item.customerWalletId"
|
|
|
+ :label="item.customerWalletName"
|
|
|
+ :value="item.customerWalletId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="right" label="实付金额" prop="qty" min-width="100" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{(((scope.row.price * scope.row.qty) * 100 - ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 - ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) / 100) | numToFixed}}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
@@ -319,10 +351,40 @@ export default {
|
|
|
item.sums2 = ['totalAmount', 'payAmount', 'price', 'discAmount', 'rebateAmount'];
|
|
|
})
|
|
|
}
|
|
|
+ res.data.items.forEach(item => {
|
|
|
+ item.rebateWallets = item.customerWalletList.filter(item => {
|
|
|
+ return item.type === 'REBATE';
|
|
|
+ });
|
|
|
+ item.wallets = item.customerWalletList.filter(item => {
|
|
|
+ return item.type === 'COMMONLY';
|
|
|
+ });
|
|
|
+ })
|
|
|
this.detailData = res.data;
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 修改返利钱包
|
|
|
+ changeFlWallet(index) {
|
|
|
+ if(this.detailData.items[index].customerWalletId2) {
|
|
|
+ let obj = this.detailData.items[index].rebateWallets.find(o => o.customerWalletId == this.detailData.items[index].customerWalletId2);
|
|
|
+ this.detailData.items[index].rebateRate = obj.rebateRate;
|
|
|
+ this.detailData.items[index].customerWalletName2 = obj.customerWalletName;
|
|
|
+ }else {
|
|
|
+ this.detailData.items[index].rebateRate = '';
|
|
|
+ this.detailData.items[index].customerWalletName2 = '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 修改现金钱包
|
|
|
+ changeXjWallet(index) {
|
|
|
+ if(this.detailData.items[index].customerWalletId) {
|
|
|
+ let obj = this.detailData.items[index].wallets.find(o => o.customerWalletId == this.detailData.items[index].customerWalletId);
|
|
|
+ this.detailData.items[index].customerWalletName = obj.customerWalletName;
|
|
|
+ }else {
|
|
|
+ this.detailData.items[index].customerWalletName = '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
// 审批
|
|
|
clickSubmitForm(val) {
|
|
|
this.$confirm('此操作将审批订单, 是否继续?', '提示', {
|