Prechádzať zdrojové kódy

用户管理和用户须知

zhongzhao 1 rok pred
rodič
commit
1bb414c0dd

+ 1 - 1
deploy/index.js

@@ -18,7 +18,7 @@ if (process.env.NODE_ENV === 'prod'){
     port:22,//服务器端口
     username:'root',//服务器ssh登录用户名
     password:'hongwei$123',//服务器ssh登录密码
-    path:'/www/wwwroot/scenicadmin.hw.hongweisoft.com'//服务器web目录
+    path:'/www/wwwroot/greatadmin.hw.hongweisoft.com'//服务器web目录
   }
 }
 

+ 1 - 1
package.json

@@ -7,7 +7,7 @@
   "scripts": {
     "dev": "vue-cli-service serve",
     "build:prod": "vue-cli-service build",
-    "deploy:dev": "npm run build:prod && cross-env NODE_ENV=dev node deploy/index.js --preview",
+    "deploy:dev": "npm run build:stage && cross-env NODE_ENV=dev node deploy/index.js --preview",
     "deploy:prod": "npm run build:prod && cross-env NODE_ENV=prod node deploy/index.js --preview",
     "build:stage": "vue-cli-service build --mode staging",
     "preview": "node build/index.js --preview",

+ 2 - 2
src/api/system/noticeMgr.js

@@ -3,7 +3,7 @@ import request from "@/utils/request";
 // 查询公告管理列表
 export function listNoticeMgr(params) {
   return request({
-    url: "/system/memberMessage/pageList",
+    url: "/system/agreementInfo/pageList",
     method: "get",
     params,
   });
@@ -12,7 +12,7 @@ export function listNoticeMgr(params) {
 // 更新公告管理
 export function updateNoticeMgr(data) {
   return request({
-    url: "/system/memberMessage/save",
+    url: "/system/agreementInfo/insertOrUpdate",
     method: "post",
     data,
   });

+ 44 - 0
src/api/userMr/userMr.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 分页查询剧院
+export const pageList = (query) => {
+  return request({
+    url: '/member/memberInfo/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 取消认证状态
+export function updateAuthStatus(data) {
+  return request({
+    url: '/member/memberInfo/updateAuthStatus?id=' + data.id,
+    method: 'get'
+  })
+}
+
+// 加入黑名单
+export function addBlackList(data) {
+  return request({
+    url: '/member/memberInfo/addBlackList?id=' + data.id,
+    method: 'get'
+  })
+}
+
+
+// ID获取详情
+export function getSelectById(id) {
+  return request({
+    url: '/merchant/merchantTheatre/selectById?id=' + id,
+    method: 'get'
+  })
+}
+
+// 删除模板
+export const deleteById = (id) => {
+  return request({
+    url: '/merchant/merchantTheatre/deleteById',
+    method: 'delete',
+    params: {id:id}
+  })
+}

+ 11 - 2
src/views/programmeMr/dialog/addAndEdit.vue

@@ -66,8 +66,8 @@
             <el-form-item label="上映日期" style="margin-top: 20px">
               <el-date-picker
                 v-model="form.releaseDate"
-                type="datetime"
-                value-format="yyyy-MM-dd HH:mm:ss"
+                type="date"
+                value-format="yyyy-MM-dd"
                 style="width: 240px;"
                 placeholder="选择上映日期">
               </el-date-picker>
@@ -355,6 +355,10 @@ export default {
           this.$set(this.form, 'showImg', obj.showImg);
           this.$set(this.form, 'performSnapshot', obj.performSnapshot);
           this.performerList = obj.performerList || [];
+          obj.photoList.forEach(item => {
+            item.url = item.imageUrl
+          })
+          this.$set(this.form, 'photoList', obj.photoList);
 
           // 观影须知
           this.$set(this.form, 'performNotice', obj.performNotice);
@@ -369,6 +373,11 @@ export default {
     submitForm() {
       this.$refs["form"].validate(async (valid) => {
         if (valid) {
+          if(this.activeName == '02') {
+            if(this.form.photoList && this.form.photoList.length < 2) {
+              this.$message.success("上传的宣传图不能少于三张!");
+            }
+          }
           try {
             this.loading = true;
             const { code } = await saveAndEdit({ ...this.form });

+ 6 - 4
src/views/programmeMr/dialog/details.vue

@@ -38,10 +38,10 @@
           <div class="grid-content bg-purple item-class">上映日期: <span>{{ form.releaseDate }}</span></div>
         </el-col>
         <el-col :span="12">
-          <div class="grid-content bg-purple item-class">演出时长: <span>{{ form.showDuration }}</span></div>
+          <div class="grid-content bg-purple item-class">演出时长: <span>{{ form.showDuration }}分钟</span></div>
         </el-col>
         <el-col :span="12">
-          <div class="grid-content bg-purple item-class">演出人数: <span>{{ form.peopleNum }}</span></div>
+          <div class="grid-content bg-purple item-class">演出人数: <span>{{ form.peopleNum }}</span></div>
         </el-col>
         <el-col :span="12">
           <div class="grid-content bg-purple item-class">演员信息: <el-button style="padding: 0" type="text" @click="performerOpen">查看</el-button></div>
@@ -53,13 +53,14 @@
                 <div>宣传图:</div>
               </el-col>
               <el-col :span="12">
-                <div>
+                <div v-if="form.showImg">
                   <el-image
                     style="width: 100px; height: 100px"
                     :src="form.showImg"
                     fit="cover"
                   />
                 </div>
+                <div v-else>--</div>
               </el-col>
             </el-row>
           </div>
@@ -71,7 +72,7 @@
                 <div>剧目海报:</div>
               </el-col>
               <el-col :span="12">
-                <div>
+                <div v-if="form.photoList && form.photoList.length > 0">
                   <el-image
                     v-for="(item, index) in form.photoList"
                     style="width: 100px; height: 100px; margin-right: 10px; margin-bottom: 10px;"
@@ -80,6 +81,7 @@
                     fit="cover"
                   />
                 </div>
+                <div v-else>--</div>
               </el-col>
             </el-row>
           </div>

+ 7 - 7
src/views/programmeMr/index.vue

@@ -57,9 +57,9 @@
         </template>
       </el-table-column>
       <el-table-column label="主办方" align="center" prop="sponsorName" />
-      <el-table-column label="上映时间" align="center" prop="releaseDate" width="160" sortable="custom" >
+      <el-table-column label="上映时间" align="center" prop="releaseDate" width="160" >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.releaseDate) }}</span>
+          <span>{{ scope.row.releaseDate }}</span>
         </template>
       </el-table-column>
       <el-table-column label="演出时长" align="center" prop="showDuration" />
@@ -75,7 +75,7 @@
           </el-switch>
         </template>
       </el-table-column>
-      <el-table-column label="添加时间" align="center" prop="onlineTime" width="160" sortable="custom" >
+      <el-table-column label="添加时间" align="center" prop="onlineTime" width="160" >
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.onlineTime) }}</span>
         </template>
@@ -86,25 +86,25 @@
           <el-button
             size="mini"
             type="text"
-            v-hasPermi="['perform:perform:release']"
+            v-hasPermi="['programmeMr:programmeMr:info']"
           >票务信息</el-button>
           <el-button
             size="mini"
             type="text"
             @click="openDetails(scope.row)"
-            v-hasPermi="['perform:perform:release']"
+            v-hasPermi="['programmeMr:programmeMr:details']"
           >详情</el-button>
           <el-button
             size="mini"
             type="text"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['perform:perform:edit']"
+            v-hasPermi="['programmeMr:programmeMr:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             @click="handleDelete(scope.row,scope.index)"
-            v-hasPermi="['perform:perform:delete']"
+            v-hasPermi="['programmeMr:programmeMr:delete']"
           >删除</el-button>
         </template>
       </el-table-column>

+ 225 - 0
src/views/userMr/index.vue

@@ -0,0 +1,225 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
+      <el-form-item label="手机号" label-width="60px">
+        <el-input
+          v-model="queryParams.mobile"
+          placeholder="请输入手机号"
+          clearable
+          style="width: 160px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="身份证号码">
+        <el-input
+          v-model="queryParams.cardId"
+          placeholder="请输入身份证号码"
+          clearable
+          style="width: 200px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="姓名">
+        <el-input
+          v-model="queryParams.realName"
+          placeholder="请输入姓名"
+          clearable
+          style="width: 140px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table ref="tables" v-loading="loading" :data="dataList" border>
+      <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
+      <el-table-column label="用户昵称" align="center" prop="name" />
+      <el-table-column label="手机号" align="center" prop="mobile" />
+      <el-table-column label="真实姓名" align="center" prop="realName" />
+      <el-table-column label="身份证号码" align="center" prop="cardId" />
+      <el-table-column label="累计消费" align="center" prop="consumeTotal" />
+      <el-table-column label="是否实名" align="center">
+        <template slot-scope="scope">
+          <el-tag type="success" v-if="scope.row.isAuth == 1">是</el-tag>
+          <el-tag type="info" v-else>否</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="注册渠道" align="center" prop="onlineTime" width="160">
+        <template slot-scope="scope">
+          <span>小程序</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="注册时间" align="center" prop="createTime" width="160">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createTime) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+<!--          <el-button-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            @click="detailsEven(scope.row)"-->
+<!--            v-hasPermi="['userMr:userMr:details']"-->
+<!--          >详情</el-button>-->
+          <el-button
+            size="mini"
+            type="text"
+            v-if="scope.row.isAuth == 1"
+            @click="updateAuthStatusEven(scope.row)"
+          >取消实名认证</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            v-if="scope.row.isBlackList == 0"
+            @click="addBlackListEven(scope.row)"
+          >加入黑名单</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+
+import { pageList, updateAuthStatus, addBlackList } from '@/api/userMr/userMr'
+
+export default {
+  name: "agreement",
+  dicts: ['agreement_type'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户表格数据
+      dataList: null,
+      // 弹出层标题
+      title: "",
+
+      // 是否显示弹出层
+      open: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        type: undefined
+      },
+      visibleStatus: false,
+      newObj: {},
+      visibleType: ''
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询列表 */
+    getList() {
+      this.loading = true;
+      pageList(this.addDateRange(this.queryParams, this.dateRange))
+      .then(response => {
+          this.dataList = response.data.rows;
+          this.total = response.data.total;
+          this.loading = false;
+        }
+      );
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.$set(this.queryParams, 'realName', '');
+      this.$set(this.queryParams, 'cardId', '');
+      this.$set(this.queryParams, 'mobile', '');
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    /** 详情按钮操作 */
+    detailsEven() {
+      // this.$refs["addAndEdit"].openDialog("新增数据", null);
+    },
+
+    /** 取消实名认证按钮操作 */
+    updateAuthStatusEven(row) {
+      this.$confirm("取消认证后,用户在小程序端会成为未实名状态,您确定要取消该用户的的认证吗?", '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        updateAuthStatus({ id: row.id}).then((res) => {
+          if (res.code == 200) {
+            this.$message({
+              type: 'success',
+              message: '操作成功!'
+            });
+            this.getList();
+          }
+        });
+      }).catch(() => {});
+    },
+
+    /** 加入黑名单按钮操作 */
+    addBlackListEven(row) {
+      this.$confirm("是否将该用户加入黑名单?", '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        addBlackList({ id: row.id}).then((res) => {
+          if (res.code == 200) {
+            this.$message({
+              type: 'success',
+              message: '操作成功!'
+            });
+            this.getList();
+          }
+        });
+      }).catch(() => {});
+    },
+
+    /** 查看按钮操作 */
+    seeCenter(obj, type) {
+      this.visibleStatus = true
+      this.visibleType = type;
+      this.newObj = obj;
+    }
+  }
+};
+</script>