<template>
  <div class="page">
    <LayoutTable :data="tableData" :config="tableConfig" notAdd notDel />
  </div>
</template>

<script>
import table from "@/assets/mixins/table";

export default {
  components: {},
  mixins: [table],
  created() {},
  methods: {
    async handFlow(row) {
      try {
        this.$post("/member/view", { id: row.memberId }).then(({ data }) => {
          if (data.entity) {
            this.$router.push({
              path: "/task/process/list",
              query: {
                "query.openId": data.entity.openId,
              },
            });
          }
        });
      } catch (error) {
        this.$message.error(error.message);
      }
    },
  },
  data() {
    return {
      config: {
        search: [],
        columns: [
          { label: "流程实例id", prop: "processInstanceId" },
          {
            label: "微信用户openId",
            prop: "openId",
            formatter: this.formatterString,
          },
    
          { label: "办理方式", prop: "isAgent", formatter: this.formatter },
          { label: "邮寄地址", prop: "address" },
          { label: "联系人", prop: "linkman" },
          { label: "联系电话", prop: "phone" },
          { label: "取件方式", prop: "manner", formatter: this.formatter },
          { label: "取件码", prop: "getnum" },
          { label: "快递单号", prop: "number" },
          { label: "是否撤销", prop: "isRevoke", formatter: this.formatter },
          { label: "站点ID", prop: "siteid" },
          { label: "审批状态", prop: "status", formatter: this.formatter },
          {
            label: "创建时间",
            prop: "createTime",
            formatter: this.formatterDate,
          },
          {
            label: "操作",
            width: 180,
            formatter: (row) => {
              return (
                <div>
                  <el-button
                    size="mini"
                    icon="el-icon-edit-outline"
                    size="mini"
                    onClick={() => {
                      this.handFlow(row);
                    }}
                  >
                    审核流程
                  </el-button>

                  <span> </span>
                </div>
              );
            },
          },
        ],
      },
    };
  },
};
</script>