|
@@ -24,7 +24,7 @@
|
|
</el-button>
|
|
</el-button>
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-item v-if="order.checkFlag === 1">
|
|
<el-dropdown-item v-if="order.checkFlag === 1">
|
|
- <div @click="handeleDialogFormVisible"> 更改收款状态</div>
|
|
|
|
|
|
+ <div @click="handeleDialogFormVisible"> 确认收款金额</div>
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
<el-dropdown-item v-if="['11','12','21','22','31','32'].indexOf(order.status) !== -1">
|
|
<el-dropdown-item v-if="['11','12','21','22','31','32'].indexOf(order.status) !== -1">
|
|
<div @click="handeleDropdown(1,order.orderId)">发货</div>
|
|
<div @click="handeleDropdown(1,order.orderId)">发货</div>
|
|
@@ -80,7 +80,7 @@
|
|
<el-row :gutter="24" class="box-row">
|
|
<el-row :gutter="24" class="box-row">
|
|
<el-col :span="6"><b>订单金额:</b> ¥{{ order.payTotalFee | toThousandFloatFilter }}</el-col>
|
|
<el-col :span="6"><b>订单金额:</b> ¥{{ order.payTotalFee | toThousandFloatFilter }}</el-col>
|
|
<el-col :span="6"><b>应收金额:</b>
|
|
<el-col :span="6"><b>应收金额:</b>
|
|
- ¥{{ order.payableAmount | toThousandFloatFilter }}
|
|
|
|
|
|
+ ¥{{ order.payTotalFee | toThousandFloatFilter }}
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12"><b>已收金额:</b>
|
|
<el-col :span="12"><b>已收金额:</b>
|
|
<template v-if="order.receiptStatus*1===1">¥0.00</template>
|
|
<template v-if="order.receiptStatus*1===1">¥0.00</template>
|
|
@@ -106,14 +106,8 @@
|
|
<el-col :span="6"><b>商品总额:</b> ¥{{ shopOrder.productAmount | toThousandFloatFilter }}</el-col>
|
|
<el-col :span="6"><b>商品总额:</b> ¥{{ shopOrder.productAmount | toThousandFloatFilter }}</el-col>
|
|
<el-col :span="6"><b>应付金额:</b> ¥{{ shopOrder.shouldPayShopAmount | toThousandFloatFilter }}</el-col>
|
|
<el-col :span="6"><b>应付金额:</b> ¥{{ shopOrder.shouldPayShopAmount | toThousandFloatFilter }}</el-col>
|
|
<el-col :span="6"><b>已付金额:</b> ¥{{ shopOrder.payedShopAmount | toThousandFloatFilter }}</el-col>
|
|
<el-col :span="6"><b>已付金额:</b> ¥{{ shopOrder.payedShopAmount | toThousandFloatFilter }}</el-col>
|
|
- <el-col :span="6"><b>待付金额:</b> ¥{{ shopOrder.waitPayShop | toThousandFloatFilter }}</el-col>
|
|
|
|
</el-row>
|
|
</el-row>
|
|
<el-row :gutter="22" class="box-row">
|
|
<el-row :gutter="22" class="box-row">
|
|
- <el-col :span="6"><b>收款状态:</b>
|
|
|
|
- <el-tag v-if="shopOrder.receiptStatus*1===1" type="danger" size="small">待收款</el-tag>
|
|
|
|
- <el-tag v-if="shopOrder.receiptStatus*1===2" type="warning" size="small">部分收款</el-tag>
|
|
|
|
- <el-tag v-if="shopOrder.receiptStatus*1===3" type="success" size="small">已收款</el-tag>
|
|
|
|
- </el-col>
|
|
|
|
<el-col :span="6"><b>付款状态:</b>
|
|
<el-col :span="6"><b>付款状态:</b>
|
|
<el-tag v-if="shopOrder.payStatus*1===1" type="danger" size="small">待付款</el-tag>
|
|
<el-tag v-if="shopOrder.payStatus*1===1" type="danger" size="small">待付款</el-tag>
|
|
<el-tag v-if="shopOrder.payStatus*1===2" type="warning" size="small">部分付款</el-tag>
|
|
<el-tag v-if="shopOrder.payStatus*1===2" type="warning" size="small">部分付款</el-tag>
|
|
@@ -124,6 +118,7 @@
|
|
<el-tag v-if="shopOrder.sendOutStatus*1===2" type="warning" size="small">部分发货</el-tag>
|
|
<el-tag v-if="shopOrder.sendOutStatus*1===2" type="warning" size="small">部分发货</el-tag>
|
|
<el-tag v-if="shopOrder.sendOutStatus*1===3" type="success" size="small">已发货</el-tag>
|
|
<el-tag v-if="shopOrder.sendOutStatus*1===3" type="success" size="small">已发货</el-tag>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="6"><b>待付金额:</b> ¥{{ shopOrder.waitPayShop | toThousandFloatFilter }}</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row :gutter="22" class="box-row">
|
|
<el-row :gutter="22" class="box-row">
|
|
<el-col :span="22"><b>留言:</b> {{ shopOrder.note ? shopOrder.note : '无' }}</el-col>
|
|
<el-col :span="22"><b>留言:</b> {{ shopOrder.note ? shopOrder.note : '无' }}</el-col>
|
|
@@ -210,9 +205,9 @@
|
|
<el-dialog title="更改收款状态" :visible.sync="dialogFormVisible" width="600px">
|
|
<el-dialog title="更改收款状态" :visible.sync="dialogFormVisible" width="600px">
|
|
<el-form ref="dataForm" :rules="rules" :model="chengeOrder" label-position="right" label-width="150px">
|
|
<el-form ref="dataForm" :rules="rules" :model="chengeOrder" label-position="right" label-width="150px">
|
|
<el-row :gutter="24" class="box-row" style="margin-bottom: 40px;">
|
|
<el-row :gutter="24" class="box-row" style="margin-bottom: 40px;">
|
|
- <el-col :span="8"><b>应收金额:</b> ¥{{ order.payableAmount | amountfilters }}</el-col>
|
|
|
|
|
|
+ <el-col :span="8"><b>应收金额:</b> ¥{{ order.payTotalFee | amountfilters }}</el-col>
|
|
<el-col :span="8"><b>已收金额:</b>¥{{ receiptAmount | amountfilters }}</el-col>
|
|
<el-col :span="8"><b>已收金额:</b>¥{{ receiptAmount | amountfilters }}</el-col>
|
|
- <el-col :span="8"><b>未收金额:</b> ¥{{ (order.payableAmount - receiptAmount) | amountfilters }}</el-col>
|
|
|
|
|
|
+ <el-col :span="8"><b>未收金额:</b> ¥{{ (order.payTotalFee - receiptAmount) | amountfilters }}</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-form-item label="订单本次收款金额:" prop="amount" :rules="rules.amount">
|
|
<el-form-item label="订单本次收款金额:" prop="amount" :rules="rules.amount">
|
|
<el-input v-model="chengeOrder.amount" style="width: 200px">
|
|
<el-input v-model="chengeOrder.amount" style="width: 200px">
|
|
@@ -246,6 +241,15 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
|
|
+ const picValidator = (rule, value, callback) => {
|
|
|
|
+ if (!this.chengeOrder.amount) {
|
|
|
|
+ callback(new Error('请输入本次收款金额'))
|
|
|
|
+ } else if (this.chengeOrder.amount > this.SubtrAount(this.order.payTotalFee, this.receiptAmount) * 1) {
|
|
|
|
+ callback(new Error('本次收款金额不能大于未收金额'))
|
|
|
|
+ } else {
|
|
|
|
+ callback()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return {
|
|
return {
|
|
activeIndex: '2',
|
|
activeIndex: '2',
|
|
order: null,
|
|
order: null,
|
|
@@ -264,7 +268,7 @@ export default {
|
|
orderInvoice: {},
|
|
orderInvoice: {},
|
|
voucher: [],
|
|
voucher: [],
|
|
rules: {
|
|
rules: {
|
|
- amount: [{ required: true, message: '请输入本次收款金额', trigger: 'blur' }]
|
|
|
|
|
|
+ amount: [{ required: true, validator: picValidator, trigger: 'blur' }]
|
|
},
|
|
},
|
|
listLoading: false
|
|
listLoading: false
|
|
}
|
|
}
|
|
@@ -322,7 +326,16 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async handleChangOrder() {
|
|
async handleChangOrder() {
|
|
- // 更改订单收款状态
|
|
|
|
|
|
+ // 确认本次收款金额
|
|
|
|
+ this.$refs['dataForm'].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ this.orderCheckReceipt()
|
|
|
|
+ } else {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ async orderCheckReceipt() {
|
|
try {
|
|
try {
|
|
await orderCheckReceipt(this.chengeOrder)
|
|
await orderCheckReceipt(this.chengeOrder)
|
|
this.$message.success('操作成功')
|
|
this.$message.success('操作成功')
|
|
@@ -332,6 +345,22 @@ export default {
|
|
console.log('error', error)
|
|
console.log('error', error)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ SubtrAount(arg1, arg2) {
|
|
|
|
+ var r1, r2, m, n
|
|
|
|
+ try {
|
|
|
|
+ r1 = arg1.toString().split('.')[1].length
|
|
|
|
+ } catch (e) {
|
|
|
|
+ r1 = 0
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ r2 = arg2.toString().split('.')[1].length
|
|
|
|
+ } catch (e) {
|
|
|
|
+ r2 = 0
|
|
|
|
+ }
|
|
|
|
+ m = Math.pow(10, Math.max(r1, r2))
|
|
|
|
+ n = (r1 >= r2) ? r1 : r2
|
|
|
|
+ return ((arg1 * m - arg2 * m) / m).toFixed(n)
|
|
|
|
+ },
|
|
backToList() {
|
|
backToList() {
|
|
this.$store.dispatch('tagsView/delView', this.$route).then(() => {
|
|
this.$store.dispatch('tagsView/delView', this.$route).then(() => {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -396,6 +425,7 @@ export default {
|
|
padding:10px 20px;
|
|
padding:10px 20px;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
border-radius: 5px;
|
|
border-radius: 5px;
|
|
|
|
+ margin-bottom: 10px;
|
|
}
|
|
}
|
|
.product-row{
|
|
.product-row{
|
|
padding: 10px 0;
|
|
padding: 10px 0;
|