<template>
  <div>
    <el-card class="el-card">
      <el-form  v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<!--        <el-row>-->
<!--          <el-col :span="8">-->
<!--            <el-form-item class="query-form-item" label="物资名称:">-->
<!--              <el-input v-model="filterQuery.productName" placeholder="清输入物资名称" style="width: 90%" clearable></el-input>-->
<!--            </el-form-item>-->
<!--          </el-col>-->

<!--          <el-col :span="8">-->
<!--            <el-form-item class="query-form-item" label="规格型号:">-->
<!--              <el-input v-model="filterQuery.ggxh" placeholder="清输入规格型号" style="width: 90%" clearable></el-input>-->
<!--            </el-form-item>-->
<!--          </el-col>-->
<!--          <el-col :span="8">-->
<!--            <el-form-item class="query-form-item" label="预警类型:">-->
<!--              <el-select v-model="filterQuery.type"-->
<!--                         placeholder="请选择消息状态"-->
<!--                         clearable-->
<!--                         style="width: 90%"-->
<!--              >-->
<!--                <el-option label="库存不足预警" :value="1"></el-option>-->
<!--                <el-option label="负库存预警" :value="2"></el-option>-->
<!--                <el-option label="库存积压预警" :value="3"></el-option>-->
<!--                <el-option label="库存过期预警" :value="4"></el-option>-->
<!--                <el-option label="近效期预警" :value="5"></el-option>-->
<!--              </el-select>-->
<!--            </el-form-item>-->
<!--          </el-col>-->

<!--          &lt;!&ndash;          <el-col :span="8">&ndash;&gt;-->
<!--          &lt;!&ndash;            <el-form-item class="query-form-item" label="批次号:">&ndash;&gt;-->
<!--          &lt;!&ndash;              <el-input v-model="filterQuery.batchNo" placeholder="批次号"&ndash;&gt;-->
<!--          &lt;!&ndash;                        style="width: 90%"&ndash;&gt;-->
<!--          &lt;!&ndash;                        clearable="true"></el-input>&ndash;&gt;-->
<!--          &lt;!&ndash;            </el-form-item>&ndash;&gt;-->
<!--          &lt;!&ndash;          </el-col>&ndash;&gt;-->
<!--        </el-row>-->

<!--        <el-row>-->


<!--          <el-col :span="8">-->
<!--            <el-form-item class="query-form-item" label="状态:">-->
<!--              <el-select v-model="filterQuery.status"-->
<!--                         placeholder="请选择消息状态"-->
<!--                         clearable-->
<!--                         style="width: 90%"-->
<!--              >-->
<!--                <el-option label="未确认" :value="1"></el-option>-->
<!--                <el-option label="已确认" :value="2"></el-option>-->
<!--              </el-select>-->
<!--            </el-form-item>-->
<!--          </el-col>-->

