Browse Source

修改多次点击问题

plg 7 months ago
parent
commit
4c54d8ad29

+ 14 - 3
src/components/ChannelRegister.vue

@@ -243,6 +243,11 @@ export default {
     // this.getChannel();
   },
   methods: {
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
     beforeAvatarUpload(file) {
       const fileName = file.name;
       const fileType = fileName.substring(fileName.lastIndexOf("."));
@@ -304,6 +309,7 @@ export default {
       }
     },
     open(val) {
+      this.cancle()
       this.dialogVisible = true;
       this.isView = val;
 
@@ -354,6 +360,10 @@ export default {
       this.dialogVisible = false;
     },
     submitCom() {
+      if (this.disableFlag) {
+        return;
+      }
+      this.disableFlag = true;
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           //判断是编辑还是新增
@@ -365,6 +375,8 @@ export default {
 
           //都校验通过后可以触发注册接口了
           //调用方法进行入参
+        }else{
+          this.disableFlagStatus()
         }
       });
     },
@@ -387,7 +399,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             this.$message.success(res.msg);
@@ -412,7 +424,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             // this.$toast.success({ message: "成功" });
@@ -424,7 +436,6 @@ export default {
             this.$message.error(res.msg);
           }
           //清空缓存
-          this.cancle();
         }
       );
     },

+ 14 - 3
src/components/ContractChannelRegister.vue

@@ -194,6 +194,11 @@ export default {
     this.getChannel();
   },
   methods: {
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
     getChannel() {
       this.$http.get(`/channel/findAll`, {}, (res) => {
         //  this.$toast.success({message:'成功'});
@@ -266,6 +271,7 @@ export default {
       }
     },
     open(val) {
+      this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 
@@ -316,6 +322,10 @@ export default {
       this.dialogVisible = false;
     },
     submitCom() {
+      if (this.disableFlag) {
+        return;
+      }
+      this.disableFlag = true;
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           //判断是编辑还是新增
@@ -327,6 +337,8 @@ export default {
 
           //都校验通过后可以触发注册接口了
           //调用方法进行入参
+        }else{
+          this.disableFlagStatus()
         }
       });
     },
@@ -368,7 +380,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             this.$message.success(res.msg);
@@ -394,7 +406,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             // this.$toast.success({ message: "成功" });
@@ -406,7 +418,6 @@ export default {
             this.$message.error(res.msg);
           }
           //清空缓存
-          this.cancle();
         }
       );
     },

+ 15 - 3
src/components/ContractRegister.vue

@@ -176,6 +176,7 @@
         <el-button
           v-show="isView"
           type="primary"
+          round
           :disabled="disableFlag"
           @click="submitCom"
           >确 定</el-button
@@ -281,6 +282,11 @@ export default {
     this.getChannel();
   },
   methods: {
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
     getChannel() {
       this.$http.get(`/channel/findAll`, {}, (res) => {
         //  this.$toast.success({message:'成功'});
@@ -353,6 +359,7 @@ export default {
       }
     },
     open(val) {
+      this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 
@@ -404,6 +411,10 @@ export default {
       this.dialogVisible = false;
     },
     submitCom() {
+      if (this.disableFlag) {
+        return;
+      }
+      this.disableFlag = true;
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           //判断是编辑还是新增
@@ -415,6 +426,8 @@ export default {
 
           //都校验通过后可以触发注册接口了
           //调用方法进行入参
+        }else{
+          this.disableFlagStatus()
         }
       });
     },
@@ -457,7 +470,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             this.$message.success(res.msg);
@@ -483,7 +496,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             // this.$toast.success({ message: "成功" });
@@ -495,7 +508,6 @@ export default {
             this.$message.error(res.msg);
           }
           //清空缓存
-          this.cancle();
         }
       );
     },

+ 429 - 0
src/components/EditHomeRegister.vue

