添加注释,删除无用代码,bug修改
This commit is contained in:
		
							parent
							
								
									df9ea021b3
								
							
						
					
					
						commit
						87980277bf
					
				@ -192,12 +192,6 @@ export const otherRouter = {
 | 
				
			|||||||
      name: "edit-platform-coupon",
 | 
					      name: "edit-platform-coupon",
 | 
				
			||||||
      component: () => import("@/views/promotion/coupon/couponPublish.vue")
 | 
					      component: () => import("@/views/promotion/coupon/couponPublish.vue")
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
      path: "promotion/platform-coupon-info",
 | 
					 | 
				
			||||||
      title: "详情",
 | 
					 | 
				
			||||||
      name: "platform-coupon-info",
 | 
					 | 
				
			||||||
      component: () => import("@/views/promotion/coupon/couponInfo.vue")
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      path: "coupon-activity/add",
 | 
					      path: "coupon-activity/add",
 | 
				
			||||||
      title: "添加优惠券活动",
 | 
					      title: "添加优惠券活动",
 | 
				
			||||||
@ -216,12 +210,6 @@ export const otherRouter = {
 | 
				
			|||||||
      name: "coupon-activity-info",
 | 
					      name: "coupon-activity-info",
 | 
				
			||||||
      component: () => import("@/views/promotion/couponActivity/couponInfo.vue")
 | 
					      component: () => import("@/views/promotion/couponActivity/couponInfo.vue")
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
      path: "promotion/platform-coupon-info",
 | 
					 | 
				
			||||||
      title: "详情",
 | 
					 | 
				
			||||||
      name: "platform-coupon-activity",
 | 
					 | 
				
			||||||
      component: () => import("@/views/promotion/coupon/couponInfo.vue")
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      path: "promotion/manager-pintuan",
 | 
					      path: "promotion/manager-pintuan",
 | 
				
			||||||
      title: "平台拼团",
 | 
					      title: "平台拼团",
 | 
				
			||||||
 | 
				
			|||||||
@ -17,12 +17,11 @@
 | 
				
			|||||||
          <Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button>
 | 
					          <Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button>
 | 
				
			||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
      <Row class="operation padding-row">
 | 
					      <Row class="operation padding-row" v-if="!selectedMember">
 | 
				
			||||||
        <Button @click="addMember" type="primary">添加会员</Button>
 | 
					        <Button @click="addMember" type="primary">添加会员</Button>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <Table :loading="loading" border :columns="columns" :data="data" ref="table">
 | 
					      <Table :loading="loading" border :columns="columns" class="mt_10" :data="data" ref="table"></Table>
 | 
				
			||||||
      </Table>
 | 
					 | 
				
			||||||
      <Row type="flex" justify="end" class="mt_10">
 | 
					      <Row type="flex" justify="end" class="mt_10">
 | 
				
			||||||
        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
 | 
					        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
 | 
				
			||||||
          show-total show-elevator show-sizer></Page>
 | 
					          show-total show-elevator show-sizer></Page>
 | 
				
			||||||
@ -43,29 +42,20 @@
 | 
				
			|||||||
          <Input type="password" password v-model="addMemberForm.password" maxlength="20" placeholder="请输入会员密码" />
 | 
					          <Input type="password" password v-model="addMemberForm.password" maxlength="20" placeholder="请输入会员密码" />
 | 
				
			||||||
        </FormItem>
 | 
					        </FormItem>
 | 
				
			||||||
      </Form>
 | 
					      </Form>
 | 
				
			||||||
 | 
					 | 
				
			||||||
      <div slot="footer">
 | 
					      <div slot="footer">
 | 
				
			||||||
        <Button @click="addFlag = false">
 | 
					        <Button @click="addFlag = false">取消</Button>
 | 
				
			||||||
          取消
 | 
					        <Button type="primary" :loading="handleAddLoading" @click="addMemberSubmit">确定</Button>
 | 
				
			||||||
        </Button>
 | 
					 | 
				
			||||||
        <Button type="primary" :loading="handleAddLoading" @click="addMemberSubmit">
 | 
					 | 
				
			||||||
          确定
 | 
					 | 
				
			||||||
        </Button>
 | 
					 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </Modal>
 | 
					    </Modal>
 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!-- 修改模态框 -->
 | 
					    <!-- 修改模态框 -->
 | 
				
			||||||
    <Modal v-model="descFlag" :title="descTitle" @on-ok="handleSubmitModal" width="500">
 | 
					    <Modal v-model="descFlag" :title="descTitle" @on-ok="handleSubmitModal" width="500">
 | 
				
			||||||
      <Form ref="form" :model="form" :rules="ruleValidate" :label-width="80">
 | 
					      <Form ref="form" :model="form" :rules="ruleValidate" :label-width="80">
 | 
				
			||||||
        <FormItem label="头像">
 | 
					        <FormItem label="头像">
 | 
				
			||||||
          <img :src="form.face" class="face" />
 | 
					          <img :src="form.face" class="face" />
 | 
				
			||||||
          <Button type="text" class="upload" @click="
 | 
					          <Button type="text" class="upload" @click="() => {
 | 
				
			||||||
              () => {
 | 
					 | 
				
			||||||
                this.picModelFlag = true;
 | 
					                this.picModelFlag = true;
 | 
				
			||||||
                this.$refs.ossManage.selectImage = true;
 | 
					                this.$refs.ossManage.selectImage = true;
 | 
				
			||||||
              }
 | 
					              }">修改</Button>
 | 
				
			||||||
            ">修改
 | 
					 | 
				
			||||||
          </Button>
 | 
					 | 
				
			||||||
          <input type="file" style="display: none" id="file" />
 | 
					          <input type="file" style="display: none" id="file" />
 | 
				
			||||||
        </FormItem>
 | 
					        </FormItem>
 | 
				
			||||||
        <FormItem label="用户名" prop="name">
 | 
					        <FormItem label="用户名" prop="name">
 | 
				
			||||||
@ -93,12 +83,9 @@
 | 
				
			|||||||
        <FormItem label="所在地" prop="mail">
 | 
					        <FormItem label="所在地" prop="mail">
 | 
				
			||||||
          <div class="form-item" v-if="!updateRegion">
 | 
					          <div class="form-item" v-if="!updateRegion">
 | 
				
			||||||
            <Input disabled style="width: 250px" :value="form.region" />
 | 
					            <Input disabled style="width: 250px" :value="form.region" />
 | 
				
			||||||
            <Button type="text" @click="
 | 
					            <Button type="text" @click="() => {
 | 
				
			||||||
                () => {
 | 
					 | 
				
			||||||
                  this.updateRegion = !this.updateRegion;
 | 
					                  this.updateRegion = !this.updateRegion;
 | 
				
			||||||
                }
 | 
					                }">修改</Button>
 | 
				
			||||||
              ">修改
 | 
					 | 
				
			||||||
            </Button>
 | 
					 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <div class="form-item" v-else>
 | 
					          <div class="form-item" v-else>
 | 
				
			||||||
            <region style="width: 250px" @selected="selectedRegion" />
 | 
					            <region style="width: 250px" @selected="selectedRegion" />
 | 
				
			||||||