<!--          &lt;!&ndash;          <el-col :span="6">&ndash;&gt;-->
<!--          &lt;!&ndash;            <el-form-item class="query-form-item" label="忽略状态:">&ndash;&gt;-->
<!--          &lt;!&ndash;              <el-select v-model="filterQuery.ignoreStatus"&ndash;&gt;-->
<!--          &lt;!&ndash;                         placeholder="请选择消息忽略状态"&ndash;&gt;-->
<!--          &lt;!&ndash;                         clearable&ndash;&gt;-->
<!--          &lt;!&ndash;                         style="width: 90%"&ndash;&gt;-->
<!--          &lt;!&ndash;              >&ndash;&gt;-->
<!--          &lt;!&ndash;                <el-option label="不忽略" :value="0"></el-option>&ndash;&gt;-->
<!--          &lt;!&ndash;                <el-option label="忽略7天" :value="1"></el-option>&ndash;&gt;-->
<!--          &lt;!&ndash;                <el-option label="忽略15天" :value="2"></el-option>&ndash;&gt;-->
<!--          &lt;!&ndash;                <el-option label="忽略30天" :value="3"></el-option>&ndash;&gt;-->
<!--          &lt;!&ndash;              </el-select>&ndash;&gt;-->
<!--          &lt;!&ndash;            </el-form-item>&ndash;&gt;-->
<!--          &lt;!&ndash;          </el-col>&ndash;&gt;-->
<!--        </el-row>-->
        <el-row style=" display:flex;  flex-wrap: wrap; ">
          <template v-for="(item, index) in queryList" >
            <el-form-item v-if="item.columnType == 'input' && item.columnName !='queryName' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
              <el-input
                v-model="filterQuery[item.columnName]"
                :placeholder="item.columnDesc"
                :disabled="executeEval(null,item.disabledFuc,false)"
                @keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
                clearable
              ></el-input>
            </el-form-item>
            <el-form-item v-if="item.columnType == 'input' && item.columnName =='queryName' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
              <el-autocomplete
                class="inline-input"
                style="width: 90%"
                v-model="queryName"
                :fetch-suggestions="queryProductName"
                placeholder="请输入内容"
                clearable
                @select="handleSelect"
                @clear="clearQueryProduct"
              ></el-autocomplete>
            </el-form-item>
            <el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
              <el-select v-model="filterQuery[item.columnName]"
                         :placeholder="item.columnDesc"
                         @change="executeFuc($event,'5',item.checkRules)"
                         :disabled="executeEval(null,item.disabledFuc,false)"
                         clearable>
                <el-option
                  v-for="dict in item.lableRuleObj"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
                <span style="float: left">{{ item.name }}</span>
                <span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
              </el-select>
            </el-form-item>
            <el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
              <el-select
                v-model="filterQuery[item.columnName]"
                :placeholder="item.columnDesc"
                :disabled="executeEval(null,item.disabledFuc,false)"
                filterable
                remote
                @change="executeFuc($event,'5',item.checkRules)"
                :remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
                clearable>
                <el-option
                  v-for="item in options[item.clickFuc]"
                  :key="item.code"
                  :label="item.label"
                  :value="item.code"
                />
                <span style="float: left">{{ item.name }}</span>
                <span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
              </el-select>
            </el-form-item>
            <el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
              <el-date-picker
                :picker-options="pickerOptions"
                v-model="actDateRange"
                type="daterange"
                format="yyyy 年 MM 月 dd 日"
                value-format="yyyy-MM-dd"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
              ></el-date-picker>
            </el-form-item>
            <el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
              <el-date-picker
                v-model="filterQuery[item.columnName]"
                :style="`width:${item.width+'px'}`"
                value-format="yyyy-MM-dd"
                :disabled="executeEval(null,item.disabledFuc,false)"
                type="date"
                :placeholder="item.columnDesc"
              ></el-date-picker>
            </el-form-item>
          </template>
        </el-row>
      </el-form>

      <div class="top-right-btn">
        <el-button-group>
          <el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
          <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
          <el-button type="primary" @click.native="search" icon="el-icon-search">查询</el-button>
        </el-button-group>
      </div>
      <el-divider style="margin: 15px"></el-divider>

      <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<!--        <el-table-column type="index" label="序号" width="50"></el-table-column>-->
<!--        <el-table-column label="物资名称" prop="productName" width="180" show-overflow-tooltip></el-table-column>-->
<!--        <el-table-column label="规格型号" prop="ggxh" width="180" show-overflow-tooltip></el-table-column>-->
<!--        &lt;!&ndash;        <el-table-column label="批次号" prop="batchNo" width="120" show-overflow-tooltip></el-table-column>&ndash;&gt;-->
<!--        <el-table-column label="预警次数" prop="remindCount" width="120" show-overflow-tooltip></el-table-column>-->
<!--        <el-table-column label="预警类型" prop="productionDate" width="120">-->
<!--          <template slot-scope="scope">-->
<!--            <el-tag type="danger">{{ typeMap[scope.row.type] }}</el-tag>-->
<!--          </template>-->
<!--        </el-table-column>-->
<!--        <el-table-column label="预警详情" prop="msg" width="250" show-overflow-tooltip></el-table-column>-->
<!--        <el-table-column label="状态" prop="status" width="120">-->
<!--          <template slot-scope="scope">-->
<!--            <el-tag :type="statusFilterType(scope.row.status)">{{-->
<!--                statusMap[scope.row.status]-->
<!--              }}-->
<!--            </el-tag>-->
<!--          </template>-->
<!--        </el-table-column>-->
<!--        <el-table-column label="处理结果" prop="handleMsg" width="200" show-overflow-tooltip></el-table-column>-->
<!--        &lt;!&ndash;        <el-table-column label="忽略预警" prop="ignoreStatus" width="100">&ndash;&gt;-->
<!--        &lt;!&ndash;          <template slot-scope="scope">&ndash;&gt;-->
<!--        &lt;!&ndash;            <el-tag>{{ ignoreStatusMap[scope.row.ignoreStatus] }}</el-tag>&ndash;&gt;-->
<!--        &lt;!&ndash;          </template>&ndash;&gt;-->
<!--        &lt;!&ndash;        </el-table-column>&ndash;&gt;-->

