sunlupeng 1 ano atrás
pai
commit
68d3de380e

+ 70 - 110
src/views/commendManage/ceoCiteList.vue

@@ -6,10 +6,6 @@
         <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="表彰名称"
@@ -83,50 +79,24 @@
       </el-table-column>
       <el-table-column align="center" min-width="120px" label="审核状态">
         <template slot-scope="props">
-                <el-popover trigger="hover">
-                  <el-table :data="props.row.logs" border size="mini">
-                    <el-table-column min-width="120" 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-popover trigger="hover">
+            <el-table :data="props.row.logs" border size="mini">
+              <el-table-column min-width="120" 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="160px" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button type="primary" size="small" @click="handleClickView(scope.row, 'view')">查看</el-button>
-          <el-button type="success" size="small"
-            @click="handleClick(scope.row)">处理</el-button>
-          </template>
+          <el-button type="success" size="small" @click="handleClickView(scope.row, 'complete')">处理</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="表彰类型">
-                  <el-input disabled class="filter-item" v-model="dataForm.typeName"></el-input>
-                </el-form-item>
-                <!-- <el-form-item label="表彰类别" prop="category">
-                  <el-select v-model="dataForm.category" clearable placeholder="表彰类别" class="filter-item" style="width: 100%" @change="handleClickChangeType">
-                    <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="integral">
-                  <el-input-number style="width: 100%;" :min="10" :step="1" v-model="dataForm.integral"></el-input-number>
-                  <!-- <el-input-number style="width: 100%;" :disabled="dataForm.category=='30' && dataForm.type!='1'?false:true" :min="0" :step="1" v-model="dataForm.integral"></el-input-number> -->
-                </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"
@@ -193,6 +163,22 @@
         <el-table-column align="center" prop="createTime" label="处理时间" width="180">
         </el-table-column>
       </el-table>
+      <el-form style="margin-top: 20px;" :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left"
+        label-width="80px">
+        <!-- <el-form-item label="表彰类型">
+          <el-input disabled class="filter-item" v-model="dataForm.typeName"></el-input>
+        </el-form-item> -->
+        <el-form-item label="奖励积分" prop="integral">
+          <el-input-number style="width: 100%;" :min="10" :step="1" v-model="dataForm.integral"></el-input-number>
+        </el-form-item>
+        <el-form-item label="审批内容" prop="content">
+          <el-input type="textarea" :rows="4" 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>
 </template>
@@ -205,6 +191,7 @@
   -webkit-box-orient: vertical;
   -webkit-line-clamp: 1;
 }
+
 .demo-table-expand {
   font-size: 0;
 }
