品牌店铺和市场
This commit is contained in:
		
							parent
							
								
									4db5bd6e02
								
							
						
					
					
						commit
						bc5bb0414f
					
				| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
import $http from "@/utils/httpRequest.js";
 | 
			
		||||
//代理商
 | 
			
		||||
//代理商和品牌
 | 
			
		||||
export const agent = {
 | 
			
		||||
  //商铺列表
 | 
			
		||||
  //代理商商铺列表
 | 
			
		||||
  agentShopPage: (data) => {
 | 
			
		||||
    return $http.request({
 | 
			
		||||
      url: `/merchant-api/agent/shop/page`,
 | 
			
		||||
| 
						 | 
				
			
			@ -9,7 +9,7 @@ export const agent = {
 | 
			
		|||
      params: data,
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  //市场列表
 | 
			
		||||
  //代理商市场列表
 | 
			
		||||
  agentMarketPage: (data) => {
 | 
			
		||||
    return $http.request({
 | 
			
		||||
      url: `/merchant-api/agent/market/page`,
 | 
			
		||||
| 
						 | 
				
			
			@ -17,4 +17,20 @@ export const agent = {
 | 
			
		|||
      params: data,
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  //品牌商铺列表
 | 
			
		||||
  brandStorePage: (data) => {
 | 
			
		||||
    return $http.request({
 | 
			
		||||
      url: `/merchant-api/brand/shop/page`,
 | 
			
		||||
      method: "get",
 | 
			
		||||
      params: data,
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  //品牌市场列表
 | 
			
		||||
  brandMarketPage: (data) => {
 | 
			
		||||
    return $http.request({
 | 
			
		||||
      url: `/merchant-api/brand/market/page`,
 | 
			
		||||
      method: "get",
 | 
			
		||||
      params: data,
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,6 +38,19 @@ export default {
 | 
			
		|||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "市场列表",
 | 
			
		||||
          url: "operation-management/market-list/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-shopping-cart-full",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
| 
						 | 
				
			
			@ -51,6 +64,19 @@ export default {
 | 
			
		|||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "品牌店铺",
 | 
			
		||||
          url: "operation-management/brand-store/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-shopping-cart-full",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
| 
						 | 
				
			
			@ -104,6 +130,19 @@ export default {
 | 
			
		|||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "订单管理",
 | 
			
		||||
          url: "operation-management/brand-order/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-menu",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
| 
						 | 
				
			
			@ -435,19 +474,6 @@ export default {
 | 
			
		|||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "市场列表",
 | 
			
		||||
          url: "agent/market-list/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-shopping-cart-full",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -175,8 +175,10 @@ export function getMenu(role) {
 | 
			
		|||
  } else if (role == "ROLE_BRAND_MANAGER") {
 | 
			
		||||
    return [
 | 
			
		||||
      "operation-management",
 | 
			
		||||
      "operation-management/shop-list/index",
 | 
			
		||||
      "operation-management/order/index",
 | 
			
		||||
      // "operation-management/shop-list/index",
 | 
			
		||||
      "operation-management/brand-store/index",
 | 
			
		||||
      // "operation-management/order/index",
 | 
			
		||||
      "operation-management/brand-order/index",
 | 
			
		||||
      "operation-management/role/index",
 | 
			
		||||
      "datacenter",
 | 
			
		||||
      "datacenter/customer-analysis/index",
 | 
			
		||||
| 
						 | 
				
			
			@ -192,7 +194,9 @@ export function getMenu(role) {
 | 
			
		|||
    return [
 | 
			
		||||
      "operation-management",
 | 
			
		||||
      "operation-management/shop-list/index",
 | 
			
		||||
      "operation-management/order/index",
 | 
			
		||||
      "operation-management/market-list/index",
 | 
			
		||||
      // "operation-management/order/index",
 | 
			
		||||
      "operation-management/brand-order/index",
 | 
			
		||||
      "operation-management/role/index",
 | 
			
		||||
      "datacenter",
 | 
			
		||||
      "datacenter/customer-analysis/index",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    品牌订单
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style>
 | 
			
		||||
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,222 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div style="height: calc(100vh - 200px)">
 | 
			
		||||
    <obj-table-plus
 | 
			
		||||
      ref="oTable"
 | 
			
		||||
      style="height: 100%"
 | 
			
		||||
      :tableCols="tableCols"
 | 
			
		||||
      :tableProp="tableProp"
 | 
			
		||||
      @query="queryList"
 | 
			
		||||
      v-model="dataList"
 | 
			
		||||
      :tableEvent="tableEvent"
 | 
			
		||||
      :enableAutoQuery="false"
 | 
			
		||||
    >
 | 
			
		||||
      <template slot="tableTop">
 | 
			
		||||
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
 | 
			
		||||
          <el-form-item label="摊铺名称">
 | 
			
		||||
            <el-input
 | 
			
		||||
              v-model="formInline.name"
 | 
			
		||||
              placeholder="摊铺名称搜索"
 | 
			
		||||
            ></el-input>
 | 
			
		||||
          </el-form-item>
 | 
			
		||||
          <el-form-item>
 | 
			
		||||
            <el-button type="primary" @click="$refs.oTable.reload()"
 | 
			
		||||
              >查询</el-button
 | 
			
		||||
            >
 | 
			
		||||
            <el-button type="primary" @click="Reset">重置</el-button>
 | 
			
		||||
          </el-form-item>
 | 
			
		||||
        </el-form>
 | 
			
		||||
        <div class="mb-2"></div>
 | 
			
		||||
      </template>
 | 
			
		||||
    </obj-table-plus>
 | 
			
		||||
    <!-- 查看详情 -->
 | 
			
		||||
    <viewDetails ref="viewDetails"></viewDetails>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import viewDetails from "./popup/view-details.vue";
 | 
			
		||||
import { mapState } from "vuex";
 | 
			
		||||
export default {
 | 
			
		||||
  components: { viewDetails },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      dataList: [],
 | 
			
		||||
      formInline: {
 | 
			
		||||
        name: "",
 | 
			
		||||
      },
 | 
			
		||||
      tableProp: {
 | 
			
		||||
        "auto-resize": true,
 | 
			
		||||
        border: true,
 | 
			
		||||
        height: "auto",
 | 
			
		||||
        "row-id": "id",
 | 
			
		||||
        "show-overflow": false,
 | 
			
		||||
      },
 | 
			
		||||
      productFilterType: "SALE",
 | 
			
		||||
      selectList: [],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    this.$nextTick(() => {
 | 
			
		||||
      this.$refs.oTable.reload();
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    Reset() {
 | 
			
		||||
      this.formInline = {
 | 
			
		||||
        name: "",
 | 
			
		||||
      };
 | 
			
		||||
      this.$refs.oTable.reload();
 | 
			
		||||
    },
 | 
			
		||||
    queryList(pageNo, pageSize) {
 | 
			
		||||
      this.$api.agent
 | 
			
		||||
        .brandStorePage({
 | 
			
		||||
          pageNumber: pageNo,
 | 
			
		||||
          pageSize: pageSize,
 | 
			
		||||
          brandId: JSON.parse(sessionStorage.getItem("userInfo")).brandId,
 | 
			
		||||
        })
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          console.log(res);
 | 
			
		||||
          this.$refs.oTable.complete(
 | 
			
		||||
            res.data.data.content,
 | 
			
		||||
            Number(res.data.data.totalElements)
 | 
			
		||||
          );
 | 
			
		||||
        })
 | 
			
		||||
        .catch((err) => {
 | 
			
		||||
          this.$refs.oTable.complete(false);
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    tableCols() {
 | 
			
		||||
      return [
 | 
			
		||||
        { type: "checkbox", width: "60px", fixed: "left" },
 | 
			
		||||
        // { type: "seq", width: "60px", align: "center", title: "序号" },
 | 
			
		||||
        {
 | 
			
		||||
          title: "摊位名称",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "name",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "菜市场名称",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "marketName",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "地址",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "address",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "经纬度",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "category",
 | 
			
		||||
          type: "jsx",
 | 
			
		||||
          render: ({ row }) => {
 | 
			
		||||
            return (
 | 
			
		||||
              <span>
 | 
			
		||||
                经度:{row.longitude}; 维度:{row.latitude}
 | 
			
		||||
              </span>
 | 
			
		||||
            );
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "营业执照",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "couponType",
 | 
			
		||||
          type: "jsx",
 | 
			
		||||
          render: ({ row }) => {
 | 
			
		||||
            return (
 | 
			
		||||
              <el-image
 | 
			
		||||
                preview-src-list={[row.license]}
 | 
			
		||||
                src={row.license}
 | 
			
		||||
              ></el-image>
 | 
			
		||||
            );
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "评分",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "score",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "收藏数量",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "collectCount",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "点赞数量",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "likeItCount",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "平台结算比例",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "platformSettleRatio",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "代理商结算比例",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "agentSettleRatio",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "加入时间",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "createTime",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "状态",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "status",
 | 
			
		||||
          type: "jsx",
 | 
			
		||||
          width: "120px",
 | 
			
		||||
          render: ({ row }) => {
 | 
			
		||||
            if (row.status == 1) {
 | 
			
		||||
              return <span>开</span>;
 | 
			
		||||
            } else {
 | 
			
		||||
              return <span>关</span>;
 | 
			
		||||
            }
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "操作",
 | 
			
		||||
          fixed: "right",
 | 
			
		||||
          type: "jsx",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          width: "140px",
 | 
			
		||||
          render: (row) => {
 | 
			
		||||
            let edit = () => {
 | 
			
		||||
              this.$refs.viewDetails.toggle(row).update();
 | 
			
		||||
            };
 | 
			
		||||
            return (
 | 
			
		||||
              <div>
 | 
			
		||||
                <el-button size="mini" type="primary" onClick={edit}>
 | 
			
		||||
                  详情
 | 
			
		||||
                </el-button>
 | 
			
		||||
              </div>
 | 
			
		||||
            );
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
      ];
 | 
			
		||||
    },
 | 
			
		||||
    tableEvent() {
 | 
			
		||||
      return {
 | 
			
		||||
        "checkbox-all": ({ records, reserves }) => {
 | 
			
		||||
          this.selectList = [...records, ...reserves];
 | 
			
		||||
        },
 | 
			
		||||
        "checkbox-change": ({ records, reserves }) => {
 | 
			
		||||
          this.selectList = [...records, ...reserves];
 | 
			
		||||
        },
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
    ...mapState("userData", [
 | 
			
		||||
      "isMerchant",
 | 
			
		||||
      "marketList",
 | 
			
		||||
      "storeList",
 | 
			
		||||
      "marketId",
 | 
			
		||||
      "shopId",
 | 
			
		||||
    ]),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped></style>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,243 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <obj-modal
 | 
			
		||||
      ref="modal"
 | 
			
		||||
      labelWidth="150px"
 | 
			
		||||
      :modalConfig="modalConfig"
 | 
			
		||||
      :modalData="modalData"
 | 
			
		||||
      :modalHandles="modalHandles"
 | 
			
		||||
    >
 | 
			
		||||
      <div slot="dialog__content">
 | 
			
		||||
        <el-form
 | 
			
		||||
          :model="ruleForm"
 | 
			
		||||
          ref="ruleForm"
 | 
			
		||||
          label-width="150px"
 | 
			
		||||
          class="demo-ruleForm"
 | 
			
		||||
        >
 | 
			
		||||
          <el-row>
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="摊位名称:">
 | 
			
		||||
                <span>{{ ruleForm.name }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="所在菜市场:">
 | 
			
		||||
                <span>{{ ruleForm.marketName }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="状态:">
 | 
			
		||||
                <span>{{ ruleForm.status == 0 ? "禁用" : "启用" }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
          </el-row>
 | 
			
		||||
          <el-row>
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="地址:">
 | 
			
		||||
                <span>{{ ruleForm.address }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="经度:">
 | 
			
		||||
                <span>{{ ruleForm.longitude }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="纬度:">
 | 
			
		||||
                <span>{{ ruleForm.latitude }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
          </el-row>
 | 
			
		||||
          <el-row>
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="营业执照:">
 | 
			
		||||
                <el-image
 | 
			
		||||
                  style="width: 100px; height: 100px"
 | 
			
		||||
                  :src="ruleForm?.license"
 | 
			
		||||
                  :preview-src-list="[ruleForm.license]"
 | 
			
		||||
                >
 | 
			
		||||
                </el-image> </el-form-item
 | 
			
		||||
            ></el-col>
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="身份证人像面:">
 | 
			
		||||
                <el-image
 | 
			
		||||
                  style="width: 100px; height: 100px"
 | 
			
		||||
                  :src="ruleForm.idCardFace"
 | 
			
		||||
                  :preview-src-list="[ruleForm.idCardFace]"
 | 
			
		||||
                >
 | 
			
		||||
                </el-image> </el-form-item
 | 
			
		||||
            ></el-col>
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="身份证国徽面:">
 | 
			
		||||
                <el-image
 | 
			
		||||
                  style="width: 100px; height: 100px"
 | 
			
		||||
                  :src="ruleForm.idCardBadge"
 | 
			
		||||
                  :preview-src-list="[ruleForm.idCardBadge]"
 | 
			
		||||
                >
 | 
			
		||||
                </el-image> </el-form-item
 | 
			
		||||
            ></el-col>
 | 
			
		||||
          </el-row>
 | 
			
		||||
          <el-row>
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="店铺照片:">
 | 
			
		||||
                <el-image
 | 
			
		||||
                  style="width: 100px; height: 100px"
 | 
			
		||||
                  :src="ruleForm.imgs?.split(';')[0]"
 | 
			
		||||
                  :preview-src-list="ruleForm.imgs?.split(';')"
 | 
			
		||||
                >
 | 
			
		||||
                </el-image> </el-form-item
 | 
			
		||||
            ></el-col>
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="是否自动营业:">
 | 
			
		||||
                <span>{{ ruleForm.isAutoBusiness ? "是" : "否" }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="联系电话:">
 | 
			
		||||
                <span>{{ ruleForm.contactPhone }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
          </el-row>
 | 
			
		||||
          <el-row>
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="经营状态:">
 | 
			
		||||
                <span>{{
 | 
			
		||||
                  ruleForm.businessStatus == 0 ? "休息" : "经营中"
 | 
			
		||||
                }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="评分:">
 | 
			
		||||
                <span>{{ ruleForm.score }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="收藏数量:">
 | 
			
		||||
                <span>{{ ruleForm.collectCount }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
          </el-row>
 | 
			
		||||
          <el-row>
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="点赞数量:">
 | 
			
		||||
                <span>{{ ruleForm.likeItCount }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <el-form-item label="加入时间:">
 | 
			
		||||
                <span>{{ ruleForm.createTime }}</span>
 | 
			
		||||
              </el-form-item></el-col
 | 
			
		||||
            >
 | 
			
		||||
            <el-col :span="8">
 | 
			
		||||
              <!-- <el-form-item label="下单时间:">
 | 
			
		||||
                <span>{{ ruleForm.createTime }}</span>
 | 
			
		||||
              </el-form-item> -->
 | 
			
		||||
            </el-col>
 | 
			
		||||
          </el-row>
 | 
			
		||||
        </el-form>
 | 
			
		||||
      </div>
 | 
			
		||||
      <!-- 选择商品 -->
 | 
			
		||||
    </obj-modal>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import { debounce, cloneDeep } from "lodash";
 | 
			
		||||
export default {
 | 
			
		||||
  components: {},
 | 
			
		||||
  props: {},
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      isAdd: true,
 | 
			
		||||
      //表格属性
 | 
			
		||||
      modalConfig: {
 | 
			
		||||
        title: "订单详情",
 | 
			
		||||
        show: false,
 | 
			
		||||
        width: "1200px",
 | 
			
		||||
        fullscreen: true,
 | 
			
		||||
      },
 | 
			
		||||
      modalData: {},
 | 
			
		||||
      ruleForm: {},
 | 
			
		||||
      tableData: [],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
    // "modalConfig.show"(newVal) {
 | 
			
		||||
    //   if (newVal) {
 | 
			
		||||
    //     //关闭弹窗清空校验
 | 
			
		||||
    //     setTimeout(() => {
 | 
			
		||||
    //       this.$refs.ruleForm.resetFields();
 | 
			
		||||
    //     });
 | 
			
		||||
    //   }
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    queryTableData(pageNo, pageSize) {},
 | 
			
		||||
    toggle(e) {
 | 
			
		||||
      if (this.modalConfig.show == false) {
 | 
			
		||||
        this.modalConfig.show = true;
 | 
			
		||||
      } else {
 | 
			
		||||
        this.modalConfig.show = false;
 | 
			
		||||
      }
 | 
			
		||||
      if (e) {
 | 
			
		||||
        this.init(cloneDeep(e.row));
 | 
			
		||||
      }
 | 
			
		||||
      return {
 | 
			
		||||
        add: () => {
 | 
			
		||||
          this.modalConfig.title = "店铺详情";
 | 
			
		||||
          this.isAdd = true;
 | 
			
		||||
        },
 | 
			
		||||
        update: () => {
 | 
			
		||||
          this.modalConfig.title = "店铺详情";
 | 
			
		||||
          this.isAdd = false;
 | 
			
		||||
        },
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
    init(row) {
 | 
			
		||||
      console.log(row);
 | 
			
		||||
      this.ruleForm = row;
 | 
			
		||||
    },
 | 
			
		||||
    handleSelectionChange(e) {
 | 
			
		||||
      console.log(e);
 | 
			
		||||
    },
 | 
			
		||||
    getRefundStatus(val) {
 | 
			
		||||
      if (val == 0) {
 | 
			
		||||
        return "正常";
 | 
			
		||||
      } else if (val == 1) {
 | 
			
		||||
        return "退款中";
 | 
			
		||||
      } else if (val == 2) {
 | 
			
		||||
        return "完全退款";
 | 
			
		||||
      } else if (val == 3) {
 | 
			
		||||
        return "部分退款";
 | 
			
		||||
      } else if (val == 4) {
 | 
			
		||||
        return "拒绝用户退款";
 | 
			
		||||
      } else if (val == -1) {
 | 
			
		||||
        return "退款失败";
 | 
			
		||||
      } else if (val == -2) {
 | 
			
		||||
        return "用户申请退款中";
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    modalHandles() {
 | 
			
		||||
      return [
 | 
			
		||||
        {
 | 
			
		||||
          label: "关闭",
 | 
			
		||||
          handle: () => {
 | 
			
		||||
            this.toggle();
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        // {
 | 
			
		||||
        //   label: "确认",
 | 
			
		||||
        //   type: "primary",
 | 
			
		||||
        //   // submit: true,
 | 
			
		||||
        //   handle: () => {
 | 
			
		||||
        //   },
 | 
			
		||||
        // },
 | 
			
		||||
      ];
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  asyncComputed: {},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,220 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div style="height: calc(100vh - 200px)">
 | 
			
		||||
    <obj-table-plus
 | 
			
		||||
      ref="oTable"
 | 
			
		||||
      style="height: 100%"
 | 
			
		||||
      :tableCols="tableCols"
 | 
			
		||||
      :tableProp="tableProp"
 | 
			
		||||
      @query="queryList"
 | 
			
		||||
      v-model="dataList"
 | 
			
		||||
      :tableEvent="tableEvent"
 | 
			
		||||
      :enableAutoQuery="false"
 | 
			
		||||
    >
 | 
			
		||||
      <template slot="tableTop">
 | 
			
		||||
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
 | 
			
		||||
          <el-form-item label="菜市场名称">
 | 
			
		||||
            <el-input
 | 
			
		||||
              v-model="formInline.marketName"
 | 
			
		||||
              placeholder="菜市场名称搜索"
 | 
			
		||||
            ></el-input>
 | 
			
		||||
          </el-form-item>
 | 
			
		||||
          <el-form-item>
 | 
			
		||||
            <el-button type="primary" @click="$refs.oTable.reload()"
 | 
			
		||||
              >查询</el-button
 | 
			
		||||
            >
 | 
			
		||||
            <el-button type="primary" @click="Reset">重置</el-button>
 | 
			
		||||
          </el-form-item>
 | 
			
		||||
        </el-form>
 | 
			
		||||
        <div class="mb-2"></div>
 | 
			
		||||
      </template>
 | 
			
		||||
    </obj-table-plus>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { mapState } from "vuex";
 | 
			
		||||
export default {
 | 
			
		||||
  components: {},
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      dataList: [],
 | 
			
		||||
      formInline: {
 | 
			
		||||
        name: "",
 | 
			
		||||
      },
 | 
			
		||||
      tableProp: {
 | 
			
		||||
        "auto-resize": true,
 | 
			
		||||
        border: true,
 | 
			
		||||
        height: "auto",
 | 
			
		||||
        "row-id": "id",
 | 
			
		||||
        "show-overflow": false,
 | 
			
		||||
      },
 | 
			
		||||
      productFilterType: "SALE",
 | 
			
		||||
      selectList: [],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    this.$nextTick(() => {
 | 
			
		||||
      this.$refs.oTable.reload();
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    Reset() {
 | 
			
		||||
      this.formInline = {
 | 
			
		||||
        name: "",
 | 
			
		||||
      };
 | 
			
		||||
      this.$refs.oTable.reload();
 | 
			
		||||
    },
 | 
			
		||||
    queryList(pageNo, pageSize) {
 | 
			
		||||
      this.$api.agent
 | 
			
		||||
        .agentMarketPage({
 | 
			
		||||
          pageNumber: pageNo,
 | 
			
		||||
          pageSize: pageSize,
 | 
			
		||||
          ...this.formInline,
 | 
			
		||||
        })
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          console.log(res);
 | 
			
		||||
          this.$refs.oTable.complete(
 | 
			
		||||
            res.data.data.content,
 | 
			
		||||
            Number(res.data.data.totalElements)
 | 
			
		||||
          );
 | 
			
		||||
        })
 | 
			
		||||
        .catch((err) => {
 | 
			
		||||
          this.$refs.oTable.complete(false);
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    tableCols() {
 | 
			
		||||
      return [
 | 
			
		||||
        { type: "checkbox", width: "60px", fixed: "left" },
 | 
			
		||||
        // { type: "seq", width: "60px", align: "center", title: "序号" },
 | 
			
		||||
        {
 | 
			
		||||
          title: "菜市场名称",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "name",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "地址",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "address",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "经纬度",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "category",
 | 
			
		||||
          type: "jsx",
 | 
			
		||||
          render: ({ row }) => {
 | 
			
		||||
            return (
 | 
			
		||||
              <span>
 | 
			
		||||
                经度:{row.longitude}; 维度:{row.latitude}
 | 
			
		||||
              </span>
 | 
			
		||||
            );
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "营业执照",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "couponType",
 | 
			
		||||
          type: "jsx",
 | 
			
		||||
          render: ({ row }) => {
 | 
			
		||||
            return (
 | 
			
		||||
              <el-image
 | 
			
		||||
                preview-src-list={[row.license]}
 | 
			
		||||
                src={row.license}
 | 
			
		||||
              ></el-image>
 | 
			
		||||
            );
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "评分",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "score",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "收藏数量",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "collectCount",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "点赞数量",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "likeItCount",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "平台结算比例",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "platformSettleRatio",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "代理商结算比例",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "agentSettleRatio",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "加入时间",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "createTime",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "状态",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "status",
 | 
			
		||||
          type: "jsx",
 | 
			
		||||
          width: "120px",
 | 
			
		||||
          render: ({ row }) => {
 | 
			
		||||
            let changeState = () => {};
 | 
			
		||||
            return (
 | 
			
		||||
              <el-switch
 | 
			
		||||
                onchange={changeState}
 | 
			
		||||
                v-model={row.status}
 | 
			
		||||
                active-text="开"
 | 
			
		||||
                inactive-text="关"
 | 
			
		||||
                active-value={1}
 | 
			
		||||
                inactive-value={0}
 | 
			
		||||
              ></el-switch>
 | 
			
		||||
            );
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "操作",
 | 
			
		||||
          fixed: "right",
 | 
			
		||||
          type: "jsx",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          width: "140px",
 | 
			
		||||
          render: (row) => {
 | 
			
		||||
            let edit = () => {
 | 
			
		||||
              //   this.$refs.viewDetails.toggle(row).update();
 | 
			
		||||
            };
 | 
			
		||||
            return (
 | 
			
		||||
              <div>
 | 
			
		||||
                <el-button size="mini" type="primary" onClick={edit}>
 | 
			
		||||
                  详情
 | 
			
		||||
                </el-button>
 | 
			
		||||
              </div>
 | 
			
		||||
            );
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
      ];
 | 
			
		||||
    },
 | 
			
		||||
    tableEvent() {
 | 
			
		||||
      return {
 | 
			
		||||
        "checkbox-all": ({ records, reserves }) => {
 | 
			
		||||
          this.selectList = [...records, ...reserves];
 | 
			
		||||
        },
 | 
			
		||||
        "checkbox-change": ({ records, reserves }) => {
 | 
			
		||||
          this.selectList = [...records, ...reserves];
 | 
			
		||||
        },
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
    ...mapState("userData", [
 | 
			
		||||
      "isMerchant",
 | 
			
		||||
      "marketList",
 | 
			
		||||
      "storeList",
 | 
			
		||||
      "marketId",
 | 
			
		||||
      "shopId",
 | 
			
		||||
    ]),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped></style>
 | 
			
		||||
		Loading…
	
		Reference in New Issue