Browse Source

客户表彰审批

sunlupeng 1 year ago
parent
commit
bd98d540ed

+ 26 - 0
src/api/commendManage.js

@@ -73,3 +73,29 @@ export function dataRemove(query) {
   })
 }
 
+// 客户表彰审批列表
+export function customerPage(query) {
+  return request({
+    url: '/customer/commend/page',
+    method: 'get',
+    params:query
+  })
+}
+
+// 客户表彰审批
+export function complete(query) {
+  return request({
+    url: '/customer/commend/complete',
+    method: 'post',
+    params:query
+  })
+}
+
+// 客户表彰详情
+export function detail(query) {
+  return request({
+    url: '/customer/commend/info',
+    method: 'get',
+    params:query
+  })
+}

+ 2 - 0
src/permission.js

@@ -50,6 +50,8 @@ const myRoles = [
   'commendList',
   'commendDataList', 
   'citeList',
+  'operateCiteList',
+  'ceoCiteList',
   'festivalManage', 
   'festivalList', 
   'certManage', 

+ 3 - 1
src/router/index.js

@@ -194,7 +194,9 @@ export const asyncRouterMap = [
     children: [
       { path: 'commendList', component: _import('commendManage/commendList'), name: 'commendList', meta: { title: '表彰列表', noCache: true }},
       { path: 'commendDataList/:id', component: _import('commendManage/commendDataList'), name: 'commendDataList', meta: { title: '表彰人员', noCache: false, hideTag: true, hidden: true }},
-      { path: 'citeList', component: _import('commendManage/citeList'), name: 'citeList', meta: { title: '表彰审批列表', noCache: true }},
+      { path: 'citeList', component: _import('commendManage/citeList'), name: 'citeList', meta: { title: '客户表彰列表', noCache: true }},
+      { path: 'operateCiteList', component: _import('commendManage/operateCiteList'), name: 'operateCiteList', meta: { title: '客户表彰审批列表', noCache: true }},
+      { path: 'ceoCiteList', component: _import('commendManage/ceoCiteList'), name: 'ceoCiteList', meta: { title: '客户表彰确认列表', noCache: true }},
     ]
   },
   {

+ 303 - 0
src/views/commendManage/ceoCiteList.vue

@@ -0,0 +1,303 @@
+<template>
+  <div class="app-container calendar-list-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-select v-model="listQuery.type" clearable placeholder="表彰类型" class="filter-item" style="width: 200px">
+        <el-option :key="item.dictValue" v-for="item in typeList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select>
+      <el-select v-model="listQuery.category" clearable placeholder="表彰类别" class="filter-item" style="width: 200px">
+        <el-option :key="item.dictValue" v-for="item in categoryList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select>
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="客户名称"
+        v-model="listQuery.customerName"></el-input>
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="表彰名称"
+        v-model="listQuery.title"></el-input>
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="上传人"
+        v-model="listQuery.userName"></el-input>
+      <!-- <el-select v-model="listQuery.status" clearable placeholder="审批状态" style="top: -4px; width: 200px">
+        <el-option :key="item.dictValue" v-for="item in statusTypeList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select> -->
+      <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
+      <!-- <el-button class="filter-item" type="primary" v-waves icon="el-icon-download" @click="handleDownLoad">导出</el-button> -->
+    </div>
+
+    <!-- 查询结果 -->
+    <el-table size="small" :data="list" v-loading="listLoading" element-loading-text="正在查询中。。。" border fit
+      highlight-current-row>
+      <el-table-column type="index" label="序号" header-align="center" align="center">
+      </el-table-column>
+      <el-table-column align="center" min-width="200px" label="附件">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.files" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="typeName" min-width="100" label="表彰类型">
+      </el-table-column>
+      <el-table-column align="center" prop="categoryName" min-width="100" label="表彰类别">
+      </el-table-column>
+      <el-table-column align="center" min-width="100" label="表彰人员">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.groupUsers" :key="index">
+            {{ item.userName }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="customerName" min-width="100" label="客户名称">
+      </el-table-column>
+      <el-table-column align="center" prop="title" min-width="100" label="表彰名称">
+      </el-table-column>
+      <el-table-column align="center" min-width="80px" label="上传人" prop="userName">
+      </el-table-column>
+      <!-- <el-table-column align="center" min-width="250px" label="公司" prop="companyName">
+        </el-table-column> -->
+      <el-table-column align="center" min-width="250px" label="部门" prop="deptName">
+      </el-table-column>
+      <el-table-column align="center" min-width="80px" label="获得积分" prop="integral">
+      </el-table-column>
+      <el-table-column align="center" min-width="120px" label="审核状态">
+        <template slot-scope="props">
+                <el-popover>
+                  <el-table :data="props.row.logs" border size="mini">
+                    <el-table-column min-width="80" align="center" prop="auditor" label="处理人"></el-table-column>
+                    <el-table-column min-width="160" align="center" prop="comment" label="处理结果"></el-table-column>
+                    <el-table-column min-width="180" align="center" prop="createTime" label="处理时间"></el-table-column>
+                  </el-table>
+                  <span style="color: #1e80ff;cursor: pointer;" slot="reference">{{ props.row.statusName }}</span>
+                </el-popover>
+              </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="100px" label="日期" prop="createTime">
+      </el-table-column>
+      <el-table-column align="center" label="操作" width="80px" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button type="success" size="small"
+            @click="handleClick(scope.row)">处理</el-button>
+          </template>
+      </el-table-column>
+    </el-table>
+    <el-dialog :close-on-click-modal="false" title="表彰审批" :visible.sync="dialogFormVisible" width="40%">
+            <el-form :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="80px">
+              
+                <el-form-item label="表彰类别" prop="category">
+                  <el-select v-model="dataForm.category" clearable placeholder="表彰类别" class="filter-item" style="width: 100%">
+                    <el-option :key="item.dictValue" v-for="item in categoryList" :label="item.dictLabel" :value="item.dictValue">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="审批内容" prop="content">
+                  <el-input type="textarea" :rows="2" placeholder="请输入审批内容" v-model="dataForm.content"></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="complete(true)">同意</el-button>
+                <el-button type="danger" @click="complete(false)">驳回</el-button>
+            </div>
+        </el-dialog>
+    <!-- 分页 -->
+    <div class="pagination-container">
+      <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="listQuery.page" :page-sizes="[10, 20, 30, 50]" :page-size="listQuery.limit"
+        layout="total, sizes, prev, pager, next, jumper" :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+    
+<style>
+.demo-table-expand {
+  font-size: 0;
+}
+
+.demo-table-expand label {
+  width: 200px;
+  color: #99a9bf;
+}
+
+.demo-table-expand .el-form-item {
+  margin-right: 0;
+  margin-bottom: 0;
+}
+</style>
+    
+<script>
+import {
+  complete,
+  customerPage,
+} from "@/api/commendManage.js";
+import { dataTypeList } from "@/api/public";
+import waves from "@/directive/waves"; // 水波纹指令
+import Tinymce from "@/components/Tinymce";
+
+export default {
+  components: { Tinymce },
+  directives: { waves },
+  data() {
+    return {
+      id:'',
+      dataForm: {
+        category: '',
+        content: ''
+      },
+      rules: {
+        category: [{ required: true, message: "请选择表彰类别", trigger: "blur" }],
+      },
+      dialogFormVisible: false,
+      dialogVisible: false,
+      categoryList: [],
+      typeList: [],
+      statusTypeList: [],
+      list: [],
+      total: 0,
+      listLoading: false,
+      listQuery: {
+        page: 1,
+        limit: 10,
+        type: '',
+        category: '',
+        customerName: '',
+        title: '',
+        userName: '',
+        status: "20",
+      },
+    };
+  },
+  created() {
+    this.getTypeList();
+    this.getCategoryList();
+    this.getStatusTypeList();
+    this.getList();
+  },
+  methods: {
+    checked(val){
+            if(val.flag == false){
+                if(!val.content){
+                    this.$alert("请输入审批内容", "提示", {
+                        confirmButtonText: "确定",
+                    });
+                    return false;
+                }
+            }
+            if(val.flag == true){
+                if(!val.category){
+                    this.$alert("请选择表彰类别", "提示", {
+                        confirmButtonText: "确定",
+                    });
+                    return false;
+                }
+            }
+            return true;
+        },
+    complete(flag) {
+            const parms = {
+                id:this.id,
+                category:this.dataForm.category,
+                content: this.dataForm.content,
+                flag:flag,
+            }
+            const isChecked = this.checked(parms);
+            if(isChecked){
+                complete(parms).then((response) => {
+                    this.$notify({
+                        title: "成功",
+                        message: "操作成功",
+                        type: "success",
+                        duration: 2000,
+                    });
+                    this.dialogFormVisible = false;
+                    this.getList();
+                })
+                .catch(() => { });
+            }
+            
+        },
+      handleClick(val) {
+        this.dialogFormVisible = true;
+        this.id = val.id;
+        this.dataForm.category = val.category;
+        this.$nextTick(() => {
+            this.dataForm.content = '';
+            this.$refs["dataForm"].clearValidate();
+        });
+      },
+    getCategoryList() {
+      dataTypeList({ dictType: 'customer_treward_category' }).then(response => {
+        this.categoryList = response.data.data;
+      }).catch(() => { });
+    },
+    getTypeList() {
+      dataTypeList({ dictType: 'customer_treward_type' }).then(response => {
+        this.typeList = response.data.data;
+      }).catch(() => { });
+    },
+    getStatusTypeList() {
+      dataTypeList({ dictType: 'customer_treward_status' }).then(response => {
+        this.statusTypeList = response.data.data;
+      }).catch(() => { });
+    },
+    handleDownLoad() {
+      window.location.href = process.env.BASE_API + '/mall-integral-obtain/export/certificate?name=' + this.listQuery.name + '&title=' + this.listQuery.title + '&userName=' + this.listQuery.userName + '&status=' + this.listQuery.status;
+    },
+    getList() {
+      this.listLoading = true;
+      customerPage(this.listQuery)
+        .then((response) => {
+          this.list = response.data.data.items;
+          this.total = response.data.data.total;
+          this.listLoading = false;
+        })
+        .catch(() => {
+          this.list = [];
+          this.total = 0;
+          this.listLoading = false;
+        });
+    },
+
+    handleFilter() {
+      this.listQuery.page = 1;
+      this.getList();
+    },
+
+    handleSizeChange(val) {
+      this.listQuery.limit = val;
+      this.getList();
+    },
+
+    handleCurrentChange(val) {
+      this.listQuery.page = val;
+      this.getList();
+    },
+  },
+};
+</script>
+<style>
+.ad-avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+
+.ad-avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+
+.ad-avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.ad-avatar {
+  display: block;
+}
+</style>
+    

+ 211 - 276
src/views/commendManage/citeList.vue

@@ -1,286 +1,221 @@
 <template>
-    <div class="app-container calendar-list-container">
-      <!-- 查询和其他操作 -->
-      <div class="filter-container">
-        <el-input clearable class="filter-item" style="width: 200px;" placeholder="表彰类型"
-                v-model="listQuery.name"></el-input>
-                <el-input clearable class="filter-item" style="width: 200px;" placeholder="表彰名称"
-                v-model="listQuery.title"></el-input>
-                <el-input clearable class="filter-item" style="width: 200px;" placeholder="上传人"
-                v-model="listQuery.userName"></el-input>
-        <el-select v-model="listQuery.status" clearable placeholder="审批状态" style="top: -4px; width: 200px">
-          <el-option :key="item.type" v-for="item in statusTypeList" :label="item.name" :value="item.type">
-          </el-option>
-        </el-select>
-        <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
-        <el-button class="filter-item" type="primary" v-waves icon="el-icon-download" @click="handleDownLoad">导出</el-button>
-      </div>
-  
-      <!-- 查询结果 -->
-      <el-table size="small" :data="list" v-loading="listLoading"
-        element-loading-text="正在查询中。。。" border fit highlight-current-row>
-        <el-table-column type="index" label="序号" header-align="center" align="center">
-        </el-table-column>
-        <el-table-column align="center" min-width="200px" label="附件">
-          <template slot-scope="props">
-                <div v-for="(item, index) in props.row.files" :key="index">
-                  <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
-                </div>
-              </template>
-        </el-table-column>
-        <el-table-column align="center" prop="categoryName" min-width="100" label="表彰类型">
-        </el-table-column>
-        <el-table-column align="center" prop="title" min-width="100" label="表彰名称">
-        </el-table-column>
-        <el-table-column align="center" min-width="80px" label="上传人" prop="userName">
-        </el-table-column>
-        <el-table-column align="center" min-width="250px" label="公司" prop="companyName">
-        </el-table-column>
-        <el-table-column align="center" min-width="250px" label="部门" prop="deptName">
-        </el-table-column>
-        <!-- <el-table-column align="center" min-width="80px" label="获得积分" prop="integral">
+  <div class="app-container calendar-list-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-select v-model="listQuery.type" clearable placeholder="表彰类型" class="filter-item" style="width: 200px">
+        <el-option :key="item.dictValue" v-for="item in typeList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select>
+      <el-select v-model="listQuery.category" clearable placeholder="表彰类别" class="filter-item" style="width: 200px">
+        <el-option :key="item.dictValue" v-for="item in categoryList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select>
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="客户名称"
+        v-model="listQuery.customerName"></el-input>
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="表彰名称"
+        v-model="listQuery.title"></el-input>
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="上传人"
+        v-model="listQuery.userName"></el-input>
+      <el-select v-model="listQuery.status" clearable placeholder="审批状态" style="top: -4px; width: 200px">
+        <el-option :key="item.dictValue" v-for="item in statusTypeList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select>
+      <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
+      <!-- <el-button class="filter-item" type="primary" v-waves icon="el-icon-download" @click="handleDownLoad">导出</el-button> -->
+    </div>
+
+    <!-- 查询结果 -->
+    <el-table size="small" :data="list" v-loading="listLoading" element-loading-text="正在查询中。。。" border fit
+      highlight-current-row>
+      <el-table-column type="index" label="序号" header-align="center" align="center">
+      </el-table-column>
+      <el-table-column align="center" min-width="200px" label="附件">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.files" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="typeName" min-width="100" label="表彰类型">
+      </el-table-column>
+      <el-table-column align="center" prop="categoryName" min-width="100" label="表彰类别">
+      </el-table-column>
+      <el-table-column align="center" min-width="100" label="表彰人员">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.groupUsers" :key="index">
+            {{ item.userName }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="customerName" min-width="100" label="客户名称">
+      </el-table-column>
+      <el-table-column align="center" prop="title" min-width="100" label="表彰名称">
+      </el-table-column>
+      <el-table-column align="center" min-width="80px" label="上传人" prop="userName">
+      </el-table-column>
+      <!-- <el-table-column align="center" min-width="250px" label="公司" prop="companyName">
         </el-table-column> -->
-        <el-table-column align="center" min-width="80px" label="审核状态" prop="statusName">
-        </el-table-column>
-        <el-table-column align="center" min-width="100px" label="日期" prop="createTime">
-        </el-table-column>
-        <el-table-column align="center" label="操作" width="150px" class-name="small-padding fixed-width">
-          <template slot-scope="scope">
-            <el-button :disabled="scope.row.status == 0?false:true" type="primary" size="small" @click="handleComplete(scope.row.id,0)">通过</el-button>
-            <el-button :disabled="scope.row.status == 0?false:true" type="warning" size="small" @click="handleCreate(scope.row.id)">不通过</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-  
-      <!-- 分页 -->
-      <div class="pagination-container">
-        <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
-          :current-page="listQuery.page" :page-sizes="[10, 20, 30, 50]" :page-size="listQuery.limit"
-          layout="total, sizes, prev, pager, next, jumper" :total="total">
-        </el-pagination>
-      </div>
-      <!-- 添加或修改对话框 -->
-      <el-dialog :close-on-click-modal="false" title="表彰审批" :visible.sync="dialogFormVisible" width="40%">
-            <el-form :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="80px">
-                <el-form-item label="审批内容" prop="content">
-                  <el-input type="textarea" :rows="2" placeholder="请输入审批内容" v-model="dataForm.content"></el-input>
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click="dialogFormVisible = false">取消</el-button>
-                <el-button type="primary" @click="handleComplete(certificateId,1)">确定</el-button>
-            </div>
-        </el-dialog>
+      <el-table-column align="center" min-width="250px" label="部门" prop="deptName">
+      </el-table-column>
+      <el-table-column align="center" min-width="80px" label="获得积分" prop="integral">
+      </el-table-column>
+      <el-table-column align="center" min-width="120px" label="审核状态">
+        <template slot-scope="props">
+                <el-popover>
+                  <el-table :data="props.row.logs" border size="mini">
+                    <el-table-column min-width="80" align="center" prop="auditor" label="处理人"></el-table-column>
+                    <el-table-column min-width="160" align="center" prop="comment" label="处理结果"></el-table-column>
+                    <el-table-column min-width="180" align="center" prop="createTime" label="处理时间"></el-table-column>
+                  </el-table>
+                  <span style="color: #1e80ff;cursor: pointer;" slot="reference">{{ props.row.statusName }}</span>
+                </el-popover>
+              </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="100px" label="日期" prop="createTime">
+      </el-table-column>
+    </el-table>
+
+    <!-- 分页 -->
+    <div class="pagination-container">
+      <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="listQuery.page" :page-sizes="[10, 20, 30, 50]" :page-size="listQuery.limit"
+        layout="total, sizes, prev, pager, next, jumper" :total="total">
+      </el-pagination>
     </div>
-  </template>
+  </div>
+</template>
     
-  <style>
-  .demo-table-expand {
-    font-size: 0;
-  }
-  
-  .demo-table-expand label {
-    width: 200px;
-    color: #99a9bf;
-  }
-  
-  .demo-table-expand .el-form-item {
-    margin-right: 0;
-    margin-bottom: 0;
-  }
-  </style>
+<style>
+.demo-table-expand {
+  font-size: 0;
+}
+
+.demo-table-expand label {
+  width: 200px;
+  color: #99a9bf;
+}
+
+.demo-table-expand .el-form-item {
+  margin-right: 0;
+  margin-bottom: 0;
+}
+</style>
     
-  <script>
-  import {
-    complete,
-    list,
-  } from "@/api/certManage";
-  import waves from "@/directive/waves"; // 水波纹指令
-  import Tinymce from "@/components/Tinymce";
-  
-  export default {
-    components: { Tinymce },
-    directives: { waves },
-    data() {
-      return {
-        certificateId:'',
-        dialogFormVisible: false,
-        dataForm: {
-          content: ''
-        },
-        rules: {
-          content: [{ required: true, message: "审批内容不能为空", trigger: "blur" }],
-        },
-        statusTypeList: [
-          {
-            type: 0,
-            name: "审核中",
-          },
-          {
-            type: 1,
-            name: "通过",
-          },
-          {
-            type: 2,
-            name: "不通过",
-          },
-        ],
-        list: [
-          {
-                "id": 15,
-                "loginId": "13564541778",
-                "userName": "卢卫国",
-                "employeNo": "34106",
-                "deptName": "软件工程院_本部_开发",
-                "deptId": "80e99ccb24a1425d8b4d3e776550cdc7",
-                "companyName": "神州通誉软件(上海)股份有限公司",
-                "type": "203",
-                "typeName": "专业厂商认证",
-                "category": "209",
-                "categoryName": "表彰类型",
-                "title": "3232",
-                "integral": 1000,
-                "fileIds": "3716",
-                "createTime": "2023-07-21",
-                "createTimeStr": "2023-07-21",
-                "modifyTime": "2023-07-21",
-                "status": 0,
-                "statusName": "审批中",
-                "content": null,
-                "files": [
-                    {
-                        "id": 3716,
-                        "key": "4mwi6vxtt7g42yhyne3m",
-                        "oldName": "报工问题.docx",
-                        "name": null,
-                        "newName": "4mwi6vxtt7g42yhyne3m.docx",
-                        "type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
-                        "size": 588506,
-                        "filePath": "/application/2023/07/21/4mwi6vxtt7g42yhyne3m.docx",
-                        "url": "https://xiaoyou.dgtis.com/images/application/2023/07/21/4mwi6vxtt7g42yhyne3m.docx",
-                        "modifyTime": "2023-07-21T13:56:34",
-                        "createUserId": null,
-                        "createTime": "2023-07-21T13:56:34",
-                        "modifyUserId": null,
-                        "deleted": false,
-                        "imgBelongs": null
-                    }
-                ]
-          }
-        ],
-        total: 0,
-        listLoading: false,
-        listQuery: {
-          page: 1,
-          limit: 10,
-          name:'',
-          title:'',
-          userName:'',
-          status: "",
-        },
-      };
+<script>
+import {
+  customerPage,
+} from "@/api/commendManage.js";
+import { dataTypeList } from "@/api/public";
+import waves from "@/directive/waves"; // 水波纹指令
+import Tinymce from "@/components/Tinymce";
+
+export default {
+  components: { Tinymce },
+  directives: { waves },
+  data() {
+    return {
+      detailData:{},
+      tableData:[],
+      dialogVisible: false,
+      categoryList: [],
+      typeList: [],
+      statusTypeList: [],
+      list: [],
+      total: 0,
+      listLoading: false,
+      listQuery: {
+        page: 1,
+        limit: 10,
+        type: '',
+        category: '',
+        customerName: '',
+        title: '',
+        userName: '',
+        status: "",
+      },
+    };
+  },
+  created() {
+    this.getTypeList();
+    this.getCategoryList();
+    this.getStatusTypeList();
+    this.getList();
+  },
+  methods: {
+    getCategoryList() {
+      dataTypeList({ dictType: 'customer_treward_category' }).then(response => {
+        this.categoryList = response.data.data;
+      }).catch(() => { });
     },
-    created() {
-      // this.getList();
+    getTypeList() {
+      dataTypeList({ dictType: 'customer_treward_type' }).then(response => {
+        this.typeList = response.data.data;
+      }).catch(() => { });
     },
-    methods: {
-      handleDownLoad(){
-            window.location.href = process.env.BASE_API + '/mall-integral-obtain/export/certificate?name=' + this.listQuery.name + '&title=' + this.listQuery.title + '&userName=' + this.listQuery.userName + '&status=' + this.listQuery.status;
-        },
-      getList() {
-        this.listLoading = true;
-        list(this.listQuery)
-          .then((response) => {
-            this.list = response.data.data.items;
-            this.total = response.data.data.total;
-            this.listLoading = false;
-          })
-          .catch(() => {
-            this.list = [];
-            this.total = 0;
-            this.listLoading = false;
-          });
-      },
-  
-      handleFilter() {
-        this.listQuery.page = 1;
-        this.getList();
-      },
-  
-      handleSizeChange(val) {
-        this.listQuery.limit = val;
-        this.getList();
-      },
-  
-      handleCurrentChange(val) {
-        this.listQuery.page = val;
-        this.getList();
-      },
-      handleCreate(id) {
-        this.dialogFormVisible = true;
-        this.certificateId = id;
-        this.$nextTick(() => {
-            this.dataForm.content = '';
-            this.$refs["dataForm"].clearValidate();
+    getStatusTypeList() {
+      dataTypeList({ dictType: 'customer_treward_status' }).then(response => {
+        this.statusTypeList = response.data.data;
+      }).catch(() => { });
+    },
+    handleDownLoad() {
+      window.location.href = process.env.BASE_API + '/mall-integral-obtain/export/certificate?name=' + this.listQuery.name + '&title=' + this.listQuery.title + '&userName=' + this.listQuery.userName + '&status=' + this.listQuery.status;
+    },
+    getList() {
+      this.listLoading = true;
+      customerPage(this.listQuery)
+        .then((response) => {
+          this.list = response.data.data.items;
+          this.total = response.data.data.total;
+          this.listLoading = false;
+        })
+        .catch(() => {
+          this.list = [];
+          this.total = 0;
+          this.listLoading = false;
         });
-      },
-      handleComplete(certificateId,flag){
-        if(flag==1){
-          this.$refs["dataForm"].validate((valid) => {
-          if (valid) {
-            complete({certificateId:certificateId,flag:flag,content:this.dataForm.content}).then(() => {
-                  this.dialogFormVisible = false;
-                        this.$notify({
-                        title: "成功",
-                        message: "操作成功",
-                        type: "success",
-                        duration: 2000,
-                    });
-                        this.getList();
-                    });
-          }
-        })  
-        }else{
-          complete({certificateId:certificateId,flag:flag}).then(() => {
-                        this.$notify({
-                        title: "成功",
-                        message: "操作成功",
-                        type: "success",
-                        duration: 2000,
-                    });
-                        this.getList();
-                    });
-        }
-        
-      }
-      
     },
-  };
-  </script>
-  <style>
-  .ad-avatar-uploader .el-upload {
-    border: 1px dashed #d9d9d9;
-    border-radius: 6px;
-    cursor: pointer;
-    position: relative;
-    overflow: hidden;
-  }
-  
-  .ad-avatar-uploader .el-upload:hover {
-    border-color: #409eff;
-  }
-  
-  .ad-avatar-uploader-icon {
-    font-size: 28px;
-    color: #8c939d;
-    width: 178px;
-    height: 178px;
-    line-height: 178px;
-    text-align: center;
-  }
-  
-  .ad-avatar {
-    display: block;
-  }
-  </style>
+
+    handleFilter() {
+      this.listQuery.page = 1;
+      this.getList();
+    },
+
+    handleSizeChange(val) {
+      this.listQuery.limit = val;
+      this.getList();
+    },
+
+    handleCurrentChange(val) {
+      this.listQuery.page = val;
+      this.getList();
+    },
+  },
+};
+</script>
+<style>
+.ad-avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+
+.ad-avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+
+.ad-avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.ad-avatar {
+  display: block;
+}
+</style>
     

+ 303 - 0
src/views/commendManage/operateCiteList.vue

@@ -0,0 +1,303 @@
+<template>
+  <div class="app-container calendar-list-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-select v-model="listQuery.type" clearable placeholder="表彰类型" class="filter-item" style="width: 200px">
+        <el-option :key="item.dictValue" v-for="item in typeList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select>
+      <!-- <el-select v-model="listQuery.category" clearable placeholder="表彰类别" class="filter-item" style="width: 200px">
+        <el-option :key="item.dictValue" v-for="item in categoryList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select> -->
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="客户名称"
+        v-model="listQuery.customerName"></el-input>
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="表彰名称"
+        v-model="listQuery.title"></el-input>
+      <el-input clearable class="filter-item" style="width: 200px;" placeholder="上传人"
+        v-model="listQuery.userName"></el-input>
+      <!-- <el-select v-model="listQuery.status" clearable placeholder="审批状态" style="top: -4px; width: 200px">
+        <el-option :key="item.dictValue" v-for="item in statusTypeList" :label="item.dictLabel" :value="item.dictValue">
+        </el-option>
+      </el-select> -->
+      <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
+      <!-- <el-button class="filter-item" type="primary" v-waves icon="el-icon-download" @click="handleDownLoad">导出</el-button> -->
+    </div>
+
+    <!-- 查询结果 -->
+    <el-table size="small" :data="list" v-loading="listLoading" element-loading-text="正在查询中。。。" border fit
+      highlight-current-row>
+      <el-table-column type="index" label="序号" header-align="center" align="center">
+      </el-table-column>
+      <el-table-column align="center" min-width="200px" label="附件">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.files" :key="index">
+            <a style="color: #1e80ff;" target="_blank" :href="item.url">{{ item.oldName }}</a>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="typeName" min-width="100" label="表彰类型">
+      </el-table-column>
+      <!-- <el-table-column align="center" prop="categoryName" min-width="100" label="表彰类别">
+      </el-table-column> -->
+      <el-table-column align="center" min-width="100" label="表彰人员">
+        <template slot-scope="props">
+          <div v-for="(item, index) in props.row.groupUsers" :key="index">
+            {{ item.userName }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="customerName" min-width="100" label="客户名称">
+      </el-table-column>
+      <el-table-column align="center" prop="title" min-width="100" label="表彰名称">
+      </el-table-column>
+      <el-table-column align="center" min-width="80px" label="上传人" prop="userName">
+      </el-table-column>
+      <!-- <el-table-column align="center" min-width="250px" label="公司" prop="companyName">
+        </el-table-column> -->
+      <el-table-column align="center" min-width="250px" label="部门" prop="deptName">
+      </el-table-column>
+      <el-table-column align="center" min-width="80px" label="获得积分" prop="integral">
+      </el-table-column>
+      <el-table-column align="center" min-width="120px" label="审核状态">
+        <template slot-scope="props">
+                <el-popover>
+                  <el-table :data="props.row.logs" border size="mini">
+                    <el-table-column min-width="80" align="center" prop="auditor" label="处理人"></el-table-column>
+                    <el-table-column min-width="160" align="center" prop="comment" label="处理结果"></el-table-column>
+                    <el-table-column min-width="180" align="center" prop="createTime" label="处理时间"></el-table-column>
+                  </el-table>
+                  <span style="color: #1e80ff;cursor: pointer;" slot="reference">{{ props.row.statusName }}</span>
+                </el-popover>
+              </template>
+      </el-table-column>
+      <el-table-column align="center" min-width="100px" label="日期" prop="createTime">
+      </el-table-column>
+      <el-table-column align="center" label="操作" width="80px" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button type="success" size="small"
+            @click="handleClick(scope.row.id)">处理</el-button>
+          </template>
+      </el-table-column>
+    </el-table>
+    <el-dialog :close-on-click-modal="false" title="表彰审批" :visible.sync="dialogFormVisible" width="40%">
+            <el-form :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="80px">
+              
+                <el-form-item label="表彰类别" prop="category">
+                  <el-select v-model="dataForm.category" clearable placeholder="表彰类别" class="filter-item" style="width: 100%">
+                    <el-option :key="item.dictValue" v-for="item in categoryList" :label="item.dictLabel" :value="item.dictValue">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="审批内容" prop="content">
+                  <el-input type="textarea" :rows="2" placeholder="请输入审批内容" v-model="dataForm.content"></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="complete(true)">同意</el-button>
+                <el-button type="danger" @click="complete(false)">驳回</el-button>
+            </div>
+        </el-dialog>
+    <!-- 分页 -->
+    <div class="pagination-container">
+      <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="listQuery.page" :page-sizes="[10, 20, 30, 50]" :page-size="listQuery.limit"
+        layout="total, sizes, prev, pager, next, jumper" :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+    
+<style>
+.demo-table-expand {
+  font-size: 0;
+}
+
+.demo-table-expand label {
+  width: 200px;
+  color: #99a9bf;
+}
+
+.demo-table-expand .el-form-item {
+  margin-right: 0;
+  margin-bottom: 0;
+}
+</style>
+    
+<script>
+import {
+  complete,
+  customerPage,
+} from "@/api/commendManage.js";
+import { dataTypeList } from "@/api/public";
+import waves from "@/directive/waves"; // 水波纹指令
+import Tinymce from "@/components/Tinymce";
+
+export default {
+  components: { Tinymce },
+  directives: { waves },
+  data() {
+    return {
+      id:'',
+      dataForm: {
+        category: '',
+        content: ''
+      },
+      rules: {
+        category: [{ required: true, message: "请选择表彰类别", trigger: "blur" }],
+      },
+      dialogFormVisible: false,
+      dialogVisible: false,
+      categoryList: [],
+      typeList: [],
+      statusTypeList: [],
+      list: [],
+      total: 0,
+      listLoading: false,
+      listQuery: {
+        page: 1,
+        limit: 10,
+        type: '',
+        category: '',
+        customerName: '',
+        title: '',
+        userName: '',
+        status: "10",
+      },
+    };
+  },
+  created() {
+    this.getTypeList();
+    this.getCategoryList();
+    this.getStatusTypeList();
+    this.getList();
+  },
+  methods: {
+    checked(val){
+            if(val.flag == false){
+                if(!val.content){
+                    this.$alert("请输入审批内容", "提示", {
+                        confirmButtonText: "确定",
+                    });
+                    return false;
+                }
+            }
+            if(val.flag == true){
+                if(!val.category){
+                    this.$alert("请选择表彰类别", "提示", {
+                        confirmButtonText: "确定",
+                    });
+                    return false;
+                }
+            }
+            return true;
+        },
+    complete(flag) {
+            const parms = {
+                id:this.id,
+                category:this.dataForm.category,
+                content: this.dataForm.content,
+                flag:flag,
+            }
+            const isChecked = this.checked(parms);
+            if(isChecked){
+                complete(parms).then((response) => {
+                    this.$notify({
+                        title: "成功",
+                        message: "操作成功",
+                        type: "success",
+                        duration: 2000,
+                    });
+                    this.dialogFormVisible = false;
+                    this.getList();
+                })
+                .catch(() => { });
+            }
+            
+        },
+      handleClick(id) {
+        this.dialogFormVisible = true;
+        this.id = id;
+        this.$nextTick(() => {
+            this.dataForm.category = '';
+            this.dataForm.content = '';
+            this.$refs["dataForm"].clearValidate();
+        });
+      },
+    getCategoryList() {
+      dataTypeList({ dictType: 'customer_treward_category' }).then(response => {
+        this.categoryList = response.data.data;
+      }).catch(() => { });
+    },
+    getTypeList() {
+      dataTypeList({ dictType: 'customer_treward_type' }).then(response => {
+        this.typeList = response.data.data;
+      }).catch(() => { });
+    },
+    getStatusTypeList() {
+      dataTypeList({ dictType: 'customer_treward_status' }).then(response => {
+        this.statusTypeList = response.data.data;
+      }).catch(() => { });
+    },
+    handleDownLoad() {
+      window.location.href = process.env.BASE_API + '/mall-integral-obtain/export/certificate?name=' + this.listQuery.name + '&title=' + this.listQuery.title + '&userName=' + this.listQuery.userName + '&status=' + this.listQuery.status;
+    },
+    getList() {
+      this.listLoading = true;
+      customerPage(this.listQuery)
+        .then((response) => {
+          this.list = response.data.data.items;
+          this.total = response.data.data.total;
+          this.listLoading = false;
+        })
+        .catch(() => {
+          this.list = [];
+          this.total = 0;
+          this.listLoading = false;
+        });
+    },
+
+    handleFilter() {
+      this.listQuery.page = 1;
+      this.getList();
+    },
+
+    handleSizeChange(val) {
+      this.listQuery.limit = val;
+      this.getList();
+    },
+
+    handleCurrentChange(val) {
+      this.listQuery.page = val;
+      this.getList();
+    },
+  },
+};
+</script>
+<style>
+.ad-avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+
+.ad-avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+
+.ad-avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.ad-avatar {
+  display: block;
+}
+</style>
+