@@ -0,0 +1,429 @@
+<template>
+  <div>
+    <el-dialog
+      :title="isView ? '新增' : '编辑'"
+      :visible.sync="dialogVisible"
+      :before-close="cancle"
+      width="60%"
+    >
+      <el-form
+        :inline="true"
+        :model="ruleForm"
+        :rules="rules"
+        ref="ruleForm"
+        label-width="120px"
+        class="demo-ruleForm"
+      >
+        <el-row>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="头像" prop="avatar">
+              <el-upload
+                accept=".png, .jpg, .jpeg"
+                class="avatar-uploader"
+                name="file"
+                :action="action"
+                :show-file-list="false"
+                :on-success="handleAvatarSuccess"
+                :before-upload="beforeAvatarUpload"
+              >
+                <img v-if="ruleForm.avatar" :src="ruleForm.avatar" class="avatar" />
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                <div class="el-upload__tip" slot="tip">
+                  建议上传jpg/png/jpeg文件,且不超过500kb
+                </div>
+              </el-upload>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="姓名" prop="name">
+              <el-input
+                v-model="ruleForm.name"
+                class="inputCom"
+                placeholder="请输入姓名"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="个人描述" prop="description">
+              <el-input
+                v-model="ruleForm.description"
+                class="inputCom"
+                placeholder="请输入描述"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="岗位" prop="job">
+              <el-input
+                v-model="ruleForm.job"
+                class="inputCom"
+                placeholder="请输入岗位"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="邮箱" prop="mail">
+              <el-input
+                v-model="ruleForm.mail"
+                class="inputCom"
+                placeholder="请输入邮箱"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="手机号" prop="phone">
+              <el-input
+                v-model="ruleForm.phone"
+                class="inputCom"
+                placeholder="请输入手机号"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="状态" prop="state">
+              <el-select v-model="ruleForm.state" placeholder="请选择状态">
+                <el-option
+                  :label="item.name"
+                  :value="item.state"
+                  v-for="item in stateList"
+                  :key="item.state"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="cancle" round>取 消</el-button>
+        <el-button
+          v-show="isView"
+          type="primary"
+          round
+          :disabled="disableFlag"
+          @click="submitCom"
+          >确 定</el-button
+        >
+        <el-button
+          v-show="!isView"
+          type="primary"
+          round
+          :disabled="disableFlag"
+          @click="submitCom"
+          >修 改</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+// import { oSessionStorage } from "../../utils/utils";
+import { oSessionStorage } from "../utils/utils";
+import { basePath } from "../utils/http";
+import md5 from "md5";
+export default {
+  data() {
+    var validatePass = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("请输入密码"));
+      } else if (value.length < 6) {
+        callback(new Error("密码至少6位"));
+      } else {
+        callback();
+      }
+    };
+    var validatePhone = (rule, value, callback) => {
+      let myreg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
+      if (value === "") {
+        callback(new Error("请输入手机号"));
+      } else if (!myreg.test(value)) {
+        callback(new Error("请输入正确格式"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      action: "",
+      disableFlag: false,
+      phoneFlag: false,
+      flag: 3,
+      dialogVisible: false,
+      //渠道列表
+      stateList: [
+        { name: "签约", state: "1" },
+        { name: "解约", state: "0" },
+      ],
+      ruleForm: {
+        id: "",
+        channelId: "",
+        //头像
+        avatar: "",
+        //员工姓名
+        name: "",
+        //描述
+        description: "",
+        //岗位
+        job: "",
+        //邮箱
+        mail: "",
+        //手机号
+        phone: "",
+        //状态
+        state: "",
+        // //删除状态
+        isDelete: "0",
+      },
+      isView: true,
+      rules: {
+        name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
+        phone: [
+          { required: true, message: "请输入手机号", trigger: "blur" },
+          {
+            pattern: /^1[3456789]\d{9}$/,
+            message: "请输入正确的手机号",
+            trigger: ["blur", "change"],
+          },
+        ],
+        state: [{ required: true, message: "请输选择状态", trigger: "change" }],
+        mail: [
+          { required: true, message: "请输选择邮箱", trigger: "blur" },
+          { type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"] },
+        ],
+      },
+    };
+  },
+  mounted() {
+    let userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+    this.ruleForm.parentCode = userInfo.invitationCode;
+    this.action = basePath + "/file/customUpload";
+    //获取到router 传输过来的信息
+    this.ruleForm.channelId = this.$route.query.channelId;
+
+    //获取渠道信息
+
+    // this.ruleForm.type = "3";
+  },
+  methods: {
+    beforeAvatarUpload(file) {
+      const fileName = file.name;
+      const fileType = fileName.substring(fileName.lastIndexOf("."));
+      if (fileType !== ".jpg" && fileType !== ".jpeg" && fileType !== ".png") {
+        // alert("请上传jpg、jpge或png的图片!");
+        this.$message.error("请上传jpg、jpge或png的图片!");
+        return false;
+      }
+      return true;
+    },
+    //handleAvatarSuccess
+    //上传成功后的回调
+    handleAvatarSuccess(data) {
+      if (data.code == 200) {
+        this.ruleForm.avatar = basePath + "/file/show?filePath=" + data.data;
+        console.log(basePath + "/file/show?filePath=" + data.data);
+      } else {
+        //失败
+      }
+    },
+    phoneCheck() {
+      //判断是否重复
+      this.$http.get(`v1/system/checkPhone/${this.ruleForm.phone}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          if (res.data) {
+            this.phoneFlag = true;
+          } else {
+            this.phoneFlag = false;
+            // this.$toast.success({ message: "手机号重复" });
+            this.$message.warning("手机号重复");
+          }
+        } else {
+          // this.$toast.fail({ message: res.msg });
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    timeChange(val) {
+      if (val !== null) {
+        //根据时间得到格式化的数据
+        this.ruleForm.birthDate = this.formatterTime(val);
+      }
+    },
+    formatterTime(val) {
+      let date = new Date(val);
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      month = this.formatterMon(month);
+      let day = date.getDate();
+      day = this.formatterMon(day);
+      return year + "-" + month + "-" + day;
+    },
+    formatterMon(val) {
+      if (val < 10) {
+        return "0" + val;
+      } else {
+        return val;
+      }
+    },
+    open(val) {
+      this.dialogVisible = true;
+      this.isView = val;
+
+      this.$nextTick(() => {
+        this.$refs["ruleForm"].clearValidate();
+      });
+    },
+    edit(val) {
+      this.dialogVisible = true;
+      this.isView = false;
+      this.ruleForm.id = val.id;
+      this.ruleForm.channelId = val.channelId;
+      this.ruleForm.avatar = val.avatar;
+      this.ruleForm.name = val.name;
+      this.ruleForm.description = val.description;
+      this.ruleForm.phone = val.phone;
+      this.ruleForm.mail = val.mail;
+      this.ruleForm.job = val.job;
+      this.ruleForm.state = val.state;
+      this.ruleForm.isDelete = val.isDelete;
+    },
+    cancle() {
+      //清空表单
+      //   id: "",
+      //     channelId:'',
+      //     //头像
+      //     avatar: "",
+      //     //员工姓名
+      //     name: "",
+      //     //描述
+      //     description: "",
+      //     //岗位
+      //     job: "",
+      //     //邮箱
+      //     mail: "",
+      //     //手机号
+      //     phone: "",
+      //     //状态
+      //     state: "",
+      this.ruleForm.id = "";
+      // this.ruleForm.channelId='';
+      this.ruleForm.avatar = "";
+      this.ruleForm.name = "";
+      this.ruleForm.description = "";
+      this.ruleForm.job = "";
+      this.ruleForm.mail = "";
+      this.ruleForm.phone = "";
+      this.ruleForm.state = "";
+      this.ruleForm.isDelete = "";
+      this.$refs["ruleForm"].clearValidate();
+      this.dialogVisible = false;
+    },
+    submitCom() {
+      this.$refs["ruleForm"].validate((valid) => {
+        if (valid) {
+          //判断是编辑还是新增
+          if (this.isView) {
+            this.register();
+          } else {
+            this.editUserFun();
+          }
+
+          //都校验通过后可以触发注册接口了
+          //调用方法进行入参
+        }
+      });
+    },
+    register() {
+      let that = this;
+      this.$http.post(
+        `/staff/save`,
+        {
+          avatar: this.ruleForm.avatar,
+          name: this.ruleForm.name,
+          description: this.ruleForm.description,
+          job: this.ruleForm.job,
+          mail: this.ruleForm.mail,
+          phone: this.ruleForm.phone,
+          state: this.ruleForm.state,
+          channelId: this.ruleForm.channelId,
+          isDelete: this.ruleForm.isDelete,
+          // ...this.ruleForm, //解构对象
+        },
+        (res) => {
+          this.disableFlag = false;
+          if (res && res.code == 200) {
+            this.dialogVisible = false;
+            this.$message.success(res.msg);
+            // this.$toast.success({ message: "成功" });
+            //调用父组件的查询方法
+            that.$emit("search");
+          } else {
+            // this.$toast.fail({ message: res.msg });
+            this.$message.error(res.msg);
+          }
+          //清空缓存
+          this.cancle();
+        }
+      );
+    },
+    editUserFun() {
+      let that = this;
+      this.$http.post(
+        `/staff/save`,
+        {
+          ...this.ruleForm,
+          // ...this.ruleForm, //解构对象
+        },
+        (res) => {
+          this.disableFlag = false;
+          if (res && res.code == 200) {
+            this.dialogVisible = false;
+            // this.$toast.success({ message: "成功" });
+            //调用父组件的查询方法
+            that.$emit("search");
+            this.$message.success("修改成功");
+          } else {
+            // this.$toast.fail({ message: res.msg });
+            this.$message.error(res.msg);
+          }
+          //清空缓存
+          this.cancle();
+        }
+      );
+    },
+  },
+};
+</script>
+<style scoped>
+.inputCom {
+  width: 200px;
+}
+
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+  border: 1px solid;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>

+ 15 - 3
src/components/PriceRegister.vue

@@ -178,6 +178,11 @@ export default {
     // this.ruleForm.type = "3";
   },
   methods: {
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
     beforeAvatarUpload(file) {
       const fileName = file.name;
       const fileType = fileName.substring(fileName.lastIndexOf("."));
@@ -239,6 +244,7 @@ export default {
       }
     },
     open(val) {
+      this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 
@@ -272,8 +278,13 @@ export default {
       this.dialogVisible = false;
     },
     submitCom() {
+      if (this.disableFlag) {
+        return;
+      }
+      this.disableFlag = true;
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
+          this.disableFlag=true;
           //判断是编辑还是新增
           if (this.isView) {
             this.register();
@@ -283,6 +294,8 @@ export default {
 
           //都校验通过后可以触发注册接口了
           //调用方法进行入参
+        }else{
+          this.disableFlagStatus()
         }
       });
     },
@@ -300,7 +313,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             this.$message.success(res.msg);
@@ -325,7 +338,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             // this.$toast.success({ message: "成功" });
@@ -337,7 +350,6 @@ export default {
             this.$message.error(res.msg);
           }
           //清空缓存
-          this.cancle();
         }
       );
     },

+ 14 - 3
src/components/ProductRegister.vue

@@ -195,6 +195,11 @@ export default {
     // this.ruleForm.type = "3";
   },
   methods: {
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
     beforeAvatarUpload(file) {
       const fileName = file.name;
       const fileType = fileName.substring(fileName.lastIndexOf("."));
@@ -256,6 +261,7 @@ export default {
       }
     },
     open(val) {
+      this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 
@@ -292,6 +298,10 @@ export default {
       this.dialogVisible = false;
     },
     submitCom() {
+      if (this.disableFlag) {
+        return;
+      }
+      this.disableFlag = true;
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           //判断是编辑还是新增
@@ -303,6 +313,8 @@ export default {
 
           //都校验通过后可以触发注册接口了
           //调用方法进行入参
+        }else{
+          this.disableFlagStatus()
         }
       });
     },
@@ -322,7 +334,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             this.$message.success(res.msg);
@@ -347,7 +359,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             // this.$toast.success({ message: "成功" });
@@ -359,7 +371,6 @@ export default {
             this.$message.error(res.msg);
           }
           //清空缓存
-          this.cancle();
         }
       );
     },

+ 43 - 32
src/components/Register.vue

@@ -17,7 +17,11 @@
         <el-row>
           <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <el-form-item label="用户名" prop="name">
-              <el-input :disabled="!isView" v-model="ruleForm.name" class="inputCom"></el-input>
+              <el-input
+                :disabled="!isView"
+                v-model="ruleForm.name"
+                class="inputCom"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
@@ -81,7 +85,7 @@ export default {
     var validatePass = (rule, value, callback) => {
       if (value === "") {
         callback(new Error("请输入密码"));
-      } else if (value.length<6) {
+      } else if (value.length < 6) {
         callback(new Error("密码至少6位"));
       } else {
         callback();
@@ -120,14 +124,10 @@ export default {
       isView: true,
       rules: {
         name: [{ required: true, message: "请输入用户名称", trigger: "blur" }],
-        userName: [
-          { required: true, message: "请输入用户昵称", trigger: "blur" },
-        ],
+        userName: [{ required: true, message: "请输入用户昵称", trigger: "blur" }],
         // password: [{ required: true, message: "请输密码", trigger: "blur" }],
         password: [{ required: true, validator: validatePass, trigger: "blur" }],
-        channel: [
-          { required: true, message: "请输选择渠道", trigger: "change" },
-        ],
+        channel: [{ required: true, message: "请输选择渠道", trigger: "change" }],
       },
     };
   },
@@ -155,25 +155,21 @@ export default {
     },
     phoneCheck() {
       //判断是否重复
-      this.$http.get(
-        `v1/system/checkPhone/${this.ruleForm.phone}`,
-        {},
-        (res) => {
-          //  this.$toast.success({message:'成功'});
-          if (res && res.code == 200) {
-            if (res.data) {
-              this.phoneFlag = true;
-            } else {
-              this.phoneFlag = false;
-              // this.$toast.success({ message: "手机号重复" });
-              this.$message.warning("手机号重复");
-            }
+      this.$http.get(`v1/system/checkPhone/${this.ruleForm.phone}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          if (res.data) {
+            this.phoneFlag = true;
           } else {
-            // this.$toast.fail({ message: res.msg });
-            this.$message.error(res.msg);
+            this.phoneFlag = false;
+            // this.$toast.success({ message: "手机号重复" });
+            this.$message.warning("手机号重复");
           }
+        } else {
+          // this.$toast.fail({ message: res.msg });
+          this.$message.error(res.msg);
         }
-      );
+      });
     },
     timeChange(val) {
       if (val !== null) {
@@ -198,11 +194,12 @@ export default {
       }
     },
     open(val) {
+      this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 
       this.$nextTick(() => {
-        this.$refs["ruleForm"].clearValidate();
+        this.$refs.ruleForm.clearValidate();
       });
     },
     edit(val) {
@@ -221,6 +218,7 @@ export default {
       this.ruleForm.type = val.tyep;
     },
     cancle() {
+      this.$refs["ruleForm"].clearValidate();
       //清空表单
       this.ruleForm.name = "";
 
@@ -228,10 +226,18 @@ export default {
       this.ruleForm.userName = "";
       this.ruleForm.channel = "";
 
-      // this.$refs["ruleForm"].clearValidate();
       this.dialogVisible = false;
     },
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
     submitCom() {
+      if (this.disableFlag) {
+        return;
+      }
+      this.disableFlag = true;
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           //判断是编辑还是新增
@@ -243,6 +249,8 @@ export default {
 
           //都校验通过后可以触发注册接口了
           //调用方法进行入参
+        } else {
+          this.disableFlagStatus()
         }
       });
     },
@@ -263,7 +271,8 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus();
+          // this.disableFlag = false;
           if (res && res.code == 200) {
             this.dialogVisible = false;
             // this.$toast.success({ message: "成功" });
@@ -301,27 +310,29 @@ export default {
           userName: this.ruleForm.userName,
           password: this.ruleForm.password,
           channelId: this.ruleForm.channel,
-          openId:this.ruleForm.openId,
+          openId: this.ruleForm.openId,
           phone: this.ruleForm.phone,
           photoPath: this.ruleForm.photoPath,
           state: this.ruleForm.state,
-          type:this.ruleForm.type
+          type: this.ruleForm.type,
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus();
           if (res && res.code == 200) {
             this.dialogVisible = false;
             // this.$toast.success({ message: "成功" });
             //调用父组件的查询方法
             that.$emit("search");
-            this.$message.success('修改成功')
+            this.$message.success("修改成功");
           } else {
             // this.$toast.fail({ message: res.msg });
             this.$message.error(res.msg);
           }
+
+          //清空缓存
+
           //清空缓存
-          this.cancle();
         }
       );
     },

+ 16 - 3
src/components/ReportRegister.vue

@@ -193,6 +193,11 @@ export default {
     // this.ruleForm.type = "3";
   },
   methods: {
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
     getChannel() {
       this.$http.get(`/channel/findAll`, {}, (res) => {
         //  this.$toast.success({message:'成功'});
@@ -277,6 +282,7 @@ export default {
       }
     },
     open(val) {
+      this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 
@@ -328,8 +334,13 @@ export default {
       this.dialogVisible = false;
     },
     submitCom() {
+      if (this.disableFlag) {
+        return;
+      }
+      this.disableFlag = true;
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
+         
           //判断是编辑还是新增
           if (this.isView) {
             this.register();
@@ -339,6 +350,8 @@ export default {
 
           //都校验通过后可以触发注册接口了
           //调用方法进行入参
+        }else {
+          this.disableFlagStatus()
         }
       });
     },
@@ -358,7 +371,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             this.$message.success(res.msg);
@@ -385,7 +398,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             // this.$toast.success({ message: "成功" });
@@ -397,7 +410,7 @@ export default {
             this.$message.error(res.msg);
           }
           //清空缓存
-          this.cancle();
+          
         }
       );
     },

+ 15 - 3
src/components/StaffRegister.vue

@@ -201,6 +201,11 @@ export default {
     // this.ruleForm.type = "3";
   },
   methods: {
+    disableFlagStatus() {
+      setTimeout(() => {
+        this.disableFlag = false;
+      }, 1500);
+    },
     beforeAvatarUpload(file) {
       const fileName = file.name;
       const fileType = fileName.substring(fileName.lastIndexOf("."));
@@ -262,6 +267,7 @@ export default {
       }
     },
     open(val) {
+      this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 
@@ -315,8 +321,13 @@ export default {
       this.dialogVisible = false;
     },
     submitCom() {
+      if (this.disableFlag) {
+        return;
+      }
+      this.disableFlag = true;
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
+       
           //判断是编辑还是新增
           if (this.isView) {
             this.register();
@@ -326,6 +337,8 @@ export default {
 
           //都校验通过后可以触发注册接口了
           //调用方法进行入参
+        }else{
+          this.disableFlagStatus()
         }
       });
     },
@@ -346,7 +359,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             this.$message.success(res.msg);
@@ -371,7 +384,7 @@ export default {
           // ...this.ruleForm, //解构对象
         },
         (res) => {
-          this.disableFlag = false;
+          this.disableFlagStatus()
           if (res && res.code == 200) {
             this.dialogVisible = false;
             // this.$toast.success({ message: "成功" });
@@ -383,7 +396,6 @@ export default {
             this.$message.error(res.msg);
           }
           //清空缓存
-          this.cancle();
         }
       );
     },

+ 41 - 13
src/router/router.js

@@ -61,6 +61,13 @@ export const routerList = [
         name: "recordListAll",
         component: () => import("../views/manage/channelInfo/recordListAll"),
       },
+      //渠道信息、、员工信息
+      {
+        path: "channelUserManage",
+        name: "channelUserManage",
+        component: () =>
+          import("../views/manage/channelInfo/channelUserManage"),
+      },
       //渠道管理 、、渠道信息
       {
         path: "channelManagement",
@@ -68,11 +75,26 @@ export const routerList = [
         component: () =>
           import("../views/manage/channelManagement/channelManagement"),
       },
+      //渠道管理 、、 渠道信息、、员工管理
+      {
+        path: "staff",
+        name: "staff",
+        component: () => import("../views/manage/channelManagement/staff"),
+      },
+
+      //渠道管理  签约详情
       {
         path: "contract",
         name: "contract",
         component: () => import("../views/manage/channelManagement/contract"),
       },
+      //渠道管理  签约详情  编辑首页
+      {
+        path: "editHomePage",
+        name: "editHomePage",
+        component: () => import("../views/manage/channelManagement/editHomePage"),
+      },
+
       //财税报告、、价格接口
       {
         path: "interfacePrice",
@@ -88,25 +110,31 @@ export const routerList = [
           import("../views/manage/interfacePrice/productPrice.vue"),
       },
 
-       //财税报告、报告记录
-       {
+      //财税报告、报告记录
+      {
         path: "reportList",
         name: "reportList",
         component: () =>
           import("../views/manage/interfacePrice/reportList.vue"),
       },
-        //订单管理  --邀约订单
-        {
-          path: "orderInvite",
-          name: "orderInvite",
-          component: () => import("../views/manage/orderManage/orderInvite"),
-        },
-      
-      //员工管理
+      //订单管理  --用户订单
       {
-        path: "staff",
-        name: "staff",
-        component: () => import("../views/manage/channelManagement/staff"),
+        path: "userOrder",
+        name: "userOrder",
+        component: () => import("../views/manage/orderManage/userOrder"),
+      },
+      //订单管理  --邀约订单
+      {
+        path: "orderInvite",
+        name: "orderInvite",
+        component: () => import("../views/manage/orderManage/orderInvite"),
+      },
+      //订单管理  --订单结算
+      {
+        path: "orderSettlementManage",
+        name: "orderSettlementManage",
+        component: () =>
+          import("../views/manage/orderManage/orderSettlementManage"),
       },
 
       {

+ 2 - 2
src/utils/http.js

@@ -16,8 +16,8 @@ import { router } from "@/router";
 // axios.defaults.baseURL = 'https://81.70.207.4:8070';
 // axios.defaults.baseURL = 'https://child.hhnao.com:8070';
 // axios.defaults.baseURL = 'https://child.hhnao.com:8070';
-// export const basePath='http://10.113.248.3:8086'
-export const basePath='http://43.143.198.30:8086'
+export const basePath='http://10.113.248.3:8086'
+// export const basePath='http://43.143.198.30:8086'
 axios.defaults.baseURL = basePath;
 // axios.defaults.baseURL = "http://43.143.198.30:8086";
 

+ 442 - 0
src/views/manage/channelInfo/channelUserManage.vue

@@ -0,0 +1,442 @@
+<template>
+  <div class="record-warp">
+    <div class="record-main">
+      <el-row>
+        <!-- <el-col :span="24">
+          <div class="search-head">
+            <span>公司名称:</span>
+            <el-input v-model="name" clearable placeholder="请输入公司名称"></el-input>&nbsp;&nbsp;&nbsp;&nbsp;
+            <el-button type="primary" icon="el-icon-search" @click="searchTarget">搜索</el-button>
+            <el-button type="primary" icon="el-icon-delete-solid" @click="clearSearch">清空</el-button>
+          </div>
+        </el-col> -->
+      </el-row>
+      <el-row class="add_user_class">
+        <el-col :span="24">
+          <div class="search-head">
+            <!-- <el-button type="primary" round icon="el-icon-plus" @click="addUser"
+              >新增</el-button
+            > -->
+            <!-- <el-button type="primary" round icon="el-icon-back" @click="goBack"
+              >返回</el-button
+            > -->
+          </div>
+        </el-col>
+      </el-row>
+
+      <div class="table-content">
+        <el-table
+          :data="tableData"
+          :row-style="{ height: '0px' }"
+          :cell-style="{ padding: '5px' }"
+        >
+          <!-- <el-table-column prop="name" label="姓名" align="center" width=""  show-overflow-tooltip>
+            </el-table-column> -->
+          <el-table-column label="头像" align="center" width="">
+            <template slot-scope="scope">
+              <el-image :src="scope.row.avatar" />
+            </template>
+          </el-table-column>
+          <el-table-column prop="name" label="姓名" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="description" label="个人描述" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="job" label="岗位" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="mail" label="邮箱" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="phone" label="手机号" align="center" width="">
+          </el-table-column>
+
+          <el-table-column
+            prop="state"
+            label="状态"
+            align="center"
+            :formatter="formatterState"
+            width=""
+          >
+          </el-table-column>
+          <!-- <el-table-column
+            prop="isDelete"
+            label="删除状态"
+            align="center"
+            :formatter="formatterIsDelete"
+            width=""
+          >
+          </el-table-column> -->
+          <!-- <el-table-column prop="isDelete" label="删除状态" align="center" :formatter="formatterDelete" width="">
+                    </el-table-column> -->
+          <el-table-column label="操作" width="200px" align="center" fixed="right">
+            <template slot-scope="scope">
+              <el-button @click="viewUser(scope.row)" type="text" size="small"
+                >查看</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
+      <el-pagination
+        small
+        background
+        @current-change="handleCurrentChange"
+        :current-page.sync="pageNum"
+        layout="total, prev, pager, next"
+        :page-size="pageSize"
+        :total="total"
+      >
+      </el-pagination>
+      <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
+        </el-pagination> -->
+    </div>
+    <StaffRegister ref="register" @search="searchTarget" />
+    <el-dialog title="查看" :visible.sync="centerDialogVisible" width="60%" center>
+      <div>
+        <el-row>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub" style="height: 200px">头像</div>
+              <div class="user_out_subNext">
+                <el-image :src="detailObj.avatar" style="width: 150px; height: 150px" />
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub" style="height: 200px">姓名</div>
+              <div class="user_out_subNext" style="height: 200px">
+                {{ detailObj.name }}
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">个人描述</div>
+              <div class="user_out_subNext">
+                {{ detailObj.description }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">岗位</div>
+              <div class="user_out_subNext">
+                {{ detailObj.job }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">邮箱</div>
+              <div class="user_out_subNext">
+                {{ detailObj.mail }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">手机号</div>
+              <div class="user_out_subNext">
+                {{ detailObj.phone }}
+              </div>
+            </div>
+          </el-col>
+
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">状态</div>
+              <div class="user_out_subNext">
+                {{ detailObj.state == "1" ? "签约" : "解约" }}
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { oSessionStorage } from "../../../utils/utils";
+import staffRegister from "../../../components/StaffRegister.vue";
+export default {
+  name: "channelManagement",
+  components: {
+    StaffRegister: staffRegister,
+  },
+  data() {
+    return {
+      centerDialogVisible: false,
+      editUserFlag: false,
+      startTime: "",
+      endTime: "",
+      value1: null,
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      keyword: "",
+      tableData: [],
+      userInfo: {}, //用户信息
+      userId: "", //用户id
+      name: "", //根据名称搜索
+      userName: "", //根据昵称搜索
+      hospitalOrDepartment: "", //医院科室
+
+      invitationCode: "",
+      roleType: "0",
+      type: 0,
+
+      channel:'',
+      detailObj: {},
+    };
+  },
+  created() {},
+  mounted() {
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+
+
+    if (this.userInfo.type == "1") {
+      this.channel = "";
+    } else if (this.userInfo.type == "0") {
+      this.channel = this.userInfo.channelId;
+    }
+
+    //判断是超级管理员吗
+  
+
+ 
+    if (!this.userInfo) {
+      //如果用户信息不存在跳转登陆页
+      this.$router.push({ path: "/" });
+    }
+    this.searchTarget();
+  },
+  methods: {
+    goBack(){
+        this.$router.go(-1)
+    },
+    //格式化状态
+    formatterIsDelete(row) {
+      if ((row.isDelete == "0")) {
+        return "正常";
+      } else if ((row.isDelete == "1")) {
+        return "已删除";
+      }else{
+        return ''
+      }
+    },
+    //格式化状态
+    formatterState(row) {
+      if (row.state == "1") {
+        return "签约";
+      } else if (row.state == "0") {
+        return "解约";
+      } else {
+        return "";
+      }
+    },
+    formatterDelete(row) {
+      if (row.isDelete == 0) {
+        return "正常";
+      } else {
+        return "已删除";
+      }
+    },
+    resetUser(index, val) {
+      console.log(val);
+      this.$http.get(`/user/reset/${val.id}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.$message.success("重置成功");
+          this.searchTarget();
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+      //重置密码
+    },
+    editUser(row) {
+      this.editRegisterUser(row);
+    },
+    viewUser(row) {
+      this.detailObj = row;
+      this.centerDialogVisible = true;
+    },
+    addUser() {
+      this.addRegisterUser(true);
+    },
+    clearSearch() {
+      this.name = "";
+      this.userName = "";
+      this.searchTarget();
+    },
+    formatterRole(val) {
+      if (val.type == "1") {
+        return "超级管理员";
+      } else {
+        return "渠道用户";
+      }
+    },
+
+    forma(val) {
+      if (val.gender == "0") {
+        return "男";
+      } else {
+        return "女";
+      }
+    },
+    addRegisterUser(val) {
+      this.$refs.register.open(val);
+    },
+    editRegisterUser(val) {
+      this.$refs.register.edit(val);
+    },
+    deleteStaff(index, row) {
+      this.$http.delete(`/staff/delete/${row.id}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.$message.success("删除成功");
+          this.searchTarget();
+        } else {
+          this.$message.error("删除失败");
+        }
+      });
+    },
+
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    //根据现有情况进行搜索
+    searchList() {
+      //  let url =``
+      this.$http.post(
+        `/staff/find`,
+        {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          channelId: this.channel,
+          // name: this.name,
+          // isDelete: 0,
+        },
+        (res) => {
+          // console.log(res,'用户测试记录')
+          if (res && res.code == 200) {
+            this.tableData = res.data.content;
+            this.total = res.data.totalElements;
+          } else {
+            // this.$toast.fail(res.msg);
+            this.$message.error(res.msg);
+          }
+        }
+      );
+    },
+    searchTarget() {
+      this.pageNum = 1;
+      this.searchList();
+    },
+    //跳转首页
+    goHome() {
+      this.$router.push({ path: "/home" });
+    },
+    //跳转记录页
+    goRecord() {
+      this.$router.push({ path: "/record" });
+    },
+    //退出登陆
+    logout() {
+      oSessionStorage.removeItem("userInfo");
+      oSessionStorage.removeItem("token");
+      this.$router.push({ path: "/" });
+    },
+    //点击日历获取日期
+    getDate(param) {
+      // console.log(param,"日期。。。")
+      this.userRecord(param.dateStr);
+    },
+    //点击获取月出勤次数
+    getTimes(param) {
+      this.monthTimes = param;
+    },
+    // 用户测试记录显示
+    userRecord(date) {
+      this.$http.get(
+        `gameRecord/findListByUserIdAndDate/${this.userId}/${date}`,
+        {},
+        (res) => {
+          // console.log(res,'用户测试记录')
+          if (res && res.code == 200) {
+            this.listData = res.data;
+          } else {
+            this.$toast.fail(res.msg);
+          }
+        }
+      );
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import "../../../styles/theme.less";
+
+.record-warp {
+  width: 100%;
+  height: 80vh;
+  //background: url(../../assets/img/index/19.png) no-repeat center;
+  //background-size: 100% 100%;
+  position: relative;
+
+  .record-main {
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    overflow-y: auto;
+
+    .search-head {
+      width: 100%;
+      display: flex;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: center;
+
+      .zc-title {
+        color: #606266;
+        font-size: 14px;
+      }
+    }
+
+    .table-content {
+      margin: 10px 0;
+    }
+  }
+}
+
+.add_user_class {
+  margin-top: 10px;
+  display: flex;
+}
+
+.user_out {
+  display: flex;
+  width: 100%;
+  align-items: center;
+  border: 1px solid #eeeeef;
+  line-height: 50px;
+  margin-top: 10px;
+}
+
+.user_out_sub {
+  flex: 1;
+  background-color: #fafafa;
+  text-align: center;
+  // color:#ffffff
+}
+
+.user_out_subNext {
+  padding-left: 10px;
+  flex: 3;
+}
+</style>

+ 1 - 12
src/views/manage/channelInfo/recordList.vue

@@ -241,18 +241,7 @@ export default {
     } else if (this.userInfo.type == "0") {
       this.channel = this.userInfo.channelId;
     }
-    this.invitationCode = this.userInfo.invitationCode;
-
-    //判断是超级管理员吗
-    if (this.userInfo.roleType == "1") {
-      this.type = 0;
-    } else if (this.userInfo.roleType == "3") {
-      //如果登录的是代理用户
-      this.type = 4;
-    } else if (this.userInfo.roleType == "2") {
-      this.type = 5;
-    }
-
+   
     if (!this.userInfo) {
       //如果用户信息不存在跳转登陆页
       this.$router.push({ path: "/" });

+ 11 - 0
src/views/manage/channelManagement/contract.vue

@@ -107,6 +107,13 @@
                 @click="viewPoster(scope.row)"
                 >查看海报</el-button
               >
+              <el-button
+                type="text"
+                size="small"
+                v-if="scope.row.state != 0"
+                @click="editHomeFun(scope.row)"
+                >编辑首页</el-button
+              >
               <el-button
                 type="text"
                 size="small"
@@ -332,6 +339,10 @@ export default {
     this.searchTarget();
   },
   methods: {
+    //编辑首页
+    editHomeFun(row){
+      this.$router.push({path:'/manage/editHomePage',query:{id:row.id}})
+    },
     //充值次数
     topUpCount(row){
         // console.log(this.$refs.topUp)

+ 456 - 0
src/views/manage/channelManagement/editHomePage.vue

@@ -0,0 +1,456 @@
+<template>
+  <div class="record-warp">
+    <div class="record-main">
+      <el-row>
+        <!-- <el-col :span="24">
+            <div class="search-head">
+              <span>公司名称:</span>
+              <el-input v-model="name" clearable placeholder="请输入公司名称"></el-input>&nbsp;&nbsp;&nbsp;&nbsp;
+              <el-button type="primary" icon="el-icon-search" @click="searchTarget">搜索</el-button>
+              <el-button type="primary" icon="el-icon-delete-solid" @click="clearSearch">清空</el-button>
+            </div>
+          </el-col> -->
+      </el-row>
+      <el-row class="add_user_class">
+        <el-col :span="24">
+          <div class="search-head">
+            <el-button type="primary" round icon="el-icon-plus" @click="addUser"
+              >新增</el-button
+            >
+            <el-button type="primary" round icon="el-icon-back" @click="goBack"
+              >返回</el-button
+            >
+          </div>
+        </el-col>
+      </el-row>
+
+      <div class="table-content">
+        <el-table
+          :data="tableData"
+          :row-style="{ height: '0px' }"
+          :cell-style="{ padding: '5px' }"
+        >
+          <!-- <el-table-column prop="name" label="姓名" align="center" width=""  show-overflow-tooltip>
+              </el-table-column> -->
+          <el-table-column prop="name" label="报告来源" align="center" width="">
+          
+          </el-table-column>
+          <el-table-column prop="name" label="公司名" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="description" label="是否展示详细信息" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="job" label="公司英文名" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="mail" label="网址" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="phone" label="邮箱" align="center" width="">
+          </el-table-column>
+
+          <el-table-column
+            prop="state"
+            label="是否展示尾页二维码"
+            align="center"
+            :formatter="formatterState"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column
+            prop="state"
+            label="是否展示尾页公司名称及地址"
+            align="center"
+            :formatter="formatterState"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column prop="phone" label="尾页公司名" align="center" width="">
+        </el-table-column>
+        <el-table-column prop="phone" label="尾页公司地址" align="center" width="">
+        </el-table-column>
+          <!-- <el-table-column
+              prop="isDelete"
+              label="删除状态"
+              align="center"
+              :formatter="formatterIsDelete"
+              width=""
+            >
+            </el-table-column> -->
+          <!-- <el-table-column prop="isDelete" label="删除状态" align="center" :formatter="formatterDelete" width="">
+                      </el-table-column> -->
+          <el-table-column label="操作" width="200px" align="center" fixed="right">
+            <template slot-scope="scope">
+              <el-button @click="viewUser(scope.row)" type="text" size="small"
+                >查看</el-button
+              >
+              <el-button type="text" size="small" @click="editUser(scope.row)"
+                >编辑</el-button
+              >
+
+              <el-popconfirm
+                title="确定删除吗?"
+                placement="top"
+                @confirm="deleteStaff(scope.$index, scope.row)"
+              >
+                <el-button
+                  size="small"
+                  style="margin-left: 10px"
+                  type="text"
+                  slot="reference"
+                  >删除</el-button
+                >
+              </el-popconfirm>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
+      <el-pagination
+        small
+        background
+        @current-change="handleCurrentChange"
+        :current-page.sync="pageNum"
+        layout="total, prev, pager, next"
+        :page-size="pageSize"
+        :total="total"
+      >
+      </el-pagination>
+      <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
+          </el-pagination> -->
+    </div>
+    <EditHomeRegister ref="register" @search="searchTarget" />
+    <el-dialog title="查看" :visible.sync="centerDialogVisible" width="60%" center>
+      <div>
+        <el-row>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub" style="height: 200px">头像</div>
+              <div class="user_out_subNext">
+                <el-image :src="detailObj.avatar" style="width: 150px; height: 150px" />
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub" style="height: 200px">姓名</div>
+              <div class="user_out_subNext" style="height: 200px">
+                {{ detailObj.name }}
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">个人描述</div>
+              <div class="user_out_subNext">
+                {{ detailObj.description }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">岗位</div>
+              <div class="user_out_subNext">
+                {{ detailObj.job }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">邮箱</div>
+              <div class="user_out_subNext">
+                {{ detailObj.mail }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">手机号</div>
+              <div class="user_out_subNext">
+                {{ detailObj.phone }}
+              </div>
+            </div>
+          </el-col>
+
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">状态</div>
+              <div class="user_out_subNext">
+                {{ detailObj.state == "1" ? "签约" : "解约" }}
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { oSessionStorage } from "../../../utils/utils";
+import editHomeRegister from "../../../components/EditHomeRegister.vue";
+export default {
+  name: "channelManagement",
+  components: {
+    EditHomeRegister: editHomeRegister,
+  },
+  data() {
+    return {
+      centerDialogVisible: false,
+      editUserFlag: false,
+      startTime: "",
+      endTime: "",
+      value1: null,
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      keyword: "",
+      tableData: [],
+      userInfo: {}, //用户信息
+      userId: "", //用户id
+      name: "", //根据名称搜索
+      userName: "", //根据昵称搜索
+      hospitalOrDepartment: "", //医院科室
+
+      invitationCode: "",
+      roleType: "0",
+      type: 0,
+
+      detailObj: {},
+    };
+  },
+  created() {},
+  mounted() {
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+    if (!this.userInfo) {
+      //如果用户信息不存在跳转登陆页
+      this.$router.push({ path: "/" });
+    }
+    this.searchTarget();
+  },
+  methods: {
+    goBack() {
+      this.$router.go(-1);
+    },
+    //格式化状态
+    formatterIsDelete(row) {
+      if (row.isDelete == "0") {
+        return "正常";
+      } else if (row.isDelete == "1") {
+        return "已删除";
+      } else {
+        return "";
+      }
+    },
+    //格式化状态
+    formatterState(row) {
+      if (row.state == "1") {
+        return "签约";
+      } else if (row.state == "0") {
+        return "解约";
+      } else {
+        return "";
+      }
+    },
+    formatterDelete(row) {
+      if (row.isDelete == 0) {
+        return "正常";
+      } else {
+        return "已删除";
+      }
+    },
+    resetUser(index, val) {
+      console.log(val);
+      this.$http.get(`/user/reset/${val.id}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.$message.success("重置成功");
+          this.searchTarget();
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+      //重置密码
+    },
+    editUser(row) {
+      this.editRegisterUser(row);
+    },
+    viewUser(row) {
+      this.detailObj = row;
+      this.centerDialogVisible = true;
+    },
+    addUser() {
+      this.addRegisterUser(true);
+    },
+    clearSearch() {
+      this.name = "";
+      this.userName = "";
+      this.searchTarget();
+    },
+    formatterRole(val) {
+      if (val.type == "1") {
+        return "超级管理员";
+      } else {
+        return "渠道用户";
+      }
+    },
+
+    forma(val) {
+      if (val.gender == "0") {
+        return "男";
+      } else {
+        return "女";
+      }
+    },
+    addRegisterUser(val) {
+      this.$refs.register.open(val);
+    },
+    editRegisterUser(val) {
+      this.$refs.register.edit(val);
+    },
+    deleteStaff(index, row) {
+      this.$http.delete(`/staff/delete/${row.id}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.$message.success("删除成功");
+          this.searchTarget();
+        } else {
+          this.$message.error("删除失败");
+        }
+      });
+    },
+
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    //根据现有情况进行搜索
+    searchList() {
+      //  let url =``
+      this.$http.post(
+        `/staff/find`,
+        {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          
+          // name: this.name,
+          // isDelete: 0,
+        },
+        (res) => {
+          // console.log(res,'用户测试记录')
+          if (res && res.code == 200) {
+            this.tableData = res.data.content;
+            this.total = res.data.totalElements;
+          } else {
+            // this.$toast.fail(res.msg);
+            this.$message.error(res.msg);
+          }
+        }
+      );
+    },
+    searchTarget() {
+      this.pageNum = 1;
+      this.searchList();
+    },
+    //跳转首页
+    goHome() {
+      this.$router.push({ path: "/home" });
+    },
+    //跳转记录页
+    goRecord() {
+      this.$router.push({ path: "/record" });
+    },
+    //退出登陆
+    logout() {
+      oSessionStorage.removeItem("userInfo");
+      oSessionStorage.removeItem("token");
+      this.$router.push({ path: "/" });
+    },
+    //点击日历获取日期
+    getDate(param) {
+      // console.log(param,"日期。。。")
+      this.userRecord(param.dateStr);
+    },
+    //点击获取月出勤次数
+    getTimes(param) {
+      this.monthTimes = param;
+    },
+    // 用户测试记录显示
+    userRecord(date) {
+      this.$http.get(
+        `gameRecord/findListByUserIdAndDate/${this.userId}/${date}`,
+        {},
+        (res) => {
+          // console.log(res,'用户测试记录')
+          if (res && res.code == 200) {
+            this.listData = res.data;
+          } else {
+            this.$toast.fail(res.msg);
+          }
+        }
+      );
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import "../../../styles/theme.less";
+
+.record-warp {
+  width: 100%;
+  height: 80vh;
+  //background: url(../../assets/img/index/19.png) no-repeat center;
+  //background-size: 100% 100%;
+  position: relative;
+
+  .record-main {
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    overflow-y: auto;
+
+    .search-head {
+      width: 100%;
+      display: flex;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: center;
+
+      .zc-title {
+        color: #606266;
+        font-size: 14px;
+      }
+    }
+
+    .table-content {
+      margin: 10px 0;
+    }
+  }
+}
+
+.add_user_class {
+  margin-top: 10px;
+  display: flex;
+}
+
+.user_out {
+  display: flex;
+  width: 100%;
+  align-items: center;
+  border: 1px solid #eeeeef;
+  line-height: 50px;
+  margin-top: 10px;
+}
+
+.user_out_sub {
+  flex: 1;
+  background-color: #fafafa;
+  text-align: center;
+  // color:#ffffff
+}
+
+.user_out_subNext {
+  padding-left: 10px;
+  flex: 3;
+}
+</style>

+ 3 - 0
src/views/manage/dapin.vue

@@ -0,0 +1,3 @@
+<template>
+    <div>大屏</div>
+</template>

+ 30 - 18
src/views/manage/manageMain.vue

@@ -278,8 +278,16 @@ export default {
               path: "/manage/recordListAll",
               showItem: true,
             },
+            {
+              id: "05",
+              name: "员工管理",
+              icon: "el-icon-user-solid",
+              parentName: "渠道信息",
+              path: "/manage/channelUserManage",
+              showItem: true,
+            },
           ],
-        },
+        },//channelUserManage
         {
           id: "1",
           name: "渠道管理",
@@ -349,6 +357,7 @@ export default {
               id: "31",
               name: "用户订单",
               icon: "el-icon-user-solid",
+              parentName: "订单管理",
               path: "/manage/userOrder",
               showItem: true,
             },
@@ -364,7 +373,8 @@ export default {
               id: "33",
               name: "订单结算",
               icon: "el-icon-user-solid",
-              path: "/manage/agencyUserManage",
+              parentName: "订单管理",
+              path: "/manage/orderSettlementManage",
               showItem: true,
             },
           ],
@@ -442,22 +452,22 @@ export default {
             },
           ],
         },
-        {
-          id: "6",
-          name: "数据大屏",
-          icon: "el-icon-s-order",
-          // path: "/manage/gameRecord",
-          showItem: true,
-          child: [
-            {
-              id: "61",
-              name: "大屏",
-              icon: "el-icon-user-solid",
-              path: "/manage/agencyUserManage",
-              showItem: true,
-            },
-          ],
-        },
+        // {
+        //   id: "6",
+        //   name: "数据大屏",
+        //   icon: "el-icon-s-order",
+        //   // path: "/manage/gameRecord",
+        //   showItem: true,
+        //   child: [
+        //     {
+        //       id: "61",
+        //       name: "大屏",
+        //       icon: "el-icon-user-solid",
+        //       path: "/manage/agencyUserManage",
+        //       showItem: true,
+        //     },
+        //   ],
+        // },
       ],
       //面包屑页签
       crumbParent: "首页",
@@ -494,6 +504,8 @@ export default {
           if (
             this.menuList[i].id == "5" ||
             this.menuList[i].id == "6" ||
+            this.menuList[i].id == "2" ||
+            this.menuList[i].id == "3" ||
             this.menuList[i].id == "1"
           ) {
             this.menuList[i].showItem = false;

+ 4 - 4
src/views/manage/orderManage/orderInvite.vue

@@ -250,7 +250,7 @@ export default {
       channel: "",
       channelList: [{ name: "渠道天成", id: "1" }],
       staffId: "",
-      userList: [{ name: "老三", id: "1" }],
+      userList: [],
     };
   },
   created() {},
@@ -275,7 +275,7 @@ export default {
   methods: {
     //渠道发生变化
     changeChannel() {
-        debugger;
+      debugger;
       this.getUserInfo();
       this.searchTarget();
     },
@@ -371,8 +371,8 @@ export default {
     },
     clearSearch() {
       this.channel = "";
-      this.staffId='';
-      this.userList=[]
+      this.staffId = "";
+      this.userList = [];
       this.searchTarget();
     },
     formatterRole(val) {

+ 522 - 0
src/views/manage/orderManage/orderSettlementManage.vue

@@ -0,0 +1,522 @@
+<template>
+  <div class="record-warp">
+    <div>正确认结算流程,正在努力开发</div>
+    <div class="record-main" v-show="false">
+        <el-row>
+        <el-col :span="24">
+          <div class="search-head">
+            <span>渠道:</span>
+            <el-select @change="changeChannel" v-model="channel" placeholder="请选择渠道">
+              <el-option
+                :label="item.name"
+                :value="item.id"
+                v-for="item in channelList"
+                :key="item.id"
+              ></el-option> </el-select
+            >&nbsp;&nbsp;&nbsp;&nbsp;
+            <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
+              >搜索</el-button
+            >
+            <el-button type="info" round icon="el-icon-delete-solid" @click="clearSearch"
+              >清空</el-button
+            >
+            <!-- <el-button type="info" round icon="el-icon-search" @click="searchTarget"
+              >结清</el-button
+            > -->
+          </div>
+        </el-col>
+      </el-row>
+      <div class="table-content">
+        <el-table
+          :data="tableData"
+          :row-style="{ height: '0px' }"
+          :cell-style="{ padding: '5px' }"
+        >
+          <el-table-column prop="channelId" label="渠道Id" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="title" label="标题" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="amount" label="金额" align="center" width="">
+          </el-table-column>
+          <el-table-column
+            prop="status"
+            label="状态"
+            align="center"
+            width=""
+            :formatter="formatterOrder"
+          >
+          </el-table-column>
+          <el-table-column prop="effectiveDate" label="类型" align="center" width="">
+          </el-table-column>
+          <el-table-column
+            prop="expirationDate"
+            label="订单日期起"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column
+            prop="expirationDate"
+            label="订单日期止"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+
+          <el-table-column prop="createDate" label="创建时间" align="center" width="">
+          </el-table-column>
+
+        </el-table>
+      </div>
+
+      <el-pagination
+        small
+        background
+        @current-change="handleCurrentChange"
+        :current-page.sync="pageNum"
+        layout="total, prev, pager, next"
+        :page-size="pageSize"
+        :total="total"
+      >
+      </el-pagination>
+      <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
+              </el-pagination> -->
+    </div>
+    <ContractChannelRegister ref="register" @search="searchTarget" />
+    <ContractPoster ref="poster" @search="searchTarget" />
+    <ContractTopUp ref="topUp" @search="searchTarget" />
+
+    <el-dialog title="查看" :visible.sync="centerDialogVisible" width="60%" center>
+      <div>
+        <el-row>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">已使用次数</div>
+              <div class="user_out_subNext">
+                {{ detailObj.used }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">单次价格</div>
+              <div class="user_out_subNext">
+                {{ detailObj.singlePrice }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">充值使用次数</div>
+              <div class="user_out_subNext">
+                {{ detailObj.rechargeUsed }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">剩余次数</div>
+              <div class="user_out_subNext">
+                {{ detailObj.unuse }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">累计充值次数</div>
+              <div class="user_out_subNext">
+                {{ detailObj.rechargeCount }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">签约单次金额</div>
+              <div class="user_out_subNext">
+                {{ detailObj.signAmount }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">有效时间起</div>
+              <div class="user_out_subNext">
+                {{ detailObj.effectiveDate }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">有效时间止</div>
+              <div class="user_out_subNext">
+                {{ detailObj.expirationDate }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">状态</div>
+              <div class="user_out_subNext">
+                {{ detailObj.status == "1" ? "签约" : "解约" }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">备注</div>
+              <div class="user_out_subNext">
+                {{ detailObj.remarks }}
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub" style="height: 200px">海报背景图</div>
+              <div class="user_out_subNext">
+                <el-image
+                  :src="detailObj.background"
+                  style="width: 150px; height: 150px"
+                />
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { oSessionStorage } from "../../../utils/utils";
+import contractChannelRegister from "../../../components/ContractChannelRegister.vue";
+
+import contractPoster from "../../../components/ContractPoster.vue";
+import contractTopUp from "../../../components/ContractTopUp.vue";
+export default {
+  name: "channelManagement",
+  components: {
+    ContractChannelRegister: contractChannelRegister,
+    ContractPoster: contractPoster,
+  },
+  data() {
+    return {
+      centerDialogVisible: false,
+      editUserFlag: false,
+      startTime: "",
+      endTime: "",
+      value1: null,
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      keyword: "",
+      tableData: [],
+      userInfo: {}, //用户信息
+      userId: "", //用户id
+      name: "", //根据名称搜索
+      userName: "", //根据昵称搜索
+      hospitalOrDepartment: "", //医院科室
+
+      invitationCode: "",
+      roleType: "0",
+      type: 0,
+      view: {
+        name: "",
+        userName: "",
+        channelId: "",
+        role: "",
+      },
+      detailObj: {},
+      channel: "",
+      channelList: [{ name: "渠道天成", id: "1" }],
+    };
+  },
+  created() {},
+  mounted() {
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+    console.log(this.userInfo);
+
+    if (this.userInfo.type == "1") {
+      this.channel = "";
+    } else if (this.userInfo.type == "0") {
+      this.channel = this.userInfo.channelId;
+    }
+    // this.invitationCode = this.userInfo.invitationCode;
+    this.getChannel();
+    //判断是超级管理员吗
+    // if (this.userInfo.roleType == "1") {
+    //   this.type = 0;
+    // } else if (this.userInfo.roleType == "3") {
+    //   //如果登录的是代理用户
+    //   this.type = 4;
+    // } else if (this.userInfo.roleType == "2") {
+    //   this.type = 5;
+    // }
+
+    // if (this.$route.query.invitationCode) {
+    //   this.invitationCode = this.$route.query.invitationCode;
+    //   this.type = this.$route.query.type;
+    // }
+    if (!this.userInfo) {
+      //如果用户信息不存在跳转登陆页
+      this.$router.push({ path: "/" });
+    }
+    this.searchTarget();
+  },
+  methods: {
+    formatterOrder(row) {
+      if (row.status == "1") {
+        return "已结算";
+      } else {
+        return "待结算";
+      }
+    },
+    //充值次数
+    topUpCount(row) {
+      // console.log(this.$refs.topUp)
+      this.$refs.topUp.open(row.id);
+    },
+    //查看海报
+    viewPoster(row) {
+      this.$refs.poster.open(row);
+    },
+    //格式化自定义首尾页
+    formatterSelfPage(row) {
+      if (row.selfPage == "0") {
+        return "否";
+      } else {
+        return "是";
+      }
+    },
+    //获取渠道信息
+    getChannel() {
+      this.$http.get(`/channel/findAll`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          //将值赋值给list
+          this.channelList = res.data;
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    //员工管理
+    userManage(row) {
+      this.$router.push({ path: "/manage/staff", query: { channelId: row.id } });
+    },
+    //格式化状态
+    formatterStatus(row) {
+      if (row.status == "1") {
+        return "签约";
+      } else if (row.status == "0") {
+        return "解约";
+      } else {
+        return "";
+      }
+    },
+    formatterDelete(row) {
+      if (row.isDelete == 0) {
+        return "正常";
+      } else {
+        return "已删除";
+      }
+    },
+    resetUser(index, val) {
+      console.log(val);
+      this.$http.get(`/user/reset/${val.id}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.$message.success("重置成功");
+          this.searchTarget();
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+      //重置密码
+    },
+    editUser(row) {
+      this.editRegisterUser(row);
+    },
+    viewUser(row) {
+      this.detailObj = row;
+      this.centerDialogVisible = true;
+    },
+    addUser() {
+      this.addRegisterUser(true);
+    },
+    clearSearch() {
+      this.channel = "";
+      this.searchTarget();
+    },
+    formatterRole(val) {
+      if (val.type == "1") {
+        return "超级管理员";
+      } else {
+        return "渠道用户";
+      }
+    },
+
+    forma(val) {
+      if (val.gender == "0") {
+        return "男";
+      } else {
+        return "女";
+      }
+    },
+    addRegisterUser(val) {
+      this.$refs.register.open(val);
+    },
+    editRegisterUser(val) {
+      this.$refs.register.edit(val);
+    },
+    deleteChannel(index, row) {
+      this.$http.delete(`/sign/delete/${row.id}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.$message.success("删除成功");
+          this.searchTarget();
+        } else {
+          this.$message.error("删除失败");
+        }
+      });
+    },
+
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    //根据现有情况进行搜索
+    searchList() {
+      //  let url =``
+      let data = {};
+      if (this.channel == "" || this.channel == null) {
+        data = {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+        };
+      } else {
+        data = {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          channelId: this.channel,
+        };
+      }
+      this.$http.post(`/order/find`, data, (res) => {
+        debugger;
+        // console.log(res,'用户测试记录')
+        if (res && res.code == 200) {
+          this.tableData = res.data.content;
+          this.total = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    searchTarget() {
+      this.pageNum = 1;
+      this.searchList();
+    },
+    //跳转首页
+    goHome() {
+      this.$router.push({ path: "/home" });
+    },
+    //跳转记录页
+    goRecord() {
+      this.$router.push({ path: "/record" });
+    },
+    //退出登陆
+    logout() {
+      oSessionStorage.removeItem("userInfo");
+      oSessionStorage.removeItem("token");
+      this.$router.push({ path: "/" });
+    },
+    //点击日历获取日期
+    getDate(param) {
+      // console.log(param,"日期。。。")
+      this.userRecord(param.dateStr);
+    },
+    //点击获取月出勤次数
+    getTimes(param) {
+      this.monthTimes = param;
+    },
+    // 用户测试记录显示
+    userRecord(date) {
+      this.$http.get(
+        `gameRecord/findListByUserIdAndDate/${this.userId}/${date}`,
+        {},
+        (res) => {
+          // console.log(res,'用户测试记录')
+          if (res && res.code == 200) {
+            this.listData = res.data;
+          } else {
+            this.$toast.fail(res.msg);
+          }
+        }
+      );
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import "../../../styles/theme.less";
+
+.record-warp {
+  width: 100%;
+  height: 80vh;
+  //background: url(../../assets/img/index/19.png) no-repeat center;
+  //background-size: 100% 100%;
+  position: relative;
+
+  .record-main {
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    overflow-y: auto;
+
+    .search-head {
+      width: 100%;
+      display: flex;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: center;
+
+      .zc-title {
+        color: #606266;
+        font-size: 14px;
+      }
+    }
+
+    .table-content {
+      margin: 10px 0;
+    }
+  }
+}
+
+.add_user_class {
+  margin-top: 10px;
+}
+
+.user_out {
+  display: flex;
+  width: 100%;
+  align-items: center;
+  border: 1px solid #eeeeef;
+  line-height: 50px;
+  margin-top: 10px;
+}
+
+.user_out_sub {
+  flex: 1;
+  background-color: #fafafa;
+  text-align: center;
+  // color:#ffffff
+}
+
+.user_out_subNext {
+  padding-left: 10px;
+  flex: 3;
+}
+</style>

+ 627 - 0
src/views/manage/orderManage/userOrder.vue

@@ -0,0 +1,627 @@
+<template>
+  <div class="record-warp">
+    <div class="record-main">
+      <div class="search-head">
+        <span class="margin_search">支付状态:</span>
+        <el-select class="margin_search" v-model="payStatus" placeholder="请选择状态">
+          <el-option
+            :label="item.name"
+            :value="item.id"
+            v-for="item in payList"
+            :key="item.id"
+          ></el-option> </el-select
+        >&nbsp;&nbsp;&nbsp;&nbsp;
+        <span class="margin_search">渠道结清状态:</span>
+        <el-select class="margin_search" v-model="status" placeholder="请选择结清状态">
+          <el-option
+            :label="item.name"
+            :value="item.id"
+            v-for="item in statusList"
+            :key="item.id"
+          ></el-option> </el-select
+        >&nbsp;&nbsp;&nbsp;&nbsp;
+        <span class="margin_search">渠道:</span>
+        <el-select class="margin_search" v-model="channel" placeholder="请选择渠道">
+          <el-option
+            :label="item.name"
+            :value="item.id"
+            v-for="item in channelList"
+            :key="item.id"
+          ></el-option> </el-select
+        >&nbsp;&nbsp;&nbsp;&nbsp;
+        <span class="margin_search">类型:</span>
+        <el-select class="margin_search" v-model="orderType" placeholder="请选择类型">
+          <el-option
+            :label="item.name"
+            :value="item.id"
+            v-for="item in orderList"
+            :key="item.id"
+          ></el-option> </el-select
+        >&nbsp;&nbsp;&nbsp;&nbsp;
+        <el-button
+          type="primary"
+          class="margin_search"
+          round
+          icon="el-icon-search"
+          @click="searchTarget"
+          >搜索</el-button
+        >
+        <el-button
+          type="info"
+          class="margin_search"
+          round
+          icon="el-icon-delete-solid"
+          @click="clearSearch"
+          >清空</el-button
+        >
+        <!-- <el-button type="success" class="add_class" round icon="el-icon-plus" @click="addUser"
+                >新增</el-button
+              > -->
+      </div>
+
+      <div class="table-content">
+        <el-table
+          :data="tableData"
+          :row-style="{ height: '0px' }"
+          :cell-style="{ padding: '5px' }"
+        >
+          <!-- <el-table-column prop="channelName" label="渠道" align="center" width="">
+                </el-table-column> -->
+          <el-table-column prop="orderNo" label="订单号" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="amount" label="金额" align="center" width="">
+          </el-table-column>
+          <el-table-column
+            prop="payStatus"
+            label="支付状态"
+            align="center"
+            width=""
+            :formatter="formatterPay"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="status"
+            label="渠道结清状态"
+            align="center"
+            width=""
+            :formatter="formatterStatus"
+          >
+          </el-table-column>
+
+          <el-table-column
+            prop="type"
+            label="类型"
+            align="center"
+            width=""
+            :formatter="formatterType"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="effectiveDate"
+            label="订单起始日期"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column
+            prop="expirationDate"
+            label="订单截至日期"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+          <!-- <el-table-column
+                  prop="selfPage"
+                  label="自定义首尾页"
+                  align="center"
+                  :formatter="formatterSelfPage"
+                  width=""
+                >
+                </el-table-column> -->
+          <!-- <el-table-column prop="isDelete" label="删除状态" align="center" :formatter="formatterDelete" width="">
+                            </el-table-column> -->
+          <el-table-column label="操作" width="200px" align="center" fixed="right">
+            <template slot-scope="scope">
+              <el-button
+                @click="viewUser(scope.row)"
+                v-if="scope.row.state != 0"
+                type="text"
+                size="small"
+                >查看</el-button
+              >
+              <!-- <el-button
+                    type="text"
+                    size="small"
+                    v-if="scope.row.state != 0"
+                    @click="editUser(scope.row)"
+                    >编辑</el-button
+                  >
+                  <el-button
+                    type="text"
+                    size="small"
+                    v-if="scope.row.state != 0"
+                    @click="viewPoster(scope.row)"
+                    >查看海报</el-button
+                  > -->
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
+      <el-pagination
+        small
+        background
+        @current-change="handleCurrentChange"
+        :current-page.sync="pageNum"
+        layout="total, prev, pager, next"
+        :page-size="pageSize"
+        :total="total"
+      >
+      </el-pagination>
+      <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
+                </el-pagination> -->
+    </div>
+    <ContractChannelRegister ref="register" @search="searchTarget" />
+    <ContractPoster ref="poster" @search="searchTarget" />
+    <ContractTopUp ref="topUp" @search="searchTarget" />
+
+    <el-dialog title="查看" :visible.sync="centerDialogVisible" width="60%" center>
+      <div>
+        <el-row>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">订单号</div>
+              <div class="user_out_subNext">
+                {{ detailObj.orderNo }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">金额</div>
+              <div class="user_out_subNext">
+                {{ detailObj.amount }}
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">支付状态</div>
+              <div class="user_out_subNext">
+                <span v-if="detailObj.payStatus == '0'"> 未支付 </span>
+                <span v-else-if="(detailObj.payStatus = '1')"> 已支付 </span>
+                <span v-else-if="(detailObj.payStatus = '2')"> 支付失败 </span>
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">渠道结清状态</div>
+              <div class="user_out_subNext">
+                <span v-if="detailObj.status == '1'"> 已结算 </span>
+                <span v-else-if="detailObj.status == '0'"> 待结算 </span>
+
+                <span> </span>
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">类型</div>
+              <div class="user_out_subNext">
+                <!-- {{ detailObj.type }} -->
+                <span v-if="detailObj.type == '1'">
+                    次卡支付
+                </span>
+                <span v-else-if="detailObj.type == '2'">
+                    时效卡支付
+                </span>
+                <span v-else-if="detailObj.type == '3'">
+                    渠道推荐支付
+                </span>
+              </div>
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">下单时间</div>
+              <div class="user_out_subNext">
+                {{ detailObj.effectiveDate }}
+              </div>
+            </div>
+          </el-col>
+
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <div class="user_out">
+              <div class="user_out_sub">支付时间</div>
+              <div class="user_out_subNext">
+                {{ detailObj.expirationDate}}
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { oSessionStorage } from "../../../utils/utils";
+import contractChannelRegister from "../../../components/ContractChannelRegister.vue";
+
+import contractPoster from "../../../components/ContractPoster.vue";
+import contractTopUp from "../../../components/ContractTopUp.vue";
+export default {
+  name: "channelManagement",
+  components: {
+    ContractChannelRegister: contractChannelRegister,
+    ContractPoster: contractPoster,
+  },
+  data() {
+    return {
+      centerDialogVisible: false,
+      editUserFlag: false,
+      startTime: "",
+      endTime: "",
+      value1: null,
+      total: 0,
+      pageSize: 10,
+      pageNum: 1,
+      keyword: "",
+      tableData: [],
+      userInfo: {}, //用户信息
+      userId: "", //用户id
+      name: "", //根据名称搜索
+      userName: "", //根据昵称搜索
+      hospitalOrDepartment: "", //医院科室
+
+      invitationCode: "",
+      roleType: "0",
+      type: 0,
+      view: {
+        name: "",
+        userName: "",
+        channelId: "",
+        role: "",
+      },
+      detailObj: {},
+      channel: "",
+      channelList: [{ name: "渠道天成", id: "1" }],
+      payStatus: "",
+      payList: [
+        { name: "未支付", id: "0" },
+        { name: "已支付", id: "1" },
+        { name: "支付失败", id: "-1" },
+      ],
+      status: "",
+      statusList: [
+        { name: "已结算", id: "1" },
+        { name: "待结算", id: "0" },
+      ],
+      orderType: "",
+      orderList: [
+        { name: "次卡支付", id: "0" },
+        { name: "时效卡支付", id: "1" },
+        { name: "渠道推荐支付", id: "2" },
+      ],
+    };
+  },
+  created() {},
+  mounted() {
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+    console.log(this.userInfo);
+
+    // if (this.userInfo.type == "1") {
+    //   this.channel = "";
+    // } else if (this.userInfo.type == "0") {
+    //   this.channel = this.userInfo.channelId;
+    // }
+    // this.invitationCode = this.userInfo.invitationCode;
+    this.getChannel();
+
+    if (!this.userInfo) {
+      //如果用户信息不存在跳转登陆页
+      this.$router.push({ path: "/" });
+    }
+    this.searchTarget();
+  },
+  methods: {
+    //格式化类型
+    formatterType(row) {
+      if (row.type == "1") {
+        return "次卡支付";
+      } else if (row.type == "2") {
+        return "时效卡";
+      } else if (row.type == "3") {
+        return "渠道推荐支付";
+      }
+    },
+    //格式化支付
+    formatterPay(row) {
+      if (row.payStatus == "0") {
+        return "未支付";
+      } else if (row.payStatus == "1") {
+        return "已支付";
+      } else if (row.payStatus == "-1") {
+        return "支付失败";
+      }
+    },
+    //渠道发生变化
+    // changeChannel() {
+    //   debugger;
+    //   this.getUserInfo();
+    //   this.searchTarget();
+    // },
+    //查看记录
+    viewRecord(row) {
+      this.$router.push({ path: "/manage/recordList", query: { id: row.id } });
+    },
+    //充值次数
+    topUpCount(row) {
+      // console.log(this.$refs.topUp)
+      this.$refs.topUp.open(row.id);
+    },
+    //查看海报
+    viewPoster(row) {
+      this.$refs.poster.open(row);
+    },
+    //格式化自定义首尾页
+    formatterSelfPage(row) {
+      if (row.selfPage == "0") {
+        return "否";
+      } else {
+        return "是";
+      }
+    },
+    //获取员工信息
+    getUserInfo() {
+      this.$http.get(`/staff/find/${this.channel}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          debugger;
+          //将值赋值给list
+          this.userList = res.data;
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    //获取渠道信息
+    getChannel() {
+      this.$http.get(`/channel/findAll`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          //将值赋值给list
+          this.channelList = res.data;
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    //员工管理
+    userManage(row) {
+      this.$router.push({ path: "/manage/staff", query: { channelId: row.id } });
+    },
+    //格式化状态
+    formatterStatus(row) {
+      if (row.status == "1") {
+        return "已结算";
+      } else if (row.status == "0") {
+        return "待结算";
+      } else {
+        return "";
+      }
+    },
+    formatterDelete(row) {
+      if (row.isDelete == 0) {
+        return "正常";
+      } else {
+        return "已删除";
+      }
+    },
+    resetUser(index, val) {
+      console.log(val);
+      this.$http.get(`/user/reset/${val.id}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.$message.success("重置成功");
+          this.searchTarget();
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+      //重置密码
+    },
+    editUser(row) {
+      this.editRegisterUser(row);
+    },
+    viewUser(row) {
+      this.detailObj = row;
+      this.centerDialogVisible = true;
+    },
+    addUser() {
+      this.addRegisterUser(true);
+    },
+    clearSearch() {
+      this.channel = "";
+      this.status = "";
+      this.payStatus = "";
+      this.orderType = "";
+      this.searchTarget();
+    },
+    formatterRole(val) {
+      if (val.type == "1") {
+        return "超级管理员";
+      } else {
+        return "渠道用户";
+      }
+    },
+
+    forma(val) {
+      if (val.gender == "0") {
+        return "男";
+      } else {
+        return "女";
+      }
+    },
+    addRegisterUser(val) {
+      this.$refs.register.open(val);
+    },
+    editRegisterUser(val) {
+      this.$refs.register.edit(val);
+    },
+    deleteChannel(index, row) {
+      this.$http.delete(`/sign/delete/${row.id}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.$message.success("删除成功");
+          this.searchTarget();
+        } else {
+          this.$message.error("删除失败");
+        }
+      });
+    },
+
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.searchList();
+    },
+    //根据现有情况进行搜索
+    searchList() {
+      //  let url =``
+      let data = {};
+      //   this.channel = "";
+      //   this.status = "";
+      //   this.payStatus = '';
+      data = {
+        pageNum: this.pageNum,
+        pageSize: this.pageSize,
+        channelId: this.channel,
+        status: this.status,
+        payStatus: this.payStatus,
+        type: this.orderType,
+      };
+
+      this.$http.post(`/order/find`, data, (res) => {
+        console.log(res);
+        // console.log(res,'用户测试记录')
+        if (res && res.code == 200) {
+          this.tableData = res.data.content;
+          console.log(this.tableData);
+          this.total = res.data.totalElements;
+        } else {
+          // this.$toast.fail(res.msg);
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    searchTarget() {
+      this.pageNum = 1;
+      this.searchList();
+    },
+    //跳转首页
+    goHome() {
+      this.$router.push({ path: "/home" });
+    },
+    //跳转记录页
+    goRecord() {
+      this.$router.push({ path: "/record" });
+    },
+    //退出登陆
+    logout() {
+      oSessionStorage.removeItem("userInfo");
+      oSessionStorage.removeItem("token");
+      this.$router.push({ path: "/" });
+    },
+    //点击日历获取日期
+    getDate(param) {
+      // console.log(param,"日期。。。")
+      this.userRecord(param.dateStr);
+    },
+    //点击获取月出勤次数
+    getTimes(param) {
+      this.monthTimes = param;
+    },
+    // 用户测试记录显示
+    userRecord(date) {
+      this.$http.get(
+        `gameRecord/findListByUserIdAndDate/${this.userId}/${date}`,
+        {},
+        (res) => {
+          // console.log(res,'用户测试记录')
+          if (res && res.code == 200) {
+            this.listData = res.data;
+          } else {
+            this.$toast.fail(res.msg);
+          }
+        }
+      );
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import "../../../styles/theme.less";
+
+.record-warp {
+  width: 100%;
+  height: 80vh;
+  //background: url(../../assets/img/index/19.png) no-repeat center;
+  //background-size: 100% 100%;
+  position: relative;
+
+  .record-main {
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    overflow-y: auto;
+
+    .search-head {
+      width: 100%;
+      display: flex;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: center;
+      flex-wrap: wrap;
+      align-content: space-between;
+      .margin_search {
+        margin-bottom: 10px;
+      }
+      .zc-title {
+        color: #606266;
+        font-size: 14px;
+      }
+    }
+
+    .table-content {
+      margin: 10px 0;
+    }
+  }
+}
+
+.add_user_class {
+  margin-top: 10px;
+}
+
+.user_out {
+  display: flex;
+  width: 100%;
+  align-items: center;
+  border: 1px solid #eeeeef;
+  line-height: 50px;
+  margin-top: 10px;
+}
+
+.user_out_sub {
+  flex: 1;
+  background-color: #fafafa;
+  text-align: center;
+  // color:#ffffff
+}
+
+.user_out_subNext {
+  padding-left: 10px;
+  flex: 3;
+}
+</style>

+ 2 - 15
src/views/manage/userManage.vue

@@ -140,21 +140,8 @@ export default {
   created() { },
   mounted() {
     this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
-    this.invitationCode = this.userInfo.invitationCode;
-    //判断是超级管理员吗
-    if (this.userInfo.roleType == "1") {
-      this.type = 0;
-    } else if (this.userInfo.roleType == "3") {
-      //如果登录的是代理用户
-      this.type = 4;
-    } else if (this.userInfo.roleType == "2") {
-      this.type = 5;
-    }
-
-    if (this.$route.query.invitationCode) {
-      this.invitationCode = this.$route.query.invitationCode;
-      this.type = this.$route.query.type;
-    }
+    
+    
     if (!this.userInfo) {
       //如果用户信息不存在跳转登陆页
       this.$router.push({ path: "/" });