@@ -234,18 +221,16 @@ export default {
   directives: { waves },
   data() {
     return {
-      id:'',
-      integral:'',
+      id: '',
+      integral: '',
       dataForm: {
-        category: '',
-        integral:'',
+        integral: '',
         content: ''
       },
       rules: {
-        category: [{ required: true, message: "请选择表彰类别", trigger: "blur" }],
         integral: [{ required: true, message: "请填写积分", trigger: "blur" }],
       },
-      dialogFormVisible: false,
+      dialogVisible: false,
       categoryList: [],
       typeList: [],
       statusTypeList: [],
@@ -256,7 +241,6 @@ export default {
         page: 1,
         limit: 10,
         type: '',
-        category: '',
         customerName: '',
         title: '',
         userName: '',
@@ -283,72 +267,48 @@ export default {
       this.dialogStatus = tag;
       this.detailData = row;
       this.dialogVisible = true;
+      this.id = row.id;
+      this.dataForm.typeName = row.typeName;
+      this.dataForm.integral = row.integral;
+      this.$nextTick(() => {
+        this.dataForm.content = '';
+        this.$refs["dataForm"].clearValidate();
+      });
     },
-    handleClickChangeType(val){
-      if(val=='30'&&this.dataForm.type=='1'){
-        this.dataForm.integral = this.integral;
-      }else{
-        this.dataForm.integral = this.categoryList.find(item => item.dictValue == val).remark;
+    checked(val) {
+      if (val.flag == false) {
+        if (!val.content) {
+          this.$alert("请输入审批内容", "提示", {
+            confirmButtonText: "确定",
+          });
+          return false;
+        }
       }
-      
+      return true;
     },
-    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,
-                addIntergral:this.dataForm.integral,
-                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.integral = val.integral;
-        
-        this.dataForm.typeName = val.typeName;
-        this.dataForm.category = val.category;
-        this.dataForm.integral = val.integral;
-        this.dataForm.type = val.type;
-        this.$nextTick(() => {
-            this.dataForm.content = '';
-            this.$refs["dataForm"].clearValidate();
-        });
-      },
+      const parms = {
+        id: this.id,
+        addIntergral: this.dataForm.integral,
+        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.dialogVisible = false;
+          this.getList();
+        })
+          .catch(() => { });
+      }
+
+    },
     getCategoryList() {
       dataTypeList({ dictType: 'customer_treward_category' }).then(response => {
         this.categoryList = response.data.data;

+ 63 - 99
src/views/commendManage/operateCiteList.vue

@@ -6,22 +6,13 @@
         <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>
 
     <!-- 查询结果 -->
@@ -83,44 +74,24 @@
       </el-table-column>
       <el-table-column align="center" min-width="120px" label="审核状态">
         <template slot-scope="props">
-                <el-popover trigger="hover">
-                  <el-table :data="props.row.logs" border size="mini">
-                    <el-table-column min-width="120" 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-popover trigger="hover">
+            <el-table :data="props.row.logs" border size="mini">
+              <el-table-column min-width="120" 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="160px" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button type="primary" size="small" @click="handleClickView(scope.row, 'view')">查看</el-button>
-          <el-button type="success" size="small"
-            @click="handleClick(scope.row.id)">处理</el-button>
-          </template>
+          <el-button type="success" size="small" @click="handleClickView(scope.row, 'complete')">处理</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"
@@ -128,8 +99,8 @@
         layout="total, sizes, prev, pager, next, jumper" :total="total">
       </el-pagination>
     </div>
-     <!-- 添加或修改对话框 -->
-     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogVisible" :close-on-click-modal="false" width="70%">
+    <!-- 添加或修改对话框 -->
+    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogVisible" :close-on-click-modal="false" width="70%">
       <el-form status-icon label-position="center" label-width="100px" style="width:100%;">
         <div style="display: flex;">
 
@@ -187,6 +158,16 @@
         <el-table-column align="center" prop="createTime" label="处理时间" width="180">
         </el-table-column>
       </el-table>
+      <el-form style="margin-top: 20px;" ref="dataForm" :model="dataForm" status-icon label-position="left"
+        label-width="80px">
+        <el-form-item label="审批内容" prop="content">
+          <el-input type="textarea" :rows="4" 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>
 </template>
@@ -199,6 +180,7 @@
   -webkit-box-orient: vertical;
   -webkit-line-clamp: 1;
 }
+
 .demo-table-expand {
   font-size: 0;
 }
@@ -228,15 +210,11 @@ export default {
   directives: { waves },
   data() {
     return {
-      id:'',
+      id: '',
       dataForm: {
-        category: '',
         content: ''
       },
-      rules: {
-        category: [{ required: true, message: "请选择表彰类别", trigger: "blur" }],
-      },
-      dialogFormVisible: false,
+      dialogVisible: false,
       categoryList: [],
       typeList: [],
       statusTypeList: [],
@@ -247,7 +225,6 @@ export default {
         page: 1,
         limit: 10,
         type: '',
-        category: '',
         customerName: '',
         title: '',
         userName: '',
@@ -274,58 +251,45 @@ export default {
       this.dialogStatus = tag;
       this.detailData = row;
       this.dialogVisible = true;
+      this.id = row.id;
+      this.$nextTick(() => {
+        this.dataForm.content = '';
+        this.$refs["dataForm"].clearValidate();
+      });
+    },
+    checked(val) {
+      if (val.flag == false) {
+        if (!val.content) {
+          this.$alert("请输入审批内容", "提示", {
+            confirmButtonText: "确定",
+          });
+          return false;
+        }
+      }
+      return true;
     },
-    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();
-        });
-      },
+      const parms = {
+        id: this.id,
+        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.dialogVisible = false;
+          this.getList();
+        })
+          .catch(() => { });
+      }
+
+    },
     getCategoryList() {
       dataTypeList({ dictType: 'customer_treward_category' }).then(response => {
         this.categoryList = response.data.data;