戴艳蓉 3 жил өмнө
parent
commit
77b7129662

+ 0 - 420
src/views/goodStore/goldPrice1/addEdit.vue

@@ -1,420 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="5vh"
-    width="700px"
-    @close="closeModel"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    v-loading="loading"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-  >
-    <el-card>
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            v-if="isApproval"
-            :model="cexForm"
-            status-icon
-            :rules="cexRules"
-            ref="cexForm"
-            label-width="80px"
-            class="cexForm-ruleForm"
-            ><el-row>
-              <el-col :span="12">
-                <el-row class="cexForm-div">
-                  <el-col :span="8" class="tr cexForm-label">规格名称:</el-col>
-                  <el-col :span="16" class="cexForm-main">{{
-                    ruleForm.name
-                  }}</el-col>
-                </el-row>
-                <el-row class="cexForm-div">
-                  <el-col :span="8" class="tr cexForm-label">规格排序:</el-col>
-                  <el-col :span="16" class="cexForm-main">{{
-                    ruleForm.weight
-                  }}</el-col>
-                </el-row>
-                <el-row class="cexForm-div">
-                  <el-col :span="8" class="tr cexForm-label">规格备注:</el-col>
-                  <el-col :span="16" class="cexForm-main">{{
-                    ruleForm.Fremark
-                  }}</el-col>
-                </el-row>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="审核状态" prop="status">
-                  <el-select
-                    v-model="cexForm.status"
-                    placeholder="请选择审核状态"
-                    @change="selectChange"
-                  >
-                    <el-option
-                      v-for="item in statusList"
-                      :key="item.code"
-                      :label="item.name"
-                      :value="item.code"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-                <el-form-item label="审核说明" prop="remark">
-                  <el-input
-                    v-model="cexForm.remark"
-                    type="textarea"
-                    placeholder="请输入审核说明"
-                    :rows="5"
-                    maxlength="300"
-                    show-word-limit
-                  ></el-input>
-                </el-form-item>
-                <el-col :span="24" style="text-align: right">
-                  <el-button type="primary" @click="submitCexForm"
-                    >保 存
-                  </el-button>
-                  <el-button @click="showModelThis = false">取 消</el-button>
-                </el-col>
-              </el-col>
-            </el-row></el-form
-          >
-
-          <el-form
-            v-else
-            :model="ruleForm"
-            status-icon
-            :rules="rulesThis"
-            ref="ruleForm"
-            label-width="80px"
-            class="demo-ruleForm"
-            ><el-row>
-              <el-col :span="12">
-                <el-form-item label="规格名称" prop="name" :disabled="isDetail">
-                  <el-input
-                    placeholder="规格名称"
-                    v-model="ruleForm.name"
-                    :disabled="isDetail"
-                  ></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="规格排序" prop="weight">
-                  <el-input-number
-                    :disabled="isDetail"
-                    id="tl-number"
-                    style="width: 100%; text-align: left"
-                    v-model="ruleForm.weight"
-                    :step="1"
-                    :min="1"
-                    :max="1000"
-                    :precision="0"
-                    step-strictly
-                    :controls="false"
-                  ></el-input-number>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-form-item label="规格备注" prop="remark">
-              <el-input
-                v-model="ruleForm.remark"
-                type="textarea"
-                placeholder="请输入备注"
-                :rows="5"
-                maxlength="300"
-                show-word-limit
-                :disabled="isDetail"
-              ></el-input>
-            </el-form-item>
-            <el-col :span="24" style="text-align: right">
-              <el-tag
-                type="warning"
-                class="fl"
-                style="max-width: 500px"
-                v-if="dataInfo.ex_remark && dataInfo.ex_status === '2'"
-                >审核备注:{{ dataInfo.ex_remark }}</el-tag
-              >
-
-              <el-button type="primary" @click="submitForm" v-if="!isDetail"
-                >保 存
-              </el-button>
-              <el-button @click="showModelThis = false">{{
-                isDetail ? "关 闭" : "取 消"
-              }}</el-button>
-            </el-col>
-          </el-form>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-   <script>
-import asyncRequest from "@/apis/service/goodStore/goldPrice";
-import {
-  isnumber,
-  isMobile,
-  validEmail,
-  isAlphanumeric,
-  isChinese,
-  isEmoticon,
-  validAlphabets,
-} from "@/utils/validate";
-import statusList from "@/assets/js/cexStatusList";
-export default {
-  name: "goldPrice",
-  props: ["showModel", "id", "isDetail", "isApproval"],
-  data() {
-    const validatename = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("规格名称不能为空!"));
-      } else {
-        if (value.lenght < 2 || value.lenght > 12) {
-          callback(new Error("规格名称规则为2~12位汉字!"));
-        } else {
-          if (!isChinese(value)) {
-            console.log(9999);
-            callback(new Error("规格名称规则为2~12位汉字!"));
-          } else if (isEmoticon(value)) {
-            console.log(2345);
-            callback(new Error("规格名称规则为2~12位汉字!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    return {
-      statusList: statusList,
-      loading: false,
-      title: "添加商品规格",
-      showModelThis: this.showModel,
-      dataInfo: {},
-      cexForm: {
-        id: this.id,
-        remark: "",
-        status: "1",
-      },
-      ruleForm: {
-        id: this.id,
-        remark: "",
-        weight: "1",
-        name: "",
-      },
-      cexRules: {
-        status: {
-          required: true,
-          message: "请选择审核状态",
-          trigger: "change",
-        },
-        remark: [
-          {
-            required: false,
-            message: "请输入审核说明!",
-            trigger: "blur",
-          },
-        ],
-      },
-      rulesThis: this.rules,
-      rules: {
-        name: [
-          {
-            required: true,
-            validator: validatename,
-            trigger: "blur",
-          },
-        ],
-        weight: [
-          {
-            required: true,
-            message: "排序不能为空!",
-            trigger: "blur",
-          },
-        ],
-
-        remark: [
-          {
-            required: false,
-            trigger: "blur",
-          },
-        ],
-      },
-    };
-  },
-  methods: {
-    closeModel() {
-      console.log("closeModel!!");
-    },
-    selectChange() {
-      if (this.cexForm.status === "1") {
-        this.cexRules.remark[0].required = false;
-      } else {
-        this.cexRules.remark[0].required = true;
-      }
-    },
-    async initForm() {
-      if (this.isApproval) {
-        this.loading = true;
-        this.title = "商品规格审核";
-        await this.initData();
-        await  this.resetcexForm()
-        this.selectChange()
-        this.loading = false;
-      } else {
-        if (this.id === "add") {
-          this.title = "添加商品规格";
-          // this.ruleForm.isAdmin = 0;
-          this.loading = false;
-          this.rulesThis = this.rules;
-          await this.resetForm();
-        } else {
-          if (this.isDetail) {
-            this.title = "商品规格";
-            this.rulesThis = {};
-          } else {
-            this.title = "修改商品规格";
-            this.rulesThis = this.rules;
-          }
-          await this.resetForm();
-          await this.initData();
-        }
-      }
-    },
-       async resetcexForm() {
-      if (this.$refs.cexForm) {
-        this.$refs.cexForm.resetFields();
-        this.$refs.cexForm.clearValidate();
-        this.cexForm = {
-          id: this.id,
-          remark: "",
-          status: "1",
-        };
-      }
-    },
-    async initData() {
-      this.loading = true;
-      let res = await asyncRequest.detail({ id: this.id });
-      this.loading = false;
-      if (res.code === 0) {
-        let data = res.data;
-        this.dataInfo = data;
-        this.ruleForm = {
-          id: this.id,
-          remark: data.spec_desc,
-          weight: data.weight,
-          name: data.spec_name,
-        };
-      }
-    },
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          this.ruleForm = {
-            id: this.id,
-            remark: "",
-            weight: "",
-            name: "",
-            // isAdmin: 0
-          };
-        }
-      });
-    },
-    async submitCexForm() {
-      await this.$refs.cexForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          console.log(this.id);
-          console.log(this.cexForm);
-          let obj = JSON.parse(JSON.stringify(this.cexForm));
-
-          obj.id = this.id;
-          console.log(obj);
-          let res = await asyncRequest.exam(obj);
-          this.loading = false;
-          if (res.code === 0) {
-            let title = "审核审批成功!";
-            this.$notify.success({
-              title,
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            this.$emit("refresh");
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          let obj = JSON.parse(JSON.stringify(this.ruleForm));
-          let res = {};
-          if (this.id === "add") {
-            delete obj["id"];
-            res = await asyncRequest.add(obj);
-          } else {
-            res = await asyncRequest.update(obj);
-          }
-          this.loading = false;
-          if (res.code === 0) {
-            let title = this.id === "add" ? "添加成功" : "修改成功";
-            this.$notify.success({
-              title,
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            this.$emit("refresh");
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.goldPrice {
-  .cexForm-ruleForm {
-    .cexForm-div {
-      margin-bottom: 22px;
-      .cexForm-label {
-        padding-right: 12px;
-        color: #606266;
-        line-height: 40px;
-        font-size: 14px;
-      }
-      .cexForm-main {
-        line-height: 40px;
-        color: rgb(151, 168, 190);
-        line-height: 40px;
-        font-size: 14px;
-      }
-    }
-  }
-}
-</style>
-   

+ 0 - 395
src/views/goodStore/goldPrice1/index copy 2.vue

@@ -1,395 +0,0 @@
-<template>
-  <div class="page goldPrice pagePadding">
-    <ex-table
-      v-if="rules.some(item => item == '001')"
-      :table="table"
-      :data="tableData"
-      :columns="columns"
-      :page="pageInfo"
-      @page-curr-change="pageInfo.curr = $event; searchList();"
-      @page-size-change="pageInfo.curr = 1;pageInfo.size = $event; searchList();"
-      @screen-reset="pageInfo.curr = 1;searchList()"
-      @screen-submit="pageInfo.curr = 1; searchList()"
-    >
-      <template #status="{scope}">
-        <el-tag
-          :type="scope.row.status == 1 ? 'success' : scope.row.status == 0 ? 'warning' : ''"
-          v-text="(statusOptions.find(item => item.id == scope.row.status) || {}).label || '--'"
-        ></el-tag>
-      </template>
-      <template #operation="{scope}">
-        <el-tooltip
-          v-if="rules.some(item => item == '004')"
-          class="item"
-          effect="dark"
-          :content="scope.row.status == 0 ? '启用' : scope.row.status == 1 ? '禁用' : '--'"
-          placement="top"
-        >
-          <i
-            class="tb-icon"
-            :class="scope.row.status == 0 ? 'el-icon-circle-check' : scope.row.status == 1 ? 'el-icon-circle-close' : ''"
-            @click="enableOrDisableAuth( scope.row.status == 0 ? 1 : scope.row.status == 1 ? 0 : '', [scope.row])"
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="rules.some(item => item == '007')"
-          class="item"
-          effect="dark"
-          content="编辑"
-          placement="top"
-        >
-          <i class="tb-icon el-icon-edit" @click="addOrUpdateHandle(scope.row.id, 'edit')"></i>
-        </el-tooltip>
-      </template>
-    </ex-table>
-    <no-auth v-else></no-auth>
-    <!-- 弹窗 新增/修改 -->
-    <!-- <add-or-update
-      v-if="isAddOrUpdate"
-      ref="addOrUpdate"
-      :authOptions="authOptions"
-      @refreshDataList="pageInfo.curr = 1;searchList()"
-    /> -->
-  </div>
-</template>
-<script>
-// import ExTable from "@/components/ExTable.vue";
-import asyncRequest from "@/apis/service/goodStore/goldPrice";
-// import AddOrUpdate from "./addOrEditAuth";
-
-export default {
-  name: "dataAuth",
-  // components: { ExTable,
-  // //  AddOrUpdate 
-  //  },
-  computed: {
-       rules() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "goldPrice"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-    // rules() {
-    //   let tran =
-    //     this.$store.state.common.ruleslist.find(
-    //       item => item.name == "data_power"
-    //     ) || {};
-    //   return this.$store.state.common.ruleslist.filter(
-    //     item => item.pid === tran.id
-    //   );
-    // }
-  },
-  data() {
-    return {
-      isAddOrUpdate: false,
-      // 状态
-      statusOptions: [
-        { id: 0, label: "禁用" },
-        { id: 1, label: "启用" }
-      ],
-      // 共享数据权限
-      authOptions: [
-        { id: 1, label: "只读" },
-        { id: 2, label: "读写" }
-      ],
-      // 表格 - 数据
-      tableData: [],
-      // 表格 - 参数
-      table: {
-        stripe: true,
-        border: true,
-        _defaultHeader_: ["setcol"]
-      },
-      // 表格 - 分页
-      pageInfo: {
-        size: 10,
-        curr: 1,
-        total: 0
-      },
-      // 表格 - 列参数
-      columns: [
-        { type: "selection", fixed: "left", _noset_: true },
-        {
-          type: "index",
-          label: "序号",
-          fixed: "left",
-          width: "50",
-          _noset_: true
-        },
-        {
-          prop: "id",
-          label: "ID",
-          "min-width": "70",
-          sortable: true
-        },
-        {
-          prop: "shar_rulenames",
-          label: "菜单数据",
-          "min-width": "120"
-        },
-        {
-          prop: "usernames",
-          label: "数据源用户",
-          "min-width": "120"
-        },
-        {
-          prop: "groupnames",
-          label: "数据源用户组",
-          "min-width": "120"
-        },
-        {
-          prop: "shar_usernames",
-          label: "数据共享用户",
-          "min-width": "120"
-        },
-        {
-          prop: "shar_groupnames",
-          label: "数据共享用户组",
-          "min-width": "120"
-        },
-        {
-          prop: "data_shar_auth",
-          label: "共享数据权限",
-          "min-width": "140",
-          sortable: true,
-          _format_: d => {
-            return (
-              this.authOptions.find(item => {
-                return item.id == d.data_shar_auth;
-              }) || {}
-            ).label;
-          }
-        },
-        {
-          prop: "created_at",
-          label: "添加时间",
-          "min-width": "160",
-          sortable: true
-        },
-        {
-          prop: "status",
-          label: "状态",
-          fixed: "right",
-          "min-width": "100",
-          sortable: true,
-          _slot_: "status"
-        },
-        {
-          prop: "",
-          label: "操作",
-          fixed: "right",
-          "min-width": "120",
-          _noset_: true,
-          _slot_: "operation"
-        }
-      ]
-    };
-  },
-  mounted() {
-    this.searchList();
-  },
-  methods: {
-    // 新建/编辑用户组
-    addOrUpdateHandle(id, type) {
-      let _this = this;
-      _this.isAddOrUpdate = true;
-      // 弹窗初始化
-      _this.$nextTick(() => {
-        _this.$refs.addOrUpdate.init(id, type);
-      });
-    },
-    /**
-     * 启用/禁用
-     * @param {String} status 0-禁用 1-启用
-     * @param {Array} selection 当前选择项
-     */
-    enableOrDisableAuth(status, selection) {
-      if (selection.length == 0)
-        return this.$message.warning("请至少选择一条数据!");
-      this.$confirm(
-        `此操作将${
-          status == 0 ? "禁用" : status == 1 ? "启用" : "--"
-        }选择的共享规则, 是否继续?`,
-        "提示",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }
-      ).then(() => {
-        this.enableOrDisableAuthService(
-          status,
-          selection.map(item => item.id)
-        );
-      });
-    },
-    /**
-     * 启用/禁用服务
-     */
-    enableOrDisableAuthService(status, ids) {
-      let loadding = this.$loading();
-      this.axios
-        .post(`/recruit/v1/shar_start_stop`, {
-          status: status,
-          id_list: ids
-        })
-        .then(res => {
-          loadding.close();
-          if (res && res.data && res.data.status == 0) {
-            this.$message.success("操作成功");
-            this.searchList();
-          } else {
-            this.$message.error(res.data.message);
-          }
-        })
-        .catch(error => {
-          loadding.close();
-          this.$message.error(error);
-        });
-    },
-    // // 刷新表格
-    // searchList() {
-    //  this.loading = true;
-    //   let res = await asyncRequest.list(this.parmValue);
-    //   if (res.code === 0 && res.data) {
-    //     this.tableData = res.data.list;
-    //     this.tableData.map((v1) => {
-    //       v1.addtime = v1.addtime.replaceAll(".000", "");
-    //       return v1;
-    //     });
-    //     this.count = Number(res.data.count);
-    //   } else {
-    //     this.tableData = [];
-    //     this.count = 0;
-    //   }
-    //   this.loading = false;
-    // },
-        restSearch() {
-      this.parmValue = {
-        status: "",
-        name: "", // 名称
-        page: 1, // 页码
-        size: 10, // 每页显示条数
-      };
-      this.searchList();
-    },
-    //新建/编辑/详情/审核
-    openModal(id, isDetail, approval, type) {
-      if (!type) {
-        return;
-      }
-      this.showModel = true;
-      this.modelId = id;
-      this.isDetail = isDetail;
-      this.approval = approval;
-    },
-    //删除
-    async deleteById(id) {
-      await this.$confirm("确定要删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          let res = await asyncRequest.delete({ id });
-          if (res.code === 0) {
-            this.$notify.success({
-              title: "删除成功",
-              message: "",
-            });
-            this.searchList();
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
-//提交审核申请
-    async again(id, type) {
-      if (!type) {
-        return;
-      }
-      await this.$confirm("确定要提交审核?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          let res = await asyncRequest.again({ id: id });
-          if (res.code === 0) {
-            this.$notify.success({
-              title: "提交成功",
-              message: "",
-            });
-            this.searchList();
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
-    //刷新表格
-    async searchList() {
-      this.loading = true;
-      let res = await asyncRequest.list(this.parmValue);
-      if (res.code === 0 && res.data) {
-        this.tableData = res.data.list;
-        this.tableData.map((v1) => {
-          v1.addtime = v1.addtime.replaceAll(".000", "");
-          return v1;
-        });
-        this.count = Number(res.data.count);
-      } else {
-        this.tableData = [];
-        this.count = 0;
-      }
-      this.loading = false;
-    },
-    async statusConfirm(id, status, ex_status, type) {
-      if (!type) {
-        return;
-      }
-      if (ex_status === "1") {
-        await this.$confirm(`确定要改为${status === "1" ? "禁用" : "启用"}?`, {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        })
-          .then(async () => {
-            this.loading = true;
-            const model = {
-              id: id,
-              status: status === "1" ? "0" : "1",
-            };
-            const res = await asyncRequest.status(model);
-            if (res.code === 0) {
-              this.loading = false;
-              this.$notify.success({
-                title: "状态修改成功!",
-                message: "",
-              });
-              await this.searchList();
-            } else {
-              this.loading = false;
-            }
-          })
-          .catch(() => {
-            console.log("取消");
-          });
-      } else {
-        if (status === "0") {
-          this.$message.warning("只有审核通过的规格,才能启用!");
-        }
-      }
-    },
-  }
-};
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 472
src/views/goodStore/goldPrice1/index.vue

@@ -1,472 +0,0 @@
-<template>
-  <div class="afterSale pagePadding">
-    <div
-      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
-    >
-      <el-row :gutter="10">
-        <el-col :span="24" style="padding: 0 0 18px 0">
-          <el-col :span="4">
-            <el-select
-              v-model="parmValue.status"
-              filterable
-              clearable
-              :size="searchSize"
-              placeholder="请选择状态"
-              style="width: 100%"
-            >
-              <el-option
-                v-for="item in statusList"
-                :key="'status' + item.code"
-                :label="item.name"
-                :value="item.code"
-              />
-            </el-select>
-          </el-col>
-          <el-col :span="4">
-            <el-input
-              :size="searchSize"
-              v-model="parmValue.name"
-              :maxlength="40"
-              placeholder="规格名称"
-            ></el-input>
-          </el-col>
-          <el-col :span="3" style="width: 152px">
-            <el-button
-              type="primary"
-              :size="searchSize"
-              @click="searchList"
-              icon="el-icon-search"
-            ></el-button>
-            <el-button
-              type="warning"
-              v-if="powers.some((item) => item == '024')"
-              :size="searchSize"
-              @click="restSearch"
-            >
-              重置
-            </el-button>
-          </el-col>
-          <el-col :span="3" style="width: 195px; float: right">
-            <el-button
-              v-if="powers.some((item) => item == '002')"
-              type="primary"
-              :size="searchSize"
-              style="float: right; margin-left: 5px"
-              @click="searchList"
-            >
-              刷新
-            </el-button>
-            <el-button
-              v-if="powers.some((item) => item == '003')"
-              :size="searchSize"
-              type="success"
-              style="float: right"
-              @click="openModal('add', false, false)"
-            >
-              添加
-            </el-button>
-          </el-col>
-        </el-col>
-      </el-row>
-      <el-table
-        :data="tableData"
-        stripe
-        v-loading="loading"
-        border
-        :size="size"
-        style="width: 100%"
-      >
-        <el-table-column
-          prop="spec_name"
-          label="规格名称"
-          show-overflow-tooltip
-          align="center"
-        ></el-table-column>
-        <el-table-column label="审核状态" show-overflow-tooltip align="center">
-          <template slot-scope="scope">
-            <el-tag
-              :size="tablebtnSize"
-              v-if="scope.row.ex_status === '0'"
-              :class="{
-                'hover-tag':
-                  scope.row.status === '0' &&
-                  powers.some((item) => item == '010'),
-              }"
-              :type="'warning'"
-              @click="
-                openModal(
-                  scope.row.id,
-                  false,
-                  true,
-                  scope.row.status === '0' &&
-                    powers.some((item) => item == '010')
-                )
-              "
-            >
-              <i
-                class="el-icon-thumb"
-                v-if="
-                  scope.row.status === '0' &&
-                  powers.some((item) => item == '010')
-                "
-                style="margin-right: 1px"
-              ></i>
-              {{ scope.row.ex_status_cn }}
-            </el-tag>
-            <el-tag
-              :size="tablebtnSize"
-              v-else-if="scope.row.ex_status === '1'"
-              :type="'success'"
-            >
-              {{ scope.row.ex_status_cn }}
-            </el-tag>
-            <el-tag
-              :size="tablebtnSize"
-              v-else-if="scope.row.ex_status === '2'"
-              :class="{
-                'hover-tag':
-                  scope.row.status === '0' &&
-                  powers.some((item) => item == '009'),
-              }"
-              :type="'danger'"
-              @click="
-                again(
-                  scope.row.id,
-                  scope.row.status === '0' &&
-                    powers.some((item) => item == '009')
-                )
-              "
-            >
-              <i
-                class="el-icon-thumb"
-                v-if="
-                  scope.row.status === '0' &&
-                  powers.some((item) => item == '009')
-                "
-                style="margin-right: 1px"
-              ></i>
-              {{ scope.row.ex_status_cn }}
-            </el-tag>
-            <el-tag
-              :size="tablebtnSize"
-              v-else-if="scope.row.ex_status === '3'"
-              :class="{
-                'hover-tag':
-                  scope.row.status === '0' &&
-                  powers.some((item) => item == '009'),
-              }"
-              :type="'info'"
-              @click="
-                again(
-                  scope.row.id,
-                  scope.row.status === '0' &&
-                    powers.some((item) => item == '009')
-                )
-              "
-            >
-              <i
-                class="el-icon-thumb"
-                v-if="
-                  scope.row.status === '0' &&
-                  powers.some((item) => item == '009')
-                "
-                style="margin-right: 1px"
-              ></i>
-              {{ scope.row.ex_status_cn }}
-            </el-tag>
-          </template>
-        </el-table-column>
-        <el-table-column label="状态" show-overflow-tooltip align="center">
-          <template slot-scope="scope">
-            <el-tag
-              v-if="scope.row.status === '1'"
-              type="success"
-              :class="{ 'hover-tag': powers.some((item) => item == '004') }"
-              :size="tablebtnSize"
-              @click="
-                statusConfirm(
-                  scope.row.id,
-                  scope.row.status,
-                  scope.row.ex_status,
-                  powers.some((item) => item == '004')
-                )
-              "
-            >
-              <i
-                class="el-icon-thumb"
-                v-if="powers.some((item) => item == '004')"
-                style="margin-right: 1px"
-              ></i>
-              启用</el-tag
-            >
-            <el-tag
-              v-else
-              :class="{ 'hover-tag': powers.some((item) => item == '004') }"
-              :size="tablebtnSize"
-              type="warning"
-              @click="
-                statusConfirm(
-                  scope.row.id,
-                  scope.row.status,
-                  scope.row.ex_status,
-                  powers.some((item) => item == '004')
-                )
-              "
-            >
-              <i
-                class="el-icon-thumb"
-                v-if="powers.some((item) => item == '004')"
-                style="margin-right: 1px"
-              ></i>
-              禁用</el-tag
-            >
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="addtime"
-          label="创建时间"
-          show-overflow-tooltip
-          align="center"
-        ></el-table-column>
-        <el-table-column fixed="right" label="操作" align="center">
-          <template slot-scope="scope">
-            <el-link
-              v-if="
-                (scope.row.status === '0' &&
-                  scope.row.ex_status === '3' &&
-                  powers.some((item) => item == '005')) ||
-                (scope.row.status === '0' &&
-                  scope.row.ex_status === '2' &&
-                  powers.some((item) => item == '005'))
-              "
-              type="primary"
-              style="margin: 0 4px"
-              :underline="false"
-              :size="tablebtnSize"
-              @click="openModal(scope.row.id, false, false, true)"
-            >
-              修改
-            </el-link>
-            <!-- <el-link
-            type="primary"
-              style="margin: 0 4px"
-              :underline="false"
-              :size="tablebtnSize"
-            @click="deleteById(scope.row.id)"
-          >
-            删除
-          </el-link> -->
-            <el-link
-              v-if="powers.some((item) => item == '007')"
-              type="primary"
-              style="margin: 0 4px"
-              :underline="false"
-              :size="tablebtnSize"
-              @click="openModal(scope.row.id, true, false, true)"
-            >
-              详情
-            </el-link>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div
-        class="Pagination"
-        style="text-align: right; margin-top: 10px"
-        v-show="count > 0"
-      >
-        <el-pagination
-          :size="searchSize"
-          @size-change="handleSizeChange"
-          @current-change="handlePageChange"
-          :current-page="parmValue.page"
-          :page-sizes="[10, 15, 20, 30, 40]"
-          :page-size="parmValue.size"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="count"
-        ></el-pagination>
-      </div>
-      <add-edit
-        :showModel="showModel"
-        :id="modelId"
-        :isApproval="approval"
-        :isDetail="isDetail"
-        @refresh="searchList"
-        @cancel="showModel = false"
-      ></add-edit>
-    </div>
-    <div v-else>
-      <no-auth></no-auth>
-    </div>
-  </div>
-</template>
-   <script>
-import mixinPage from "@/mixins/elPaginationHandle";
-import asyncRequest from "@/apis/service/goodStore/afterSale";
-import addEdit from "./addEdit";
-import statusList from "@/assets/js/statusList";
-import { mapGetters } from "vuex";
-export default {
-  name: "afterSale",
-  data() {
-    return {
-      statusList: statusList,
-      approval: false,
-      loading: true,
-      showModel: false,
-      isDetail: false,
-      modelId: 0,
-      parmValue: {
-        status: "",
-        name: "", // 名称
-        page: 1, // 页码
-        size: 10, // 每页显示条数
-      },
-      count: 0, // 总条数
-      tableData: [],
-    };
-  },
-  mixins: [mixinPage],
-  mounted() {
-    this.searchList();
-  },
-  components: {
-    addEdit,
-  },
-  computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "afterSale"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  methods: {
-    restSearch() {
-      this.parmValue = {
-        status: "",
-        name: "", // 名称
-        page: 1, // 页码
-        size: 10, // 每页显示条数
-      };
-      this.searchList();
-    },
-    openModal(id, isDetail, approval, type) {
-      if (!type) {
-        return;
-      }
-      this.showModel = true;
-      this.modelId = id;
-      this.isDetail = isDetail;
-      this.approval = approval;
-    },
-    async deleteById(id) {
-      await this.$confirm("确定要删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          let res = await asyncRequest.delete({ id });
-          if (res.code === 0) {
-            this.$notify.success({
-              title: "删除成功",
-              message: "",
-            });
-            this.searchList();
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
-
-    async again(id, type) {
-      if (!type) {
-        return;
-      }
-      await this.$confirm("确定要提交审核?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          let res = await asyncRequest.again({ id: id });
-          if (res.code === 0) {
-            this.$notify.success({
-              title: "提交成功",
-              message: "",
-            });
-            this.searchList();
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
-    async searchList() {
-      this.loading = true;
-      let res = await asyncRequest.list(this.parmValue);
-      if (res.code === 0 && res.data) {
-        this.tableData = res.data.list;
-        this.tableData.map((v1) => {
-          v1.addtime = v1.addtime.replaceAll(".000", "");
-          return v1;
-        });
-        this.count = Number(res.data.count);
-      } else {
-        this.tableData = [];
-        this.count = 0;
-      }
-      this.loading = false;
-    },
-    async statusConfirm(id, status, ex_status, type) {
-      if (!type) {
-        return;
-      }
-      if (ex_status === "1") {
-        await this.$confirm(`确定要改为${status === "1" ? "禁用" : "启用"}?`, {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        })
-          .then(async () => {
-            this.loading = true;
-            const model = {
-              id: id,
-              status: status === "1" ? "0" : "1",
-            };
-            const res = await asyncRequest.status(model);
-            if (res.code === 0) {
-              this.loading = false;
-              this.$notify.success({
-                title: "状态修改成功!",
-                message: "",
-              });
-              await this.searchList();
-            } else {
-              this.loading = false;
-            }
-          })
-          .catch(() => {
-            console.log("取消");
-          });
-      } else {
-        if (status === "0") {
-          this.$message.warning("只有审核通过的规格,才能启用!");
-        }
-      }
-    },
-  },
-};
-</script>
-   <style lang="scss" scoped>
-.afterSale {
-}
-</style>
-   

+ 0 - 0
src/views/goodStore/goldPrice1/实时金价