Bläddra i källkod

移动端按钮

natasha 2 veckor sedan
förälder
incheckning
398b5a98a8
1 ändrade filer med 48 tillägg och 37 borttagningar
  1. 48 37
      src/views/finance_manage/FlowManage.vue

+ 48 - 37
src/views/finance_manage/FlowManage.vue

@@ -486,28 +486,33 @@
               :width="isPhone ? '50' : '110'"
             >
               <template slot-scope="scope">
-                <el-dropdown trigger="click" v-if="isPhone">
-                  <span class="el-dropdown-link">
-                    <svg-icon
-                      icon-class="operate"
-                      class="el-dropdown-link"
-                    ></svg-icon>
-                  </span>
-                  <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item
-                      @click.native.prevent="
-                        handleRefund(scope.row, scope.$index)
-                      "
-                      v-if="scope.row.is_use_discount_code == 'false'"
-                      >退款</el-dropdown-item
-                    >
-                    <el-dropdown-item
+                <template v-if="isPhone">
+                  <el-dropdown
+                    trigger="click"
+                    v-if="scope.row.is_use_discount_code == 'false'"
+                  >
+                    <span class="el-dropdown-link">
+                      <svg-icon
+                        icon-class="operate"
+                        class="el-dropdown-link"
+                      ></svg-icon>
+                    </span>
+                    <el-dropdown-menu slot="dropdown">
+                      <el-dropdown-item
+                        @click.native.prevent="
+                          handleRefund(scope.row, scope.$index)
+                        "
+                        v-if="scope.row.is_use_discount_code == 'false'"
+                        >退款</el-dropdown-item
+                      >
+                      <!-- <el-dropdown-item
                       @click.native.prevent="handleUp(scope.row, scope.$index)"
                       v-if="scope.row.order_status === 2"
                       >撤回</el-dropdown-item
-                    >
-                  </el-dropdown-menu>
-                </el-dropdown>
+                    > -->
+                    </el-dropdown-menu>
+                  </el-dropdown>
+                </template>
                 <template v-else>
                   <el-button
                     type="text"
@@ -520,7 +525,7 @@
                   >
                     退款
                   </el-button>
-                  <el-button
+                  <!-- <el-button
                     @click.native.prevent="handleUp(scope.row, scope.$index)"
                     type="text"
                     size="small"
@@ -528,7 +533,7 @@
                     v-if="scope.row.order_status === 2"
                   >
                     撤回
-                  </el-button>
+                  </el-button> -->
                   <el-button
                     type="text"
                     size="small"
@@ -1137,22 +1142,28 @@ export default {
     },
     // 停用 启用
     handleUp(row, index) {
-      let Mname = "/OrgServer/Manager/SysUserManager/EnableSysUser";
-      let updataData = JSON.parse(JSON.stringify(row));
-      let data = {
-        id: row.id,
-      };
-      if (row.status === 0) {
-        // 下架状态
-        data.is_enable = "true";
-        updataData.status = 1;
-      } else if (row.status === 1) {
-        data.is_enable = "false";
-        updataData.status = 0;
-      }
-      getLogin(Mname, data).then((res) => {
-        this.$message.success("操作成功");
-        this.$set(this.tableData, index, updataData);
+      this.$confirm("确定撤回吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        let Mname = "/OrgServer/Manager/SysUserManager/EnableSysUser";
+        let updataData = JSON.parse(JSON.stringify(row));
+        let data = {
+          id: row.id,
+        };
+        if (row.status === 0) {
+          // 下架状态
+          data.is_enable = "true";
+          updataData.status = 1;
+        } else if (row.status === 1) {
+          data.is_enable = "false";
+          updataData.status = 0;
+        }
+        getLogin(Mname, data).then((res) => {
+          this.$message.success("操作成功");
+          this.$set(this.tableData, index, updataData);
+        });
       });
     },
     handleSizeChange(val) {