zory 1 долоо хоног өмнө
parent
commit
e680ae506d

+ 9 - 7
src/views/service/order/index/components/table.vue

@@ -30,8 +30,8 @@
                         fit="cover"></el-image>
                     </div>
                     <div class="name">
-                        <span>{{ scope.row.product.product_name }}</span>
-                        <span class="dec">商品编码:{{ scope.row.product.product_id }}</span>
+                        <span>{{ scope.row.product?scope.row.product.product_name:'-' }}</span>
+                        <span class="dec">商品编码:{{ scope.row.product?scope.row.product.product_id:'-' }}</span>
                     </div>
                 </div>
             </template>
@@ -137,9 +137,11 @@
                     <el-button size="small" text @click="table_view(scope.row)">详情</el-button>
                     <el-button type="danger" size="small" text @click="table_error(scope.row)" v-if="trade==2 && scope.row.status==2 && scope.row.is_error==0">标记异常</el-button>
                 </el-button-group>
-                <el-button-group>
-                    <el-button type="danger" size="small" text @click="table_cancel(scope.row)" v-if="trade==2 && scope.row.status==2 && scope.row.express_status==1">取消</el-button>
-                </el-button-group>
+                <template v-if="scope.row.is_error==0">
+                    <el-button-group>
+                        <el-button type="danger" size="small" text @click="table_cancel(scope.row)" v-if="trade==2 && scope.row.status==2 && scope.row.express_status==1">取消</el-button>
+                    </el-button-group>
+                </template>
             </template>
         </el-table-column>
     </scTable>
@@ -194,7 +196,7 @@ export default {
                     return this.$message.error(resp.msg);
                 }
                 this.$message.success(resp.msg);
-                this.$emit("success");
+                this.$refs.table.refresh()
             }).catch(() => {
 
             })
@@ -208,7 +210,7 @@ export default {
                     return this.$message.error(resp.msg);
                 }
                 this.$message.success(resp.msg);
-                this.$emit("success");
+                this.$refs.table.refresh()
             }).catch(() => {
 
             })

+ 0 - 1
src/views/service/order/unusual/components/table.vue

@@ -129,7 +129,6 @@
             <template #default="scope">
                 <el-button-group>
                     <el-button size="small" text @click="table_view(scope.row)">详情</el-button>
-                    <el-button type="danger" size="small" text @click="table_view(scope.row)" v-if="trade==2">标记异常</el-button>
                 </el-button-group>
             </template>
         </el-table-column>