阿赫 3 сар өмнө
parent
commit
7956290332

+ 22 - 8
zkqy-ui/src/views/orderMange/productwolist/index.vue

@@ -128,16 +128,17 @@
 <!--      <el-table-column label="码单状态" align="center" prop="otherStates" />-->
 <!--      <el-table-column label="父级码单ID" align="center" prop="parentCode" />-->
 <!--      <el-table-column label="二维码唯一标识" align="center" prop="qrCodeId" />-->
+
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['productwolist:productwolist:edit']"
-          >修改</el-button>
-
+          <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
+            <el-button type="warning">
+              操作<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item  icon="el-icon-edit"  command="handleUpdate">修改</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
         </template>
       </el-table-column>
     </el-table>
@@ -289,6 +290,19 @@ export default {
       this.open = false;
       this.reset();
     },
+    //下拉菜单点击事件
+    handleCommand(command, row) {
+      switch (command) {
+        case "handleUpdate":
+          this.handleUpdate(row)
+          break;
+        case "handleDelete":
+          this.handleDelete(row)
+          break;
+        default:
+          break;
+      }
+    },
     // 表单重置
     reset() {
       this.form = {