@ -121,8 +108,7 @@ import * as RegExp from "@/libs/RegExp.js";
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "member",
 | 
					  name: "member",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    region,
 | 
					    region, ossManage
 | 
				
			||||||
    ossManage
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@ -372,9 +358,6 @@ export default {
 | 
				
			|||||||
    // 分页 改变页码
 | 
					    // 分页 改变页码
 | 
				
			||||||
    changePage(v) {
 | 
					    changePage(v) {
 | 
				
			||||||
      this.searchForm.pageNumber = v;
 | 
					      this.searchForm.pageNumber = v;
 | 
				
			||||||
      // 此处如果是父子级传值的时候需要做一下处理
 | 
					 | 
				
			||||||
      //selectedMember
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      this.getData();
 | 
					      this.getData();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 分页 改变页数
 | 
					    // 分页 改变页数
 | 
				
			||||||
 | 
				
			|||||||
@ -2,9 +2,9 @@
 | 
				
			|||||||
  <div class="wrapper">
 | 
					  <div class="wrapper">
 | 
				
			||||||
    <Row>
 | 
					    <Row>
 | 
				
			||||||
      <Col style=" height: 100%;" span="4">
 | 
					      <Col style=" height: 100%;" span="4">
 | 
				
			||||||
      <Card class="article-category mr_10">
 | 
					        <Card class="article-category mr_10">
 | 
				
			||||||
        <Tree :data="treeData" @on-select-change="handleCateChange"></Tree>
 | 
					          <Tree :data="treeData" @on-select-change="handleCateChange"></Tree>
 | 
				
			||||||
      </Card>
 | 
					        </Card>
 | 
				
			||||||
      </Col>
 | 
					      </Col>
 | 
				
			||||||
      <Col span="20">
 | 
					      <Col span="20">
 | 
				
			||||||
      <Card class="article-detail">
 | 
					      <Card class="article-detail">
 | 
				
			||||||
 | 
				
			|||||||
@ -1,509 +0,0 @@
 | 
				
			|||||||
<template>
 | 
					 | 
				
			||||||
  <div class="search">
 | 
					 | 
				
			||||||
    <Card>
 | 
					 | 
				
			||||||
      <Row class="operation">
 | 
					 | 
				
			||||||
        <Button @click="add" type="primary" icon="md-add">添加</Button>
 | 
					 | 
				
			||||||
        <Button @click="disableAll" icon="md-trash">批量禁用</Button>
 | 
					 | 
				
			||||||
        <Button @click="getDataList" icon="md-refresh">刷新</Button>
 | 
					 | 
				
			||||||
        <Button type="dashed" @click="openTip = !openTip">{{
 | 
					 | 
				
			||||||
          openTip ? "关闭提示" : "开启提示"
 | 
					 | 
				
			||||||
        }}</Button>
 | 
					 | 
				
			||||||
      </Row>
 | 
					 | 
				
			||||||
      <Row v-show="openTip">
 | 
					 | 
				
			||||||
        <Alert show-icon>
 | 
					 | 
				
			||||||
          已选择 <span class="select-count">{{ selectCount }}</span> 项
 | 
					 | 
				
			||||||
          <a class="select-clear" @click="clearSelectAll">清空</a>
 | 
					 | 
				
			||||||
        </Alert>
 | 
					 | 
				
			||||||
      </Row>
 | 
					 | 
				
			||||||
      <Table
 | 
					 | 
				
			||||||
        :loading="loading"
 | 
					 | 
				
			||||||
        border
 | 
					 | 
				
			||||||
        :columns="columns"
 | 
					 | 
				
			||||||
        :data="data"
 | 
					 | 
				
			||||||
        ref="table"
 | 
					 | 
				
			||||||
        sortable="custom"
 | 
					 | 
				
			||||||
        @on-sort-change="changeSort"
 | 
					 | 
				
			||||||
        @on-selection-change="changeSelect"
 | 
					 | 
				
			||||||
      ></Table>
 | 
					 | 
				
			||||||
      <Row type="flex" justify="end" class="mt_10">
 | 
					 | 
				
			||||||
        <Page
 | 
					 | 
				
			||||||
          :current="searchForm.pageNumber"
 | 
					 | 
				
			||||||
          :total="total"
 | 
					 | 
				
			||||||
          :page-size="searchForm.pageSize"
 | 
					 | 
				
			||||||
          @on-change="changePage"
 | 
					 | 
				
			||||||
          @on-page-size-change="changePageSize"
 | 
					 | 
				
			||||||
          :page-size-opts="[10, 20, 50]"
 | 
					 | 
				
			||||||
          size="small"
 | 
					 | 
				
			||||||
          show-total
 | 
					 | 
				
			||||||
          show-elevator
 | 
					 | 
				
			||||||
          show-sizer
 | 
					 | 
				
			||||||
        ></Page>
 | 
					 | 
				
			||||||
      </Row>
 | 
					 | 
				
			||||||
    </Card>
 | 
					 | 
				
			||||||
    <Modal
 | 
					 | 
				
			||||||
      :title="modalTitle"
 | 
					 | 
				
			||||||
      v-model="modalVisible"
 | 
					 | 
				
			||||||
      :mask-closable="false"
 | 
					 | 
				
			||||||
      :width="500"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <Form ref="form" :model="form" :label-width="100" :rules="formValidate">
 | 
					 | 
				
			||||||
        <FormItem label="名称" prop="name">
 | 
					 | 
				
			||||||
          <Input v-model="form.name" clearable style="width: 100%" />
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
        <FormItem label="图片" prop="url">
 | 
					 | 
				
			||||||
          <upload-pic-input
 | 
					 | 
				
			||||||
            v-model="form.url"
 | 
					 | 
				
			||||||
            style="width: 100%"
 | 
					 | 
				
			||||||
          ></upload-pic-input>
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
        <FormItem label="操作类型" prop="operationType">
 | 
					 | 
				
			||||||
          <Select
 | 
					 | 
				
			||||||
            v-model="form.operationType"
 | 
					 | 
				
			||||||
            placeholder="请选择"
 | 
					 | 
				
			||||||
            clearable
 | 
					 | 
				
			||||||
            style="width: 200px"
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
            <Option value="NONE">无操作</Option>
 | 
					 | 
				
			||||||
            <Option value="URL">链接地址</Option>
 | 
					 | 
				
			||||||
            <Option value="GOODS">商品序号</Option>
 | 
					 | 
				
			||||||
            <Option value="SHOP">店铺编号</Option>
 | 
					 | 
				
			||||||
            <Option value="KEYWORD">关键字</Option>
 | 
					 | 
				
			||||||
            <Option value="CATEGORY">商品分类</Option>
 | 
					 | 
				
			||||||
          </Select>
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
        <FormItem label="链接值" prop="sort">
 | 
					 | 
				
			||||||
          <Input v-model="form.operationUrl" clearable style="width: 100%" />
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
        <FormItem label="排序" prop="sort">
 | 
					 | 
				
			||||||
          <InputNumber :max="999" :min="0" v-model="form.sort"></InputNumber>
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
      </Form>
 | 
					 | 
				
			||||||
      <div slot="footer">
 | 
					 | 
				
			||||||
        <Button type="text" @click="modalVisible = false">取消</Button>
 | 
					 | 
				
			||||||
        <Button type="primary" :loading="submitLoading" @click="handleSubmit"
 | 
					 | 
				
			||||||
          >提交</Button
 | 
					 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </Modal>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
import {
 | 
					 | 
				
			||||||
  getFocusData,
 | 
					 | 
				
			||||||
  saveFocusData,
 | 
					 | 
				
			||||||
  disableFocus,
 | 
					 | 
				
			||||||
  enableFocus,
 | 
					 | 
				
			||||||
  delFocus,
 | 
					 | 
				
			||||||
} from "@/api/pages";
 | 
					 | 
				
			||||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
  name: "mobileFocus",
 | 
					 | 
				
			||||||
  components: {
 | 
					 | 
				
			||||||
    uploadPicInput,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  data() {
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
      openTip: true, // 显示提示
 | 
					 | 
				
			||||||
      loading: true, // 表单加载状态
 | 
					 | 
				
			||||||
      modalType: 0, // 添加或编辑标识
 | 
					 | 
				
			||||||
      modalVisible: false, // 添加或编辑显示
 | 
					 | 
				
			||||||
      modalTitle: "", // 添加或编辑标题
 | 
					 | 
				
			||||||
      searchForm: {
 | 
					 | 
				
			||||||
        // 搜索框初始化对象
 | 
					 | 
				
			||||||
        clientType: "MOBILE", //客户端类型
 | 
					 | 
				
			||||||
        pageNumber: 1, // 当前页数
 | 
					 | 
				
			||||||
        pageSize: 10, // 页面大小
 | 
					 | 
				
			||||||
        sort: "createTime", // 默认排序字段
 | 
					 | 
				
			||||||
        order: "desc", // 默认排序方式
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      form: {
 | 
					 | 
				
			||||||
        // 添加或编辑表单对象初始化数据
 | 
					 | 
				
			||||||
        name: "",
 | 
					 | 
				
			||||||
        operationType: "",
 | 
					 | 
				
			||||||
        operationUrl: "",
 | 
					 | 
				
			||||||
        url: "",
 | 
					 | 
				
			||||||
        sort: 0,
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      // 表单验证规则
 | 
					 | 
				
			||||||
      formValidate: {
 | 
					 | 
				
			||||||
        name: [{ required: true, message: "不能为空", trigger: "blur" }],
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      submitLoading: false, // 添加或编辑提交状态
 | 
					 | 
				
			||||||
      selectList: [], // 多选数据
 | 
					 | 
				
			||||||
      selectCount: 0, // 多选计数
 | 
					 | 
				
			||||||
      columns: [
 | 
					 | 
				
			||||||
        // 表头
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          type: "selection",
 | 
					 | 
				
			||||||
          width: 60,
 | 
					 | 
				
			||||||
          align: "center",
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "名称",
 | 
					 | 
				
			||||||
          key: "name",
 | 
					 | 
				
			||||||
          minWidth: 120,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "状态",
 | 
					 | 
				
			||||||
          key: "status",
 | 
					 | 
				
			||||||
          minWidth: 100,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
          render: (h, params) => {
 | 
					 | 
				
			||||||
            if (params.row.status == "CLOSE") {
 | 
					 | 
				
			||||||
              return h("div", [
 | 
					 | 
				
			||||||
                h("Badge", {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    status: "error",
 | 
					 | 
				
			||||||
                    text: "禁用",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                }),
 | 
					 | 
				
			||||||
              ]);
 | 
					 | 
				
			||||||
            } else if (params.row.status == "OPEN") {
 | 
					 | 
				
			||||||
              return h("div", [
 | 
					 | 
				
			||||||
                h("Badge", {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    status: "success",
 | 
					 | 
				
			||||||
                    text: "启用",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                }),
 | 
					 | 
				
			||||||
              ]);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "图片",
 | 
					 | 
				
			||||||
          key: "url",
 | 
					 | 
				
			||||||
          minWidth: 120,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
          render: (h, params) => {
 | 
					 | 
				
			||||||
            return h("img", {
 | 
					 | 
				
			||||||
              attrs: {
 | 
					 | 
				
			||||||
                src: params.row.url,
 | 
					 | 
				
			||||||
                alt: "加载图片失败",
 | 
					 | 
				
			||||||
              },
 | 
					 | 
				
			||||||
              style: {
 | 
					 | 
				
			||||||
                cursor: "pointer",
 | 
					 | 
				
			||||||
                width: "80px",
 | 
					 | 
				
			||||||
                height: "60px",
 | 
					 | 
				
			||||||
                margin: "10px 0",
 | 
					 | 
				
			||||||
                "object-fit": "contain",
 | 
					 | 
				
			||||||
              },
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "排序",
 | 
					 | 
				
			||||||
          key: "sort",
 | 
					 | 
				
			||||||
          minWidth: 120,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "操作",
 | 
					 | 
				
			||||||
          key: "action",
 | 
					 | 
				
			||||||
          align: "center",
 | 
					 | 
				
			||||||
          width: 200,
 | 
					 | 
				
			||||||
          render: (h, params) => {
 | 
					 | 
				
			||||||
            let enableOrDisable = "";
 | 
					 | 
				
			||||||
            if (params.row.status == "CLOSE") {
 | 
					 | 
				
			||||||
              enableOrDisable = h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    type: "success",
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.enable(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "启用"
 | 
					 | 
				
			||||||
              );
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
              enableOrDisable = h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.disable(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "禁用"
 | 
					 | 
				
			||||||
              );
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            return h("div", [
 | 
					 | 
				
			||||||
              h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    type: "primary",
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.edit(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "编辑"
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
              h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    type: "error",
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.remove(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "删除"
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
              enableOrDisable,
 | 
					 | 
				
			||||||
            ]);
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      data: [], // 表单数据
 | 
					 | 
				
			||||||
      total: 0, // 表单数据总数
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					 | 
				
			||||||
    init() {
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changePage(v) {
 | 
					 | 
				
			||||||
      this.searchForm.pageNumber = v;
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
      this.clearSelectAll();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changePageSize(v) {
 | 
					 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    handleSearch() {
 | 
					 | 
				
			||||||
      this.searchForm.pageNumber = 1;
 | 
					 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    handleReset() {
 | 
					 | 
				
			||||||
      this.$refs.searchForm.resetFields();
 | 
					 | 
				
			||||||
      this.searchForm.pageNumber = 1;
 | 
					 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					 | 
				
			||||||
      // 重新加载数据
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changeSort(e) {
 | 
					 | 
				
			||||||
      this.searchForm.sort = e.key;
 | 
					 | 
				
			||||||
      this.searchForm.order = e.order;
 | 
					 | 
				
			||||||
      if (e.order === "normal") {
 | 
					 | 
				
			||||||
        this.searchForm.order = "";
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    clearSelectAll() {
 | 
					 | 
				
			||||||
      this.$refs.table.selectAll(false);
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changeSelect(e) {
 | 
					 | 
				
			||||||
      this.selectList = e;
 | 
					 | 
				
			||||||
      this.selectCount = e.length;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    getDataList() {
 | 
					 | 
				
			||||||
      this.loading = true;
 | 
					 | 
				
			||||||
      // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
					 | 
				
			||||||
      getFocusData(this.searchForm).then((res) => {
 | 
					 | 
				
			||||||
        this.loading = false;
 | 
					 | 
				
			||||||
        if (res.success) {
 | 
					 | 
				
			||||||
          this.data = res.result.records;
 | 
					 | 
				
			||||||
          this.total = res.result.total;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
      // 以下为模拟数据
 | 
					 | 
				
			||||||
      //this.data = [
 | 
					 | 
				
			||||||
      //];
 | 
					 | 
				
			||||||
      this.total = this.data.length;
 | 
					 | 
				
			||||||
      this.loading = false;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    enable(v) {
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认启用",
 | 
					 | 
				
			||||||
        // 记得确认修改此处
 | 
					 | 
				
			||||||
        content: "您确认要确认启用 " + v.name + " ?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          // 删除
 | 
					 | 
				
			||||||
          enableFocus(v.id).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    disable(v) {
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认禁用",
 | 
					 | 
				
			||||||
        // 记得确认修改此处
 | 
					 | 
				
			||||||
        content: "您确认要禁用 " + v.name + " ?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          // 删除
 | 
					 | 
				
			||||||
          disableFocus(v.id).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    handleSubmit() {
 | 
					 | 
				
			||||||
      this.$refs.form.validate((valid) => {
 | 
					 | 
				
			||||||
        if (valid) {
 | 
					 | 
				
			||||||
          this.form.ClientType = "MOBILE";
 | 
					 | 
				
			||||||
          this.submitLoading = true;
 | 
					 | 
				
			||||||
          if (this.modalType === 0) {
 | 
					 | 
				
			||||||
            this.form.status = "OPEN";
 | 
					 | 
				
			||||||
            // 添加 避免编辑后传入id等数据 记得删除
 | 
					 | 
				
			||||||
            delete this.form.id;
 | 
					 | 
				
			||||||
            saveFocusData(this.form).then((res) => {
 | 
					 | 
				
			||||||
              this.submitLoading = false;
 | 
					 | 
				
			||||||
              if (res.success) {
 | 
					 | 
				
			||||||
                this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
                this.modalVisible = false;
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          } else {
 | 
					 | 
				
			||||||
            // 编辑
 | 
					 | 
				
			||||||
            saveFocusData(this.form).then((res) => {
 | 
					 | 
				
			||||||
              this.submitLoading = false;
 | 
					 | 
				
			||||||
              if (res.success) {
 | 
					 | 
				
			||||||
                this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
                this.modalVisible = false;
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    add() {
 | 
					 | 
				
			||||||
      this.modalType = 0;
 | 
					 | 
				
			||||||
      this.modalTitle = "添加";
 | 
					 | 
				
			||||||
      this.$refs.form.resetFields();
 | 
					 | 
				
			||||||
      delete this.form.id;
 | 
					 | 
				
			||||||
      this.modalVisible = true;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    edit(v) {
 | 
					 | 
				
			||||||
      this.modalType = 1;
 | 
					 | 
				
			||||||
      this.modalTitle = "编辑";
 | 
					 | 
				
			||||||
      this.$refs.form.resetFields();
 | 
					 | 
				
			||||||
      // 转换null为""
 | 
					 | 
				
			||||||
      for (let attr in v) {
 | 
					 | 
				
			||||||
        if (v[attr] === null) {
 | 
					 | 
				
			||||||
          v[attr] = "";
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      let str = JSON.stringify(v);
 | 
					 | 
				
			||||||
      let data = JSON.parse(str);
 | 
					 | 
				
			||||||
      this.form = data;
 | 
					 | 
				
			||||||
      this.modalVisible = true;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    remove(v) {
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认删除",
 | 
					 | 
				
			||||||
        // 记得确认修改此处
 | 
					 | 
				
			||||||
        content: "您确认要删除么?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          // 删除
 | 
					 | 
				
			||||||
          delFocus(v.id).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    disableAll() {
 | 
					 | 
				
			||||||
      if (this.selectCount <= 0) {
 | 
					 | 
				
			||||||
        this.$Message.warning("您还未选择要禁用的数据");
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认禁用",
 | 
					 | 
				
			||||||
        content: "您确认要禁用所选的 " + this.selectCount + " 条数据?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          let ids = "";
 | 
					 | 
				
			||||||
          this.selectList.forEach(function (e) {
 | 
					 | 
				
			||||||
            ids += e.id + ",";
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
          ids = ids.substring(0, ids.length - 1);
 | 
					 | 
				
			||||||
          // 批量删除
 | 
					 | 
				
			||||||
          disableFocus(ids).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("禁用成功");
 | 
					 | 
				
			||||||
              this.clearSelectAll();
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    this.init();
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
<style lang="scss">
 | 
					 | 
				
			||||||
.search {
 | 
					 | 
				
			||||||
  .operation {
 | 
					 | 
				
			||||||
    margin-bottom: 2vh;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .select-count {
 | 
					 | 
				
			||||||
    font-weight: 600;
 | 
					 | 
				
			||||||
    color: #40a9ff;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .select-clear {
 | 
					 | 
				
			||||||
    margin-left: 10px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .page {
 | 
					 | 
				
			||||||
    margin-top: 2vh;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .drop-down {
 | 
					 | 
				
			||||||
    margin-left: 5px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
@ -1,509 +0,0 @@
 | 
				
			|||||||
<template>
 | 
					 | 
				
			||||||
  <div class="search">
 | 
					 | 
				
			||||||
    <Card>
 | 
					 | 
				
			||||||
      <Row class="operation">
 | 
					 | 
				
			||||||
        <Button @click="add" type="primary" icon="md-add">添加</Button>
 | 
					 | 
				
			||||||
        <Button @click="disableAll" icon="md-trash">批量禁用</Button>
 | 
					 | 
				
			||||||
        <Button @click="getDataList" icon="md-refresh">刷新</Button>
 | 
					 | 
				
			||||||
        <Button type="dashed" @click="openTip = !openTip">{{
 | 
					 | 
				
			||||||
          openTip ? "关闭提示" : "开启提示"
 | 
					 | 
				
			||||||
        }}</Button>
 | 
					 | 
				
			||||||
      </Row>
 | 
					 | 
				
			||||||
      <Row v-show="openTip">
 | 
					 | 
				
			||||||
        <Alert show-icon>
 | 
					 | 
				
			||||||
          已选择 <span class="select-count">{{ selectCount }}</span> 项
 | 
					 | 
				
			||||||
          <a class="select-clear" @click="clearSelectAll">清空</a>
 | 
					 | 
				
			||||||
        </Alert>
 | 
					 | 
				
			||||||
      </Row>
 | 
					 | 
				
			||||||
      <Table
 | 
					 | 
				
			||||||
        :loading="loading"
 | 
					 | 
				
			||||||
        border
 | 
					 | 
				
			||||||
        :columns="columns"
 | 
					 | 
				
			||||||
        :data="data"
 | 
					 | 
				
			||||||
        ref="table"
 | 
					 | 
				
			||||||
        sortable="custom"
 | 
					 | 
				
			||||||
        @on-sort-change="changeSort"
 | 
					 | 
				
			||||||
        @on-selection-change="changeSelect"
 | 
					 | 
				
			||||||
      ></Table>
 | 
					 | 
				
			||||||
      <Row type="flex" justify="end" class="mt_10">
 | 
					 | 
				
			||||||
        <Page
 | 
					 | 
				
			||||||
          :current="searchForm.pageNumber"
 | 
					 | 
				
			||||||
          :total="total"
 | 
					 | 
				
			||||||
          :page-size="searchForm.pageSize"
 | 
					 | 
				
			||||||
          @on-change="changePage"
 | 
					 | 
				
			||||||
          @on-page-size-change="changePageSize"
 | 
					 | 
				
			||||||
          :page-size-opts="[10, 20, 50]"
 | 
					 | 
				
			||||||
          size="small"
 | 
					 | 
				
			||||||
          show-total
 | 
					 | 
				
			||||||
          show-elevator
 | 
					 | 
				
			||||||
          show-sizer
 | 
					 | 
				
			||||||
        ></Page>
 | 
					 | 
				
			||||||
      </Row>
 | 
					 | 
				
			||||||
    </Card>
 | 
					 | 
				
			||||||
    <Modal
 | 
					 | 
				
			||||||
      :title="modalTitle"
 | 
					 | 
				
			||||||
      v-model="modalVisible"
 | 
					 | 
				
			||||||
      :mask-closable="false"
 | 
					 | 
				
			||||||
      :width="500"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <Form ref="form" :model="form" :label-width="100" :rules="formValidate">
 | 
					 | 
				
			||||||
        <FormItem label="名称" prop="name">
 | 
					 | 
				
			||||||
          <Input v-model="form.name" clearable style="width: 100%" />
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
        <FormItem label="图片" prop="url">
 | 
					 | 
				
			||||||
          <upload-pic-input
 | 
					 | 
				
			||||||
            v-model="form.url"
 | 
					 | 
				
			||||||
            style="width: 100%"
 | 
					 | 
				
			||||||
          ></upload-pic-input>
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
        <FormItem label="操作类型" prop="operationType">
 | 
					 | 
				
			||||||
          <Select
 | 
					 | 
				
			||||||
            v-model="form.operationType"
 | 
					 | 
				
			||||||
            placeholder="请选择"
 | 
					 | 
				
			||||||
            clearable
 | 
					 | 
				
			||||||
            style="width: 200px"
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
            <Option value="NONE">无操作</Option>
 | 
					 | 
				
			||||||
            <Option value="URL">链接地址</Option>
 | 
					 | 
				
			||||||
            <Option value="GOODS">商品序号</Option>
 | 
					 | 
				
			||||||
            <Option value="SHOP">店铺编号</Option>
 | 
					 | 
				
			||||||
            <Option value="KEYWORD">关键字</Option>
 | 
					 | 
				
			||||||
            <Option value="CATEGORY">商品分类</Option>
 | 
					 | 
				
			||||||
          </Select>
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
        <FormItem label="链接值" prop="sort">
 | 
					 | 
				
			||||||
          <Input v-model="form.operationUrl" clearable style="width: 100%" />
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
        <FormItem label="排序" prop="sort">
 | 
					 | 
				
			||||||
          <InputNumber :max="999" :min="0" v-model="form.sort"></InputNumber>
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
      </Form>
 | 
					 | 
				
			||||||
      <div slot="footer">
 | 
					 | 
				
			||||||
        <Button type="text" @click="modalVisible = false">取消</Button>
 | 
					 | 
				
			||||||
        <Button type="primary" :loading="submitLoading" @click="handleSubmit"
 | 
					 | 
				
			||||||
          >提交</Button
 | 
					 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </Modal>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
import {
 | 
					 | 
				
			||||||
  getFocusData,
 | 
					 | 
				
			||||||
  saveFocusData,
 | 
					 | 
				
			||||||
  disableFocus,
 | 
					 | 
				
			||||||
  enableFocus,
 | 
					 | 
				
			||||||
  delFocus,
 | 
					 | 
				
			||||||
} from "@/api/pages";
 | 
					 | 
				
			||||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
  name: "pcFocus",
 | 
					 | 
				
			||||||
  components: {
 | 
					 | 
				
			||||||
    uploadPicInput,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  data() {
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
      openTip: true, // 显示提示
 | 
					 | 
				
			||||||
      loading: true, // 表单加载状态
 | 
					 | 
				
			||||||
      modalType: 0, // 添加或编辑标识
 | 
					 | 
				
			||||||
      modalVisible: false, // 添加或编辑显示
 | 
					 | 
				
			||||||
      modalTitle: "", // 添加或编辑标题
 | 
					 | 
				
			||||||
      searchForm: {
 | 
					 | 
				
			||||||
        // 搜索框初始化对象
 | 
					 | 
				
			||||||
        clientType: "PC", //客户端类型
 | 
					 | 
				
			||||||
        pageNumber: 1, // 当前页数
 | 
					 | 
				
			||||||
        pageSize: 10, // 页面大小
 | 
					 | 
				
			||||||
        sort: "createTime", // 默认排序字段
 | 
					 | 
				
			||||||
        order: "desc", // 默认排序方式
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      form: {
 | 
					 | 
				
			||||||
        // 添加或编辑表单对象初始化数据
 | 
					 | 
				
			||||||
        name: "",
 | 
					 | 
				
			||||||
        operationType: "",
 | 
					 | 
				
			||||||
        operationUrl: "",
 | 
					 | 
				
			||||||
        url: "",
 | 
					 | 
				
			||||||
        sort: 0,
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      // 表单验证规则
 | 
					 | 
				
			||||||
      formValidate: {
 | 
					 | 
				
			||||||
        name: [{ required: true, message: "不能为空", trigger: "blur" }],
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      submitLoading: false, // 添加或编辑提交状态
 | 
					 | 
				
			||||||
      selectList: [], // 多选数据
 | 
					 | 
				
			||||||
      selectCount: 0, // 多选计数
 | 
					 | 
				
			||||||
      columns: [
 | 
					 | 
				
			||||||
        // 表头
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          type: "selection",
 | 
					 | 
				
			||||||
          width: 60,
 | 
					 | 
				
			||||||
          align: "center",
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "名称",
 | 
					 | 
				
			||||||
          key: "name",
 | 
					 | 
				
			||||||
          minWidth: 120,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "状态",
 | 
					 | 
				
			||||||
          key: "status",
 | 
					 | 
				
			||||||
          minWidth: 100,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
          render: (h, params) => {
 | 
					 | 
				
			||||||
            if (params.row.status == "CLOSE") {
 | 
					 | 
				
			||||||
              return h("div", [
 | 
					 | 
				
			||||||
                h("Badge", {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    status: "error",
 | 
					 | 
				
			||||||
                    text: "禁用",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                }),
 | 
					 | 
				
			||||||
              ]);
 | 
					 | 
				
			||||||
            } else if (params.row.status == "OPEN") {
 | 
					 | 
				
			||||||
              return h("div", [
 | 
					 | 
				
			||||||
                h("Badge", {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    status: "success",
 | 
					 | 
				
			||||||
                    text: "启用",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                }),
 | 
					 | 
				
			||||||
              ]);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "图片",
 | 
					 | 
				
			||||||
          key: "url",
 | 
					 | 
				
			||||||
          minWidth: 120,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
          render: (h, params) => {
 | 
					 | 
				
			||||||
            return h("img", {
 | 
					 | 
				
			||||||
              attrs: {
 | 
					 | 
				
			||||||
                src: params.row.url,
 | 
					 | 
				
			||||||
                alt: "加载图片失败",
 | 
					 | 
				
			||||||
              },
 | 
					 | 
				
			||||||
              style: {
 | 
					 | 
				
			||||||
                cursor: "pointer",
 | 
					 | 
				
			||||||
                width: "80px",
 | 
					 | 
				
			||||||
                height: "60px",
 | 
					 | 
				
			||||||
                margin: "10px 0",
 | 
					 | 
				
			||||||
                "object-fit": "contain",
 | 
					 | 
				
			||||||
              },
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "排序",
 | 
					 | 
				
			||||||
          key: "sort",
 | 
					 | 
				
			||||||
          minWidth: 120,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "操作",
 | 
					 | 
				
			||||||
          key: "action",
 | 
					 | 
				
			||||||
          align: "center",
 | 
					 | 
				
			||||||
          width: 200,
 | 
					 | 
				
			||||||
          render: (h, params) => {
 | 
					 | 
				
			||||||
            let enableOrDisable = "";
 | 
					 | 
				
			||||||
            if (params.row.status == "CLOSE") {
 | 
					 | 
				
			||||||
              enableOrDisable = h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    type: "success",
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.enable(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "启用"
 | 
					 | 
				
			||||||
              );
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
              enableOrDisable = h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.disable(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "禁用"
 | 
					 | 
				
			||||||
              );
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            return h("div", [
 | 
					 | 
				
			||||||
              h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    type: "primary",
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.edit(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "编辑"
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
              h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    type: "error",
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.remove(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "删除"
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
              enableOrDisable,
 | 
					 | 
				
			||||||
            ]);
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      data: [], // 表单数据
 | 
					 | 
				
			||||||
      total: 0, // 表单数据总数
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					 | 
				
			||||||
    init() {
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changePage(v) {
 | 
					 | 
				
			||||||
      this.searchForm.pageNumber = v;
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
      this.clearSelectAll();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changePageSize(v) {
 | 
					 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    handleSearch() {
 | 
					 | 
				
			||||||
      this.searchForm.pageNumber = 1;
 | 
					 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    handleReset() {
 | 
					 | 
				
			||||||
      this.$refs.searchForm.resetFields();
 | 
					 | 
				
			||||||
      this.searchForm.pageNumber = 1;
 | 
					 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					 | 
				
			||||||
      // 重新加载数据
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changeSort(e) {
 | 
					 | 
				
			||||||
      this.searchForm.sort = e.key;
 | 
					 | 
				
			||||||
      this.searchForm.order = e.order;
 | 
					 | 
				
			||||||
      if (e.order === "normal") {
 | 
					 | 
				
			||||||
        this.searchForm.order = "";
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    clearSelectAll() {
 | 
					 | 
				
			||||||
      this.$refs.table.selectAll(false);
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changeSelect(e) {
 | 
					 | 
				
			||||||
      this.selectList = e;
 | 
					 | 
				
			||||||
      this.selectCount = e.length;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    getDataList() {
 | 
					 | 
				
			||||||
      this.loading = true;
 | 
					 | 
				
			||||||
      // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
					 | 
				
			||||||
      getFocusData(this.searchForm).then((res) => {
 | 
					 | 
				
			||||||
        this.loading = false;
 | 
					 | 
				
			||||||
        if (res.success) {
 | 
					 | 
				
			||||||
          this.data = res.result.records;
 | 
					 | 
				
			||||||
          this.total = res.result.total;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
      // 以下为模拟数据
 | 
					 | 
				
			||||||
      //this.data = [
 | 
					 | 
				
			||||||
      //];
 | 
					 | 
				
			||||||
      this.total = this.data.length;
 | 
					 | 
				
			||||||
      this.loading = false;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    enable(v) {
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认启用",
 | 
					 | 
				
			||||||
        // 记得确认修改此处
 | 
					 | 
				
			||||||
        content: "您确认要确认启用 " + v.name + " ?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          // 删除
 | 
					 | 
				
			||||||
          enableFocus(v.id).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    disable(v) {
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认禁用",
 | 
					 | 
				
			||||||
        // 记得确认修改此处
 | 
					 | 
				
			||||||
        content: "您确认要禁用 " + v.name + " ?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          // 删除
 | 
					 | 
				
			||||||
          disableFocus(v.id).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    handleSubmit() {
 | 
					 | 
				
			||||||
      this.$refs.form.validate((valid) => {
 | 
					 | 
				
			||||||
        if (valid) {
 | 
					 | 
				
			||||||
          this.form.ClientType = "PC";
 | 
					 | 
				
			||||||
          this.submitLoading = true;
 | 
					 | 
				
			||||||
          if (this.modalType === 0) {
 | 
					 | 
				
			||||||
            this.form.status = "OPEN";
 | 
					 | 
				
			||||||
            // 添加 避免编辑后传入id等数据 记得删除
 | 
					 | 
				
			||||||
            delete this.form.id;
 | 
					 | 
				
			||||||
            saveFocusData(this.form).then((res) => {
 | 
					 | 
				
			||||||
              this.submitLoading = false;
 | 
					 | 
				
			||||||
              if (res.success) {
 | 
					 | 
				
			||||||
                this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
                this.modalVisible = false;
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          } else {
 | 
					 | 
				
			||||||
            // 编辑
 | 
					 | 
				
			||||||
            saveFocusData(this.form).then((res) => {
 | 
					 | 
				
			||||||
              this.submitLoading = false;
 | 
					 | 
				
			||||||
              if (res.success) {
 | 
					 | 
				
			||||||
                this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
                this.modalVisible = false;
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    add() {
 | 
					 | 
				
			||||||
      this.modalType = 0;
 | 
					 | 
				
			||||||
      this.modalTitle = "添加";
 | 
					 | 
				
			||||||
      this.$refs.form.resetFields();
 | 
					 | 
				
			||||||
      delete this.form.id;
 | 
					 | 
				
			||||||
      this.modalVisible = true;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    edit(v) {
 | 
					 | 
				
			||||||
      this.modalType = 1;
 | 
					 | 
				
			||||||
      this.modalTitle = "编辑";
 | 
					 | 
				
			||||||
      this.$refs.form.resetFields();
 | 
					 | 
				
			||||||
      // 转换null为""
 | 
					 | 
				
			||||||
      for (let attr in v) {
 | 
					 | 
				
			||||||
        if (v[attr] === null) {
 | 
					 | 
				
			||||||
          v[attr] = "";
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      let str = JSON.stringify(v);
 | 
					 | 
				
			||||||
      let data = JSON.parse(str);
 | 
					 | 
				
			||||||
      this.form = data;
 | 
					 | 
				
			||||||
      this.modalVisible = true;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    remove(v) {
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认删除",
 | 
					 | 
				
			||||||
        // 记得确认修改此处
 | 
					 | 
				
			||||||
        content: "您确认要删除么?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          // 删除
 | 
					 | 
				
			||||||
          delFocus(v.id).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    disableAll() {
 | 
					 | 
				
			||||||
      if (this.selectCount <= 0) {
 | 
					 | 
				
			||||||
        this.$Message.warning("您还未选择要禁用的数据");
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认禁用",
 | 
					 | 
				
			||||||
        content: "您确认要禁用所选的 " + this.selectCount + " 条数据?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          let ids = "";
 | 
					 | 
				
			||||||
          this.selectList.forEach(function (e) {
 | 
					 | 
				
			||||||
            ids += e.id + ",";
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
          ids = ids.substring(0, ids.length - 1);
 | 
					 | 
				
			||||||
          // 批量删除
 | 
					 | 
				
			||||||
          disableFocus(ids).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("禁用成功");
 | 
					 | 
				
			||||||
              this.clearSelectAll();
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    this.init();
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
<style lang="scss">
 | 
					 | 
				
			||||||
.search {
 | 
					 | 
				
			||||||
  .operation {
 | 
					 | 
				
			||||||
    margin-bottom: 2vh;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .select-count {
 | 
					 | 
				
			||||||
    font-weight: 600;
 | 
					 | 
				
			||||||
    color: #40a9ff;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .select-clear {
 | 
					 | 
				
			||||||
    margin-left: 10px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .page {
 | 
					 | 
				
			||||||
    margin-top: 2vh;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .drop-down {
 | 
					 | 
				
			||||||
    margin-left: 5px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
@ -1,474 +0,0 @@
 | 
				
			|||||||
<template>
 | 
					 | 
				
			||||||
  <div class="search">
 | 
					 | 
				
			||||||
    <Card>
 | 
					 | 
				
			||||||
      <Row class="operation">
 | 
					 | 
				
			||||||
        <Button @click="add" type="primary" icon="md-add">添加</Button>
 | 
					 | 
				
			||||||
        <Button @click="disableAll" icon="md-trash">批量禁用</Button>
 | 
					 | 
				
			||||||
        <Button @click="getDataList" icon="md-refresh">刷新</Button>
 | 
					 | 
				
			||||||
        <Button type="dashed" @click="openTip = !openTip">{{
 | 
					 | 
				
			||||||
          openTip ? "关闭提示" : "开启提示"
 | 
					 | 
				
			||||||
        }}</Button>
 | 
					 | 
				
			||||||
      </Row>
 | 
					 | 
				
			||||||
      <Row v-show="openTip">
 | 
					 | 
				
			||||||
        <Alert show-icon>
 | 
					 | 
				
			||||||
          已选择 <span class="select-count">{{ selectCount }}</span> 项
 | 
					 | 
				
			||||||
          <a class="select-clear" @click="clearSelectAll">清空</a>
 | 
					 | 
				
			||||||
        </Alert>
 | 
					 | 
				
			||||||
      </Row>
 | 
					 | 
				
			||||||
      <Table
 | 
					 | 
				
			||||||
        :loading="loading"
 | 
					 | 
				
			||||||
        border
 | 
					 | 
				
			||||||
        :columns="columns"
 | 
					 | 
				
			||||||
        :data="data"
 | 
					 | 
				
			||||||
        ref="table"
 | 
					 | 
				
			||||||
        sortable="custom"
 | 
					 | 
				
			||||||
        @on-sort-change="changeSort"
 | 
					 | 
				
			||||||
        @on-selection-change="changeSelect"
 | 
					 | 
				
			||||||
      ></Table>
 | 
					 | 
				
			||||||
      <Row type="flex" justify="end" class="mt_10">
 | 
					 | 
				
			||||||
        <Page
 | 
					 | 
				
			||||||
          :current="searchForm.pageNumber"
 | 
					 | 
				
			||||||
          :total="total"
 | 
					 | 
				
			||||||
          :page-size="searchForm.pageSize"
 | 
					 | 
				
			||||||
          @on-change="changePage"
 | 
					 | 
				
			||||||
          @on-page-size-change="changePageSize"
 | 
					 | 
				
			||||||
          :page-size-opts="[10, 20, 50]"
 | 
					 | 
				
			||||||
          size="small"
 | 
					 | 
				
			||||||
          show-total
 | 
					 | 
				
			||||||
          show-elevator
 | 
					 | 
				
			||||||
          show-sizer
 | 
					 | 
				
			||||||
        ></Page>
 | 
					 | 
				
			||||||
      </Row>
 | 
					 | 
				
			||||||
    </Card>
 | 
					 | 
				
			||||||
    <Modal
 | 
					 | 
				
			||||||
      :title="modalTitle"
 | 
					 | 
				
			||||||
      v-model="modalVisible"
 | 
					 | 
				
			||||||
      :mask-closable="false"
 | 
					 | 
				
			||||||
      :width="500"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <Form ref="form" :model="form" :label-width="100" :rules="formValidate">
 | 
					 | 
				
			||||||
        <FormItem label="导航栏名称" prop="navigationName">
 | 
					 | 
				
			||||||
          <Input v-model="form.navigationName" clearable style="width: 100%" />
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
        <FormItem label="导航栏链接" prop="url">
 | 
					 | 
				
			||||||
          <Input v-model="form.url" clearable style="width: 100%" />
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
        <FormItem label="品牌图标" prop="image">
 | 
					 | 
				
			||||||
          <upload-pic-input
 | 
					 | 
				
			||||||
            v-model="form.image"
 | 
					 | 
				
			||||||
            style="width: 100%"
 | 
					 | 
				
			||||||
          ></upload-pic-input>
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
      </Form>
 | 
					 | 
				
			||||||
      <div slot="footer">
 | 
					 | 
				
			||||||
        <Button type="text" @click="modalVisible = false">取消</Button>
 | 
					 | 
				
			||||||
        <Button type="primary" :loading="submitLoading" @click="handleSubmit"
 | 
					 | 
				
			||||||
          >提交</Button
 | 
					 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </Modal>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
import {
 | 
					 | 
				
			||||||
  save,
 | 
					 | 
				
			||||||
  getNavigationData,
 | 
					 | 
				
			||||||
  disableNavigation,
 | 
					 | 
				
			||||||
  enableNavigation,
 | 
					 | 
				
			||||||
  delNavigation,
 | 
					 | 
				
			||||||
  update,
 | 
					 | 
				
			||||||
} from "@/api/pages";
 | 
					 | 
				
			||||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
  name: "mobileNavigation",
 | 
					 | 
				
			||||||
  components: {
 | 
					 | 
				
			||||||
    uploadPicInput,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  data() {
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
      openTip: true, // 显示提示
 | 
					 | 
				
			||||||
      loading: true, // 表单加载状态
 | 
					 | 
				
			||||||
      type: "MOBILE", // 手机还是pc
 | 
					 | 
				
			||||||
      modalType: 0, // 添加或编辑标识
 | 
					 | 
				
			||||||
      modalVisible: false, // 添加或编辑显示
 | 
					 | 
				
			||||||
      modalTitle: "", // 添加或编辑标题
 | 
					 | 
				
			||||||
      searchForm: {
 | 
					 | 
				
			||||||
        // 搜索框初始化对象
 | 
					 | 
				
			||||||
        pageNumber: 1, // 当前页数
 | 
					 | 
				
			||||||
        pageSize: 10, // 页面大小
 | 
					 | 
				
			||||||
        sort: "createTime", // 默认排序字段
 | 
					 | 
				
			||||||
        order: "desc", // 默认排序方式
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      form: {
 | 
					 | 
				
			||||||
        // 添加或编辑表单对象初始化数据
 | 
					 | 
				
			||||||
        navigationName: "",
 | 
					 | 
				
			||||||
        image: "",
 | 
					 | 
				
			||||||
        url: "",
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      // 表单验证规则
 | 
					 | 
				
			||||||
      formValidate: {
 | 
					 | 
				
			||||||
        url: [
 | 
					 | 
				
			||||||
          { required: true, message: "导航栏url不能为空", trigger: "blur" },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        navigationName: [
 | 
					 | 
				
			||||||
          { required: true, message: "导航栏不能为空", trigger: "blur" },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      submitLoading: false, // 添加或编辑提交状态
 | 
					 | 
				
			||||||
      selectList: [], // 多选数据
 | 
					 | 
				
			||||||
      selectCount: 0, // 多选计数
 | 
					 | 
				
			||||||
      columns: [
 | 
					 | 
				
			||||||
        // 表头
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          type: "selection",
 | 
					 | 
				
			||||||
          width: 60,
 | 
					 | 
				
			||||||
          align: "center",
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "导航名称",
 | 
					 | 
				
			||||||
          key: "navigationName",
 | 
					 | 
				
			||||||
          minWidth: 120,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "状态",
 | 
					 | 
				
			||||||
          key: "status",
 | 
					 | 
				
			||||||
          minWidth: 100,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
          render: (h, params) => {
 | 
					 | 
				
			||||||
            if (params.row.status == "CLOSE") {
 | 
					 | 
				
			||||||
              return h("div", [
 | 
					 | 
				
			||||||
                h("Badge", {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    status: "error",
 | 
					 | 
				
			||||||
                    text: "禁用",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                }),
 | 
					 | 
				
			||||||
              ]);
 | 
					 | 
				
			||||||
            } else if (params.row.status == "OPEN") {
 | 
					 | 
				
			||||||
              return h("div", [
 | 
					 | 
				
			||||||
                h("Badge", {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    status: "success",
 | 
					 | 
				
			||||||
                    text: "启用",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                }),
 | 
					 | 
				
			||||||
              ]);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "图片",
 | 
					 | 
				
			||||||
          key: "image",
 | 
					 | 
				
			||||||
          minWidth: 120,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
          render: (h, params) => {
 | 
					 | 
				
			||||||
            return h("img", {
 | 
					 | 
				
			||||||
              attrs: {
 | 
					 | 
				
			||||||
                src: params.row.image,
 | 
					 | 
				
			||||||
                alt: "加载图片失败",
 | 
					 | 
				
			||||||
              },
 | 
					 | 
				
			||||||
              style: {
 | 
					 | 
				
			||||||
                cursor: "pointer",
 | 
					 | 
				
			||||||
                width: "80px",
 | 
					 | 
				
			||||||
                height: "60px",
 | 
					 | 
				
			||||||
                margin: "10px 0",
 | 
					 | 
				
			||||||
                "object-fit": "contain",
 | 
					 | 
				
			||||||
              },
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "排序",
 | 
					 | 
				
			||||||
          key: "sort",
 | 
					 | 
				
			||||||
          minWidth: 120,
 | 
					 | 
				
			||||||
          sortable: false,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "操作",
 | 
					 | 
				
			||||||
          key: "action",
 | 
					 | 
				
			||||||
          align: "center",
 | 
					 | 
				
			||||||
          width: 250,
 | 
					 | 
				
			||||||
          render: (h, params) => {
 | 
					 | 
				
			||||||
            console.warn(params.status);
 | 
					 | 
				
			||||||
            let enableOrDisable = "";
 | 
					 | 
				
			||||||
            if (params.row.status == "CLOSE") {
 | 
					 | 
				
			||||||
              enableOrDisable = h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    type: "success",
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.enable(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "启用"
 | 
					 | 
				
			||||||
              );
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
              enableOrDisable = h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.disable(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "禁用"
 | 
					 | 
				
			||||||
              );
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            return h("div", [
 | 
					 | 
				
			||||||
              h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    type: "primary",
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.edit(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "编辑"
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
              h(
 | 
					 | 
				
			||||||
                "Button",
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                  props: {
 | 
					 | 
				
			||||||
                    type: "error",
 | 
					 | 
				
			||||||
                    size: "small",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  style: {
 | 
					 | 
				
			||||||
                    marginRight: "5px",
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                  on: {
 | 
					 | 
				
			||||||
                    click: () => {
 | 
					 | 
				
			||||||
                      this.del(params.row);
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                  },
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                "删除"
 | 
					 | 
				
			||||||
              ),
 | 
					 | 
				
			||||||
              enableOrDisable,
 | 
					 | 
				
			||||||
            ]);
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      data: [], // 表单数据
 | 
					 | 
				
			||||||
      total: 0, // 表单数据总数
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					 | 
				
			||||||
    init() {
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changePage(v) {
 | 
					 | 
				
			||||||
      this.searchForm.pageNumber = v;
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
      this.clearSelectAll();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changePageSize(v) {
 | 
					 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    handleSearch() {
 | 
					 | 
				
			||||||
      this.searchForm.pageNumber = 1;
 | 
					 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    handleReset() {
 | 
					 | 
				
			||||||
      this.$refs.searchForm.resetFields();
 | 
					 | 
				
			||||||
      this.searchForm.pageNumber = 1;
 | 
					 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					 | 
				
			||||||
      // 重新加载数据
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changeSort(e) {
 | 
					 | 
				
			||||||
      this.searchForm.sort = e.key;
 | 
					 | 
				
			||||||
      this.searchForm.order = e.order;
 | 
					 | 
				
			||||||
      if (e.order === "normal") {
 | 
					 | 
				
			||||||
        this.searchForm.order = "";
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    clearSelectAll() {
 | 
					 | 
				
			||||||
      this.$refs.table.selectAll(false);
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changeSelect(e) {
 | 
					 | 
				
			||||||
      this.selectList = e;
 | 
					 | 
				
			||||||
      this.selectCount = e.length;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    getDataList() {
 | 
					 | 
				
			||||||
      this.searchForm.clientType = this.type;
 | 
					 | 
				
			||||||
      this.loading = true;
 | 
					 | 
				
			||||||
      // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
					 | 
				
			||||||
      getNavigationData(this.searchForm).then((res) => {
 | 
					 | 
				
			||||||
        this.loading = false;
 | 
					 | 
				
			||||||
        if (res.success) {
 | 
					 | 
				
			||||||
          this.data = res.result.records;
 | 
					 | 
				
			||||||
          this.total = res.result.total;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
      this.total = this.data.length;
 | 
					 | 
				
			||||||
      this.loading = false;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    handleSubmit() {
 | 
					 | 
				
			||||||
      this.$refs.form.validate((valid) => {
 | 
					 | 
				
			||||||
        if (valid) {
 | 
					 | 
				
			||||||
          this.submitLoading = true;
 | 
					 | 
				
			||||||
          this.form.clientType = this.type;
 | 
					 | 
				
			||||||
          if (this.modalType === 0) {
 | 
					 | 
				
			||||||
            // 添加 避免编辑后传入id等数据 记得删除
 | 
					 | 
				
			||||||
            delete this.form.id;
 | 
					 | 
				
			||||||
            save(this.form).then((res) => {
 | 
					 | 
				
			||||||
              this.submitLoading = false;
 | 
					 | 
				
			||||||
              if (res.success) {
 | 
					 | 
				
			||||||
                this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
                this.modalVisible = false;
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          } else {
 | 
					 | 
				
			||||||
            // 编辑
 | 
					 | 
				
			||||||
            update(this.form).then((res) => {
 | 
					 | 
				
			||||||
              this.submitLoading = false;
 | 
					 | 
				
			||||||
              if (res.success) {
 | 
					 | 
				
			||||||
                this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
                this.modalVisible = false;
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    add() {
 | 
					 | 
				
			||||||
      this.modalType = 0;
 | 
					 | 
				
			||||||
      this.modalTitle = "添加";
 | 
					 | 
				
			||||||
      this.$refs.form.resetFields();
 | 
					 | 
				
			||||||
      delete this.form.id;
 | 
					 | 
				
			||||||
      this.modalVisible = true;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    edit(v) {
 | 
					 | 
				
			||||||
      this.modalType = 1;
 | 
					 | 
				
			||||||
      this.modalTitle = "编辑";
 | 
					 | 
				
			||||||
      this.$refs.form.resetFields();
 | 
					 | 
				
			||||||
      // 转换null为""
 | 
					 | 
				
			||||||
      for (let attr in v) {
 | 
					 | 
				
			||||||
        if (v[attr] === null) {
 | 
					 | 
				
			||||||
          v[attr] = "";
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      let str = JSON.stringify(v);
 | 
					 | 
				
			||||||
      let data = JSON.parse(str);
 | 
					 | 
				
			||||||
      this.form = data;
 | 
					 | 
				
			||||||
      this.modalVisible = true;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    enable(v) {
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认启用",
 | 
					 | 
				
			||||||
        // 记得确认修改此处
 | 
					 | 
				
			||||||
        content: "您确认要确认启用 " + v.navigationName + " ?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          // 删除
 | 
					 | 
				
			||||||
          enableNavigation(v.id).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    disable(v) {
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认禁用",
 | 
					 | 
				
			||||||
        // 记得确认修改此处
 | 
					 | 
				
			||||||
        content: "您确认要禁用 " + v.navigationName + " ?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          // 删除
 | 
					 | 
				
			||||||
          disableNavigation(v.id).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    disableAll() {
 | 
					 | 
				
			||||||
      if (this.selectCount <= 0) {
 | 
					 | 
				
			||||||
        this.$Message.warning("您还未选择要禁用的数据");
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认禁用",
 | 
					 | 
				
			||||||
        content: "您确认要禁用所选的 " + this.selectCount + " 条数据?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          let ids = "";
 | 
					 | 
				
			||||||
          this.selectList.forEach(function (e) {
 | 
					 | 
				
			||||||
            ids += e.id + ",";
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
          ids = ids.substring(0, ids.length - 1);
 | 
					 | 
				
			||||||
          // 批量禁用
 | 
					 | 
				
			||||||
          disableNavigation(ids).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
              this.clearSelectAll();
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    del(v) {
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					 | 
				
			||||||
        title: "确认删除",
 | 
					 | 
				
			||||||
        // 记得确认修改此处
 | 
					 | 
				
			||||||
        content: "您确认要永久性删除 " + v.navigationName + " ?",
 | 
					 | 
				
			||||||
        loading: true,
 | 
					 | 
				
			||||||
        onOk: () => {
 | 
					 | 
				
			||||||
          // 删除
 | 
					 | 
				
			||||||
          delNavigation(v.id).then((res) => {
 | 
					 | 
				
			||||||
            this.$Modal.remove();
 | 
					 | 
				
			||||||
            if (res.success) {
 | 
					 | 
				
			||||||
              this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
              this.getDataList();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    this.init();
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
@ -1,439 +0,0 @@
 | 
				
			|||||||
<template>
 | 
					 | 
				
			||||||
    <div class="search">
 | 
					 | 
				
			||||||
                <Card>
 | 
					 | 
				
			||||||
                    <Row class="operation">
 | 
					 | 
				
			||||||
                        <Button @click="add" type="primary" icon="md-add">添加</Button>
 | 
					 | 
				
			||||||
                        <Button @click="disableAll" icon="md-trash">批量禁用</Button>
 | 
					 | 
				
			||||||
                        <Button @click="getDataList" icon="md-refresh">刷新</Button>
 | 
					 | 
				
			||||||
                        <Button type="dashed" @click="openTip=!openTip">{{openTip ? "关闭提示" : "开启提示"}}</Button>
 | 
					 | 
				
			||||||
                    </Row>
 | 
					 | 
				
			||||||
                    <Row v-show="openTip">
 | 
					 | 
				
			||||||
                        <Alert show-icon>
 | 
					 | 
				
			||||||
                            已选择 <span class="select-count">{{selectCount}}</span> 项
 | 
					 | 
				
			||||||
                            <a class="select-clear" @click="clearSelectAll">清空</a>
 | 
					 | 
				
			||||||
                        </Alert>
 | 
					 | 
				
			||||||
                    </Row>
 | 
					 | 
				
			||||||
                    <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
 | 
					 | 
				
			||||||
                            @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
 | 
					 | 
				
			||||||
                    <Row type="flex" justify="end" class="mt_10">
 | 
					 | 
				
			||||||
                        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
 | 
					 | 
				
			||||||
                              @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]"
 | 
					 | 
				
			||||||
                              size="small" show-total show-elevator show-sizer></Page>
 | 
					 | 
				
			||||||
                    </Row>
 | 
					 | 
				
			||||||
                </Card>
 | 
					 | 
				
			||||||
        <Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500">
 | 
					 | 
				
			||||||
            <Form ref="form" :model="form" :label-width="100" :rules="formValidate">
 | 
					 | 
				
			||||||
                <FormItem label="导航栏名称" prop="navigationName">
 | 
					 | 
				
			||||||
                    <Input v-model="form.navigationName" clearable style="width:100%"/>
 | 
					 | 
				
			||||||
                </FormItem>
 | 
					 | 
				
			||||||
                <FormItem label="导航栏链接" prop="url">
 | 
					 | 
				
			||||||
                    <Input v-model="form.url" clearable style="width:100%"/>
 | 
					 | 
				
			||||||
                </FormItem>
 | 
					 | 
				
			||||||
                <FormItem label="品牌图标" prop="image">
 | 
					 | 
				
			||||||
                    <upload-pic-input v-model="form.image" style="width:100%"></upload-pic-input>
 | 
					 | 
				
			||||||
                </FormItem>
 | 
					 | 
				
			||||||
            </Form>
 | 
					 | 
				
			||||||
            <div slot="footer">
 | 
					 | 
				
			||||||
                <Button type="text" @click="modalVisible=false">取消</Button>
 | 
					 | 
				
			||||||
                <Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
        </Modal>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
    import {
 | 
					 | 
				
			||||||
        save,
 | 
					 | 
				
			||||||
        getNavigationData,
 | 
					 | 
				
			||||||
        disableNavigation,
 | 
					 | 
				
			||||||
        enableNavigation,
 | 
					 | 
				
			||||||
        delNavigation,
 | 
					 | 
				
			||||||
        update
 | 
					 | 
				
			||||||
    } from "@/api/pages";
 | 
					 | 
				
			||||||
    import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    export default {
 | 
					 | 
				
			||||||
        name: "pcNavigation",
 | 
					 | 
				
			||||||
        components: {
 | 
					 | 
				
			||||||
            uploadPicInput
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        data() {
 | 
					 | 
				
			||||||
            return {
 | 
					 | 
				
			||||||
                openTip: true, // 显示提示
 | 
					 | 
				
			||||||
                loading: true, // 表单加载状态
 | 
					 | 
				
			||||||
                type: "PC", // 手机还是pc
 | 
					 | 
				
			||||||
                modalType: 0, // 添加或编辑标识
 | 
					 | 
				
			||||||
                modalVisible: false, // 添加或编辑显示
 | 
					 | 
				
			||||||
                modalTitle: "", // 添加或编辑标题
 | 
					 | 
				
			||||||
                searchForm: { // 搜索框初始化对象
 | 
					 | 
				
			||||||
                    pageNumber: 1, // 当前页数
 | 
					 | 
				
			||||||
                    pageSize: 10, // 页面大小
 | 
					 | 
				
			||||||
                    sort: "createTime", // 默认排序字段
 | 
					 | 
				
			||||||
                    order: "desc", // 默认排序方式
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                form: { // 添加或编辑表单对象初始化数据
 | 
					 | 
				
			||||||
                    navigationName: "",
 | 
					 | 
				
			||||||
                    image: "",
 | 
					 | 
				
			||||||
                    url: "",
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                // 表单验证规则
 | 
					 | 
				
			||||||
                formValidate: {
 | 
					 | 
				
			||||||
                    url: [{required: true, message: "导航栏url不能为空", trigger: "blur"}],
 | 
					 | 
				
			||||||
                    navigationName: [{required: true, message: "导航栏不能为空", trigger: "blur"}],
 | 
					 | 
				
			||||||
                },
 | 
					 | 
				
			||||||
                submitLoading: false, // 添加或编辑提交状态
 | 
					 | 
				
			||||||
                selectList: [], // 多选数据
 | 
					 | 
				
			||||||
                selectCount: 0, // 多选计数
 | 
					 | 
				
			||||||
                columns: [
 | 
					 | 
				
			||||||
                    // 表头
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        type: "selection",
 | 
					 | 
				
			||||||
                        width: 60,
 | 
					 | 
				
			||||||
                        align: "center"
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        title: "导航名称",
 | 
					 | 
				
			||||||
                        key: "navigationName",
 | 
					 | 
				
			||||||
                        minWidth: 120,
 | 
					 | 
				
			||||||
                        sortable: false,
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        title: "状态",
 | 
					 | 
				
			||||||
                        key: "status",
 | 
					 | 
				
			||||||
                        minWidth: 100,
 | 
					 | 
				
			||||||
                        sortable: false,
 | 
					 | 
				
			||||||
                        render: (h, params) => {
 | 
					 | 
				
			||||||
                            if (params.row.status == 'CLOSE') {
 | 
					 | 
				
			||||||
                                return h("div", [
 | 
					 | 
				
			||||||
                                    h("Badge", {
 | 
					 | 
				
			||||||
                                        props: {
 | 
					 | 
				
			||||||
                                            status: "error",
 | 
					 | 
				
			||||||
                                            text: "禁用"
 | 
					 | 
				
			||||||
                                        }
 | 
					 | 
				
			||||||
                                    })
 | 
					 | 
				
			||||||
                                ]);
 | 
					 | 
				
			||||||
                            } else if (params.row.status == 'OPEN') {
 | 
					 | 
				
			||||||
                                return h("div", [
 | 
					 | 
				
			||||||
                                    h("Badge", {
 | 
					 | 
				
			||||||
                                        props: {
 | 
					 | 
				
			||||||
                                            status: "success",
 | 
					 | 
				
			||||||
                                            text: "启用"
 | 
					 | 
				
			||||||
                                        }
 | 
					 | 
				
			||||||
                                    })
 | 
					 | 
				
			||||||
                                ]);
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        title: "图片",
 | 
					 | 
				
			||||||
                        key: "image",
 | 
					 | 
				
			||||||
                        minWidth: 120,
 | 
					 | 
				
			||||||
                        sortable: false,
 | 
					 | 
				
			||||||
                        render: (h, params) => {
 | 
					 | 
				
			||||||
                            return h("img", {
 | 
					 | 
				
			||||||
                                attrs: {
 | 
					 | 
				
			||||||
                                    src: params.row.image,
 | 
					 | 
				
			||||||
                                    alt: "加载图片失败"
 | 
					 | 
				
			||||||
                                },
 | 
					 | 
				
			||||||
                                style: {
 | 
					 | 
				
			||||||
                                    cursor: "pointer",
 | 
					 | 
				
			||||||
                                    width: "80px",
 | 
					 | 
				
			||||||
                                    height: "60px",
 | 
					 | 
				
			||||||
                                    margin: "10px 0",
 | 
					 | 
				
			||||||
                                    "object-fit": "contain"
 | 
					 | 
				
			||||||
                                }
 | 
					 | 
				
			||||||
                            });
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        title: "排序",
 | 
					 | 
				
			||||||
                        key: "sort",
 | 
					 | 
				
			||||||
                        minWidth: 120,
 | 
					 | 
				
			||||||
                        sortable: false,
 | 
					 | 
				
			||||||
                    },
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        title: "操作",
 | 
					 | 
				
			||||||
                        key: "action",
 | 
					 | 
				
			||||||
                        align: "center",
 | 
					 | 
				
			||||||
                        width: 250,
 | 
					 | 
				
			||||||
                        render: (h, params) => {
 | 
					 | 
				
			||||||
                            console.warn(params.status)
 | 
					 | 
				
			||||||
                            let enableOrDisable = "";
 | 
					 | 
				
			||||||
                            if (params.row.status == "CLOSE") {
 | 
					 | 
				
			||||||
                                enableOrDisable = h(
 | 
					 | 
				
			||||||
                                    "Button",
 | 
					 | 
				
			||||||
                                    {
 | 
					 | 
				
			||||||
                                        props: {
 | 
					 | 
				
			||||||
                                            type: "success",
 | 
					 | 
				
			||||||
                                            size: "small"
 | 
					 | 
				
			||||||
                                        },
 | 
					 | 
				
			||||||
                                        style: {
 | 
					 | 
				
			||||||
                                            marginRight: "5px"
 | 
					 | 
				
			||||||
                                        },
 | 
					 | 
				
			||||||
                                        on: {
 | 
					 | 
				
			||||||
                                            click: () => {
 | 
					 | 
				
			||||||
                                                this.enable(params.row);
 | 
					 | 
				
			||||||
                                            }
 | 
					 | 
				
			||||||
                                        }
 | 
					 | 
				
			||||||
                                    },
 | 
					 | 
				
			||||||
                                    "启用"
 | 
					 | 
				
			||||||
                                );
 | 
					 | 
				
			||||||
                            } else {
 | 
					 | 
				
			||||||
                                enableOrDisable = h(
 | 
					 | 
				
			||||||
                                    "Button",
 | 
					 | 
				
			||||||
                                    {
 | 
					 | 
				
			||||||
                                        props: {
 | 
					 | 
				
			||||||
                                            size: "small"
 | 
					 | 
				
			||||||
                                        },
 | 
					 | 
				
			||||||
                                        style: {
 | 
					 | 
				
			||||||
                                            marginRight: "5px"
 | 
					 | 
				
			||||||
                                        },
 | 
					 | 
				
			||||||
                                        on: {
 | 
					 | 
				
			||||||
                                            click: () => {
 | 
					 | 
				
			||||||
                                                this.disable(params.row);
 | 
					 | 
				
			||||||
                                            }
 | 
					 | 
				
			||||||
                                        }
 | 
					 | 
				
			||||||
                                    },
 | 
					 | 
				
			||||||
                                    "禁用"
 | 
					 | 
				
			||||||
                                );
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                            return h("div", [
 | 
					 | 
				
			||||||
                                h(
 | 
					 | 
				
			||||||
                                    "Button",
 | 
					 | 
				
			||||||
                                    {
 | 
					 | 
				
			||||||
                                        props: {
 | 
					 | 
				
			||||||
                                            type: "primary",
 | 
					 | 
				
			||||||
                                            size: "small"
 | 
					 | 
				
			||||||
                                        },
 | 
					 | 
				
			||||||
                                        style: {
 | 
					 | 
				
			||||||
                                            marginRight: "5px"
 | 
					 | 
				
			||||||
                                        },
 | 
					 | 
				
			||||||
                                        on: {
 | 
					 | 
				
			||||||
                                            click: () => {
 | 
					 | 
				
			||||||
                                                this.edit(params.row);
 | 
					 | 
				
			||||||
                                            }
 | 
					 | 
				
			||||||
                                        }
 | 
					 | 
				
			||||||
                                    },
 | 
					 | 
				
			||||||
                                    "编辑"
 | 
					 | 
				
			||||||
                                ),
 | 
					 | 
				
			||||||
                                h(
 | 
					 | 
				
			||||||
                                    "Button",
 | 
					 | 
				
			||||||
                                    {
 | 
					 | 
				
			||||||
                                        props: {
 | 
					 | 
				
			||||||
                                            type: "error",
 | 
					 | 
				
			||||||
                                            size: "small",
 | 
					 | 
				
			||||||
                                        },
 | 
					 | 
				
			||||||
                                        style: {
 | 
					 | 
				
			||||||
                                            marginRight: "5px"
 | 
					 | 
				
			||||||
                                        },
 | 
					 | 
				
			||||||
                                        on: {
 | 
					 | 
				
			||||||
                                            click: () => {
 | 
					 | 
				
			||||||
                                                this.del(params.row);
 | 
					 | 
				
			||||||
                                            }
 | 
					 | 
				
			||||||
                                        }
 | 
					 | 
				
			||||||
                                    },
 | 
					 | 
				
			||||||
                                    "删除"
 | 
					 | 
				
			||||||
                                ),
 | 
					 | 
				
			||||||
                                enableOrDisable,
 | 
					 | 
				
			||||||
                            ]);
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                ],
 | 
					 | 
				
			||||||
                data: [], // 表单数据
 | 
					 | 
				
			||||||
                total: 0 // 表单数据总数
 | 
					 | 
				
			||||||
            };
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        methods: {
 | 
					 | 
				
			||||||
            init() {
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            changePage(v) {
 | 
					 | 
				
			||||||
                this.searchForm.pageNumber = v;
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
                this.clearSelectAll();
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            changePageSize(v) {
 | 
					 | 
				
			||||||
                this.searchForm.pageSize = v;
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            handleSearch() {
 | 
					 | 
				
			||||||
                this.searchForm.pageNumber = 1;
 | 
					 | 
				
			||||||
                this.searchForm.pageSize = 10;
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            handleReset() {
 | 
					 | 
				
			||||||
                this.$refs.searchForm.resetFields();
 | 
					 | 
				
			||||||
                this.searchForm.pageNumber = 1;
 | 
					 | 
				
			||||||
                this.searchForm.pageSize = 10;
 | 
					 | 
				
			||||||
                // 重新加载数据
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            changeSort(e) {
 | 
					 | 
				
			||||||
                this.searchForm.sort = e.key;
 | 
					 | 
				
			||||||
                this.searchForm.order = e.order;
 | 
					 | 
				
			||||||
                if (e.order === "normal") {
 | 
					 | 
				
			||||||
                    this.searchForm.order = "";
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                this.getDataList();
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            clearSelectAll() {
 | 
					 | 
				
			||||||
                this.$refs.table.selectAll(false);
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            changeSelect(e) {
 | 
					 | 
				
			||||||
                this.selectList = e;
 | 
					 | 
				
			||||||
                this.selectCount = e.length;
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            getDataList() {
 | 
					 | 
				
			||||||
                this.searchForm.clientType = this.type
 | 
					 | 
				
			||||||
                this.loading = true;
 | 
					 | 
				
			||||||
                // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
					 | 
				
			||||||
                getNavigationData(this.searchForm).then(res => {
 | 
					 | 
				
			||||||
                    this.loading = false;
 | 
					 | 
				
			||||||
                    if (res.success) {
 | 
					 | 
				
			||||||
                        this.data = res.result.records;
 | 
					 | 
				
			||||||
                        this.total = res.result.total;
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
                this.total = this.data.length;
 | 
					 | 
				
			||||||
                this.loading = false;
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            handleSubmit() {
 | 
					 | 
				
			||||||
                this.$refs.form.validate(valid => {
 | 
					 | 
				
			||||||
                    if (valid) {
 | 
					 | 
				
			||||||
                        this.submitLoading = true;
 | 
					 | 
				
			||||||
                        this.form.clientType = this.type
 | 
					 | 
				
			||||||
                        if (this.modalType === 0) {
 | 
					 | 
				
			||||||
                            // 添加 避免编辑后传入id等数据 记得删除
 | 
					 | 
				
			||||||
                            delete this.form.id;
 | 
					 | 
				
			||||||
                            save(this.form).then(res => {
 | 
					 | 
				
			||||||
                                this.submitLoading = false;
 | 
					 | 
				
			||||||
                                if (res.success) {
 | 
					 | 
				
			||||||
                                    this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                                    this.getDataList();
 | 
					 | 
				
			||||||
                                    this.modalVisible = false;
 | 
					 | 
				
			||||||
                                }
 | 
					 | 
				
			||||||
                            });
 | 
					 | 
				
			||||||
                        } else {
 | 
					 | 
				
			||||||
                            // 编辑
 | 
					 | 
				
			||||||
                            update(this.form).then(res => {
 | 
					 | 
				
			||||||
                                this.submitLoading = false;
 | 
					 | 
				
			||||||
                                if (res.success) {
 | 
					 | 
				
			||||||
                                    this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                                    this.getDataList();
 | 
					 | 
				
			||||||
                                    this.modalVisible = false;
 | 
					 | 
				
			||||||
                                }
 | 
					 | 
				
			||||||
                            });
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            add() {
 | 
					 | 
				
			||||||
                this.modalType = 0;
 | 
					 | 
				
			||||||
                this.modalTitle = "添加";
 | 
					 | 
				
			||||||
                this.$refs.form.resetFields();
 | 
					 | 
				
			||||||
                delete this.form.id;
 | 
					 | 
				
			||||||
                this.modalVisible = true;
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            edit(v) {
 | 
					 | 
				
			||||||
                this.modalType = 1;
 | 
					 | 
				
			||||||
                this.modalTitle = "编辑";
 | 
					 | 
				
			||||||
                this.$refs.form.resetFields();
 | 
					 | 
				
			||||||
                // 转换null为""
 | 
					 | 
				
			||||||
                for (let attr in v) {
 | 
					 | 
				
			||||||
                    if (v[attr] === null) {
 | 
					 | 
				
			||||||
                        v[attr] = "";
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                let str = JSON.stringify(v);
 | 
					 | 
				
			||||||
                let data = JSON.parse(str);
 | 
					 | 
				
			||||||
                this.form = data;
 | 
					 | 
				
			||||||
                this.modalVisible = true;
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            enable(v){
 | 
					 | 
				
			||||||
                this.$Modal.confirm({
 | 
					 | 
				
			||||||
                    title: "确认启用",
 | 
					 | 
				
			||||||
                    // 记得确认修改此处
 | 
					 | 
				
			||||||
                    content: "您确认要确认启用 " + v.navigationName + " ?",
 | 
					 | 
				
			||||||
                    loading: true,
 | 
					 | 
				
			||||||
                    onOk: () => {
 | 
					 | 
				
			||||||
                        // 删除
 | 
					 | 
				
			||||||
                        enableNavigation(v.id).then(res => {
 | 
					 | 
				
			||||||
                            this.$Modal.remove();
 | 
					 | 
				
			||||||
                            if (res.success) {
 | 
					 | 
				
			||||||
                                this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                                this.getDataList();
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                        });
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            disable(v) {
 | 
					 | 
				
			||||||
                this.$Modal.confirm({
 | 
					 | 
				
			||||||
                    title: "确认禁用",
 | 
					 | 
				
			||||||
                    // 记得确认修改此处
 | 
					 | 
				
			||||||
                    content: "您确认要禁用 " + v.navigationName + " ?",
 | 
					 | 
				
			||||||
                    loading: true,
 | 
					 | 
				
			||||||
                    onOk: () => {
 | 
					 | 
				
			||||||
                        // 删除
 | 
					 | 
				
			||||||
                        disableNavigation(v.id).then(res => {
 | 
					 | 
				
			||||||
                            this.$Modal.remove();
 | 
					 | 
				
			||||||
                            if (res.success) {
 | 
					 | 
				
			||||||
                                this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                                this.getDataList();
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                        });
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            disableAll() {
 | 
					 | 
				
			||||||
                if (this.selectCount <= 0) {
 | 
					 | 
				
			||||||
                    this.$Message.warning("您还未选择要禁用的数据");
 | 
					 | 
				
			||||||
                    return;
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                this.$Modal.confirm({
 | 
					 | 
				
			||||||
                    title: "确认禁用",
 | 
					 | 
				
			||||||
                    content: "您确认要禁用所选的 " + this.selectCount + " 条数据?",
 | 
					 | 
				
			||||||
                    loading: true,
 | 
					 | 
				
			||||||
                    onOk: () => {
 | 
					 | 
				
			||||||
                        let ids = "";
 | 
					 | 
				
			||||||
                        this.selectList.forEach(function (e) {
 | 
					 | 
				
			||||||
                            ids += e.id + ",";
 | 
					 | 
				
			||||||
                        });
 | 
					 | 
				
			||||||
                        ids = ids.substring(0, ids.length - 1);
 | 
					 | 
				
			||||||
                        // 批量禁用
 | 
					 | 
				
			||||||
                        disableNavigation(ids).then(res => {
 | 
					 | 
				
			||||||
                            this.$Modal.remove();
 | 
					 | 
				
			||||||
                            if (res.success) {
 | 
					 | 
				
			||||||
                                this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                                this.clearSelectAll();
 | 
					 | 
				
			||||||
                                this.getDataList();
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                        });
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            del(v) {
 | 
					 | 
				
			||||||
                this.$Modal.confirm({
 | 
					 | 
				
			||||||
                    title: "确认删除",
 | 
					 | 
				
			||||||
                    // 记得确认修改此处
 | 
					 | 
				
			||||||
                    content: "您确认要永久性删除 " + v.navigationName + " ?",
 | 
					 | 
				
			||||||
                    loading: true,
 | 
					 | 
				
			||||||
                    onOk: () => {
 | 
					 | 
				
			||||||
                        // 删除
 | 
					 | 
				
			||||||
                        delNavigation(v.id).then(res => {
 | 
					 | 
				
			||||||
                            this.$Modal.remove();
 | 
					 | 
				
			||||||
                            if (res.success) {
 | 
					 | 
				
			||||||
                                this.$Message.success("操作成功");
 | 
					 | 
				
			||||||
                                this.getDataList();
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                        });
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        mounted() {
 | 
					 | 
				
			||||||
            this.init();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
@ -1,65 +0,0 @@
 | 
				
			|||||||
.own-space {
 | 
					 | 
				
			||||||
  .own-space-new {
 | 
					 | 
				
			||||||
    .ivu-card-body {
 | 
					 | 
				
			||||||
      padding: 16px 16px 16px 0px;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .own-wrap {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .title {
 | 
					 | 
				
			||||||
      font-size: 20px;
 | 
					 | 
				
			||||||
      color: rgba(0, 0, 0, .85);
 | 
					 | 
				
			||||||
      line-height: 28px;
 | 
					 | 
				
			||||||
      font-weight: 500;
 | 
					 | 
				
			||||||
      margin-bottom: 12px;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .safe {
 | 
					 | 
				
			||||||
      width: 100%;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      .item {
 | 
					 | 
				
			||||||
        width: 100%;
 | 
					 | 
				
			||||||
        display: flex;
 | 
					 | 
				
			||||||
        align-items: center;
 | 
					 | 
				
			||||||
        justify-content: space-between;
 | 
					 | 
				
			||||||
        padding-top: 14px;
 | 
					 | 
				
			||||||
        padding-bottom: 14px;
 | 
					 | 
				
			||||||
        border-bottom: 1px solid #e8e8e8;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        .title {
 | 
					 | 
				
			||||||
          color: rgba(0, 0, 0, .65);
 | 
					 | 
				
			||||||
          margin-bottom: 4px;
 | 
					 | 
				
			||||||
          font-size: 14px;
 | 
					 | 
				
			||||||
          line-height: 22px;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        .desc {
 | 
					 | 
				
			||||||
          color: rgba(0, 0, 0, .45);
 | 
					 | 
				
			||||||
          font-size: 14px;
 | 
					 | 
				
			||||||
          line-height: 22px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          .red {
 | 
					 | 
				
			||||||
            color: #ed3f14;
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          .middle {
 | 
					 | 
				
			||||||
            color: #faad14;
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          .green {
 | 
					 | 
				
			||||||
            color: #52c41a;
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/deep/ .upload-list {
 | 
					 | 
				
			||||||
  img {
 | 
					 | 
				
			||||||
    width: 100%;
 | 
					 | 
				
			||||||
    height: 100%;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,7 +1,3 @@
 | 
				
			|||||||
<style lang="scss" scoped>
 | 
					 | 
				
			||||||
@import "./personal-center.scss";
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="own-space">
 | 
					  <div class="own-space">
 | 
				
			||||||
    <Card class="own-space-new">
 | 
					    <Card class="own-space-new">
 | 
				
			||||||
@ -85,6 +81,7 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 初始化数据
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      let v = JSON.parse(Cookies.get("userInfo"));
 | 
					      let v = JSON.parse(Cookies.get("userInfo"));
 | 
				
			||||||
      // 转换null为""
 | 
					      // 转换null为""
 | 
				
			||||||
@ -97,15 +94,18 @@ export default {
 | 
				
			|||||||
      this.userForm = userInfo;
 | 
					      this.userForm = userInfo;
 | 
				
			||||||
      console.log(userInfo)
 | 
					      console.log(userInfo)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 跳转修改密码页面
 | 
				
			||||||
    changePassword() {
 | 
					    changePassword() {
 | 
				
			||||||
      util.openNewPage(this, "change-password");
 | 
					      util.openNewPage(this, "change-password");
 | 
				
			||||||
      this.$router.push({
 | 
					      this.$router.push({
 | 
				
			||||||
        name: "change_password"
 | 
					        name: "change_password"
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 左侧菜单点击
 | 
				
			||||||
    changeMenu(v) {
 | 
					    changeMenu(v) {
 | 
				
			||||||
      this.currMenu = v;
 | 
					      this.currMenu = v;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 保存
 | 
				
			||||||
    saveEdit() {
 | 
					    saveEdit() {
 | 
				
			||||||
      this.saveLoading = true;
 | 
					      this.saveLoading = true;
 | 
				
			||||||
      let params = this.userForm;
 | 
					      let params = this.userForm;
 | 
				
			||||||
@ -117,7 +117,6 @@ export default {
 | 
				
			|||||||
          Cookies.set("userInfo", this.userForm);
 | 
					          Cookies.set("userInfo", this.userForm);
 | 
				
			||||||
          // 更新头像
 | 
					          // 更新头像
 | 
				
			||||||
          this.$store.commit("setAvatarPath", this.userForm.avatar);
 | 
					          this.$store.commit("setAvatarPath", this.userForm.avatar);
 | 
				
			||||||
 | 
					 | 
				
			||||||
          setTimeout(()=>{
 | 
					          setTimeout(()=>{
 | 
				
			||||||
            this.$router.go(0)
 | 
					            this.$router.go(0)
 | 
				
			||||||
          },500)
 | 
					          },500)
 | 
				
			||||||
@ -125,31 +124,77 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    updateUserInfo() {
 | 
					 | 
				
			||||||
      // 更新用户信息
 | 
					 | 
				
			||||||
      userInfo().then(res => {
 | 
					 | 
				
			||||||
        if (res.success) {
 | 
					 | 
				
			||||||
          // 避免超过大小限制
 | 
					 | 
				
			||||||
          delete res.result.permissions;
 | 
					 | 
				
			||||||
          if (this.getStore("saveLogin")) {
 | 
					 | 
				
			||||||
            // 保存7天
 | 
					 | 
				
			||||||
            Cookies.set("userInfo", JSON.stringify(res.result), {
 | 
					 | 
				
			||||||
              expires: 7
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          } else {
 | 
					 | 
				
			||||||
            Cookies.set("userInfo", JSON.stringify(res.result));
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
          this.setStore("userInfo", res.result);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changeMessage(v) {
 | 
					 | 
				
			||||||
      this.setStore("messageOpen", v);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    let type = this.$route.query.type;
 | 
					 | 
				
			||||||
    this.init();
 | 
					    this.init();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					  .own-space {
 | 
				
			||||||
 | 
					  .own-space-new {
 | 
				
			||||||
 | 
					    .ivu-card-body {
 | 
				
			||||||
 | 
					      padding: 16px 16px 16px 0px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .own-wrap {
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    .title {
 | 
				
			||||||
 | 
					      font-size: 20px;
 | 
				
			||||||
 | 
					      color: rgba(0, 0, 0, .85);
 | 
				
			||||||
 | 
					      line-height: 28px;
 | 
				
			||||||
 | 
					      font-weight: 500;
 | 
				
			||||||
 | 
					      margin-bottom: 12px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    .safe {
 | 
				
			||||||
 | 
					      width: 100%;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      .item {
 | 
				
			||||||
 | 
					        width: 100%;
 | 
				
			||||||
 | 
					        display: flex;
 | 
				
			||||||
 | 
					        align-items: center;
 | 
				
			||||||
 | 
					        justify-content: space-between;
 | 
				
			||||||
 | 
					        padding-top: 14px;
 | 
				
			||||||
 | 
					        padding-bottom: 14px;
 | 
				
			||||||
 | 
					        border-bottom: 1px solid #e8e8e8;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        .title {
 | 
				
			||||||
 | 
					          color: rgba(0, 0, 0, .65);
 | 
				
			||||||
 | 
					          margin-bottom: 4px;
 | 
				
			||||||
 | 
					          font-size: 14px;
 | 
				
			||||||
 | 
					          line-height: 22px;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        .desc {
 | 
				
			||||||
 | 
					          color: rgba(0, 0, 0, .45);
 | 
				
			||||||
 | 
					          font-size: 14px;
 | 
				
			||||||
 | 
					          line-height: 22px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          .red {
 | 
				
			||||||
 | 
					            color: #ed3f14;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          .middle {
 | 
				
			||||||
 | 
					            color: #faad14;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          .green {
 | 
				
			||||||
 | 
					            color: #52c41a;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/deep/ .upload-list {
 | 
				
			||||||
 | 
					  img {
 | 
				
			||||||
 | 
					    width: 100%;
 | 
				
			||||||
 | 
					    height: 100%;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@ -22,7 +22,7 @@
 | 
				
			|||||||
        <Button @click="add" type="primary">添加优惠券</Button>
 | 
					        <Button @click="add" type="primary">添加优惠券</Button>
 | 
				
			||||||
        <Button @click="delAll">批量下架</Button>
 | 
					        <Button @click="delAll">批量下架</Button>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
      <Table v-if="refreshTable" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
 | 
					      <Table v-if="refreshTable" :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10" @on-selection-change="changeSelect">
 | 
				
			||||||
        <template slot-scope="{ row }" slot="action">
 | 
					        <template slot-scope="{ row }" slot="action">
 | 
				
			||||||
          <Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="success" :class="{'mr_10' : row.promotionStatus === 'START' || row.promotionStatus === 'NEW'}" size="small" @click="edit(row)">编辑
 | 
					          <Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="success" :class="{'mr_10' : row.promotionStatus === 'START' || row.promotionStatus === 'NEW'}" size="small" @click="edit(row)">编辑
 | 
				
			||||||
          </Button>
 | 
					          </Button>
 | 
				
			||||||
@ -37,7 +37,6 @@
 | 
				
			|||||||
    </Card>
 | 
					    </Card>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  getPlatformCouponList,
 | 
					  getPlatformCouponList,
 | 
				
			||||||
@ -46,14 +45,9 @@ import {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "coupon",
 | 
					  name: "coupon",
 | 
				
			||||||
  components: {},
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      loading: true, // 表单加载状态
 | 
					      loading: true, // 表单加载状态
 | 
				
			||||||
      modalType: 0, // 添加或编辑标识
 | 
					 | 
				
			||||||
      modalVisible: false, // 添加或编辑显示
 | 
					 | 
				
			||||||
      modalTitle: "", // 添加或编辑标题
 | 
					 | 
				
			||||||
      searchForm: {
 | 
					      searchForm: {
 | 
				
			||||||
        // 搜索框初始化对象
 | 
					        // 搜索框初始化对象
 | 
				
			||||||
        pageNumber: 1, // 当前页数
 | 
					        pageNumber: 1, // 当前页数
 | 
				
			||||||
@ -62,17 +56,6 @@ export default {
 | 
				
			|||||||
        order: "desc", // 默认排序方式
 | 
					        order: "desc", // 默认排序方式
 | 
				
			||||||
        getType: "", // 默认排序方式
 | 
					        getType: "", // 默认排序方式
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      form: {
 | 
					 | 
				
			||||||
        // 添加或编辑表单对象初始化数据
 | 
					 | 
				
			||||||
        promotionName: "",
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      // 表单验证规则
 | 
					 | 
				
			||||||
      formValidate: {
 | 
					 | 
				
			||||||
        promotionName: [
 | 
					 | 
				
			||||||
          { required: true, message: "不能为空", trigger: "blur" },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      submitLoading: false, // 添加或编辑提交状态
 | 
					 | 
				
			||||||
      selectList: [], // 多选数据
 | 
					      selectList: [], // 多选数据
 | 
				
			||||||
      selectCount: 0, // 多选计数
 | 
					      selectCount: 0, // 多选计数
 | 
				
			||||||
      columns: [
 | 
					      columns: [
 | 
				
			||||||
@ -271,6 +254,7 @@ export default {
 | 
				
			|||||||
    check() { // 选中的优惠券
 | 
					    check() { // 选中的优惠券
 | 
				
			||||||
      this.$emit("selected", this.selectList);
 | 
					      this.$emit("selected", this.selectList);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 初始化数据
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -285,11 +269,12 @@ export default {
 | 
				
			|||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageSize(v) { // 改变页数
 | 
					    changePageSize(v) { // 改变页数
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					      this.searchForm.pageSize = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleSearch() { // 搜索
 | 
					    handleSearch() { // 搜索
 | 
				
			||||||
      this.searchForm.pageNumber = 0;
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					      this.searchForm.pageSize = 10;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -313,7 +298,6 @@ export default {
 | 
				
			|||||||
        this.searchForm.startTime = null;
 | 
					        this.searchForm.startTime = null;
 | 
				
			||||||
        this.searchForm.endTime = null;
 | 
					        this.searchForm.endTime = null;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
					 | 
				
			||||||
      getPlatformCouponList(this.searchForm).then((res) => {
 | 
					      getPlatformCouponList(this.searchForm).then((res) => {
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,240 +0,0 @@
 | 
				
			|||||||
<template>
 | 
					 | 
				
			||||||
  <div>
 | 
					 | 
				
			||||||
    <div class="content-goods-publish">
 | 
					 | 
				
			||||||
      <Form ref="form" :model="form" :label-width="130">
 | 
					 | 
				
			||||||
        <div class="base-info-item">
 | 
					 | 
				
			||||||
          <h4>平台券活动详情</h4>
 | 
					 | 
				
			||||||
          <div class="form-item-view">
 | 
					 | 
				
			||||||
            <FormItem label="活动名称">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.promotionName }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="活动类型">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{
 | 
					 | 
				
			||||||
                getCouponType(form.couponType)
 | 
					 | 
				
			||||||
              }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="面额">
 | 
					 | 
				
			||||||
              <span class="goods-category-name"> ¥{{ form.price | unitPrice }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="活动说明">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.description }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="发放总数">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.publishNum }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="领取限制">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.limitNum }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="活动开始时间">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.startTime }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="消费限额">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{
 | 
					 | 
				
			||||||
                form.consumptionLimit
 | 
					 | 
				
			||||||
              }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="使用有效期">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.startTime }} 至 {{ form.endTime }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="适用品类范围">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{
 | 
					 | 
				
			||||||
                getScopeType(form.scopeType)
 | 
					 | 
				
			||||||
              }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="品类范围描述">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.couponName }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="状态">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{
 | 
					 | 
				
			||||||
                getStatus(form.status)
 | 
					 | 
				
			||||||
              }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="优惠券类型">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{
 | 
					 | 
				
			||||||
                getType(form.getType)
 | 
					 | 
				
			||||||
              }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="活动创建时间">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.createTime }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="活动最后更新时间">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.updateTime }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="更新管理员名称">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.updateBy }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="已发放数量">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.receivedNum }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
            <FormItem label="已使用数量">
 | 
					 | 
				
			||||||
              <span class="goods-category-name">{{ form.usedNum }}</span>
 | 
					 | 
				
			||||||
            </FormItem>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <h4>适用品类范围</h4>
 | 
					 | 
				
			||||||
          <div>
 | 
					 | 
				
			||||||
            <Table :loading="loading" border :columns="columns1" :data="data1" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
 | 
					 | 
				
			||||||
            <Row type="flex" justify="end" class="mt_10">
 | 
					 | 
				
			||||||
              <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
 | 
					 | 
				
			||||||
                size="small" show-total show-elevator show-sizer></Page>
 | 
					 | 
				
			||||||
            </Row>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </Form>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <div class="footer">
 | 
					 | 
				
			||||||
      <Button type="primary" @click="back">返回活动列表</Button>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
import { getPlatformCoupon } from "@/api/promotion";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import uploadPicThumb from "@/views/my-components/lili/upload-pic-thumb";
 | 
					 | 
				
			||||||
import editor from "@/views/my-components/lili/editor";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
  name: "addCoupon",
 | 
					 | 
				
			||||||
  components: {
 | 
					 | 
				
			||||||
    uploadPicThumb,
 | 
					 | 
				
			||||||
    editor,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  data() {
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
      modalType: 0, // 当前类型
 | 
					 | 
				
			||||||
      loading: false, // 表单加载状态
 | 
					 | 
				
			||||||
      searchForm: {
 | 
					 | 
				
			||||||
        // 搜索框初始化对象
 | 
					 | 
				
			||||||
        pageNumber: 1, // 当前页数
 | 
					 | 
				
			||||||
        pageSize: 10, // 页面大小
 | 
					 | 
				
			||||||
        sort: "createTime", // 默认排序字段
 | 
					 | 
				
			||||||
        order: "desc", // 默认排序方式
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      form: {
 | 
					 | 
				
			||||||
        /** 店铺承担比例 */
 | 
					 | 
				
			||||||
        sellerCommission: 0,
 | 
					 | 
				
			||||||
        /** 发行数量 */
 | 
					 | 
				
			||||||
        publishNum: 1,
 | 
					 | 
				
			||||||
        /** 运费承担者 */
 | 
					 | 
				
			||||||
        scopeType: "ALL",
 | 
					 | 
				
			||||||
        /** 消费限额 */
 | 
					 | 
				
			||||||
        consumptionLimit: "",
 | 
					 | 
				
			||||||
        /** 限领数量 */
 | 
					 | 
				
			||||||
        limitNum: 1,
 | 
					 | 
				
			||||||
        /** 活动类型 */
 | 
					 | 
				
			||||||
        couponType: "",
 | 
					 | 
				
			||||||
        /** 优惠券名称 */
 | 
					 | 
				
			||||||
        couponName: "",
 | 
					 | 
				
			||||||
        /** 已被使用数量 */
 | 
					 | 
				
			||||||
        usedNum: 0,
 | 
					 | 
				
			||||||
        /** 已被领取的数量 */
 | 
					 | 
				
			||||||
        receivedNum: 0,
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      id: this.$route.query.id,
 | 
					 | 
				
			||||||
      columns1: [
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "一级类目",
 | 
					 | 
				
			||||||
          key: "name",
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "二级类目",
 | 
					 | 
				
			||||||
          key: "age",
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: "三级类目",
 | 
					 | 
				
			||||||
          key: "address",
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      data1: [
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          name: "王小明",
 | 
					 | 
				
			||||||
          age: 18,
 | 
					 | 
				
			||||||
          address: "北京市朝阳区芍药居",
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          name: "张小刚",
 | 
					 | 
				
			||||||
          age: 25,
 | 
					 | 
				
			||||||
          address: "北京市海淀区西二旗",
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          name: "李小红",
 | 
					 | 
				
			||||||
          age: 30,
 | 
					 | 
				
			||||||
          address: "上海市浦东新区世纪大道",
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          name: "周小伟",
 | 
					 | 
				
			||||||
          age: 26,
 | 
					 | 
				
			||||||
          address: "深圳市南山区深南大道",
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      submitLoading: false, // 添加或编辑提交状态
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    // 如果id不为空则查询信息
 | 
					 | 
				
			||||||
    if (this.id) {
 | 
					 | 
				
			||||||
      this.getCoupon();
 | 
					 | 
				
			||||||
      this.modalType = 1;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					 | 
				
			||||||
    getCouponType(value) {
 | 
					 | 
				
			||||||
      switch (value) {
 | 
					 | 
				
			||||||
        case "POINT":
 | 
					 | 
				
			||||||
          return "打折";
 | 
					 | 
				
			||||||
        case "PRICE":
 | 
					 | 
				
			||||||
          return "减免现金";
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    /** 获取状态 */
 | 
					 | 
				
			||||||
    getStatus(value) {
 | 
					 | 
				
			||||||
      switch (value) {
 | 
					 | 
				
			||||||
        case "NEW":
 | 
					 | 
				
			||||||
          return "新建";
 | 
					 | 
				
			||||||
        case "START":
 | 
					 | 
				
			||||||
          return "开始";
 | 
					 | 
				
			||||||
        case "LOWER":
 | 
					 | 
				
			||||||
          return "结束";
 | 
					 | 
				
			||||||
        case "CANCEL":
 | 
					 | 
				
			||||||
          return "作废";
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    /** 关联范围类型 */
 | 
					 | 
				
			||||||
    getScopeType(value) {
 | 
					 | 
				
			||||||
      switch (value) {
 | 
					 | 
				
			||||||
        case "PORTION_CATEGORY":
 | 
					 | 
				
			||||||
          return "部分商品分类";
 | 
					 | 
				
			||||||
        case "PORTION_GOODS":
 | 
					 | 
				
			||||||
          return "指定商品";
 | 
					 | 
				
			||||||
        case "ALL":
 | 
					 | 
				
			||||||
          return "全品类";
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    /** 优惠券类型 */
 | 
					 | 
				
			||||||
    getType(value) {
 | 
					 | 
				
			||||||
      switch (value) {
 | 
					 | 
				
			||||||
        case "FREE":
 | 
					 | 
				
			||||||
          return "免费获取";
 | 
					 | 
				
			||||||
        case "ACTIVITY":
 | 
					 | 
				
			||||||
          return "活动获取";
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    getCoupon() {
 | 
					 | 
				
			||||||
      getPlatformCoupon(this.id).then((res) => {
 | 
					 | 
				
			||||||
        this.form = res.result;
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    back() {
 | 
					 | 
				
			||||||
      this.$store.commit("removeTag", "platform-coupon-info");
 | 
					 | 
				
			||||||
      this.$router.go(-1);
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<style lang="scss" scoped>
 | 
					 | 
				
			||||||
@import "couponPublish.scss";
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@ -1,257 +0,0 @@
 | 
				
			|||||||
/*选择商品品类*/
 | 
					 | 
				
			||||||
.content-goods-publish {
 | 
					 | 
				
			||||||
  padding: 15px;
 | 
					 | 
				
			||||||
  margin: 0 auto;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
  border: 1px solid #ddd;
 | 
					 | 
				
			||||||
  background: none repeat 0 0 #fff;
 | 
					 | 
				
			||||||
  height: 100%;
 | 
					 | 
				
			||||||
  margin-bottom: 20px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /*商品品类*/
 | 
					 | 
				
			||||||
  .goods-category {
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    padding: 10px;
 | 
					 | 
				
			||||||
    background: #fafafa;
 | 
					 | 
				
			||||||
    border: 1px solid #e6e6e6;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ul {
 | 
					 | 
				
			||||||
      padding: 8px 4px 8px 8px;
 | 
					 | 
				
			||||||
      list-style: none;
 | 
					 | 
				
			||||||
      width: 300px;
 | 
					 | 
				
			||||||
      background: none repeat 0 0 #fff;
 | 
					 | 
				
			||||||
      border: 1px solid #e6e6e6;
 | 
					 | 
				
			||||||
      display: inline-block;
 | 
					 | 
				
			||||||
      letter-spacing: normal;
 | 
					 | 
				
			||||||
      margin-right: 15px;
 | 
					 | 
				
			||||||
      vertical-align: top;
 | 
					 | 
				
			||||||
      word-spacing: normal;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      li {
 | 
					 | 
				
			||||||
        line-height: 20px;
 | 
					 | 
				
			||||||
        padding: 5px;
 | 
					 | 
				
			||||||
        cursor: pointer;
 | 
					 | 
				
			||||||
        color: #333;
 | 
					 | 
				
			||||||
        font-size: 12px;
 | 
					 | 
				
			||||||
        display: flex;
 | 
					 | 
				
			||||||
        flex-wrap: nowrap;
 | 
					 | 
				
			||||||
        flex-direction: row;
 | 
					 | 
				
			||||||
        justify-content: space-between;
 | 
					 | 
				
			||||||
        align-items: center;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /** 当前品类被选中的样式 */
 | 
					 | 
				
			||||||
  .activeClass {
 | 
					 | 
				
			||||||
    background-color: #d9edf7;
 | 
					 | 
				
			||||||
    border: 1px solid #bce8f1;
 | 
					 | 
				
			||||||
    color: #3a87ad;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /*!*当前选择的商品品类文字*!*/
 | 
					 | 
				
			||||||
  .current-goods-category {
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    padding: 10px;
 | 
					 | 
				
			||||||
    width: 100%;
 | 
					 | 
				
			||||||
    border: 1px solid #fbeed5;
 | 
					 | 
				
			||||||
    color: #c09853;
 | 
					 | 
				
			||||||
    background-color: #fcf8e3;
 | 
					 | 
				
			||||||
    margin: 10px auto;
 | 
					 | 
				
			||||||
    padding: 8px 35px 8px 14px;
 | 
					 | 
				
			||||||
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
 | 
					 | 
				
			||||||
    font-size: 12px;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*编辑基本信息*/
 | 
					 | 
				
			||||||
.el-form {
 | 
					 | 
				
			||||||
  padding-bottom: 80px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item {
 | 
					 | 
				
			||||||
    width: 100%;
 | 
					 | 
				
			||||||
    color: gray;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
div.base-info-item {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  h4 {
 | 
					 | 
				
			||||||
    margin-bottom: 10px;
 | 
					 | 
				
			||||||
    padding: 0 10px;
 | 
					 | 
				
			||||||
    border: 1px solid #ddd;
 | 
					 | 
				
			||||||
    background-color: #f8f8f8;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
    color: #333;
 | 
					 | 
				
			||||||
    font-size: 14px;
 | 
					 | 
				
			||||||
    line-height: 40px;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .form-item-view {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    flex-direction: column;
 | 
					 | 
				
			||||||
    align-items: flex-start;
 | 
					 | 
				
			||||||
    justify-content: space-between;
 | 
					 | 
				
			||||||
    padding-left: 80px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .shop-category-text {
 | 
					 | 
				
			||||||
      font-size: 12px;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .item-goods-properts-row {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    flex-direction: row;
 | 
					 | 
				
			||||||
    word-break: break-all;
 | 
					 | 
				
			||||||
    white-space: normal;
 | 
					 | 
				
			||||||
    width: 300px;
 | 
					 | 
				
			||||||
    height: 100px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .item-goods-properts {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    flex-direction: row;
 | 
					 | 
				
			||||||
    margin-bottom: 10px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .form-item {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    align-items: center;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /** 审核信息-拒绝原因 */
 | 
					 | 
				
			||||||
  .auth-info {
 | 
					 | 
				
			||||||
    color: red;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item {
 | 
					 | 
				
			||||||
    width: 30%;
 | 
					 | 
				
			||||||
    min-width: 300px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .goods-name-width {
 | 
					 | 
				
			||||||
    width: 50%;
 | 
					 | 
				
			||||||
    min-width: 300px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item__content {
 | 
					 | 
				
			||||||
    margin-left: 120px;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  p.goods-group-manager {
 | 
					 | 
				
			||||||
    padding-left: 7.5%;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    color: #999;
 | 
					 | 
				
			||||||
    font-size: 13px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /*teatarea*/
 | 
					 | 
				
			||||||
  /deep/ .el-textarea {
 | 
					 | 
				
			||||||
    width: 150%;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .seo-text {
 | 
					 | 
				
			||||||
    width: 150%;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*折叠面板*/
 | 
					 | 
				
			||||||
.el-collapse-item {
 | 
					 | 
				
			||||||
  /deep/ .el-collapse-item__header {
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    background-color: #f8f8f8;
 | 
					 | 
				
			||||||
    padding: 0 10px;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
    color: #333;
 | 
					 | 
				
			||||||
    font-size: 14px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item {
 | 
					 | 
				
			||||||
    margin-left: 5%;
 | 
					 | 
				
			||||||
    width: 25%;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /deep/ .el-form-item__content {
 | 
					 | 
				
			||||||
    margin-left: 120px;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  p.goods-group-manager {
 | 
					 | 
				
			||||||
    padding-left: 12%;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    color: #999;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /deep/ .el-collapse-item__content {
 | 
					 | 
				
			||||||
    padding: 10px 0;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*商品描述*/
 | 
					 | 
				
			||||||
.goods-intro {
 | 
					 | 
				
			||||||
  line-height: 40;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/** 底部步骤 */
 | 
					 | 
				
			||||||
.footer {
 | 
					 | 
				
			||||||
  width: 88.7%;
 | 
					 | 
				
			||||||
  padding: 10px;
 | 
					 | 
				
			||||||
  background-color: #ffc;
 | 
					 | 
				
			||||||
  position: fixed;
 | 
					 | 
				
			||||||
  bottom: 0px;
 | 
					 | 
				
			||||||
  left: 10%;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
  z-index: 9999;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*图片上传组件第一张图设置封面*/
 | 
					 | 
				
			||||||
.goods-images {
 | 
					 | 
				
			||||||
  /deep/ li.el-upload-list__item:first-child {
 | 
					 | 
				
			||||||
    position: relative;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /deep/ li.el-upload-list__item:first-child:after {
 | 
					 | 
				
			||||||
    content: "封";
 | 
					 | 
				
			||||||
    color: #fff;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
    font-size: 12px;
 | 
					 | 
				
			||||||
    position: absolute;
 | 
					 | 
				
			||||||
    left: -15px;
 | 
					 | 
				
			||||||
    top: -6px;
 | 
					 | 
				
			||||||
    width: 40px;
 | 
					 | 
				
			||||||
    height: 24px;
 | 
					 | 
				
			||||||
    padding-top: 6px;
 | 
					 | 
				
			||||||
    background: #13ce66;
 | 
					 | 
				
			||||||
    text-align: center;
 | 
					 | 
				
			||||||
    -webkit-transform: rotate(-45deg);
 | 
					 | 
				
			||||||
    transform: rotate(-45deg);
 | 
					 | 
				
			||||||
    -webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
 | 
					 | 
				
			||||||
    box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.el-form-item__label {
 | 
					 | 
				
			||||||
  word-break: break-all;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.step-view {
 | 
					 | 
				
			||||||
  width: 33%;
 | 
					 | 
				
			||||||
  height: 40px;
 | 
					 | 
				
			||||||
  font-size: 19px;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  background-color: #fff;
 | 
					 | 
				
			||||||
  justify-content: center;
 | 
					 | 
				
			||||||
  align-items: center;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.page {
 | 
					 | 
				
			||||||
  margin-top: 2vh;
 | 
					 | 
				
			||||||
  margin-bottom: 5vh;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -198,12 +198,6 @@ export default {
 | 
				
			|||||||
      submitLoading: false, // 添加或编辑提交状态
 | 
					      submitLoading: false, // 添加或编辑提交状态
 | 
				
			||||||
      selectedGoods: [], // 已选商品列表,便于删除
 | 
					      selectedGoods: [], // 已选商品列表,便于删除
 | 
				
			||||||
      goodsCategoryList: [], // 商品分类列表
 | 
					      goodsCategoryList: [], // 商品分类列表
 | 
				
			||||||
      shopCategoryList: [], // 店铺分类列表
 | 
					 | 
				
			||||||
      cascaderProps: {
 | 
					 | 
				
			||||||
        multiple: true,
 | 
					 | 
				
			||||||
        label: "name",
 | 
					 | 
				
			||||||
        value: "id",
 | 
					 | 
				
			||||||
      }, // 级联选择器配置项
 | 
					 | 
				
			||||||
      formRule: {
 | 
					      formRule: {
 | 
				
			||||||
        promotionName: [{required: true, message: "活动名称不能为空"}],
 | 
					        promotionName: [{required: true, message: "活动名称不能为空"}],
 | 
				
			||||||
        couponName: [{required: true, message: "优惠券名称不能为空"}],
 | 
					        couponName: [{required: true, message: "优惠券名称不能为空"}],
 | 
				
			||||||
@ -306,6 +300,7 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 获取优惠券数据
 | 
				
			||||||
    getCoupon() {
 | 
					    getCoupon() {
 | 
				
			||||||
      getPlatformCoupon(this.id).then((res) => {
 | 
					      getPlatformCoupon(this.id).then((res) => {
 | 
				
			||||||
        let data = res.result;
 | 
					        let data = res.result;
 | 
				
			||||||
@ -495,17 +490,11 @@ export default {
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
      this.form.promotionGoodsList = list;
 | 
					      this.form.promotionGoodsList = list;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getGoodsCategory(e) {
 | 
					 | 
				
			||||||
      // 获取级联选择器商品分类id
 | 
					 | 
				
			||||||
      // console.log(e);
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    async getCagetoryList() {
 | 
					    async getCagetoryList() {
 | 
				
			||||||
      // 获取全部商品分类
 | 
					      // 获取全部商品分类
 | 
				
			||||||
      let data = await getCategoryTree();
 | 
					      let data = await getCategoryTree();
 | 
				
			||||||
      this.goodsCategoryList = data.result;
 | 
					      this.goodsCategoryList = data.result;
 | 
				
			||||||
      // 过滤出可显示的值
 | 
					      // 过滤出可显示的值
 | 
				
			||||||
 | 
					 | 
				
			||||||
      this.goodsCategoryList = this.goodsCategoryList.map((item) => {
 | 
					      this.goodsCategoryList = this.goodsCategoryList.map((item) => {
 | 
				
			||||||
        if (item.children) {
 | 
					        if (item.children) {
 | 
				
			||||||
          item.children = item.children.map((child) => {
 | 
					          item.children = item.children.map((child) => {
 | 
				
			||||||
@ -531,7 +520,6 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        return {value: item.id, label: item.name, children: item.children};
 | 
					        return {value: item.id, label: item.name, children: item.children};
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      console.log(this.goodsCategoryList);
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    filterCategoryId(list, idArr) {
 | 
					    filterCategoryId(list, idArr) {
 | 
				
			||||||
      // 递归获取分类id
 | 
					      // 递归获取分类id
 | 
				
			||||||
 | 
				
			|||||||
@ -5,19 +5,17 @@
 | 
				
			|||||||
        <Button @click="add" type="primary">添加活动</Button>
 | 
					        <Button @click="add" type="primary">添加活动</Button>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
      <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom">
 | 
					      <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom">
 | 
				
			||||||
 | 
					        <template slot-scope="{ row }" slot="action">
 | 
				
			||||||
        <template slot-scope="{ row,index }" slot="action">
 | 
					          <Button type="info" size="small" style="margin-right: 10px" @click="info(row)">
 | 
				
			||||||
          <Button type="info"
 | 
					            查看
 | 
				
			||||||
                  size="small" style="margin-right: 10px" @click="info(row)">查看
 | 
					 | 
				
			||||||
          </Button>
 | 
					          </Button>
 | 
				
			||||||
          <Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error"
 | 
					          <Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error"
 | 
				
			||||||
                  size="small" style="margin-right: 10px" @click="remove(row)">停止
 | 
					            size="small" style="margin-right: 10px" @click="remove(row)">停止
 | 
				
			||||||
          </Button>
 | 
					          </Button>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
 | 
					 | 
				
			||||||
      </Table>
 | 
					      </Table>
 | 
				
			||||||
      <Row type="flex" justify="end" class="mt_10">
 | 
					      <Row type="flex" justify="end" class="mt_10">
 | 
				
			||||||
        <Page :current="searchForm.pageNumber + 1" :total="total" :page-size="searchForm.pageSize"
 | 
					        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
 | 
				
			||||||
              @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
 | 
					              @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
 | 
				
			||||||
              size="small" show-total show-elevator show-sizer></Page>
 | 
					              size="small" show-total show-elevator show-sizer></Page>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
@ -42,7 +40,7 @@ export default {
 | 
				
			|||||||
      modalTitle: "", // 添加或编辑标题
 | 
					      modalTitle: "", // 添加或编辑标题
 | 
				
			||||||
      searchForm: {
 | 
					      searchForm: {
 | 
				
			||||||
        // 搜索框初始化对象
 | 
					        // 搜索框初始化对象
 | 
				
			||||||
        pageNumber: 0, // 当前页数
 | 
					        pageNumber: 1, // 当前页数
 | 
				
			||||||
        pageSize: 10, // 页面大小
 | 
					        pageSize: 10, // 页面大小
 | 
				
			||||||
        sort: "createTime", // 默认排序字段
 | 
					        sort: "createTime", // 默认排序字段
 | 
				
			||||||
        order: "desc", // 默认排序方式
 | 
					        order: "desc", // 默认排序方式
 | 
				
			||||||
@ -170,19 +168,20 @@ export default {
 | 
				
			|||||||
    info(v) {
 | 
					    info(v) {
 | 
				
			||||||
      this.$router.push({name: "coupon-activity-info", query: {id: v.id}});
 | 
					      this.$router.push({name: "coupon-activity-info", query: {id: v.id}});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //跳转页面
 | 
					    // 分页 修改页码
 | 
				
			||||||
    changePage(v) {
 | 
					    changePage(v) {
 | 
				
			||||||
      this.searchForm.pageNumber = v - 1;
 | 
					      this.searchForm.pageNumber = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //修改分页
 | 
					    // 分页 修改页数
 | 
				
			||||||
    changePageSize(v) {
 | 
					    changePageSize(v) {
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					      this.searchForm.pageSize = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //搜索活动
 | 
					    //搜索活动
 | 
				
			||||||
    handleSearch() {
 | 
					    handleSearch() {
 | 
				
			||||||
      this.searchForm.pageNumber = 0;
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					      this.searchForm.pageSize = 10;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -196,7 +195,6 @@ export default {
 | 
				
			|||||||
        this.searchForm.startTime = null;
 | 
					        this.searchForm.startTime = null;
 | 
				
			||||||
        this.searchForm.endTime = null;
 | 
					        this.searchForm.endTime = null;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
					 | 
				
			||||||
      getCouponActivityList(this.searchForm).then((res) => {
 | 
					      getCouponActivityList(this.searchForm).then((res) => {
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
@ -210,23 +208,21 @@ export default {
 | 
				
			|||||||
    edit(v) {
 | 
					    edit(v) {
 | 
				
			||||||
      this.$router.push({name: "edit-platform-coupon", query: {id: v.id}});
 | 
					      this.$router.push({name: "edit-platform-coupon", query: {id: v.id}});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //下架活动
 | 
					    //停止活动
 | 
				
			||||||
    remove(v) {
 | 
					    remove(v) {
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: "确认下架",
 | 
					        title: "确认停止",
 | 
				
			||||||
        // 记得确认修改此处
 | 
					        // 记得确认修改此处
 | 
				
			||||||
        content: "确认要下架此优惠券活动么?下架活动只能重新创建",
 | 
					        content: "确认要停止此优惠券活动么?停止活动只能重新创建",
 | 
				
			||||||
        loading: true,
 | 
					        loading: true,
 | 
				
			||||||
        onOk: () => {
 | 
					        onOk: () => {
 | 
				
			||||||
          // 删除
 | 
					          // 删除
 | 
				
			||||||
          closeActivity(v.id).then((res) => {
 | 
					          closeActivity(v.id).then((res) => {
 | 
				
			||||||
            if (res.success) {
 | 
					            if (res.success) {
 | 
				
			||||||
              this.$Message.success("优惠券活动已作废");
 | 
					              this.$Message.success("优惠券活动已停止");
 | 
				
			||||||
              this.getDataList();
 | 
					              this.getDataList();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }).catch(() => {
 | 
					          }).catch(() => {});
 | 
				
			||||||
            this.$Modal;
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div>
 | 
					  <div>
 | 
				
			||||||
    <div class="content-goods-publish">
 | 
					    <div class="content-goods-publish">
 | 
				
			||||||
      <Form ref="form" :model="form" :label-width="130">
 | 
					      <Form ref="form" :model="form" :label-width="70">
 | 
				
			||||||
        <div class="base-info-item">
 | 
					        <div class="base-info-item">
 | 
				
			||||||
          <h4>优惠券活动详情</h4>
 | 
					          <h4>优惠券活动详情</h4>
 | 
				
			||||||
          <div class="form-item-view">
 | 
					          <div class="form-item-view">
 | 
				
			||||||
@ -30,10 +30,10 @@
 | 
				
			|||||||
          <h4>优惠券列表</h4>
 | 
					          <h4>优惠券列表</h4>
 | 
				
			||||||
          <Table :columns="couponColumn" :data="couponData" ref="table">
 | 
					          <Table :columns="couponColumn" :data="couponData" ref="table">
 | 
				
			||||||
          </Table>
 | 
					          </Table>
 | 
				
			||||||
          <h4 v-if="couponActivity.activityScopeInfo && memberData.length>0">会员列表列表</h4>
 | 
					          <template v-if="couponActivity.activityScopeInfo && memberData.length>0">
 | 
				
			||||||
          <Table :columns="memberColumn" :data="memberData">
 | 
					            <h4 class="mt_10">会员列表列表</h4>
 | 
				
			||||||
 | 
					            <Table :columns="memberColumn" :data="memberData"></Table>
 | 
				
			||||||
          </Table>
 | 
					          </template>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </Form>
 | 
					      </Form>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
@ -52,7 +52,9 @@ export default {
 | 
				
			|||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      id: this.$route.query.id,//表单id
 | 
					      id: this.$route.query.id,//表单id
 | 
				
			||||||
      couponActivity: "",//券活动
 | 
					      couponActivity: {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      },//券活动
 | 
				
			||||||
      couponColumn: [
 | 
					      couponColumn: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "优惠券名称",
 | 
					          title: "优惠券名称",
 | 
				
			||||||
@ -124,6 +126,52 @@ export default {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
@import "couponPublish.scss";
 | 
					/*选择商品品类*/
 | 
				
			||||||
 | 
					.content-goods-publish {
 | 
				
			||||||
 | 
					  padding: 15px;
 | 
				
			||||||
 | 
					  margin: 0 auto;
 | 
				
			||||||
 | 
					  text-align: center;
 | 
				
			||||||
 | 
					  border: 1px solid #ddd;
 | 
				
			||||||
 | 
					  background: none repeat 0 0 #fff;
 | 
				
			||||||
 | 
					  height: 100%;
 | 
				
			||||||
 | 
					  margin-bottom: 20px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					div.base-info-item {
 | 
				
			||||||
 | 
					  h4 {
 | 
				
			||||||
 | 
					    margin-bottom: 10px;
 | 
				
			||||||
 | 
					    padding: 0 10px;
 | 
				
			||||||
 | 
					    border: 1px solid #ddd;
 | 
				
			||||||
 | 
					    background-color: #f8f8f8;
 | 
				
			||||||
 | 
					    font-weight: bold;
 | 
				
			||||||
 | 
					    color: #333;
 | 
				
			||||||
 | 
					    font-size: 14px;
 | 
				
			||||||
 | 
					    line-height: 40px;
 | 
				
			||||||
 | 
					    text-align: left;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .form-item-view {
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    flex-direction: column;
 | 
				
			||||||
 | 
					    align-items: flex-start;
 | 
				
			||||||
 | 
					    justify-content: space-between;
 | 
				
			||||||
 | 
					    padding-left: 40px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    .shop-category-text {
 | 
				
			||||||
 | 
					      font-size: 12px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					/** 底部步骤 */
 | 
				
			||||||
 | 
					.footer {
 | 
				
			||||||
 | 
					  width: 88.7%;
 | 
				
			||||||
 | 
					  padding: 10px;
 | 
				
			||||||
 | 
					  background-color: #ffc;
 | 
				
			||||||
 | 
					  position: fixed;
 | 
				
			||||||
 | 
					  bottom: 0px;
 | 
				
			||||||
 | 
					  left: 10%;
 | 
				
			||||||
 | 
					  text-align: center;
 | 
				
			||||||
 | 
					  z-index: 9999;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,253 +0,0 @@
 | 
				
			|||||||
/*选择商品品类*/
 | 
					 | 
				
			||||||
.content-goods-publish {
 | 
					 | 
				
			||||||
  padding: 15px;
 | 
					 | 
				
			||||||
  margin: 0 auto;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
  border: 1px solid #ddd;
 | 
					 | 
				
			||||||
  background: none repeat 0 0 #fff;
 | 
					 | 
				
			||||||
  height: 100%;
 | 
					 | 
				
			||||||
  margin-bottom: 20px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /*商品品类*/
 | 
					 | 
				
			||||||
  .goods-category {
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    padding: 10px;
 | 
					 | 
				
			||||||
    background: #fafafa;
 | 
					 | 
				
			||||||
    border: 1px solid #e6e6e6;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ul {
 | 
					 | 
				
			||||||
      padding: 8px 4px 8px 8px;
 | 
					 | 
				
			||||||
      list-style: none;
 | 
					 | 
				
			||||||
      width: 300px;
 | 
					 | 
				
			||||||
      background: none repeat 0 0 #fff;
 | 
					 | 
				
			||||||
      border: 1px solid #e6e6e6;
 | 
					 | 
				
			||||||
      display: inline-block;
 | 
					 | 
				
			||||||
      letter-spacing: normal;
 | 
					 | 
				
			||||||
      margin-right: 15px;
 | 
					 | 
				
			||||||
      vertical-align: top;
 | 
					 | 
				
			||||||
      word-spacing: normal;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      li {
 | 
					 | 
				
			||||||
        line-height: 20px;
 | 
					 | 
				
			||||||
        padding: 5px;
 | 
					 | 
				
			||||||
        cursor: pointer;
 | 
					 | 
				
			||||||
        color: #333;
 | 
					 | 
				
			||||||
        font-size: 12px;
 | 
					 | 
				
			||||||
        display: flex;
 | 
					 | 
				
			||||||
        flex-wrap: nowrap;
 | 
					 | 
				
			||||||
        flex-direction: row;
 | 
					 | 
				
			||||||
        justify-content: space-between;
 | 
					 | 
				
			||||||
        align-items: center;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /** 当前品类被选中的样式 */
 | 
					 | 
				
			||||||
  .activeClass {
 | 
					 | 
				
			||||||
    background-color: #d9edf7;
 | 
					 | 
				
			||||||
    border: 1px solid #bce8f1;
 | 
					 | 
				
			||||||
    color: #3a87ad;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /*!*当前选择的商品品类文字*!*/
 | 
					 | 
				
			||||||
  .current-goods-category {
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    padding: 10px;
 | 
					 | 
				
			||||||
    width: 100%;
 | 
					 | 
				
			||||||
    border: 1px solid #fbeed5;
 | 
					 | 
				
			||||||
    color: #c09853;
 | 
					 | 
				
			||||||
    background-color: #fcf8e3;
 | 
					 | 
				
			||||||
    margin: 10px auto;
 | 
					 | 
				
			||||||
    padding: 8px 35px 8px 14px;
 | 
					 | 
				
			||||||
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
 | 
					 | 
				
			||||||
    font-size: 12px;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*编辑基本信息*/
 | 
					 | 
				
			||||||
.el-form {
 | 
					 | 
				
			||||||
  padding-bottom: 80px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item {
 | 
					 | 
				
			||||||
    width: 100%;
 | 
					 | 
				
			||||||
    color: gray;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
div.base-info-item {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  h4 {
 | 
					 | 
				
			||||||
    margin-bottom: 10px;
 | 
					 | 
				
			||||||
    padding: 0 10px;
 | 
					 | 
				
			||||||
    border: 1px solid #ddd;
 | 
					 | 
				
			||||||
    background-color: #f8f8f8;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
    color: #333;
 | 
					 | 
				
			||||||
    font-size: 14px;
 | 
					 | 
				
			||||||
    line-height: 40px;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .form-item-view {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    flex-direction: column;
 | 
					 | 
				
			||||||
    align-items: flex-start;
 | 
					 | 
				
			||||||
    justify-content: space-between;
 | 
					 | 
				
			||||||
    padding-left: 80px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .shop-category-text {
 | 
					 | 
				
			||||||
      font-size: 12px;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .item-goods-properts-row {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    flex-direction: row;
 | 
					 | 
				
			||||||
    word-break: break-all;
 | 
					 | 
				
			||||||
    white-space: normal;
 | 
					 | 
				
			||||||
    width: 300px;
 | 
					 | 
				
			||||||
    height: 100px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .item-goods-properts {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    flex-direction: row;
 | 
					 | 
				
			||||||
    margin-bottom: 10px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .form-item {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    align-items: center;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item {
 | 
					 | 
				
			||||||
    width: 30%;
 | 
					 | 
				
			||||||
    min-width: 300px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .goods-name-width {
 | 
					 | 
				
			||||||
    width: 50%;
 | 
					 | 
				
			||||||
    min-width: 300px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item__content {
 | 
					 | 
				
			||||||
    margin-left: 120px;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  p.goods-group-manager {
 | 
					 | 
				
			||||||
    padding-left: 7.5%;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    color: #999;
 | 
					 | 
				
			||||||
    font-size: 13px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /*teatarea*/
 | 
					 | 
				
			||||||
  /deep/ .el-textarea {
 | 
					 | 
				
			||||||
    width: 150%;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .seo-text {
 | 
					 | 
				
			||||||
    width: 150%;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*折叠面板*/
 | 
					 | 
				
			||||||
.el-collapse-item {
 | 
					 | 
				
			||||||
  /deep/ .el-collapse-item__header {
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    background-color: #f8f8f8;
 | 
					 | 
				
			||||||
    padding: 0 10px;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
    color: #333;
 | 
					 | 
				
			||||||
    font-size: 14px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item {
 | 
					 | 
				
			||||||
    margin-left: 5%;
 | 
					 | 
				
			||||||
    width: 25%;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /deep/ .el-form-item__content {
 | 
					 | 
				
			||||||
    margin-left: 120px;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  p.goods-group-manager {
 | 
					 | 
				
			||||||
    padding-left: 12%;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    color: #999;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /deep/ .el-collapse-item__content {
 | 
					 | 
				
			||||||
    padding: 10px 0;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*商品描述*/
 | 
					 | 
				
			||||||
.goods-intro {
 | 
					 | 
				
			||||||
  line-height: 40;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/** 底部步骤 */
 | 
					 | 
				
			||||||
.footer {
 | 
					 | 
				
			||||||
  width: 88.7%;
 | 
					 | 
				
			||||||
  padding: 10px;
 | 
					 | 
				
			||||||
  background-color: #ffc;
 | 
					 | 
				
			||||||
  position: fixed;
 | 
					 | 
				
			||||||
  bottom: 0px;
 | 
					 | 
				
			||||||
  left: 10%;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
  z-index: 9999;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*图片上传组件第一张图设置封面*/
 | 
					 | 
				
			||||||
.goods-images {
 | 
					 | 
				
			||||||
  /deep/ li.el-upload-list__item:first-child {
 | 
					 | 
				
			||||||
    position: relative;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /deep/ li.el-upload-list__item:first-child:after {
 | 
					 | 
				
			||||||
    content: "封";
 | 
					 | 
				
			||||||
    color: #fff;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
    font-size: 12px;
 | 
					 | 
				
			||||||
    position: absolute;
 | 
					 | 
				
			||||||
    left: -15px;
 | 
					 | 
				
			||||||
    top: -6px;
 | 
					 | 
				
			||||||
    width: 40px;
 | 
					 | 
				
			||||||
    height: 24px;
 | 
					 | 
				
			||||||
    padding-top: 6px;
 | 
					 | 
				
			||||||
    background: #13ce66;
 | 
					 | 
				
			||||||
    text-align: center;
 | 
					 | 
				
			||||||
    -webkit-transform: rotate(-45deg);
 | 
					 | 
				
			||||||
    transform: rotate(-45deg);
 | 
					 | 
				
			||||||
    -webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
 | 
					 | 
				
			||||||
    box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.el-form-item__label {
 | 
					 | 
				
			||||||
  word-break: break-all;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.step-view {
 | 
					 | 
				
			||||||
  width: 33%;
 | 
					 | 
				
			||||||
  height: 40px;
 | 
					 | 
				
			||||||
  font-size: 19px;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  background-color: #fff;
 | 
					 | 
				
			||||||
  justify-content: center;
 | 
					 | 
				
			||||||
  align-items: center;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.page {
 | 
					 | 
				
			||||||
  margin-top: 2vh;
 | 
					 | 
				
			||||||
  margin-bottom: 5vh;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -6,12 +6,11 @@
 | 
				
			|||||||
          <h4>活动信息</h4>
 | 
					          <h4>活动信息</h4>
 | 
				
			||||||
          <div class="form-item-view">
 | 
					          <div class="form-item-view">
 | 
				
			||||||
            <FormItem label="活动名称" prop="promotionName">
 | 
					            <FormItem label="活动名称" prop="promotionName">
 | 
				
			||||||
              <Input type="text" v-model="form.promotionName" placeholder="活动名称" clearable style="width: 260px"/>
 | 
					              <Input type="text" v-model="form.promotionName" placeholder="请填写活动名称" clearable style="width: 260px"/>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
 | 
					 | 
				
			||||||
            <FormItem label="活动时间">
 | 
					            <FormItem label="活动时间">
 | 
				
			||||||
              <DatePicker type="datetimerange" :options="options" v-model="rangeTime" format="yyyy-MM-dd HH:mm:ss"
 | 
					              <DatePicker type="datetimerange" :options="options" v-model="rangeTime" format="yyyy-MM-dd HH:mm:ss"
 | 
				
			||||||
                          placeholder="请选择" style="width: 260px">
 | 
					                placeholder="请选择活动时间" style="width: 260px">
 | 
				
			||||||
              </DatePicker>
 | 
					              </DatePicker>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -72,18 +71,16 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import couponTemplate from "@/views/promotion/coupon/coupon";
 | 
					import couponTemplate from "@/views/promotion/coupon/coupon";
 | 
				
			||||||
 | 
					 | 
				
			||||||
import userList from "@/views/member/list/index";
 | 
					import userList from "@/views/member/list/index";
 | 
				
			||||||
 | 
					import {saveActivityCoupon} from "@/api/promotion";
 | 
				
			||||||
import {saveActivityCoupon, updateCouponActivity} from "@/api/promotion";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "addCouponActivity",
 | 
					  name: "addCouponActivity",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    couponTemplate,
 | 
					    couponTemplate,
 | 
				
			||||||
    userList,
 | 
					    userList
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data () {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      options: {
 | 
					      options: {
 | 
				
			||||||
        disabledDate(date) {
 | 
					        disabledDate(date) {
 | 
				
			||||||
@ -228,7 +225,6 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 返回已选择的用户
 | 
					    // 返回已选择的用户
 | 
				
			||||||
    callbackSelectUser(val) {
 | 
					    callbackSelectUser(val) {
 | 
				
			||||||
      // 每次将返回的数据回调判断
 | 
					      // 每次将返回的数据回调判断
 | 
				
			||||||
@ -283,7 +279,6 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 添加指定用户
 | 
					    // 添加指定用户
 | 
				
			||||||
    addVip() {
 | 
					    addVip() {
 | 
				
			||||||
      this.checkUserList = true;
 | 
					      this.checkUserList = true;
 | 
				
			||||||
 | 
				
			|||||||
@ -2,13 +2,7 @@
 | 
				
			|||||||
  <div class="full-cut">
 | 
					  <div class="full-cut">
 | 
				
			||||||
    <Card>
 | 
					    <Card>
 | 
				
			||||||
      <Row>
 | 
					      <Row>
 | 
				
			||||||
        <Form
 | 
					        <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
 | 
				
			||||||
          ref="searchForm"
 | 
					 | 
				
			||||||
          :model="searchForm"
 | 
					 | 
				
			||||||
          inline
 | 
					 | 
				
			||||||
          :label-width="70"
 | 
					 | 
				
			||||||
          class="search-form"
 | 
					 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
          <Form-item label="活动名称" prop="promotionName">
 | 
					          <Form-item label="活动名称" prop="promotionName">
 | 
				
			||||||
            <Input
 | 
					            <Input
 | 
				
			||||||
              type="text"
 | 
					              type="text"
 | 
				
			||||||
@ -59,9 +53,7 @@
 | 
				
			|||||||
          {{ row.isFullMinus ? "满减" : "满折" }}
 | 
					          {{ row.isFullMinus ? "满减" : "满折" }}
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
        <template slot-scope="{ row }" slot="hours">
 | 
					        <template slot-scope="{ row }" slot="hours">
 | 
				
			||||||
          <Tag v-for="item in unixHours(row.hours)" :key="item">{{
 | 
					          <Tag v-for="item in unixHours(row.hours)" :key="item">{{item}}</Tag>
 | 
				
			||||||
            item
 | 
					 | 
				
			||||||
          }}</Tag>
 | 
					 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
        <template slot-scope="{ row }" slot="action">
 | 
					        <template slot-scope="{ row }" slot="action">
 | 
				
			||||||
          <div>
 | 
					          <div>
 | 
				
			||||||
@ -83,7 +75,7 @@
 | 
				
			|||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </Table>
 | 
					      </Table>
 | 
				
			||||||
      <Row type="flex" justify="end" class="page operation">
 | 
					      <Row type="flex" justify="end" class="mt_10">
 | 
				
			||||||
        <Page
 | 
					        <Page
 | 
				
			||||||
          :current="searchForm.pageNumber"
 | 
					          :current="searchForm.pageNumber"
 | 
				
			||||||
          :total="total"
 | 
					          :total="total"
 | 
				
			||||||
@ -183,6 +175,7 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 初始化数据
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -218,6 +211,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    changePageSize(v) {
 | 
					    changePageSize(v) {
 | 
				
			||||||
      // 改变页码
 | 
					      // 改变页码
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					      this.searchForm.pageSize = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -227,6 +221,7 @@ export default {
 | 
				
			|||||||
      this.searchForm.pageSize = 10;
 | 
					      this.searchForm.pageSize = 10;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取列表数据
 | 
				
			||||||
    getDataList() {
 | 
					    getDataList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
 | 
					      if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
 | 
				
			||||||
 | 
				
			|||||||
@ -5,9 +5,7 @@
 | 
				
			|||||||
      <Tabs v-model="searchForm.status">
 | 
					      <Tabs v-model="searchForm.status">
 | 
				
			||||||
        <!-- 标签栏 -->
 | 
					        <!-- 标签栏 -->
 | 
				
			||||||
        <TabPane v-for="(item,index) in tabs" :key="index" :name="item.status" :label="item.title">
 | 
					        <TabPane v-for="(item,index) in tabs" :key="index" :name="item.status" :label="item.title">
 | 
				
			||||||
 | 
					 | 
				
			||||||
        </TabPane>
 | 
					        </TabPane>
 | 
				
			||||||
 | 
					 | 
				
			||||||
      </Tabs>
 | 
					      </Tabs>
 | 
				
			||||||
      <Table :columns="liveColumns" :data="liveData"></Table>
 | 
					      <Table :columns="liveColumns" :data="liveData"></Table>
 | 
				
			||||||
      <Row type="flex" style="margin:20px;" justify="end" class="mt_10">
 | 
					      <Row type="flex" style="margin:20px;" justify="end" class="mt_10">
 | 
				
			||||||
@ -167,6 +165,7 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
 | 
					    // 直播状态
 | 
				
			||||||
    "searchForm.status": {
 | 
					    "searchForm.status": {
 | 
				
			||||||
      handler() {
 | 
					      handler() {
 | 
				
			||||||
        this.liveData = [];
 | 
					        this.liveData = [];
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,6 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div>
 | 
					  <div>
 | 
				
			||||||
    <Card>
 | 
					    <Card>
 | 
				
			||||||
 | 
					 | 
				
			||||||
      <Form :model="liveForm" ref="liveForm" :rules="liveRulesForm" :label-width="120">
 | 
					      <Form :model="liveForm" ref="liveForm" :rules="liveRulesForm" :label-width="120">
 | 
				
			||||||
        <FormItem label="直播标题" prop="name">
 | 
					        <FormItem label="直播标题" prop="name">
 | 
				
			||||||
          <Input disabled v-model="liveForm.name" style="width:460px"></Input>
 | 
					          <Input disabled v-model="liveForm.name" style="width:460px"></Input>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,79 +1,78 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="search">
 | 
					  <div class="search">
 | 
				
			||||||
    <Card>
 | 
					    <Card>
 | 
				
			||||||
      <Row v-show="openSearch">
 | 
					      <Form
 | 
				
			||||||
        <Form
 | 
					        ref="searchForm"
 | 
				
			||||||
          ref="searchForm"
 | 
					        :model="searchForm"
 | 
				
			||||||
          :model="searchForm"
 | 
					        inline
 | 
				
			||||||
          inline
 | 
					        :label-width="70"
 | 
				
			||||||
          :label-width="70"
 | 
					        class="search-form"
 | 
				
			||||||
          class="search-form"
 | 
					      >
 | 
				
			||||||
        >
 | 
					        <Form-item label="活动名称" prop="promotionName">
 | 
				
			||||||
          <Form-item label="活动名称" prop="promotionName">
 | 
					          <Input
 | 
				
			||||||
            <Input
 | 
					            type="text"
 | 
				
			||||||
              type="text"
 | 
					            v-model="searchForm.promotionName"
 | 
				
			||||||
              v-model="searchForm.promotionName"
 | 
					            placeholder="请输入活动名称"
 | 
				
			||||||
              placeholder="请输入活动名称"
 | 
					            clearable
 | 
				
			||||||
              clearable
 | 
					            style="width: 200px"
 | 
				
			||||||
              style="width: 200px"
 | 
					          />
 | 
				
			||||||
            />
 | 
					        </Form-item>
 | 
				
			||||||
          </Form-item>
 | 
					        <Form-item label="活动状态" prop="promotionStatus">
 | 
				
			||||||
          <Form-item label="活动状态" prop="promotionStatus">
 | 
					          <Select
 | 
				
			||||||
            <Select
 | 
					            v-model="searchForm.promotionStatus"
 | 
				
			||||||
              v-model="searchForm.promotionStatus"
 | 
					            placeholder="请选择"
 | 
				
			||||||
              placeholder="请选择"
 | 
					            clearable
 | 
				
			||||||
              clearable
 | 
					            style="width: 200px"
 | 
				
			||||||
              style="width: 200px"
 | 
					 | 
				
			||||||
            >
 | 
					 | 
				
			||||||
              <Option value="NEW">未开始</Option>
 | 
					 | 
				
			||||||
              <Option value="START">已开始/上架</Option>
 | 
					 | 
				
			||||||
              <Option value="END">已结束/下架</Option>
 | 
					 | 
				
			||||||
              <Option value="CLOSE">紧急关闭/作废</Option>
 | 
					 | 
				
			||||||
            </Select>
 | 
					 | 
				
			||||||
          </Form-item>
 | 
					 | 
				
			||||||
          <Form-item label="活动时间">
 | 
					 | 
				
			||||||
            <DatePicker
 | 
					 | 
				
			||||||
              v-model="selectDate"
 | 
					 | 
				
			||||||
              type="daterange"
 | 
					 | 
				
			||||||
              clearable
 | 
					 | 
				
			||||||
              placeholder="选择起始时间"
 | 
					 | 
				
			||||||
              style="width: 200px"
 | 
					 | 
				
			||||||
            ></DatePicker>
 | 
					 | 
				
			||||||
          </Form-item>
 | 
					 | 
				
			||||||
          <Button @click="handleSearch" type="primary" class="search-btn"
 | 
					 | 
				
			||||||
            >搜索</Button
 | 
					 | 
				
			||||||
          >
 | 
					          >
 | 
				
			||||||
        </Form>
 | 
					            <Option value="NEW">未开始</Option>
 | 
				
			||||||
      </Row>
 | 
					            <Option value="START">已开始/上架</Option>
 | 
				
			||||||
        <Table
 | 
					            <Option value="END">已结束/下架</Option>
 | 
				
			||||||
          :loading="loading"
 | 
					            <Option value="CLOSE">紧急关闭/作废</Option>
 | 
				
			||||||
          border
 | 
					          </Select>
 | 
				
			||||||
          :columns="columns"
 | 
					        </Form-item>
 | 
				
			||||||
          :data="data"
 | 
					        <Form-item label="活动时间">
 | 
				
			||||||
          ref="table"
 | 
					          <DatePicker
 | 
				
			||||||
 | 
					            v-model="selectDate"
 | 
				
			||||||
 | 
					            type="daterange"
 | 
				
			||||||
 | 
					            clearable
 | 
				
			||||||
 | 
					            placeholder="选择起始时间"
 | 
				
			||||||
 | 
					            style="width: 200px"
 | 
				
			||||||
 | 
					          ></DatePicker>
 | 
				
			||||||
 | 
					        </Form-item>
 | 
				
			||||||
 | 
					        <Button @click="handleSearch" type="primary" class="search-btn"
 | 
				
			||||||
 | 
					          >搜索</Button
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
          <template slot-scope="{ row }" slot="action">
 | 
					      </Form>
 | 
				
			||||||
            <Button
 | 
					      <Table
 | 
				
			||||||
              type="info"
 | 
					        :loading="loading"
 | 
				
			||||||
              size="small"
 | 
					        border
 | 
				
			||||||
              @click="view(row)"
 | 
					        :columns="columns"
 | 
				
			||||||
              style="margin-right: 5px"
 | 
					        :data="data"
 | 
				
			||||||
              >查看</Button
 | 
					        ref="table"
 | 
				
			||||||
            >
 | 
					        class="mt_10"
 | 
				
			||||||
            <Button
 | 
					      >
 | 
				
			||||||
              type="error"
 | 
					        <template slot-scope="{ row }" slot="action">
 | 
				
			||||||
              size="small"
 | 
					          <Button
 | 
				
			||||||
              :disabled="
 | 
					            type="info"
 | 
				
			||||||
                row.promotionStatus == 'END' || row.promotionStatus == 'CLOSE'
 | 
					            size="small"
 | 
				
			||||||
              "
 | 
					            @click="view(row)"
 | 
				
			||||||
              @click="close(row)"
 | 
					            style="margin-right: 5px"
 | 
				
			||||||
              >关闭
 | 
					            >查看</Button
 | 
				
			||||||
            </Button>
 | 
					          >
 | 
				
			||||||
          </template>
 | 
					          <Button
 | 
				
			||||||
        </Table>
 | 
					            type="error"
 | 
				
			||||||
 | 
					            size="small"
 | 
				
			||||||
 | 
					            :disabled="
 | 
				
			||||||
 | 
					              row.promotionStatus == 'END' || row.promotionStatus == 'CLOSE'
 | 
				
			||||||
 | 
					            "
 | 
				
			||||||
 | 
					            @click="close(row)"
 | 
				
			||||||
 | 
					            >关闭
 | 
				
			||||||
 | 
					          </Button>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </Table>
 | 
				
			||||||
      <Row type="flex" justify="end" class="mt_10">
 | 
					      <Row type="flex" justify="end" class="mt_10">
 | 
				
			||||||
        <Page
 | 
					        <Page
 | 
				
			||||||
          :current="searchForm.pageNumber + 1"
 | 
					          :current="searchForm.pageNumber"
 | 
				
			||||||
          :total="total"
 | 
					          :total="total"
 | 
				
			||||||
          :page-size="searchForm.pageSize"
 | 
					          :page-size="searchForm.pageSize"
 | 
				
			||||||
          @on-change="changePage"
 | 
					          @on-change="changePage"
 | 
				
			||||||
@ -94,14 +93,12 @@ import { getPintuanList, closePintuan } from "@/api/promotion";
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "pintuan",
 | 
					  name: "pintuan",
 | 
				
			||||||
  components: {},
 | 
					 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      loading: true, // 表单加载状态
 | 
					      loading: true, // 表单加载状态
 | 
				
			||||||
      openSearch: true, // 显示搜索项
 | 
					 | 
				
			||||||
      searchForm: {
 | 
					      searchForm: {
 | 
				
			||||||
        // 搜索框初始化对象
 | 
					        // 搜索框初始化对象
 | 
				
			||||||
        pageNumber: 0, // 当前页数
 | 
					        pageNumber: 1, // 当前页数
 | 
				
			||||||
        pageSize: 10, // 页面大小
 | 
					        pageSize: 10, // 页面大小
 | 
				
			||||||
        sort: "startTime",
 | 
					        sort: "startTime",
 | 
				
			||||||
        order: "desc", // 默认排序方式
 | 
					        order: "desc", // 默认排序方式
 | 
				
			||||||
@ -175,23 +172,29 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 初始化数据
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 分页 修改页码
 | 
				
			||||||
    changePage(v) {
 | 
					    changePage(v) {
 | 
				
			||||||
      this.searchForm.pageNumber = v - 1;
 | 
					      this.searchForm.pageNumber = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
      this.clearSelectAll();
 | 
					      this.clearSelectAll();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 分页 修改页数
 | 
				
			||||||
    changePageSize(v) {
 | 
					    changePageSize(v) {
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					      this.searchForm.pageSize = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 搜索
 | 
				
			||||||
    handleSearch() {
 | 
					    handleSearch() {
 | 
				
			||||||
      this.searchForm.pageNumber = 0;
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					      this.searchForm.pageSize = 10;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取拼团列表
 | 
				
			||||||
    getDataList() {
 | 
					    getDataList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
 | 
					      if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
 | 
				
			||||||
@ -209,9 +212,11 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 查看拼团商品
 | 
				
			||||||
    view(v) {
 | 
					    view(v) {
 | 
				
			||||||
      this.$router.push({ name: "pintuan-goods", query: { id: v.id } });
 | 
					      this.$router.push({ name: "pintuan-goods", query: { id: v.id } });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 关闭当前活动
 | 
				
			||||||
    close(v) {
 | 
					    close(v) {
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: "确认关闭",
 | 
					        title: "确认关闭",
 | 
				
			||||||
 | 
				
			|||||||
@ -2,9 +2,7 @@
 | 
				
			|||||||
  <div class="pintuan-goods">
 | 
					  <div class="pintuan-goods">
 | 
				
			||||||
    <Card>
 | 
					    <Card>
 | 
				
			||||||
      <h4>活动详情</h4>
 | 
					      <h4>活动详情</h4>
 | 
				
			||||||
      <Table
 | 
					      <Table style="margin: 10px 0" border
 | 
				
			||||||
        style="margin: 10px 0"
 | 
					 | 
				
			||||||
        border
 | 
					 | 
				
			||||||
        :columns="columns"
 | 
					        :columns="columns"
 | 
				
			||||||
        :data="data"
 | 
					        :data="data"
 | 
				
			||||||
      ></Table>
 | 
					      ></Table>
 | 
				
			||||||
@ -36,7 +34,7 @@
 | 
				
			|||||||
        </Table>
 | 
					        </Table>
 | 
				
			||||||
      <Row type="flex" justify="end" class="page operation">
 | 
					      <Row type="flex" justify="end" class="page operation">
 | 
				
			||||||
        <Page
 | 
					        <Page
 | 
				
			||||||
          :current="searchForm.pageNumber + 1"
 | 
					          :current="searchForm.pageNumber"
 | 
				
			||||||
          :total="total"
 | 
					          :total="total"
 | 
				
			||||||
          :page-size="searchForm.pageSize"
 | 
					          :page-size="searchForm.pageSize"
 | 
				
			||||||
          @on-change="changePage"
 | 
					          @on-change="changePage"
 | 
				
			||||||
@ -49,41 +47,21 @@
 | 
				
			|||||||
        ></Page>
 | 
					        ></Page>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
    </Card>
 | 
					    </Card>
 | 
				
			||||||
    <Modal title="查看图片" v-model="visible">
 | 
					 | 
				
			||||||
      <img
 | 
					 | 
				
			||||||
        :src="showImg"
 | 
					 | 
				
			||||||
        v-if="visible"
 | 
					 | 
				
			||||||
        style="width: 200px; height: 200px; margin-left: 130px"
 | 
					 | 
				
			||||||
      />
 | 
					 | 
				
			||||||
    </Modal>
 | 
					 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { getPintuanGoodsList, getPintuanDetail } from "@/api/promotion.js";
 | 
					import { getPintuanGoodsList, getPintuanDetail } from "@/api/promotion.js";
 | 
				
			||||||
import config from "@/config";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const buyerUrl =
 | 
					 | 
				
			||||||
  process.env.NODE_ENV === "development"
 | 
					 | 
				
			||||||
    ? config.api_dev.buyer
 | 
					 | 
				
			||||||
    : config.api_prod.buyer;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      visible: false,// 预览图片
 | 
					 | 
				
			||||||
      showImg: "", // 预览图片url
 | 
					 | 
				
			||||||
      openSearch: true, // 显示搜索
 | 
					 | 
				
			||||||
      openTip: true, // 显示提示
 | 
					 | 
				
			||||||
      loading: false, // 表单加载状态
 | 
					      loading: false, // 表单加载状态
 | 
				
			||||||
      searchForm: {
 | 
					      searchForm: {
 | 
				
			||||||
        // 搜索框初始化对象
 | 
					        // 搜索框初始化对象
 | 
				
			||||||
        pageNumber: 0, // 当前页数
 | 
					        pageNumber: 1, // 当前页数
 | 
				
			||||||
        pageSize: 10, // 页面大小
 | 
					        pageSize: 10, // 页面大小
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      submitLoading: false, // 添加或编辑提交状态
 | 
					 | 
				
			||||||
      selectList: [], // 多选数据
 | 
					 | 
				
			||||||
      selectCount: 0, // 多选计数
 | 
					 | 
				
			||||||
      data: [], // 表单数据
 | 
					      data: [], // 表单数据
 | 
				
			||||||
      total: 0, // 表单数据总数
 | 
					      total: 0, // 表单数据总数
 | 
				
			||||||
      columns: [
 | 
					      columns: [
 | 
				
			||||||
@ -170,35 +148,27 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      goodsData: [],
 | 
					      goodsData: [] // 商品数据
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 初始化数据
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
      this.getPintuanMsg();
 | 
					      this.getPintuanMsg();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 分页 改变页码
 | 
				
			||||||
    changePage(v) {
 | 
					    changePage(v) {
 | 
				
			||||||
      this.searchForm.pageNumber = v - 1;
 | 
					      this.searchForm.pageNumber = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
      this.clearSelectAll();
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 分页 改变页数
 | 
				
			||||||
    changePageSize(v) {
 | 
					    changePageSize(v) {
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					      this.searchForm.pageSize = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取拼团商品列表
 | 
				
			||||||
    handleReset() {
 | 
					 | 
				
			||||||
      // 重置
 | 
					 | 
				
			||||||
      this.searchForm.pageNumber = 0;
 | 
					 | 
				
			||||||
      this.searchForm.promotionName = "";
 | 
					 | 
				
			||||||
      this.selectDate = null;
 | 
					 | 
				
			||||||
      // 重新加载数据
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    getDataList() {
 | 
					    getDataList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      this.searchForm.pintuanId = this.$route.query.id;
 | 
					      this.searchForm.pintuanId = this.$route.query.id;
 | 
				
			||||||
@ -211,27 +181,12 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取拼团详情
 | 
				
			||||||
    getPintuanMsg() {
 | 
					    getPintuanMsg() {
 | 
				
			||||||
      // 获取拼团详情
 | 
					 | 
				
			||||||
      getPintuanDetail(this.$route.query.id).then((res) => {
 | 
					      getPintuanDetail(this.$route.query.id).then((res) => {
 | 
				
			||||||
        if (res.success) this.data.push(res.result);
 | 
					        if (res.success) this.data.push(res.result);
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toBuyerGoods(row) {
 | 
					 | 
				
			||||||
      window.open(
 | 
					 | 
				
			||||||
        buyerUrl +
 | 
					 | 
				
			||||||
          "/pages/product/product?id=" +
 | 
					 | 
				
			||||||
          row.skuId +
 | 
					 | 
				
			||||||
          "&goodsId=" +
 | 
					 | 
				
			||||||
          row.goodsId
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    viewImg(img) {
 | 
					 | 
				
			||||||
      this.showImg = img;
 | 
					 | 
				
			||||||
      this.visible = true;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    this.init();
 | 
					    this.init();
 | 
				
			||||||
@ -239,9 +194,6 @@ export default {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
.operation {
 | 
					 | 
				
			||||||
  margin-bottom: 10px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
h4 {
 | 
					h4 {
 | 
				
			||||||
  margin: 20px 0;
 | 
					  margin: 20px 0;
 | 
				
			||||||
  padding: 0 10px;
 | 
					  padding: 0 10px;
 | 
				
			||||||
 | 
				
			|||||||
@ -56,19 +56,11 @@
 | 
				
			|||||||
                    >
 | 
					                    >
 | 
				
			||||||
                  </Select>
 | 
					                  </Select>
 | 
				
			||||||
                </template>
 | 
					                </template>
 | 
				
			||||||
 | 
					 | 
				
			||||||
                <template slot-scope="{ index }" slot="activeStock">
 | 
					                <template slot-scope="{ index }" slot="activeStock">
 | 
				
			||||||
                  <Input
 | 
					                  <Input type="number" v-model="promotionGoodsList[index].activeStock" />
 | 
				
			||||||
                    type="number"
 | 
					 | 
				
			||||||
                    v-model="promotionGoodsList[index].activeStock"
 | 
					 | 
				
			||||||
                  />
 | 
					 | 
				
			||||||
                </template>
 | 
					                </template>
 | 
				
			||||||
 | 
					 | 
				
			||||||
                <template slot-scope="{ index }" slot="points">
 | 
					                <template slot-scope="{ index }" slot="points">
 | 
				
			||||||
                  <Input
 | 
					                  <Input type="number" v-model="promotionGoodsList[index].points" />
 | 
				
			||||||
                    type="number"
 | 
					 | 
				
			||||||
                    v-model="promotionGoodsList[index].points"
 | 
					 | 
				
			||||||
                  />
 | 
					 | 
				
			||||||
                </template>
 | 
					                </template>
 | 
				
			||||||
              </Table>
 | 
					              </Table>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
@ -306,6 +298,7 @@ export default {
 | 
				
			|||||||
    await this.getCategory();
 | 
					    await this.getCategory();
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 获取商品分类
 | 
				
			||||||
    async getCategory() {
 | 
					    async getCategory() {
 | 
				
			||||||
      let res = await getPointsGoodsCategoryList();
 | 
					      let res = await getPointsGoodsCategoryList();
 | 
				
			||||||
      this.categoryList = res.result.records;
 | 
					      this.categoryList = res.result.records;
 | 
				
			||||||
@ -351,10 +344,12 @@ export default {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
      this.$router.go(-1);
 | 
					      this.$router.go(-1);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 选择分类
 | 
				
			||||||
    changeCategory(val, index) {
 | 
					    changeCategory(val, index) {
 | 
				
			||||||
      this.promotionGoodsList[index].pointsGoodsCategoryName = val.label;
 | 
					      this.promotionGoodsList[index].pointsGoodsCategoryName = val.label;
 | 
				
			||||||
      console.log(this.promotionGoodsList);
 | 
					      console.log(this.promotionGoodsList);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 变更选中状态
 | 
				
			||||||
    changeSelect(e) {
 | 
					    changeSelect(e) {
 | 
				
			||||||
      // 已选商品批量选择
 | 
					      // 已选商品批量选择
 | 
				
			||||||
      this.selectedGoods = e;
 | 
					      this.selectedGoods = e;
 | 
				
			||||||
 | 
				
			|||||||
@ -110,13 +110,11 @@ import {
 | 
				
			|||||||
  getPointsGoodsById,
 | 
					  getPointsGoodsById,
 | 
				
			||||||
  getPointsGoodsCategoryList,
 | 
					  getPointsGoodsCategoryList,
 | 
				
			||||||
} from "@/api/promotion";
 | 
					} from "@/api/promotion";
 | 
				
			||||||
import { format } from "date-fns";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "addCoupon",
 | 
					  name: "editPointsGoods",
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      modalType: 0, // 添加、编辑标识
 | 
					 | 
				
			||||||
      form: {
 | 
					      form: {
 | 
				
			||||||
        /** 活动名称 */
 | 
					        /** 活动名称 */
 | 
				
			||||||
        promotionName: "",
 | 
					        promotionName: "",
 | 
				
			||||||
@ -134,7 +132,6 @@ export default {
 | 
				
			|||||||
      categoryList: [], // 分类列表
 | 
					      categoryList: [], // 分类列表
 | 
				
			||||||
      id: this.$route.query.id, // 活动id
 | 
					      id: this.$route.query.id, // 活动id
 | 
				
			||||||
      submitLoading: false, // 添加或编辑提交状态
 | 
					      submitLoading: false, // 添加或编辑提交状态
 | 
				
			||||||
 | 
					 | 
				
			||||||
      formRule: {
 | 
					      formRule: {
 | 
				
			||||||
        settlementPrice: [{ required: true, message: "请填写结算价格" }],
 | 
					        settlementPrice: [{ required: true, message: "请填写结算价格" }],
 | 
				
			||||||
        pointsGoodsCategoryId: [
 | 
					        pointsGoodsCategoryId: [
 | 
				
			||||||
@ -150,7 +147,6 @@ export default {
 | 
				
			|||||||
    // 如果id不为空则查询信息
 | 
					    // 如果id不为空则查询信息
 | 
				
			||||||
    if (this.id) {
 | 
					    if (this.id) {
 | 
				
			||||||
      this.getData();
 | 
					      this.getData();
 | 
				
			||||||
      this.modalType = 1;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
@ -162,6 +158,7 @@ export default {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
      this.$router.go(-1);
 | 
					      this.$router.go(-1);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取商品数据
 | 
				
			||||||
    getData() {
 | 
					    getData() {
 | 
				
			||||||
      getPointsGoodsById(this.id).then((res) => {
 | 
					      getPointsGoodsById(this.id).then((res) => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
@ -170,11 +167,12 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取分类
 | 
				
			||||||
    async getCategory() {
 | 
					    async getCategory() {
 | 
				
			||||||
      let res = await getPointsGoodsCategoryList();
 | 
					      let res = await getPointsGoodsCategoryList();
 | 
				
			||||||
      this.categoryList = res.result.records;
 | 
					      this.categoryList = res.result.records;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 保存平台优惠券 */
 | 
					    /** 保存 */
 | 
				
			||||||
    handleSubmit() {
 | 
					    handleSubmit() {
 | 
				
			||||||
      this.$refs.form.validate((valid) => {
 | 
					      this.$refs.form.validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
 | 
				
			|||||||
@ -16,15 +16,14 @@
 | 
				
			|||||||
              <Option v-for="item in statusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
 | 
					              <Option v-for="item in statusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
 | 
				
			||||||
            </Select>
 | 
					            </Select>
 | 
				
			||||||
          </Form-item>
 | 
					          </Form-item>
 | 
				
			||||||
 | 
					          <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
 | 
				
			||||||
          <Form-item label="SKU编码">
 | 
					          <Form-item label="SKU编码">
 | 
				
			||||||
            <Input type="text" v-model="searchForm.skuId" placeholder="请输入SKU编码" clearable style="width: 200px" />
 | 
					            <Input type="text" v-model="searchForm.skuId" placeholder="请输入SKU编码" clearable style="width: 200px" />
 | 
				
			||||||
          </Form-item>
 | 
					          </Form-item>
 | 
				
			||||||
          <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
 | 
					 | 
				
			||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
      <Row class="operation padding-row">
 | 
					      <Row class="operation padding-row">
 | 
				
			||||||
        <Button @click="addPointsGoods" type="primary">添加积分商品</Button>
 | 
					        <Button @click="addPointsGoods" type="primary">添加积分商品</Button>
 | 
				
			||||||
 | 
					 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
      <Table :loading="loading" border :columns="columns" :data="data" ref="table">
 | 
					      <Table :loading="loading" border :columns="columns" :data="data" ref="table">
 | 
				
			||||||
        <template slot-scope="{ row }" slot="goodsName">
 | 
					        <template slot-scope="{ row }" slot="goodsName">
 | 
				
			||||||
@ -51,7 +50,6 @@
 | 
				
			|||||||
          <div>{{ row.startTime }}</div>
 | 
					          <div>{{ row.startTime }}</div>
 | 
				
			||||||
          <div>{{ row.endTime }}</div>
 | 
					          <div>{{ row.endTime }}</div>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
 | 
					 | 
				
			||||||
        <template slot-scope="{ row }" slot="action">
 | 
					        <template slot-scope="{ row }" slot="action">
 | 
				
			||||||
          <Button v-if="row.promotionStatus == 'NEW'" type="info" size="small" @click="edit(row.id)" style="margin-right: 5px">编辑</Button>
 | 
					          <Button v-if="row.promotionStatus == 'NEW'" type="info" size="small" @click="edit(row.id)" style="margin-right: 5px">编辑</Button>
 | 
				
			||||||
          <Button v-if="row.promotionStatus == 'START'" type="warning" size="small" @click="statusChanged(row.id, 'CLOSE')" style="margin-right: 5px">停用</Button>
 | 
					          <Button v-if="row.promotionStatus == 'START'" type="warning" size="small" @click="statusChanged(row.id, 'CLOSE')" style="margin-right: 5px">停用</Button>
 | 
				
			||||||
@ -75,7 +73,6 @@ import {
 | 
				
			|||||||
} from "@/api/promotion";
 | 
					} from "@/api/promotion";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "pointsGoods",
 | 
					  name: "pointsGoods",
 | 
				
			||||||
  components: {},
 | 
					 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      loading: true, // 表单加载状态
 | 
					      loading: true, // 表单加载状态
 | 
				
			||||||
@ -92,8 +89,7 @@ export default {
 | 
				
			|||||||
        { label: "已结束", value: "END" },
 | 
					        { label: "已结束", value: "END" },
 | 
				
			||||||
        { label: "已关闭", value: "CLOSE" },
 | 
					        { label: "已关闭", value: "CLOSE" },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      columns: [
 | 
					      columns: [ // 表头
 | 
				
			||||||
        // 表头
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "商品名称",
 | 
					          title: "商品名称",
 | 
				
			||||||
          slot: "goodsName",
 | 
					          slot: "goodsName",
 | 
				
			||||||
@ -111,7 +107,6 @@ export default {
 | 
				
			|||||||
          slot: "settlementPrice",
 | 
					          slot: "settlementPrice",
 | 
				
			||||||
          width: 100,
 | 
					          width: 100,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          title: "库存数量",
 | 
					          title: "库存数量",
 | 
				
			||||||
          slot: "quantity",
 | 
					          slot: "quantity",
 | 
				
			||||||
@ -178,20 +173,26 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 初始化数据
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 跳转添加商品页面
 | 
				
			||||||
    addPointsGoods() {
 | 
					    addPointsGoods() {
 | 
				
			||||||
      this.$router.push({ name: "add-points-goods" });
 | 
					      this.$router.push({ name: "add-points-goods" });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 分页 修改页码
 | 
				
			||||||
    changePage(v) {
 | 
					    changePage(v) {
 | 
				
			||||||
      this.searchForm.pageNumber = v;
 | 
					      this.searchForm.pageNumber = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 分页 修改页数
 | 
				
			||||||
    changePageSize(v) {
 | 
					    changePageSize(v) {
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					      this.searchForm.pageSize = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 搜索
 | 
				
			||||||
    handleSearch() {
 | 
					    handleSearch() {
 | 
				
			||||||
      this.searchForm.pageNumber = 1;
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					      this.searchForm.pageSize = 10;
 | 
				
			||||||
@ -201,10 +202,9 @@ export default {
 | 
				
			|||||||
          "_" +
 | 
					          "_" +
 | 
				
			||||||
          (this.searchForm.pointsE ? this.searchForm.pointsE : "");
 | 
					          (this.searchForm.pointsE ? this.searchForm.pointsE : "");
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取列表数据
 | 
				
			||||||
    getDataList() {
 | 
					    getDataList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      getPointsGoodsList(this.searchForm).then((res) => {
 | 
					      getPointsGoodsList(this.searchForm).then((res) => {
 | 
				
			||||||
@ -215,9 +215,11 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 编辑
 | 
				
			||||||
    edit(id) {
 | 
					    edit(id) {
 | 
				
			||||||
      this.$router.push({ name: "edit-points-goods", query: { id: id } });
 | 
					      this.$router.push({ name: "edit-points-goods", query: { id: id } });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 启用 停用积分商品
 | 
				
			||||||
    statusChanged(id, status) {
 | 
					    statusChanged(id, status) {
 | 
				
			||||||
      let text = "";
 | 
					      let text = "";
 | 
				
			||||||
      if (status == "START") {
 | 
					      if (status == "START") {
 | 
				
			||||||
@ -242,6 +244,7 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 删除积分商品
 | 
				
			||||||
    close(id) {
 | 
					    close(id) {
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: "确认删除",
 | 
					        title: "确认删除",
 | 
				
			||||||
@ -258,7 +261,7 @@ export default {
 | 
				
			|||||||
          });
 | 
					          });
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    this.init();
 | 
					    this.init();
 | 
				
			||||||
 | 
				
			|||||||
@ -1,28 +1,28 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div>
 | 
					  <div>
 | 
				
			||||||
    <div class="operation">
 | 
					    <Card>
 | 
				
			||||||
      <Button @click="addParent" icon="md-add">添加积分商品分类</Button>
 | 
					      <div class="operation mb_10">
 | 
				
			||||||
      <Button icon="md-refresh" @click="refresh">刷新</Button>
 | 
					        <Button @click="addParent" type="primary" icon="md-add">添加积分商品分类</Button>
 | 
				
			||||||
    </div>
 | 
					        <Button icon="md-refresh" @click="init">刷新</Button>
 | 
				
			||||||
    <tree-table
 | 
					      </div>
 | 
				
			||||||
      ref="treeTable"
 | 
					      <tree-table
 | 
				
			||||||
      size="default"
 | 
					        ref="treeTable"
 | 
				
			||||||
      :loading="loading"
 | 
					        size="default"
 | 
				
			||||||
      :data="tableData"
 | 
					        :loading="loading"
 | 
				
			||||||
      :columns="columns"
 | 
					        :data="tableData"
 | 
				
			||||||
      :border="true"
 | 
					        :columns="columns"
 | 
				
			||||||
      :show-index="false"
 | 
					        :border="true"
 | 
				
			||||||
      :is-fold="true"
 | 
					        :show-index="false"
 | 
				
			||||||
      :expand-type="false"
 | 
					        :is-fold="true"
 | 
				
			||||||
      primary-key="id"
 | 
					        :expand-type="false"
 | 
				
			||||||
    >
 | 
					        primary-key="id"
 | 
				
			||||||
      <template slot="action" slot-scope="scope">
 | 
					      >
 | 
				
			||||||
        <Button @click.native="edit(scope.row)" style="margin-right:10px;" size="small">编辑</Button>
 | 
					        <template slot="action" slot-scope="scope">
 | 
				
			||||||
        <Button @click.native="remove(scope.row)" type="primary" size="small">删除</Button>
 | 
					          <Button @click.native="edit(scope.row)" style="margin-right:10px;" size="small">编辑</Button>
 | 
				
			||||||
 | 
					          <Button @click.native="remove(scope.row)" type="primary" size="small">删除</Button>
 | 
				
			||||||
      </template>
 | 
					        </template>
 | 
				
			||||||
    </tree-table>
 | 
					      </tree-table>
 | 
				
			||||||
 | 
					    </Card>
 | 
				
			||||||
    <Modal
 | 
					    <Modal
 | 
				
			||||||
      :title="modalTitle"
 | 
					      :title="modalTitle"
 | 
				
			||||||
      v-model="modalVisible"
 | 
					      v-model="modalVisible"
 | 
				
			||||||
@ -59,13 +59,11 @@ import {
 | 
				
			|||||||
  deletePointsGoodsCategoryById,
 | 
					  deletePointsGoodsCategoryById,
 | 
				
			||||||
} from "@/api/promotion";
 | 
					} from "@/api/promotion";
 | 
				
			||||||
import TreeTable from "@/views/my-components/tree-table/Table/Table";
 | 
					import TreeTable from "@/views/my-components/tree-table/Table/Table";
 | 
				
			||||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "pointsGoodsCategory",
 | 
					  name: "pointsGoodsCategory",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    TreeTable,
 | 
					    TreeTable
 | 
				
			||||||
    uploadPicInput,
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@ -102,20 +100,15 @@ export default {
 | 
				
			|||||||
          template: "action",
 | 
					          template: "action",
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [], // 表格数据
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 初始化数据
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      this.getAllList();
 | 
					      this.getAllList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    refresh() {
 | 
					    // 编辑分类
 | 
				
			||||||
      this.loading = true;
 | 
					 | 
				
			||||||
      let that = this;
 | 
					 | 
				
			||||||
      setTimeout(function () {
 | 
					 | 
				
			||||||
        that.loading = false;
 | 
					 | 
				
			||||||
      }, 1000);
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    edit(v) {
 | 
					    edit(v) {
 | 
				
			||||||
      this.modalType = 1;
 | 
					      this.modalType = 1;
 | 
				
			||||||
      this.modalTitle = "编辑";
 | 
					      this.modalTitle = "编辑";
 | 
				
			||||||
@ -125,6 +118,7 @@ export default {
 | 
				
			|||||||
      this.showParent = false;
 | 
					      this.showParent = false;
 | 
				
			||||||
      this.modalVisible = true;
 | 
					      this.modalVisible = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 添加顶级分类
 | 
				
			||||||
    addParent() {
 | 
					    addParent() {
 | 
				
			||||||
      this.modalType = 0;
 | 
					      this.modalType = 0;
 | 
				
			||||||
      this.modalTitle = "添加积分商品分类";
 | 
					      this.modalTitle = "添加积分商品分类";
 | 
				
			||||||
@ -135,6 +129,7 @@ export default {
 | 
				
			|||||||
      this.formAdd.parentId = 0;
 | 
					      this.formAdd.parentId = 0;
 | 
				
			||||||
      this.modalVisible = true;
 | 
					      this.modalVisible = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 提交
 | 
				
			||||||
    Submit() {
 | 
					    Submit() {
 | 
				
			||||||
      this.$refs.form.validate((valid) => {
 | 
					      this.$refs.form.validate((valid) => {
 | 
				
			||||||
        console.log(valid);
 | 
					        console.log(valid);
 | 
				
			||||||
@ -167,10 +162,10 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 删除
 | 
				
			||||||
    remove(v) {
 | 
					    remove(v) {
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: "确认删除",
 | 
					        title: "确认删除",
 | 
				
			||||||
        // 记得确认修改此处
 | 
					 | 
				
			||||||
        content: "您确认要删除 " + v.name + " ?",
 | 
					        content: "您确认要删除 " + v.name + " ?",
 | 
				
			||||||
        loading: true,
 | 
					        loading: true,
 | 
				
			||||||
        onOk: () => {
 | 
					        onOk: () => {
 | 
				
			||||||
@ -185,6 +180,7 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取所有分类
 | 
				
			||||||
    getAllList() {
 | 
					    getAllList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      getPointsGoodsCategoryList().then((res) => {
 | 
					      getPointsGoodsCategoryList().then((res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,264 +0,0 @@
 | 
				
			|||||||
/*选择商品品类*/
 | 
					 | 
				
			||||||
.content-goods-publish {
 | 
					 | 
				
			||||||
  padding: 15px;
 | 
					 | 
				
			||||||
  margin: 0 auto;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
  border: 1px solid #ddd;
 | 
					 | 
				
			||||||
  background: none repeat 0 0 #fff;
 | 
					 | 
				
			||||||
  height: 100%;
 | 
					 | 
				
			||||||
  margin-bottom: 20px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /*商品品类*/
 | 
					 | 
				
			||||||
  .goods-category {
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    padding: 10px;
 | 
					 | 
				
			||||||
    background: #fafafa;
 | 
					 | 
				
			||||||
    border: 1px solid #e6e6e6;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ul {
 | 
					 | 
				
			||||||
      padding: 8px 4px 8px 8px;
 | 
					 | 
				
			||||||
      list-style: none;
 | 
					 | 
				
			||||||
      width: 300px;
 | 
					 | 
				
			||||||
      background: none repeat 0 0 #fff;
 | 
					 | 
				
			||||||
      border: 1px solid #e6e6e6;
 | 
					 | 
				
			||||||
      display: inline-block;
 | 
					 | 
				
			||||||
      letter-spacing: normal;
 | 
					 | 
				
			||||||
      margin-right: 15px;
 | 
					 | 
				
			||||||
      vertical-align: top;
 | 
					 | 
				
			||||||
      word-spacing: normal;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      li {
 | 
					 | 
				
			||||||
        line-height: 20px;
 | 
					 | 
				
			||||||
        padding: 5px;
 | 
					 | 
				
			||||||
        cursor: pointer;
 | 
					 | 
				
			||||||
        color: #333;
 | 
					 | 
				
			||||||
        font-size: 12px;
 | 
					 | 
				
			||||||
        display: flex;
 | 
					 | 
				
			||||||
        flex-wrap: nowrap;
 | 
					 | 
				
			||||||
        flex-direction: row;
 | 
					 | 
				
			||||||
        justify-content: space-between;
 | 
					 | 
				
			||||||
        align-items: center;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /** 当前品类被选中的样式 */
 | 
					 | 
				
			||||||
  .activeClass {
 | 
					 | 
				
			||||||
    background-color: #d9edf7;
 | 
					 | 
				
			||||||
    border: 1px solid #bce8f1;
 | 
					 | 
				
			||||||
    color: #3a87ad;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /*!*当前选择的商品品类文字*!*/
 | 
					 | 
				
			||||||
  .current-goods-category {
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    padding: 10px;
 | 
					 | 
				
			||||||
    width: 100%;
 | 
					 | 
				
			||||||
    border: 1px solid #fbeed5;
 | 
					 | 
				
			||||||
    color: #c09853;
 | 
					 | 
				
			||||||
    background-color: #fcf8e3;
 | 
					 | 
				
			||||||
    margin: 10px auto;
 | 
					 | 
				
			||||||
    padding: 8px 35px 8px 14px;
 | 
					 | 
				
			||||||
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
 | 
					 | 
				
			||||||
    font-size: 12px;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*编辑基本信息*/
 | 
					 | 
				
			||||||
.el-form {
 | 
					 | 
				
			||||||
  padding-bottom: 80px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item {
 | 
					 | 
				
			||||||
    width: 100%;
 | 
					 | 
				
			||||||
    color: gray;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
getGoodsCategoryLevelList
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*平铺*/
 | 
					 | 
				
			||||||
div.base-info-item>div {
 | 
					 | 
				
			||||||
  margin-left: 5%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
div.base-info-item {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  h4 {
 | 
					 | 
				
			||||||
    margin-bottom: 10px;
 | 
					 | 
				
			||||||
    padding: 0 10px;
 | 
					 | 
				
			||||||
    border: 1px solid #ddd;
 | 
					 | 
				
			||||||
    background-color: #f8f8f8;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
    color: #333;
 | 
					 | 
				
			||||||
    font-size: 14px;
 | 
					 | 
				
			||||||
    line-height: 40px;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .form-item-view {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    flex-direction: column;
 | 
					 | 
				
			||||||
    align-items: flex-start;
 | 
					 | 
				
			||||||
    justify-content: space-between;
 | 
					 | 
				
			||||||
    padding-left: 80px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    .shop-category-text {
 | 
					 | 
				
			||||||
      font-size: 12px;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .item-goods-properts-row {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    flex-direction: row;
 | 
					 | 
				
			||||||
    word-break: break-all;
 | 
					 | 
				
			||||||
    white-space: normal;
 | 
					 | 
				
			||||||
    width: 300px;
 | 
					 | 
				
			||||||
    height: 100px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .item-goods-properts {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    flex-direction: row;
 | 
					 | 
				
			||||||
    margin-bottom: 10px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .form-item {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    align-items: center;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /** 审核信息-拒绝原因 */
 | 
					 | 
				
			||||||
  .auth-info {
 | 
					 | 
				
			||||||
    color: red;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item {
 | 
					 | 
				
			||||||
    width: 30%;
 | 
					 | 
				
			||||||
    min-width: 300px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .goods-name-width {
 | 
					 | 
				
			||||||
    width: 50%;
 | 
					 | 
				
			||||||
    min-width: 300px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item__content {
 | 
					 | 
				
			||||||
    margin-left: 120px;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  p.goods-group-manager {
 | 
					 | 
				
			||||||
    padding-left: 7.5%;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    color: #999;
 | 
					 | 
				
			||||||
    font-size: 13px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /*teatarea*/
 | 
					 | 
				
			||||||
  /deep/ .el-textarea {
 | 
					 | 
				
			||||||
    width: 150%;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .seo-text {
 | 
					 | 
				
			||||||
    width: 150%;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*折叠面板*/
 | 
					 | 
				
			||||||
.el-collapse-item {
 | 
					 | 
				
			||||||
  /deep/ .el-collapse-item__header {
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    background-color: #f8f8f8;
 | 
					 | 
				
			||||||
    padding: 0 10px;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
    color: #333;
 | 
					 | 
				
			||||||
    font-size: 14px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .el-form-item {
 | 
					 | 
				
			||||||
    margin-left: 5%;
 | 
					 | 
				
			||||||
    width: 25%;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /deep/ .el-form-item__content {
 | 
					 | 
				
			||||||
    margin-left: 120px;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  p.goods-group-manager {
 | 
					 | 
				
			||||||
    padding-left: 12%;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    color: #999;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /deep/ .el-collapse-item__content {
 | 
					 | 
				
			||||||
    padding: 10px 0;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*商品描述*/
 | 
					 | 
				
			||||||
.goods-intro {
 | 
					 | 
				
			||||||
  line-height: 40;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/** 底部步骤 */
 | 
					 | 
				
			||||||
.footer {
 | 
					 | 
				
			||||||
  width: 88.7%;
 | 
					 | 
				
			||||||
  padding: 10px;
 | 
					 | 
				
			||||||
  background-color: #ffc;
 | 
					 | 
				
			||||||
  position: fixed;
 | 
					 | 
				
			||||||
  bottom: 0px;
 | 
					 | 
				
			||||||
  left: 10%;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
  z-index: 9999;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*图片上传组件第一张图设置封面*/
 | 
					 | 
				
			||||||
.goods-images {
 | 
					 | 
				
			||||||
  /deep/ li.el-upload-list__item:first-child {
 | 
					 | 
				
			||||||
    position: relative;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /deep/ li.el-upload-list__item:first-child:after {
 | 
					 | 
				
			||||||
    content: "封";
 | 
					 | 
				
			||||||
    color: #fff;
 | 
					 | 
				
			||||||
    font-weight: bold;
 | 
					 | 
				
			||||||
    font-size: 12px;
 | 
					 | 
				
			||||||
    position: absolute;
 | 
					 | 
				
			||||||
    left: -15px;
 | 
					 | 
				
			||||||
    top: -6px;
 | 
					 | 
				
			||||||
    width: 40px;
 | 
					 | 
				
			||||||
    height: 24px;
 | 
					 | 
				
			||||||
    padding-top: 6px;
 | 
					 | 
				
			||||||
    background: #13ce66;
 | 
					 | 
				
			||||||
    text-align: center;
 | 
					 | 
				
			||||||
    -webkit-transform: rotate(-45deg);
 | 
					 | 
				
			||||||
    transform: rotate(-45deg);
 | 
					 | 
				
			||||||
    -webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
 | 
					 | 
				
			||||||
    box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.el-form-item__label {
 | 
					 | 
				
			||||||
  word-break: break-all;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.step-view {
 | 
					 | 
				
			||||||
  width: 33%;
 | 
					 | 
				
			||||||
  height: 40px;
 | 
					 | 
				
			||||||
  font-size: 19px;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  background-color: #fff;
 | 
					 | 
				
			||||||
  justify-content: center;
 | 
					 | 
				
			||||||
  align-items: center;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.page {
 | 
					 | 
				
			||||||
  margin-top: 2vh;
 | 
					 | 
				
			||||||
  margin-bottom: 5vh;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -118,9 +118,9 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      formRule: {
 | 
					      formRule: {
 | 
				
			||||||
        promotionName: [{ required: true, message: "请填写活动名称" }],
 | 
					        promotionName: [{ required: true, message: "请填写活动名称" }],
 | 
				
			||||||
        applyEndTime: [{ required: true, message: "请填写报名截止时间" }],
 | 
					        applyEndTime: [{ required: true, message: "请选择报名截止时间" }],
 | 
				
			||||||
        seckillPeriod: [{ required: true, message: "请填写抢购时间段" }],
 | 
					        seckillPeriod: [{ required: true, message: "请填写抢购时间段" }],
 | 
				
			||||||
        startTime: [{ required: true, message: "请填写活动开始时间" }],
 | 
					        startTime: [{ required: true, message: "请选择活动开始时间" }],
 | 
				
			||||||
        seckillRule: [{ required: true, message: "请输入申请规则" }],
 | 
					        seckillRule: [{ required: true, message: "请输入申请规则" }],
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
@ -139,6 +139,7 @@ export default {
 | 
				
			|||||||
      localStorage.pageOpenedList = JSON.stringify(this.$store.state.app.pageOpenedList);
 | 
					      localStorage.pageOpenedList = JSON.stringify(this.$store.state.app.pageOpenedList);
 | 
				
			||||||
      this.$router.go(-1);
 | 
					      this.$router.go(-1);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取活动详情
 | 
				
			||||||
    getData() {
 | 
					    getData() {
 | 
				
			||||||
      seckillDetail(this.id).then((res) => {
 | 
					      seckillDetail(this.id).then((res) => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
@ -201,8 +202,18 @@ export default {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
@import "addSeckill.scss";
 | 
					h4 {
 | 
				
			||||||
.ivu-form-item{
 | 
					  margin-bottom: 10px;
 | 
				
			||||||
  margin-bottom: 30px;
 | 
					  padding: 0 10px;
 | 
				
			||||||
 | 
					  border: 1px solid #ddd;
 | 
				
			||||||
 | 
					  background-color: #f8f8f8;
 | 
				
			||||||
 | 
					  font-weight: bold;
 | 
				
			||||||
 | 
					  color: #333;
 | 
				
			||||||
 | 
					  font-size: 14px;
 | 
				
			||||||
 | 
					  line-height: 40px;
 | 
				
			||||||
 | 
					  text-align: left;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					// .ivu-form-item{
 | 
				
			||||||
 | 
					//   margin-bottom: 30px;
 | 
				
			||||||
 | 
					// }
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
				
			|||||||
@ -63,7 +63,7 @@ import setupSeckill from "@/views/promotion/seckill/setupSeckill";
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "seckill",
 | 
					  name: "seckill",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    setupSeckill,
 | 
					    setupSeckill
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@ -131,33 +131,32 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // tab栏点击切换列表和设置
 | 
				
			||||||
    clickTabPane(name) {
 | 
					    clickTabPane(name) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
      if (name == "setup") {
 | 
					      if (name == "setup") {
 | 
				
			||||||
 | 
					 | 
				
			||||||
        this.setupFlag = true;
 | 
					        this.setupFlag = true;
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        this.setupFlag = false;
 | 
					        this.setupFlag = false;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					 | 
				
			||||||
    // 初始化信息
 | 
					    // 初始化信息
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 点击分页
 | 
					    // 分页 改变页码
 | 
				
			||||||
    changePage(v) {
 | 
					    changePage(v) {
 | 
				
			||||||
      this.searchForm.pageNumber = v;
 | 
					      this.searchForm.pageNumber = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
      this.clearSelectAll();
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 设置每页大小
 | 
					    // 分页 改变页数
 | 
				
			||||||
    changePageSize(v) {
 | 
					    changePageSize(v) {
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					      this.searchForm.pageSize = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 搜索
 | 
				
			||||||
    handleSearch() {
 | 
					    handleSearch() {
 | 
				
			||||||
      this.searchForm.pageNumber = 0;
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					      this.searchForm.pageSize = 10;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -308,25 +308,26 @@
 | 
				
			|||||||
      };
 | 
					      };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    methods: {
 | 
					    methods: {
 | 
				
			||||||
 | 
					      // 初始化数据
 | 
				
			||||||
      init() {
 | 
					      init() {
 | 
				
			||||||
        this.getSeckillMsg();
 | 
					        this.getSeckillMsg();
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 分页 改变页码
 | 
				
			||||||
      changePage(v) {
 | 
					      changePage(v) {
 | 
				
			||||||
        this.searchForm.pageNumber = v - 1;
 | 
					        this.searchForm.pageNumber = v;
 | 
				
			||||||
        this.getDataList();
 | 
					        this.getDataList();
 | 
				
			||||||
        this.clearSelectAll();
 | 
					        this.clearSelectAll();
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 分页 改变页数
 | 
				
			||||||
      changePageSize(v) {
 | 
					      changePageSize(v) {
 | 
				
			||||||
 | 
					        this.searchForm.pageNumber = 1;
 | 
				
			||||||
        this.searchForm.pageSize = v;
 | 
					        this.searchForm.pageSize = v;
 | 
				
			||||||
        this.getDataList();
 | 
					        this.getDataList();
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 清除选中状态
 | 
				
			||||||
      clearSelectAll() {
 | 
					      clearSelectAll() {
 | 
				
			||||||
        this.$refs.table.selectAll(false);
 | 
					        this.$refs.table.selectAll(false);
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					 | 
				
			||||||
      changeSelect(e) {
 | 
					      changeSelect(e) {
 | 
				
			||||||
        // 获取选择数据
 | 
					        // 获取选择数据
 | 
				
			||||||
        this.selectList = e;
 | 
					        this.selectList = e;
 | 
				
			||||||
@ -379,17 +380,15 @@
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        return hourArr;
 | 
					        return hourArr;
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 格式化申请状态
 | 
				
			||||||
      promotionApplyStatus(key) {
 | 
					      promotionApplyStatus(key) {
 | 
				
			||||||
        switch (key) {
 | 
					        switch (key) {
 | 
				
			||||||
          case "APPLY":
 | 
					          case "APPLY":
 | 
				
			||||||
            return "申请";
 | 
					            return "申请";
 | 
				
			||||||
            break;
 | 
					 | 
				
			||||||
          case "PASS":
 | 
					          case "PASS":
 | 
				
			||||||
            return "通过";
 | 
					            return "通过";
 | 
				
			||||||
            break;
 | 
					 | 
				
			||||||
          case "REFUSE":
 | 
					          case "REFUSE":
 | 
				
			||||||
            return "拒绝";
 | 
					            return "拒绝";
 | 
				
			||||||
            break;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      pass(row) {
 | 
					      pass(row) {
 | 
				
			||||||
@ -421,6 +420,7 @@
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        this.showModal = true;
 | 
					        this.showModal = true;
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 确认审批
 | 
				
			||||||
      sureAudit() {
 | 
					      sureAudit() {
 | 
				
			||||||
        this.selectCount = this.selectList.length;
 | 
					        this.selectCount = this.selectList.length;
 | 
				
			||||||
        // 批量审核
 | 
					        // 批量审核
 | 
				
			||||||
@ -453,6 +453,7 @@
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 展示拒绝原因
 | 
				
			||||||
      showReason(reason) {
 | 
					      showReason(reason) {
 | 
				
			||||||
        this.$Modal.info({
 | 
					        this.$Modal.info({
 | 
				
			||||||
          title: "拒绝原因",
 | 
					          title: "拒绝原因",
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,6 @@
 | 
				
			|||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </FormItem>
 | 
					      </FormItem>
 | 
				
			||||||
    </Form>
 | 
					    </Form>
 | 
				
			||||||
    <!-- 选择时间 -->
 | 
					 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -27,9 +26,8 @@ import { getSetting, setSetting } from "@/api/index";
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      templateShow:false,
 | 
					      templateShow:false, // 设置是否显示
 | 
				
			||||||
      submitLoading: false,
 | 
					      submitLoading: false,
 | 
				
			||||||
      selectedTime: [],
 | 
					 | 
				
			||||||
      times: [], //时间集合 1-24点
 | 
					      times: [], //时间集合 1-24点
 | 
				
			||||||
      form: {
 | 
					      form: {
 | 
				
			||||||
        seckillRule: "",
 | 
					        seckillRule: "",
 | 
				
			||||||
@ -107,7 +105,6 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 选中时间
 | 
					     * 选中时间
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
 | 
				
			|||||||
@ -1,12 +1,11 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <Card>
 | 
					  <Card>
 | 
				
			||||||
    <Row class="operation">
 | 
					    <Row class="operation">
 | 
				
			||||||
      <Button @click="asyncRegion"  :loading="asyncLoading" type="primary" icon="md-add"
 | 
					      <Button @click="handleAsyncRegion"  :loading="asyncLoading" type="primary" icon="md-add"
 | 
				
			||||||
        >同步数据</Button
 | 
					        >同步数据</Button
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
    </Row>
 | 
					    </Row>
 | 
				
			||||||
    <div class="flex">
 | 
					    <div class="flex">
 | 
				
			||||||
      <Spin size="large" fix v-if="spinShow"></Spin>
 | 
					 | 
				
			||||||
      <Tree
 | 
					      <Tree
 | 
				
			||||||
        class="tree"
 | 
					        class="tree"
 | 
				
			||||||
        :data="data"
 | 
					        :data="data"
 | 
				
			||||||
@ -99,7 +98,6 @@ export default {
 | 
				
			|||||||
      asyncLoading:false, // 加载状态
 | 
					      asyncLoading:false, // 加载状态
 | 
				
			||||||
      num: 10, // 更新倒计时
 | 
					      num: 10, // 更新倒计时
 | 
				
			||||||
      modalFlag: false,  // 新增编辑标识
 | 
					      modalFlag: false,  // 新增编辑标识
 | 
				
			||||||
      spinShow: false, // 全局加载状态
 | 
					 | 
				
			||||||
      timerNum: 10, // 定时器
 | 
					      timerNum: 10, // 定时器
 | 
				
			||||||
      data: [], // 加载数据
 | 
					      data: [], // 加载数据
 | 
				
			||||||
      id: 0, // id
 | 
					      id: 0, // id
 | 
				
			||||||
@ -122,7 +120,6 @@ export default {
 | 
				
			|||||||
            trigger: "blur",
 | 
					            trigger: "blur",
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
 | 
					 | 
				
			||||||
        center: [
 | 
					        center: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            required: true,
 | 
					            required: true,
 | 
				
			||||||
@ -144,6 +141,7 @@ export default {
 | 
				
			|||||||
    this.init();
 | 
					    this.init();
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 提交数据
 | 
				
			||||||
    submit() {
 | 
					    submit() {
 | 
				
			||||||
      delete this.addValidate.children;
 | 
					      delete this.addValidate.children;
 | 
				
			||||||
      addRegion(this.addValidate).then((res) => {
 | 
					      addRegion(this.addValidate).then((res) => {
 | 
				
			||||||
@ -190,7 +188,7 @@ export default {
 | 
				
			|||||||
      this.addValidate.center = "";
 | 
					      this.addValidate.center = "";
 | 
				
			||||||
      this.modalFlag = true;
 | 
					      this.modalFlag = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 删除
 | 
				
			||||||
    handleDel() {
 | 
					    handleDel() {
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: "确定删除?",
 | 
					        title: "确定删除?",
 | 
				
			||||||
@ -227,11 +225,11 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 树结构点击事件
 | 
				
			||||||
    changeTree(array, val) {
 | 
					    changeTree(array, val) {
 | 
				
			||||||
      this.formValidate = val;
 | 
					      this.formValidate = val;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 异步加载数据
 | 
				
			||||||
    loadData(item, callback) {
 | 
					    loadData(item, callback) {
 | 
				
			||||||
      item.loading = true;
 | 
					      item.loading = true;
 | 
				
			||||||
      console.log(item);
 | 
					      console.log(item);
 | 
				
			||||||
@ -267,7 +265,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 初始化数据
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      getChildRegion(this.id).then((res) => {
 | 
					      getChildRegion(this.id).then((res) => {
 | 
				
			||||||
        if (res.result) {
 | 
					        if (res.result) {
 | 
				
			||||||
@ -294,8 +292,8 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 同步数据
 | 
				
			||||||
    asyncRegion() {
 | 
					    handleAsyncRegion() {
 | 
				
			||||||
      this.num = 10;
 | 
					      this.num = 10;
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: "确定更新?",
 | 
					        title: "确定更新?",
 | 
				
			||||||
 | 
				
			|||||||
@ -27,7 +27,7 @@
 | 
				
			|||||||
          <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
 | 
					          <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
 | 
				
			||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
      <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
 | 
					      <Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10"></Table>
 | 
				
			||||||
      <Row type="flex" justify="end" class="mt_10">
 | 
					      <Row type="flex" justify="end" class="mt_10">
 | 
				
			||||||
        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
 | 
					        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
 | 
				
			||||||
              size="small" show-total show-elevator show-sizer></Page>
 | 
					              size="small" show-total show-elevator show-sizer></Page>
 | 
				
			||||||
@ -51,8 +51,6 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    data() {
 | 
					    data() {
 | 
				
			||||||
      return {
 | 
					      return {
 | 
				
			||||||
        shopId: "", // 店铺id
 | 
					 | 
				
			||||||
        modalFlag: false, // 新增、编辑标识
 | 
					 | 
				
			||||||
        loading: true, // 表单加载状态
 | 
					        loading: true, // 表单加载状态
 | 
				
			||||||
        searchForm: {
 | 
					        searchForm: {
 | 
				
			||||||
          // 搜索框初始化对象
 | 
					          // 搜索框初始化对象
 | 
				
			||||||
@ -64,16 +62,6 @@
 | 
				
			|||||||
          endDate: "", // 终止时间
 | 
					          endDate: "", // 终止时间
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        selectDate: null, // 创建时间
 | 
					        selectDate: null, // 创建时间
 | 
				
			||||||
        form: {
 | 
					 | 
				
			||||||
          // 添加或编辑表单对象初始化数据
 | 
					 | 
				
			||||||
          memberName: "",
 | 
					 | 
				
			||||||
          storeName: "",
 | 
					 | 
				
			||||||
          shopDisable: "",
 | 
					 | 
				
			||||||
          id: "",
 | 
					 | 
				
			||||||
          createTime: "",
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        selectList: [], // 多选数据
 | 
					 | 
				
			||||||
        selectCount: 0, // 多选计数
 | 
					 | 
				
			||||||
        columns: [
 | 
					        columns: [
 | 
				
			||||||
          // 表头
 | 
					          // 表头
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@ -264,52 +252,38 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    methods: {
 | 
					    methods: {
 | 
				
			||||||
      callbackShop() {
 | 
					 | 
				
			||||||
        this.init();
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      // 回调给父级
 | 
					      // 回调给父级
 | 
				
			||||||
      callback(val) {
 | 
					      callback(val) {
 | 
				
			||||||
        this.$emit("callback", val);
 | 
					        this.$emit("callback", val);
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 初始化数据
 | 
				
			||||||
      init() {
 | 
					      init() {
 | 
				
			||||||
        this.getDataList();
 | 
					        this.getDataList();
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 分页 改变页码
 | 
				
			||||||
      changePage(v) {
 | 
					      changePage(v) {
 | 
				
			||||||
        this.searchForm.pageNumber = v;
 | 
					        this.searchForm.pageNumber = v;
 | 
				
			||||||
        this.getDataList();
 | 
					        this.getDataList();
 | 
				
			||||||
        this.clearSelectAll();
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 分页 改变页数
 | 
				
			||||||
      changePageSize(v) {
 | 
					      changePageSize(v) {
 | 
				
			||||||
 | 
					        this.searchForm.pageNumber = 1;
 | 
				
			||||||
        this.searchForm.pageSize = v;
 | 
					        this.searchForm.pageSize = v;
 | 
				
			||||||
        this.getDataList();
 | 
					        this.getDataList();
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 搜索
 | 
				
			||||||
      handleSearch() {
 | 
					      handleSearch() {
 | 
				
			||||||
        this.searchForm.pageNumber = 1;
 | 
					        this.searchForm.pageNumber = 1;
 | 
				
			||||||
        this.searchForm.pageSize = 10;
 | 
					 | 
				
			||||||
        this.getDataList();
 | 
					        this.getDataList();
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      changeSort(e) {
 | 
					      // 起止时间从新赋值
 | 
				
			||||||
        this.searchForm.sort = e.key;
 | 
					 | 
				
			||||||
        this.searchForm.order = e.order;
 | 
					 | 
				
			||||||
        if (e.order === "normal") {
 | 
					 | 
				
			||||||
          this.searchForm.order = "";
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        this.getDataList();
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      clearSelectAll() {
 | 
					 | 
				
			||||||
        this.$refs.table.selectAll(false);
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      changeSelect(e) {
 | 
					 | 
				
			||||||
        this.selectList = e;
 | 
					 | 
				
			||||||
        this.selectCount = e.length;
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      selectDateRange(v) {
 | 
					      selectDateRange(v) {
 | 
				
			||||||
        if (v) {
 | 
					        if (v) {
 | 
				
			||||||
          this.searchForm.startDate = v[0];
 | 
					          this.searchForm.startDate = v[0];
 | 
				
			||||||
          this.searchForm.endDate = v[1];
 | 
					          this.searchForm.endDate = v[1];
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 获取列表数据
 | 
				
			||||||
      getDataList() {
 | 
					      getDataList() {
 | 
				
			||||||
        this.loading = true;
 | 
					        this.loading = true;
 | 
				
			||||||
        // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
					        // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
				
			||||||
@ -324,16 +298,19 @@
 | 
				
			|||||||
        this.total = this.data.length;
 | 
					        this.total = this.data.length;
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 添加店铺
 | 
				
			||||||
      add() {
 | 
					      add() {
 | 
				
			||||||
        this.$router.push({ path: '/shop-operation'});
 | 
					        this.$router.push({ path: '/shop-operation'});
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 修改店铺
 | 
				
			||||||
      edit(v) {
 | 
					      edit(v) {
 | 
				
			||||||
        this.$router.push({ path: '/shop-operation', query: { shopId: v.id } });
 | 
					        this.$router.push({ path: '/shop-operation', query: { shopId: v.id } });
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 关闭店铺
 | 
				
			||||||
      disable(v) {
 | 
					      disable(v) {
 | 
				
			||||||
        this.$Modal.confirm({
 | 
					        this.$Modal.confirm({
 | 
				
			||||||
          title: "确认禁用",
 | 
					          title: "确认关闭",
 | 
				
			||||||
          content: "您确认要禁用店铺 " + v.storeName + " ?",
 | 
					          content: "您确认要关闭店铺 " + v.storeName + " ?",
 | 
				
			||||||
          loading: true,
 | 
					          loading: true,
 | 
				
			||||||
          onOk: () => {
 | 
					          onOk: () => {
 | 
				
			||||||
            disableShop(v.id).then((res) => {
 | 
					            disableShop(v.id).then((res) => {
 | 
				
			||||||
@ -346,6 +323,7 @@
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 审核店铺
 | 
				
			||||||
      audit(v) {
 | 
					      audit(v) {
 | 
				
			||||||
        this.$Modal.confirm({
 | 
					        this.$Modal.confirm({
 | 
				
			||||||
          title: "审核店铺",
 | 
					          title: "审核店铺",
 | 
				
			||||||
@ -373,10 +351,11 @@
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 开启店铺
 | 
				
			||||||
      enable(v) {
 | 
					      enable(v) {
 | 
				
			||||||
        this.$Modal.confirm({
 | 
					        this.$Modal.confirm({
 | 
				
			||||||
          title: "确认启用",
 | 
					          title: "确认开启",
 | 
				
			||||||
          content: "您确认要启用店铺 " + v.storeName + " ?",
 | 
					          content: "您确认要开启店铺 " + v.storeName + " ?",
 | 
				
			||||||
          loading: true,
 | 
					          loading: true,
 | 
				
			||||||
          onOk: () => {
 | 
					          onOk: () => {
 | 
				
			||||||
            enableBrand(v.id).then((res) => {
 | 
					            enableBrand(v.id).then((res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -121,6 +121,3 @@
 | 
				
			|||||||
    line-height: 16px;
 | 
					    line-height: 16px;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.point-data{
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -252,8 +252,6 @@
 | 
				
			|||||||
              :data="orderData"
 | 
					              :data="orderData"
 | 
				
			||||||
              ref="table"
 | 
					              ref="table"
 | 
				
			||||||
              class="mt_10"
 | 
					              class="mt_10"
 | 
				
			||||||
              sortable="custom"
 | 
					 | 
				
			||||||
              @on-sort-change="orderChangeSort"
 | 
					 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
              <!-- 订单详情格式化 -->
 | 
					              <!-- 订单详情格式化 -->
 | 
				
			||||||
              <template slot="orderSlot" slot-scope="scope">
 | 
					              <template slot="orderSlot" slot-scope="scope">
 | 
				
			||||||
@ -354,8 +352,6 @@
 | 
				
			|||||||
              :data="refundGoodsOrderData"
 | 
					              :data="refundGoodsOrderData"
 | 
				
			||||||
              ref="table"
 | 
					              ref="table"
 | 
				
			||||||
              class="mt_10"
 | 
					              class="mt_10"
 | 
				
			||||||
              sortable="custom"
 | 
					 | 
				
			||||||
              @on-sort-change="refundGoodsOrderChangeSort"
 | 
					 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
              <!-- 商品栏目格式化 -->
 | 
					              <!-- 商品栏目格式化 -->
 | 
				
			||||||
              <template slot="goodsSlot" slot-scope="scope">
 | 
					              <template slot="goodsSlot" slot-scope="scope">
 | 
				
			||||||
@ -478,8 +474,6 @@
 | 
				
			|||||||
              :data="refundOrderData"
 | 
					              :data="refundOrderData"
 | 
				
			||||||
              ref="table"
 | 
					              ref="table"
 | 
				
			||||||
              class="mt_10"
 | 
					              class="mt_10"
 | 
				
			||||||
              sortable="custom"
 | 
					 | 
				
			||||||
              @on-sort-change="refundOrderChangeSort"
 | 
					 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
              <!-- 商品栏目格式化 -->
 | 
					              <!-- 商品栏目格式化 -->
 | 
				
			||||||
              <template slot="goodsSlot" slot-scope="scope">
 | 
					              <template slot="goodsSlot" slot-scope="scope">
 | 
				
			||||||
@ -554,7 +548,6 @@
 | 
				
			|||||||
        storeInfo: {},//店铺信息
 | 
					        storeInfo: {},//店铺信息
 | 
				
			||||||
        checkAllGroup: [], //选中的经营分类
 | 
					        checkAllGroup: [], //选中的经营分类
 | 
				
			||||||
        selectDate: null, // 申请时间
 | 
					        selectDate: null, // 申请时间
 | 
				
			||||||
        submitLoading: false, // 添加或编辑提交状态
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        orderColumns: [
 | 
					        orderColumns: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@ -902,21 +895,6 @@
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      detail(v) {
 | 
					 | 
				
			||||||
        let sn = v.sn;
 | 
					 | 
				
			||||||
        this.$router.push({
 | 
					 | 
				
			||||||
          name: "after-order-detail",
 | 
					 | 
				
			||||||
          query: {sn: sn},
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      //跳转到订单详情页面
 | 
					 | 
				
			||||||
      orderDetail(v) {
 | 
					 | 
				
			||||||
        this.$router.push({
 | 
					 | 
				
			||||||
          name: "order-detail",
 | 
					 | 
				
			||||||
          query: {sn: v},
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      //查询分类
 | 
					      //查询分类
 | 
				
			||||||
      getCategories() {
 | 
					      getCategories() {
 | 
				
			||||||
        getCategoryTree().then((res) => {
 | 
					        getCategoryTree().then((res) => {
 | 
				
			||||||
@ -925,8 +903,6 @@
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      //售后单页数变化
 | 
					      //售后单页数变化
 | 
				
			||||||
      refundGoodsOrderChangePage(v) {
 | 
					      refundGoodsOrderChangePage(v) {
 | 
				
			||||||
        this.refundGoodsOrderSearchForm.pageNumber = v;
 | 
					        this.refundGoodsOrderSearchForm.pageNumber = v;
 | 
				
			||||||
@ -936,15 +912,9 @@
 | 
				
			|||||||
      //售后单页数变化
 | 
					      //售后单页数变化
 | 
				
			||||||
      refundGoodsOrderChangePageSize(v) {
 | 
					      refundGoodsOrderChangePageSize(v) {
 | 
				
			||||||
        this.refundGoodsOrderSearchForm.pageSize = v;
 | 
					        this.refundGoodsOrderSearchForm.pageSize = v;
 | 
				
			||||||
 | 
					        this.refundGoodsOrderSearchForm.pageNumber = 1;
 | 
				
			||||||
        this.getRefundGoodsOrderData();
 | 
					        this.getRefundGoodsOrderData();
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      //售后单
 | 
					 | 
				
			||||||
      refundGoodsOrderChangeSort(e) {
 | 
					 | 
				
			||||||
        this.refundGoodsOrderSearchForm.sort = e.key;
 | 
					 | 
				
			||||||
        this.refundGoodsOrderSearchForm.order = e.order;
 | 
					 | 
				
			||||||
        this.getRefundGoodsOrderData();
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      //退款单页数变化
 | 
					      //退款单页数变化
 | 
				
			||||||
      refundOrderChangePage(v) {
 | 
					      refundOrderChangePage(v) {
 | 
				
			||||||
        this.refundOrderSearchForm.pageNumber = v;
 | 
					        this.refundOrderSearchForm.pageNumber = v;
 | 
				
			||||||
@ -954,12 +924,7 @@
 | 
				
			|||||||
      //售后单页数变化
 | 
					      //售后单页数变化
 | 
				
			||||||
      refundOrderChangePageSize(v) {
 | 
					      refundOrderChangePageSize(v) {
 | 
				
			||||||
        this.refundOrderSearchForm.pageSize = v;
 | 
					        this.refundOrderSearchForm.pageSize = v;
 | 
				
			||||||
        this.getRefundOrder();
 | 
					        this.refundOrderSearchForm.pageNumber = 1;
 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      //售后单
 | 
					 | 
				
			||||||
      refundOrderChangeSort(e) {
 | 
					 | 
				
			||||||
        this.refundOrderSearchForm.sort = e.key;
 | 
					 | 
				
			||||||
        this.refundOrderSearchForm.order = e.order;
 | 
					 | 
				
			||||||
        this.getRefundOrder();
 | 
					        this.getRefundOrder();
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      //订单记录页数变化
 | 
					      //订单记录页数变化
 | 
				
			||||||
@ -971,25 +936,24 @@
 | 
				
			|||||||
      //订单记录页数变化
 | 
					      //订单记录页数变化
 | 
				
			||||||
      orderChangePageSize(v) {
 | 
					      orderChangePageSize(v) {
 | 
				
			||||||
        this.orderSearchForm.pageSize = v;
 | 
					        this.orderSearchForm.pageSize = v;
 | 
				
			||||||
 | 
					        this.orderSearchForm.pageNumber = 1;
 | 
				
			||||||
        this.getOrderData();
 | 
					        this.getOrderData();
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      orderChangeSort(e) {
 | 
					      // 起止时间格式化
 | 
				
			||||||
        this.orderSearchForm.sort = e.key;
 | 
					 | 
				
			||||||
        this.orderSearchForm.order = e.order;
 | 
					 | 
				
			||||||
        this.getOrderData();
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      selectDateRange(v) {
 | 
					      selectDateRange(v) {
 | 
				
			||||||
        if (v) {
 | 
					        if (v) {
 | 
				
			||||||
          this.orderSearchForm.startDate = v[0];
 | 
					          this.orderSearchForm.startDate = v[0];
 | 
				
			||||||
          this.orderSearchForm.endDate = v[1];
 | 
					          this.orderSearchForm.endDate = v[1];
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 起止时间格式化
 | 
				
			||||||
      selectRefundGoodsDateRange(v) {
 | 
					      selectRefundGoodsDateRange(v) {
 | 
				
			||||||
        if (v) {
 | 
					        if (v) {
 | 
				
			||||||
          this.refundGoodsOrderSearchForm.startDate = v[0];
 | 
					          this.refundGoodsOrderSearchForm.startDate = v[0];
 | 
				
			||||||
          this.refundGoodsOrderSearchForm.endDate = v[1];
 | 
					          this.refundGoodsOrderSearchForm.endDate = v[1];
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      // 起止时间格式化
 | 
				
			||||||
      selectRefundDateRange(v) {
 | 
					      selectRefundDateRange(v) {
 | 
				
			||||||
        if (v) {
 | 
					        if (v) {
 | 
				
			||||||
          this.refundOrderSearchForm.startDate = v[0];
 | 
					          this.refundOrderSearchForm.startDate = v[0];
 | 
				
			||||||
@ -997,12 +961,10 @@
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
      this.id = this.$route.query.id;
 | 
					      this.id = this.$route.query.id;
 | 
				
			||||||
      this.init();
 | 
					      this.init();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    ,
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
				
			|||||||
@ -30,16 +30,16 @@
 | 
				
			|||||||
              <Option value="REFUSED">审核拒绝</Option>
 | 
					              <Option value="REFUSED">审核拒绝</Option>
 | 
				
			||||||
            </Select>
 | 
					            </Select>
 | 
				
			||||||
          </Form-item>
 | 
					          </Form-item>
 | 
				
			||||||
 | 
					          <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
 | 
				
			||||||
          <Form-item label="创建时间" prop="createTime">
 | 
					          <Form-item label="创建时间" prop="createTime">
 | 
				
			||||||
            <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
 | 
					            <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
 | 
				
			||||||
          </Form-item>
 | 
					          </Form-item>
 | 
				
			||||||
          <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
 | 
					 | 
				
			||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
      <Row class="operation padding-row">
 | 
					      <Row class="operation padding-row">
 | 
				
			||||||
        <Button @click="add" type="primary">添加</Button>
 | 
					        <Button @click="add" type="primary">添加</Button>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
      <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
 | 
					      <Table :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
 | 
				
			||||||
      <Row type="flex" justify="end" class="mt_10">
 | 
					      <Row type="flex" justify="end" class="mt_10">
 | 
				
			||||||
        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
 | 
					        <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
 | 
				
			||||||
          size="small" show-total show-elevator show-sizer></Page>
 | 
					          size="small" show-total show-elevator show-sizer></Page>
 | 
				
			||||||
@ -55,16 +55,10 @@ import {
 | 
				
			|||||||
  enableBrand,
 | 
					  enableBrand,
 | 
				
			||||||
  shopAudit,
 | 
					  shopAudit,
 | 
				
			||||||
} from "@/api/shops";
 | 
					} from "@/api/shops";
 | 
				
			||||||
import shopOperation from "./shopOperation";
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "shop",
 | 
					  name: "shop",
 | 
				
			||||||
  components: {
 | 
					 | 
				
			||||||
    shopOperation,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      shopId: "", // 店铺id
 | 
					 | 
				
			||||||
      modalFlag: false, // 新增、编辑标识
 | 
					 | 
				
			||||||
      loading: true, // 表单加载状态
 | 
					      loading: true, // 表单加载状态
 | 
				
			||||||
      searchForm: {
 | 
					      searchForm: {
 | 
				
			||||||
        // 搜索框初始化对象
 | 
					        // 搜索框初始化对象
 | 
				
			||||||
@ -76,17 +70,6 @@ export default {
 | 
				
			|||||||
        endDate: "", // 终止时间
 | 
					        endDate: "", // 终止时间
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      selectDate: null, // 创建时间
 | 
					      selectDate: null, // 创建时间
 | 
				
			||||||
      form: {
 | 
					 | 
				
			||||||
        // 添加或编辑表单对象初始化数据
 | 
					 | 
				
			||||||
        memberName: "",
 | 
					 | 
				
			||||||
        storeName: "",
 | 
					 | 
				
			||||||
        shopDisable: "",
 | 
					 | 
				
			||||||
        id: "",
 | 
					 | 
				
			||||||
        createTime: "",
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      submitLoading: false, // 添加或编辑提交状态
 | 
					 | 
				
			||||||
      selectList: [], // 多选数据
 | 
					 | 
				
			||||||
      selectCount: 0, // 多选计数
 | 
					 | 
				
			||||||
      columns: [
 | 
					      columns: [
 | 
				
			||||||
        // 表头
 | 
					        // 表头
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@ -314,52 +297,39 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    callbackShop() {
 | 
					 | 
				
			||||||
      this.init();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 回调给父级
 | 
					    // 回调给父级
 | 
				
			||||||
    callback(val) {
 | 
					    callback(val) {
 | 
				
			||||||
      this.$emit("callback", val);
 | 
					      this.$emit("callback", val);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 初始化数据
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 分页 改变页码
 | 
				
			||||||
    changePage(v) {
 | 
					    changePage(v) {
 | 
				
			||||||
      this.searchForm.pageNumber = v;
 | 
					      this.searchForm.pageNumber = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
      this.clearSelectAll();
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 分页 改变页数
 | 
				
			||||||
    changePageSize(v) {
 | 
					    changePageSize(v) {
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					      this.searchForm.pageSize = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 搜索
 | 
				
			||||||
    handleSearch() {
 | 
					    handleSearch() {
 | 
				
			||||||
      this.searchForm.pageNumber = 1;
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					      this.searchForm.pageSize = 10;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changeSort(e) {
 | 
					    // 起止时间分别赋值
 | 
				
			||||||
      this.searchForm.sort = e.key;
 | 
					 | 
				
			||||||
      this.searchForm.order = e.order;
 | 
					 | 
				
			||||||
      if (e.order === "normal") {
 | 
					 | 
				
			||||||
        this.searchForm.order = "";
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    clearSelectAll() {
 | 
					 | 
				
			||||||
      this.$refs.table.selectAll(false);
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changeSelect(e) {
 | 
					 | 
				
			||||||
      this.selectList = e;
 | 
					 | 
				
			||||||
      this.selectCount = e.length;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    selectDateRange(v) {
 | 
					    selectDateRange(v) {
 | 
				
			||||||
      if (v) {
 | 
					      if (v) {
 | 
				
			||||||
        this.searchForm.startDate = v[0];
 | 
					        this.searchForm.startDate = v[0];
 | 
				
			||||||
        this.searchForm.endDate = v[1];
 | 
					        this.searchForm.endDate = v[1];
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取列表数据
 | 
				
			||||||
    getDataList() {
 | 
					    getDataList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
					      // 带多条件搜索参数获取表单数据 请自行修改接口
 | 
				
			||||||
@ -373,16 +343,19 @@ export default {
 | 
				
			|||||||
      this.total = this.data.length;
 | 
					      this.total = this.data.length;
 | 
				
			||||||
      this.loading = false;
 | 
					      this.loading = false;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 添加店铺
 | 
				
			||||||
    add() {
 | 
					    add() {
 | 
				
			||||||
      this.$router.push({ path: '/shop-operation'});
 | 
					      this.$router.push({ path: '/shop-operation'});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 修改店铺
 | 
				
			||||||
    edit(v) {
 | 
					    edit(v) {
 | 
				
			||||||
      this.$router.push({ path: '/shop-operation', query: { shopId: v.id } });
 | 
					      this.$router.push({ path: '/shop-operation', query: { shopId: v.id } });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 关闭店铺
 | 
				
			||||||
    disable(v) {
 | 
					    disable(v) {
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: "确认禁用",
 | 
					        title: "确认关闭",
 | 
				
			||||||
        content: "您确认要禁用店铺 " + v.storeName + " ?",
 | 
					        content: "您确认要关闭店铺 " + v.storeName + " ?",
 | 
				
			||||||
        loading: true,
 | 
					        loading: true,
 | 
				
			||||||
        onOk: () => {
 | 
					        onOk: () => {
 | 
				
			||||||
          disableShop(v.id).then((res) => {
 | 
					          disableShop(v.id).then((res) => {
 | 
				
			||||||
@ -399,6 +372,7 @@ export default {
 | 
				
			|||||||
    detail(row){
 | 
					    detail(row){
 | 
				
			||||||
      this.$router.push({ name: "shop-detail", query: { id: row.id } });
 | 
					      this.$router.push({ name: "shop-detail", query: { id: row.id } });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 审核店铺
 | 
				
			||||||
    audit(v) {
 | 
					    audit(v) {
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: "审核店铺",
 | 
					        title: "审核店铺",
 | 
				
			||||||
@ -426,10 +400,11 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 启用店铺
 | 
				
			||||||
    enable(v) {
 | 
					    enable(v) {
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: "确认启用",
 | 
					        title: "确认开启",
 | 
				
			||||||
        content: "您确认要启用店铺 " + v.storeName + " ?",
 | 
					        content: "您确认要开启店铺 " + v.storeName + " ?",
 | 
				
			||||||
        loading: true,
 | 
					        loading: true,
 | 
				
			||||||
        onOk: () => {
 | 
					        onOk: () => {
 | 
				
			||||||
          enableBrand(v.id).then((res) => {
 | 
					          enableBrand(v.id).then((res) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -388,7 +388,7 @@ export default {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      categories: [], // 分类
 | 
					      categories: [], // 分类
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      infoResult: "", // 店铺详情
 | 
					      infoResult: {}, // 店铺详情
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
@ -452,30 +452,25 @@ export default {
 | 
				
			|||||||
      this.shopForm.salesConsigneeAddressPath = val[1];
 | 
					      this.shopForm.salesConsigneeAddressPath = val[1];
 | 
				
			||||||
      this.shopForm.salesConsigneeAddressId = val[0];
 | 
					      this.shopForm.salesConsigneeAddressId = val[0];
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 选择图片modal
 | 
				
			||||||
    handleCLickImg(val) {
 | 
					    handleCLickImg(val) {
 | 
				
			||||||
      this.$refs.ossManage.selectImage = true;
 | 
					      this.$refs.ossManage.selectImage = true;
 | 
				
			||||||
      this.picModalFlag = true;
 | 
					      this.picModalFlag = true;
 | 
				
			||||||
      this.selectedFormBtnName = val;
 | 
					      this.selectedFormBtnName = val;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 图片回显
 | 
				
			||||||
    callbackSelected(val) {
 | 
					    callbackSelected(val) {
 | 
				
			||||||
      this.picModalFlag = false;
 | 
					      this.picModalFlag = false;
 | 
				
			||||||
      this.shopForm[this.selectedFormBtnName] = val.url;
 | 
					      this.shopForm[this.selectedFormBtnName] = val.url;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 初始化数据
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      this.getCategories();
 | 
					      this.getCategories();
 | 
				
			||||||
      if (this.shopId) {
 | 
					      if (this.shopId) {
 | 
				
			||||||
        this.getShopDetail();
 | 
					        this.getShopDetail();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    filterMethod(value, option) {
 | 
					    // 获取店铺详情
 | 
				
			||||||
      if (value && option) {
 | 
					 | 
				
			||||||
        return option.toUpperCase().indexOf(value.toUpperCase()) !== -1;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    getShopDetail() {
 | 
					    getShopDetail() {
 | 
				
			||||||
      shopDetail(this.shopId).then((res) => {
 | 
					      shopDetail(this.shopId).then((res) => {
 | 
				
			||||||
        if (res.result) {
 | 
					        if (res.result) {
 | 
				
			||||||
@ -490,6 +485,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 保存
 | 
				
			||||||
    save() {
 | 
					    save() {
 | 
				
			||||||
      this.$refs.shopForm.validate((valid) => {
 | 
					      this.$refs.shopForm.validate((valid) => {
 | 
				
			||||||
        //校验结算日是否已经确认完成
 | 
					        //校验结算日是否已经确认完成
 | 
				
			||||||
@ -542,6 +538,7 @@ export default {
 | 
				
			|||||||
      this.$set(this.shopForm, "storeAddressPath", item.addr);
 | 
					      this.$set(this.shopForm, "storeAddressPath", item.addr);
 | 
				
			||||||
      this.$set(this.shopForm, "storeAddressIdPath", item.addrId);
 | 
					      this.$set(this.shopForm, "storeAddressIdPath", item.addrId);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 全部选中
 | 
				
			||||||
    handleCheckAll() {
 | 
					    handleCheckAll() {
 | 
				
			||||||
      if (this.indeterminate) {
 | 
					      if (this.indeterminate) {
 | 
				
			||||||
        this.checkAll = false;
 | 
					        this.checkAll = false;
 | 
				
			||||||
@ -558,6 +555,7 @@ export default {
 | 
				
			|||||||
        this.checkAllGroup = [];
 | 
					        this.checkAllGroup = [];
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 经营类目的选择
 | 
				
			||||||
    checkAllGroupChange(data) {
 | 
					    checkAllGroupChange(data) {
 | 
				
			||||||
      if (data.length === this.categories.length) {
 | 
					      if (data.length === this.categories.length) {
 | 
				
			||||||
        this.indeterminate = false;
 | 
					        this.indeterminate = false;
 | 
				
			||||||
@ -570,6 +568,7 @@ export default {
 | 
				
			|||||||
        this.checkAll = false;
 | 
					        this.checkAll = false;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取所有分类
 | 
				
			||||||
    getCategories() {
 | 
					    getCategories() {
 | 
				
			||||||
      getCategoryTree().then((res) => {
 | 
					      getCategoryTree().then((res) => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
 | 
				
			|||||||
@ -11,8 +11,6 @@
 | 
				
			|||||||
          :columns="columns"
 | 
					          :columns="columns"
 | 
				
			||||||
          :data="data"
 | 
					          :data="data"
 | 
				
			||||||
          ref="table"
 | 
					          ref="table"
 | 
				
			||||||
          sortable="custom"
 | 
					 | 
				
			||||||
          @on-sort-change="changeSort"
 | 
					 | 
				
			||||||
          @on-selection-change="changeSelect"
 | 
					          @on-selection-change="changeSelect"
 | 
				
			||||||
        ></Table>
 | 
					        ></Table>
 | 
				
			||||||
      <Row type="flex" justify="end" class="mt_10">
 | 
					      <Row type="flex" justify="end" class="mt_10">
 | 
				
			||||||
@ -59,8 +57,7 @@ import {
 | 
				
			|||||||
  updateSensitiveWords
 | 
					  updateSensitiveWords
 | 
				
			||||||
} from "@/api/index";
 | 
					} from "@/api/index";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "bill",
 | 
					  name: "sensitiveWords",
 | 
				
			||||||
  components: {},
 | 
					 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      loading: true, // 表单加载状态
 | 
					      loading: true, // 表单加载状态
 | 
				
			||||||
@ -172,36 +169,25 @@ export default {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 初始化数据
 | 
				
			||||||
    init() {
 | 
					    init() {
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 分页 改变页码
 | 
				
			||||||
    changePage(v) {
 | 
					    changePage(v) {
 | 
				
			||||||
      this.searchForm.pageNumber = v;
 | 
					      this.searchForm.pageNumber = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
      this.clearSelectAll();
 | 
					      this.clearSelectAll();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 分页 改变页数
 | 
				
			||||||
    changePageSize(v) {
 | 
					    changePageSize(v) {
 | 
				
			||||||
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = v;
 | 
					      this.searchForm.pageSize = v;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 搜索
 | 
				
			||||||
    handleSearch() {
 | 
					    handleSearch() {
 | 
				
			||||||
      this.searchForm.pageNumber = 1;
 | 
					      this.searchForm.pageNumber = 1;
 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    handleReset() {
 | 
					 | 
				
			||||||
      this.$refs.searchForm.resetFields();
 | 
					 | 
				
			||||||
      this.searchForm.pageNumber = 1;
 | 
					 | 
				
			||||||
      this.searchForm.pageSize = 10;
 | 
					 | 
				
			||||||
      // 重新加载数据
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changeSort(e) {
 | 
					 | 
				
			||||||
      this.searchForm.sort = e.key;
 | 
					 | 
				
			||||||
      this.searchForm.order = e.order;
 | 
					 | 
				
			||||||
      if (e.order === "normal") {
 | 
					 | 
				
			||||||
        this.searchForm.order = "";
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    clearSelectAll() {
 | 
					    clearSelectAll() {
 | 
				
			||||||
@ -211,7 +197,7 @@ export default {
 | 
				
			|||||||
      this.selectList = e;
 | 
					      this.selectList = e;
 | 
				
			||||||
      this.selectCount = e.length;
 | 
					      this.selectCount = e.length;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取数据
 | 
				
			||||||
    getDataList() {
 | 
					    getDataList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -225,6 +211,7 @@ export default {
 | 
				
			|||||||
      this.total = this.data.length;
 | 
					      this.total = this.data.length;
 | 
				
			||||||
      this.loading = false;
 | 
					      this.loading = false;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 提交
 | 
				
			||||||
    handleSubmit() {
 | 
					    handleSubmit() {
 | 
				
			||||||
      this.$refs.form.validate((valid) => {
 | 
					      this.$refs.form.validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
@ -255,6 +242,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 添加敏感词
 | 
				
			||||||
    add() {
 | 
					    add() {
 | 
				
			||||||
      this.modalType = 0;
 | 
					      this.modalType = 0;
 | 
				
			||||||
      this.modalTitle = "添加";
 | 
					      this.modalTitle = "添加";
 | 
				
			||||||
@ -263,6 +251,7 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      this.modalVisible = true;
 | 
					      this.modalVisible = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 修改
 | 
				
			||||||
    detail(v) {
 | 
					    detail(v) {
 | 
				
			||||||
      this.modalType = 1;
 | 
					      this.modalType = 1;
 | 
				
			||||||
      this.id = v.id;
 | 
					      this.id = v.id;
 | 
				
			||||||
@ -270,6 +259,7 @@ export default {
 | 
				
			|||||||
      this.modalVisible = true;
 | 
					      this.modalVisible = true;
 | 
				
			||||||
      this.form.sensitiveWord = v.sensitiveWord;
 | 
					      this.form.sensitiveWord = v.sensitiveWord;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 删除
 | 
				
			||||||
    remove(v) {
 | 
					    remove(v) {
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: "确认删除",
 | 
					        title: "确认删除",
 | 
				
			||||||
@ -288,6 +278,7 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 批量删除
 | 
				
			||||||
    delAll() {
 | 
					    delAll() {
 | 
				
			||||||
      if (this.selectCount <= 0) {
 | 
					      if (this.selectCount <= 0) {
 | 
				
			||||||
        this.$Message.warning("您还未选择要删除的数据");
 | 
					        this.$Message.warning("您还未选择要删除的数据");
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user