Forráskód Böngészése

郑多燕 订单审核

wjj 20 órája
szülő
commit
e5e5aa3ec8
1 módosított fájl, 15 hozzáadás és 8 törlés
  1. 15 8
      src/views/hisStore/storeOrder/list.vue

+ 15 - 8
src/views/hisStore/storeOrder/list.vue

@@ -192,7 +192,7 @@
               v-hasPermi="['store:storeOrder:exportItems']"
             >导出订单明细</el-button>
           </el-col>
-          <el-col :span="1.5">
+          <!-- <el-col :span="1.5">
             <el-button
               type="success"
               icon="el-icon-s-check"
@@ -202,7 +202,7 @@
               v-hasPermi="['store:storeOrder:batchAudit']"
             >确认审核
             </el-button>
-          </el-col>
+          </el-col> -->
         <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
         <el-tabs type="card" v-model="activeName" @tab-click="handleClick">
@@ -319,6 +319,12 @@
                 @click="handleDetails(scope.row)"
                 v-hasPermi="['store:storeOrder:query']"
               >查看</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                @click="handleOrderAudit(scope.row)"
+                v-hasPermi="['store:storeOrder:batchAudit']"
+              >确认审核</el-button>
            <!--    <el-button
                 size="mini"
                 type="text"
@@ -992,17 +998,18 @@ export default {
     },
 
     /** 订单确认审核 */
-    handleOrderAudit(){
-      if (this.ids.length === 0) {
-        this.$message.warning('请至少勾选一条订单进行审核');
-        return;
-      }
+    handleOrderAudit(row){
+      // if (this.ids.length === 0) {
+      //   this.$message.warning('请至少勾选一条订单进行审核');
+      //   return;
+      // }
+      const ids = [row.id];
       this.$confirm('是否确认审核选中的订单?', "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        return auditStoreOrder({ orderIds: this.ids, isAudit: 1 });
+        return auditStoreOrder({ orderIds: ids, isAudit: 1 });
       }).then((response) => {
         this.getList();
         this.msgSuccess(response.msg || "审核成功");