linwenxin 10 mēneši atpakaļ
vecāks
revīzija
da201fb571

+ 10 - 8
src/views/mallManagement/order/order_detail/index.vue

@@ -27,6 +27,16 @@
                   <span>{{ orderDetail.orderStatus | ORDER_CURRENT_STATUS_FILTER }}</span>
                 </div>
                 <div class="order-main-opt-btn">
+                  <template
+                    v-if="
+                      ['NOPAY', 'DFH'].includes(orderDetail.orderStatus) ||
+                      (!['WECHAT'].includes(orderDetail.payTypeId) && ['SPTG', 'DQR'].includes(orderDetail.orderStatus))
+                    "
+                  >
+                    <el-popconfirm title="确定取消订单吗?" @confirm="cancelOrder" style="margin-left: 10px">
+                      <el-button slot="reference" size="small" type="danger">取消订单</el-button>
+                    </el-popconfirm>
+                  </template>
                   <template v-if="orderDetail.orderStatus === 'NOPAY'">
                     <el-popconfirm
                       v-if="!['WECHAT'].includes(orderDetail.payTypeId)"
@@ -36,9 +46,6 @@
                       <el-button slot="reference" size="small">确认收款</el-button>
                     </el-popconfirm>
                     <el-button size="small" @click="showDialog('price')" style="margin-left: 10px">修改价格</el-button>
-                    <el-popconfirm title="确定取消订单吗?" @confirm="cancelOrder" style="margin-left: 10px">
-                      <el-button slot="reference" size="small" type="danger">取消订单</el-button>
-                    </el-popconfirm>
                   </template>
                   <template v-if="['SPTG', 'DFH'].includes(orderDetail.orderStatus)">
                     <el-popconfirm
@@ -55,11 +62,6 @@
                     </el-popconfirm>
                     <el-button v-else size="small" type="primary" @click="showDialog('send')">发货</el-button>
                   </template>
-                  <template v-if="['DFH'].includes(orderDetail.orderStatus)">
-                    <el-popconfirm title="确定取消订单吗?" @confirm="cancelOrder" style="margin-left: 10px">
-                      <el-button slot="reference" size="small" type="danger">取消订单</el-button>
-                    </el-popconfirm>
-                  </template>
                   <template v-if="orderDetail.orderStatus === 'YFH' || orderDetail.orderStatus === 'OVER'">
                     <el-button size="small" @click="showDialog('query')">查看物流</el-button>
                   </template>

+ 1 - 3
src/views/mallManagement/order/order_list/index.vue

@@ -370,9 +370,7 @@
                         <el-popconfirm
                           title="确定取消订单吗?"
                           @confirm="cancelOrder(order.orderId)"
-                          v-if="
-                            (order.orderStatus === 'NOPAY' || order.orderStatus === 'DQR') && $restrict('cancelOrder')
-                          "
+                          v-if="['NOPAY', 'DQR'].includes(order.orderStatus) && $restrict('cancelOrder')"
                         >
                           <el-button slot="reference" type="text" size="small">取消订单</el-button>
                         </el-popconfirm>