<!--        &lt;!&ndash;        <el-table-column label="入库数量" prop="inCount" width="100"></el-table-column>&ndash;&gt;-->
<!--        &lt;!&ndash;        <el-table-column label="出库数量" prop="outCount" width="100"></el-table-column>&ndash;&gt;-->
<!--        <el-table-column label="库存数量" prop="reCount" width="100"></el-table-column>-->
<!--        &lt;!&ndash;        <el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>&ndash;&gt;-->
<!--        &lt;!&ndash;        <el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>&ndash;&gt;-->
<!--        &lt;!&ndash;        <el-table-column label="供应商" prop="supName" width="150" show-overflow-tooltip></el-table-column>&ndash;&gt;-->
<!--        <el-table-column label="生产企业" prop="manufactory" width="150" show-overflow-tooltip></el-table-column>-->
<!--        <el-table-column label="注册备案证号" prop="zczbhhzbapzbh" width="150" show-overflow-tooltip></el-table-column>-->
<!--        <el-table-column label="操作" width="100" fixed="right">-->
<!--          <template slot-scope="scope">-->
<!--            <el-button-->
<!--              type="text"-->
<!--              size="small"-->
<!--              v-if="scope.row.status === 1"-->
<!--              @click.native="confirmMsg(scope.row)"-->
<!--            >确认-->
<!--            </el-button>-->
<!--            &lt;!&ndash;            <el-button&ndash;&gt;-->
<!--            &lt;!&ndash;              type="text"&ndash;&gt;-->
<!--            &lt;!&ndash;              size="small"&ndash;&gt;-->
<!--            &lt;!&ndash;              v-if="scope.row.ignoreStatus === 0"&ndash;&gt;-->
<!--            &lt;!&ndash;              @click.native="ignoreMsg(scope.row)"&ndash;&gt;-->
<!--            &lt;!&ndash;            >忽略&ndash;&gt;-->
<!--            &lt;!&ndash;            </el-button>&ndash;&gt;-->
<!--          </template>-->
<!--        </el-table-column>-->
        <template v-for="(item, index) in tableHeader">
          <el-table-column
            v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
            type="index" :label="item.columnDesc"></el-table-column>
          <el-table-column
            v-if="item.columnType == 'selection'"
            type="selection"
            :width="item.width"
            :selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
          ></el-table-column>

          <el-table-column
            v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
            :prop="item.columnName"
            :label="item.columnDesc"
            :sortable="item.sort"
            :width="item.width"
            :show-overflow-tooltip="item.tooltip"
            :key="item.columnName"
          >
            <template  slot-scope="scope">
              <el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
            </template>
          </el-table-column>
          <el-table-column
            v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
            :prop="item.columnName"
            :label="item.columnDesc"
            :sortable="item.sort"
            :width="item.width"
            :show-overflow-tooltip="item.tooltip"
            :key="item.columnName"
          >
            <template   slot-scope="scope">
              <span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
            </template>
          </el-table-column>
          <el-table-column
            v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
            :prop="item.columnName"
            :label="item.columnDesc"
            :sortable="item.sort"
            :width="item.width"
            :show-overflow-tooltip="item.tooltip"
            :key="item.columnName"
          >
            <template   slot-scope="scope">
              <el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
                <span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
              </el-tag>
            </template>
          </el-table-column>
          <el-table-column
            v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
            :prop="item.columnName"
            :label="item.columnDesc"
            :width="item.width"
            :key="item.columnName"
            fixed="right"
          >
            <template slot-scope="scope">
              <el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
                         :type="buttonItem.type"
                         :size="buttonItem.size"
                         :style="buttonItem.style"
                         :key="buttonItem"
                         v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
                         :disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
                         @click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
              >{{ buttonItem.name }}
              </el-button>
            </template>
          </el-table-column>
          <el-table-column
            v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
            :prop="item.columnName"
            :label="item.columnDesc"
            :sortable="item.sort"
            :width="item.width"
            :show-overflow-tooltip="item.tooltip"
            :key="item.columnName"
          >
            <template slot-scope="scope">
              <span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
            </template>
          </el-table-column>
        </template>
      </el-table>
      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="filterQuery.page"
        :limit.sync="filterQuery.limit"
        @pagination="getList"
      />
    </el-card>


    <!--  忽略预警弹窗  -->
    <el-dialog
      v-if="ignoreVisible"
      title="忽略预警"
      :visible.sync="ignoreVisible"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      width="30%"
      top="5vh"
    >
      <el-row>
        <el-button type="primary" size="medium" style="margin-left: 20%; margin-right: 20px;" @click="ignore(1)">
          忽略7天
        </el-button>
        <el-button type="success" size="medium" style="margin-right: 20px;" @click="ignore(2)">忽略15天</el-button>
        <el-button type="warning" size="medium" style="margin-right: 20px;" @click="ignore(3)">忽略30天</el-button>
      </el-row>
    </el-dialog>


    <el-dialog
      v-if="confirmVisible"
      title="预警消息处理"
      :visible.sync="confirmVisible"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      width="65%"
      top="5vh"
    >

      <el-form :model="confirmQuery" label-width="100px" style="margin-bottom: -15px">
        <el-row>
          <el-col :span="10">
            <el-form-item class="query-form-item" label="物资名称:">
              <el-input v-model="confirmQuery.productName" style="width: 90%" :disabled="true"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="10">
            <el-form-item class="query-form-item" label="规格型号:">
              <el-input v-model="confirmQuery.ggxh" style="width: 90%" :disabled="true"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="10">
            <el-form-item class="query-form-item" label="预警次数:">
              <el-input v-model="confirmQuery.remindCount" style="width: 90%" :disabled="true"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="10">
            <el-form-item class="query-form-item" label="预警类型:">
              <el-select v-model="confirmQuery.type" style="width: 90%" placeholder="请选择处理状态" disabled>
                <el-option label="库存不足预警" :value="1"></el-option>
                <el-option label="负库存预警" :value="2"></el-option>
                <el-option label="库存积压预警" :value="3"></el-option>
                <el-option label="库存过期预警" :value="4"></el-option>
                <el-option label="近效期预警" :value="5"></el-option>
              </el-select>

            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-form-item label="预警详情:" prop="msg">
            <el-input v-model="confirmQuery.msg" auto-complete="off" type="textarea" disabled autosize></el-input>
          </el-form-item>
        </el-row>
        <el-row>
          <el-form-item label="处理方式:" prop="handleMsg">
            <el-input v-model="confirmQuery.handleMsg" auto-complete="off" type="textarea" autosize></el-input>
          </el-form-item>
        </el-row>

      </el-form>

      <div slot="footer" class="dialog-footer">
        <el-button @click.native="closeDialog">取消</el-button>
        <el-button type="primary" @click.native="postConfirm()"
        >提交
        </el-button>
      </div>
    </el-dialog>

  </div>
