|
@@ -13,7 +13,7 @@
|
|
|
>
|
|
|
<div class="dialog">
|
|
|
<!-- 表格 -->
|
|
|
- <el-button class="addBtn" type="primary" v-if="orderList.length < 3" @click="addChildOrder">添加子订单</el-button>
|
|
|
+ <el-button class="addBtn" type="primary" v-if="matchedOrdersCount < 3" @click="addChildOrder">添加子订单</el-button>
|
|
|
<div class="app-container-table-info">
|
|
|
<el-table ref="tables" v-loading="isLoading" height="500px" :data="orderList" border>
|
|
|
<el-table-column label="序号" align="center" type="index" width="60"></el-table-column>
|
|
@@ -136,6 +136,13 @@ export default {
|
|
|
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ // 统计满足指定状态的订单数量
|
|
|
+ matchedOrdersCount() {
|
|
|
+ const validStatuses = [0, 3, 4, 5, 6, 7, 8];
|
|
|
+ return this.orderList.filter(order => validStatuses.includes(order.status)).length;
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 打开弹框
|
|
|
openDialog(title, obj, type) {
|