</template>

<script>
import {getInvRemindMsgList, confirmMsg, ignoreMsg} from "@/api/system/invRemindMsg";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getInvSpaceList} from "@/api/inventory/invSpace";
import {filterProductNames} from "@/api/inventory/invPorduct";
import {getGgxhList} from "@/api/basic/product/udiRelevance";
import {
  getHead,executeFuc
} from "@/utils/customConfig";

export default {
  name: "invRemindMsg",
  data() {
    return {
      showSearch: true,
      filterQuery: {
        productName: null,
        relId: null,
        batchNo: null,
        ggxh: null,
        status: "1",
        ignoreStatus: "0",
        invCode: this.$store.getters.locInvCode,
        invSpaceCode: null,
        type: null,
        page: 1,
        limit: 20,
      },
      list: [],
      total: 0,
      loading: true,
      index: null,
      statusMap: {
        1: "未处理",
        2: "已处理"
      },
      typeMap: {
        1: "库存不足预警",
        2: "负库存预警",
        3: "库存积压预警",
        4: "库存过期预警",
        5: "近效期预警"
      },
      ignoreStatusMap: {
        0: "不忽略",
        1: "忽略7天",
        2: "忽略15天",
        3: "忽略30天"
      },
      queryName: null,
      invList: [],
      spaceList: [],
      ggxhList: [],
      tableHeader:[],
      queryList:[],
      fromList:[],

      options: {
      },
      ignoreVisible: false,
      currentId: null,
      confirmVisible: false,
      confirmQuery: {},
    };
  },
  methods: {
    hideSearch() {
      this.showSearch = !this.showSearch;
    },
    onReset() {
      this.$router.push({
        path: "",
      });
      this.filterQuery = {
        productName: null,
        relId: null,
        batchNo: null,
        ggxh: null,
        status: 1,
        ignoreStatus: 0,
        invCode: this.$store.getters.locInvCode,
        invSpaceCode: null,
        type: null,
        page: 1,
        limit: 20,
      };
      this.getList();
    },
    search() {
      this.filterQuery.page = 1;
      this.getList();
    },
    getList() {
      this.loading = true;
      getInvRemindMsgList(this.filterQuery)
        .then((response) => {
          this.loading = false;
          if (response.code === 20000) {
            this.list = response.data.list || [];
            this.total = response.data.total || 0;
          } else {
            this.list = [];
            this.total = 0;
          }
        })
        .catch(() => {
          this.loading = false;
          this.list = [];
          this.total = 0;
        });
    },
    invChange() {
      this.spaceList = [];
      this.filterQuery.invSpaceCode = null;
      this.getSpaceList();
      this.getList();
    },
    getInvList() {
      getInvListByUser()
        .then((response) => {
          this.invList = response.data || [];
          this.getSpaceList();
          this.getList();
        })
        .catch(() => {
        });
    },
    getSpaceList() {
      let params = {invWarehouseCode: this.filterQuery.invCode, status: 1};
      getInvSpaceList(params).then((res) => {
        this.spaceList = res.data.list || [];
      })
    },
    invSpaceChange() {
      this.clearProduct();
      let params = {
        cpmctymc: this.filterQuery.cpmctymc,
        invCode: this.filterQuery.invCode,
        invSpaceCode: this.filterQuery.invSpaceCode
      };
      filterProductNames(params).then((res) => {
        this.productList = res.data.list || [];
      })
    },
    clearProduct() {
      this.filterQuery.relId = null;
      this.queryName = null;
      this.filterQuery.ggxh = null;
      this.ggxhList = [];
      this.productList = null;
    },
    queryProductName(productName, cb) {
      let params = {
        cpmctymc: productName,
        invCode: this.filterQuery.invCode,
        invSpaceCode: this.filterQuery.invSpaceCode
      };
      filterProductNames(params).then((res) => {
        let productList = res.data.list || [];
        let results = productName ? productList.filter(this.createFilter(productName)) : productList;
        let rs = [];
        results.forEach(item => {
          let data = {value: item.cpmctymc, relId: item.relIdFk}
          rs.push(data);
        });
        cb(rs);
      })
    },
    createFilter(queryString) {
      return (productList) => {
        return productList.cpmctymc.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
      }
    },
    handleSelect(item) {
      this.queryName = item.value;
      this.filterQuery.relId = item.relId;
      let params = {relId: item.relId};
      getGgxhList(params).then((res) => {
        this.ggxhList = res.data || [];
      });
    },
    clearQueryProduct() {
      this.queryName = null;
      this.filterQuery.relId = null;
    },
    confirmMsg(_this,row) {
      _this.confirmVisible = true;
      _this.confirmQuery = row;
    },
    postConfirm() {
      confirmMsg(this.confirmQuery).then((res) => {
        if (res.code === 20000) {
          this.confirmVisible = false;
          this.$message.success("已确认");
          this.getList();
        } else {
          this.$message.error(res.message);
        }
      })
    },

    closeDialog() {
      this.confirmVisible = false;
    },


    ignoreMsg(row) {
      this.ignoreVisible = true;
      this.currentId = row.id;
    },
    ignore(type) {
      this.ignoreVisible = false;
      let params = {
        id: this.currentId,
        ignoreStatus: type
      };
      ignoreMsg(params).then((res) => {
        this.currentId = null;
        if (res.code === 20000) {
          this.$message.success("已忽略预警");
          this.getList();
        } else {
          this.$message.error(res.message);
        }
      }).catch(() => {
        this.currentId = null;
      })
    },


    statusFilterType(status) {
      const statusMap = {
        1: "warning",
        2: "success",
      };
      return statusMap[status];
    },
    executeFuc(row,type,clickFuc,value){
      return executeFuc(this,row,type,clickFuc,value);
    },
    executeEval(row,expression,defaultRet){
      if(expression){
        return eval(expression);
      }
      return defaultRet;
    }
  },
  created() {
    this.getInvList();
    // 加载表格数据
    getHead("supInvRemindMsg","1").then((re) => {
      // 处理返回的数据
      this.tableObj = re.data;
      this.tableHeader = re.data.tableList;
      this.queryList = re.data.queryList;
      this.fromList = re.data.fromList;
      this.getList();
    });
  },
};
</script>

