Explorar o código

财税报告--和订单管理

plg hai 11 meses
pai
achega
93474bf42e

+ 2 - 2
src/components/PriceRegister.vue

@@ -133,8 +133,8 @@ export default {
       dialogVisible: false,
       //渠道列表
       stateList: [
-        { name: "已停用", state: "1" },
-        { name: "生效中", state: "0" },
+        { name: "生效中", state: "1" },
+        { name: "已停用", state: "0" },
       ],
       //渠道级别
       channelLevelList: [

+ 401 - 0
src/components/ProductRegister.vue

@@ -0,0 +1,401 @@
+<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="productName">
+              <el-input
+                v-model="ruleForm.productName"
+                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="reportName">
+              <el-input
+                v-model="ruleForm.reportName "
+                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="price">
+              <el-input-number
+                v-model="ruleForm.price "
+                class="inputCom"
+                placeholder="请输入价格"
+              ></el-input-number>
+            </el-form-item>
+          </el-col>
+    
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="状态" prop="status">
+              <el-select v-model="ruleForm.status" 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-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="次数" prop="times">
+              <el-input-number
+                v-model="ruleForm.times "
+                class="inputCom"
+                placeholder="请输入次数"
+              ></el-input-number>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="接口类型" prop="type">
+              <el-select v-model="ruleForm.type" placeholder="请选择接口类型">
+                <el-option
+                  :label="item.name"
+                  :value="item.level"
+                  v-for="item in productlLevelList"
+                  :key="item.level"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="接口描述" prop="description">
+              <el-input
+              type="textarea"
+                v-model="ruleForm.description  "
+                class="inputCom"
+                placeholder="请输入描述"
+              ></el-input>
+            </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" },
+      ],
+      //渠道级别
+      productlLevelList: [
+        { name: "次卡", level: "1" },
+        { name: "时效卡", level: "2" },
+      ],
+      ruleForm: {
+        id: "",
+        //产品名称
+        productName: "",
+        //报告名称
+        reportName : "",
+        //价格
+        price : "",
+        //次数
+        times : "",
+        //状态
+        status: "",
+        //类型
+        type : "",
+        //描述
+        description :'',
+        //是否删除
+        isDelete:''
+      },
+      isView: true,
+      rules: {
+        productName: [{ required: true, message: "请输入产品名", trigger: "blur" }],
+        reportName: [{ required: true, message: "请输入报告名", trigger: "blur" }],
+        price: [{ required: true, message: "请输入价格", trigger: "blur" }],
+        times: [{ required: true, message: "请输入次数", trigger: "blur" }],
+        description: [{ required: true, message: "请输入描述", trigger: "blur" }],
+        status: [{ required: true, message: "请选择状态", trigger: "change" }],
+        type: [{ required: true, message: "请选择状态", trigger: "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.productName = val.productName;
+      this.ruleForm.reportName = val.reportName;
+      this.ruleForm.price = val.price;
+      this.ruleForm.times = val.times;
+      this.ruleForm.status = val.status;
+      this.ruleForm.type = val.type;
+      this.ruleForm.description  = val.description ;
+      this.ruleForm.isDelete = val.isDelete;
+      console.log(val.channelLevel)
+    },
+    cancle() {
+
+      this.ruleForm.id = "";
+      this.ruleForm.productName = "";
+      this.ruleForm.reportName = "";
+      this.ruleForm.price = "";
+      this.ruleForm.times = "";
+      this.ruleForm.status = "";
+      this.ruleForm.type = "";
+      this.ruleForm.description = "";
+      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(
+        `/product/save`,
+        {
+          productName: this.ruleForm.productName,
+          reportName : this.ruleForm.reportName ,
+          price : this.ruleForm.price ,
+          times : this.ruleForm.times ,
+          status : this.ruleForm.status ,
+          type : this.ruleForm.type ,
+          description  : this.ruleForm.description,
+          isDelete:'0'
+          // ...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(
+        `/product/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>

+ 439 - 0
src/components/ReportRegister.vue

@@ -0,0 +1,439 @@
+<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="channelId" >
+              <el-select v-model="ruleForm.channelId" placeholder="请选择渠道">
+                <el-option
+                  :label="item.name"
+                  :value="item.id"
+                  v-for="item in channelList"
+                  :key="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="公司名称" prop="companyName">
+              <el-input
+                v-model="ruleForm.companyName"
+                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="tax">
+              <el-input
+                v-model="ruleForm.tax "
+                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="reportType">
+              <el-select disabled v-model="ruleForm.reportType" placeholder="请选择类型">
+                <el-option
+                  :label="item.name"
+                  :value="item.state"
+                  v-for="item in reportTypeList"
+                  :key="item.state"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <el-form-item label="渠道员工" prop="staffName">
+              <el-input disabled
+                v-model="ruleForm.staffName "
+                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 :disabled="true" label="状态" prop="status">
+              <el-select disabled v-model="ruleForm.status" placeholder="请选择状态">
+                <el-option
+                  :label="item.name"
+                  :value="item.status"
+                  v-for="item in stateList"
+                  :key="item.status"
+                ></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 {
+      channelList: [],
+      action: "",
+      disableFlag: false,
+      phoneFlag: false,
+      flag: 3,
+      dialogVisible: false,
+      //渠道列表
+      stateList: [
+        { name: "已生成", status: "1" },
+        { name: "生成中", status: "0" },
+      ],
+      reportTypeList:[
+        { name: "邀约使用", state: "1" },
+        { name: "渠道使用", state: "2" },
+        { name: "公众号使用", state: "3" }
+      ],
+      //渠道级别
+      productlLevelList: [
+        { name: "未完成", level: "1" },
+        { name: "已完成", level: "2" },
+      ],
+      ruleForm: {
+        id: "",
+        //渠道id
+        channelId:'',
+        //渠道名称
+        channelName:'',
+        //公司名称
+        companyName: "",
+        //税号
+        tax : "",
+        //报告类型
+        reportType:'',
+        //生成时间
+        createTime:'',
+        //渠道员工
+        staffName:'',
+        //状态
+        status: "",
+        //授权状态
+        authStatus : "",
+      },
+      isView: true,
+      rules: {
+        companyName: [{ required: true, message: "请输入产品名", trigger: "blur" }],
+        tax: [{ required: true, message: "请输入报告名", trigger: "blur" }],
+      },
+    };
+  },
+  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.getChannel() 
+    // this.ruleForm.type = "3";
+  },
+  methods: {
+    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);
+        }
+      });
+    },
+    getChannelName(){
+      if(this.ruleForm.channelId==''){
+        this.ruleForm.channelName=''
+      }else{
+        for(let i=0;i<this.channelList.length;i++){
+          if(this.ruleForm.channelId==this.channelList[i].id){
+            this.ruleForm.channelName=this.channelList[i].name;
+          }
+        }
+      }
+      
+    },
+    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.channelName = val.channelName;
+      this.ruleForm.companyName = val.companyName;
+      this.ruleForm.createTime = val.createTime;
+      this.ruleForm.linkId = val.linkId;
+      this.ruleForm.reportPath = val.reportPath;
+      this.ruleForm.reportType  = val.reportType ;
+      this.ruleForm.staffName = val.staffName;
+      this.ruleForm.status = val.status;
+      this.ruleForm.tax = val.tax;
+      this.ruleForm.updateTime = val.updateTime;
+      console.log(val.channelLevel)
+    },
+    cancle() {
+      this.ruleForm.id ='';
+      this.ruleForm.channelId ='';
+      this.ruleForm.channelName = '';
+      this.ruleForm.companyName = '';
+      this.ruleForm.createTime = '';
+      this.ruleForm.linkId = '';
+      this.ruleForm.reportPath = '';
+      this.ruleForm.reportType  = '';
+      this.ruleForm.staffName = '';
+      this.ruleForm.status ='';
+      this.ruleForm.tax = '';
+      this.ruleForm.updateTime = '';
+
+      // this.ruleForm.id = "";
+      // this.ruleForm.productName = "";
+      // this.ruleForm.reportName = "";
+      // this.ruleForm.price = "";
+      // this.ruleForm.times = "";
+      // this.ruleForm.status = "";
+      // this.ruleForm.type = "";
+      // this.ruleForm.description = "";
+      // 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(
+        `/product/save`,
+        {
+          productName: this.ruleForm.productName,
+          reportName : this.ruleForm.reportName ,
+          price : this.ruleForm.price ,
+          times : this.ruleForm.times ,
+          status : this.ruleForm.status ,
+          type : this.ruleForm.type ,
+          description  : this.ruleForm.description,
+          isDelete:'0'
+          // ...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.getChannelName();
+      this.$http.post(
+        `/report/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>

+ 23 - 1
src/router/router.js

@@ -77,9 +77,31 @@ export const routerList = [
       {
         path: "interfacePrice",
         name: "interfacePrice",
-        component: () => import("../views/manage/interfacePrice/interfacePrice.vue"),
+        component: () =>
+          import("../views/manage/interfacePrice/interfacePrice.vue"),
+      },
+      //财税报告、、产品定价
+      {
+        path: "productPrice",
+        name: "productPrice",
+        component: () =>
+          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",

+ 30 - 1
src/styles/public.css

@@ -177,8 +177,11 @@
   border-color: #57acbb;
 }
 
-.el-select-dropdown__item.selected {
+/* .el-select-dropdown__item.selected {
   color: #57acbb;
+} */
+.el-select-dropdown__item.selected {
+  color: #5c5a5a;
 }
 
 .el-input.is-active .el-input__inner,
@@ -228,6 +231,32 @@
   
 }
 
+/* 删除按钮颜色  */
+.el-button--delete{
+  border-color: #ff1014;
+  color:#ffffff;
+  background-color: #ff1014;
+  
+}
+.el-button--delete:focus, .el-button--delete:hover{
+  border-color: #ff1014;
+  color:#ffffff;
+  background-color: #ff1014;
+}
+.el-button--delete.is-disabled{
+  border-color: #ff1014 !important;
+  color:#ffffff;
+  background-color: #ff1014 !important;
+  opacity: 0.5; 
+}
+.el-button--delete.is-disabled :focus .el-button--delete.is-disabled :hover{
+  border-color: #ff1014 !important;
+  color:#ffffff;
+  background-color: #ff1014 !important;
+  opacity: 0.5;
+}
+
+
 /* 按钮主题色统一处理 2022-03-10 by sxy */
 .el-button--primary {
   

+ 3 - 3
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";
 
@@ -80,7 +80,7 @@ axios.interceptors.request.use(
     config.headers.Authorization = oSessionStorage.getItem("token")
       ? `Bearer ${oSessionStorage.getItem("token")}`
       : "";
-   console.log(config.headers.Authorization)
+  //  console.log(config.headers.Authorization)
     return config;
   },
   function (error) {

+ 0 - 1
src/views/manage/channelInfo/invite.vue

@@ -291,7 +291,6 @@ export default {
   methods: {
     //查看记录
     viewRecord(row){
-        debugger;
         this.$router.push({path:'/manage/recordList',query:{id:row.id}})
 
     },

+ 7 - 10
src/views/manage/channelInfo/recordListAll.vue

@@ -148,7 +148,11 @@
             <div class="user_out">
               <div class="user_out_sub">报告类型</div>
               <div class="user_out_subNext">
-                {{ detailObj.reportType }}
+                <div class="user_out_subNext">
+                <span v-if="detailObj.reportType=='1'">邀约使用</span>
+                <span v-else-if="detailObj.reportType=='2'">渠道使用</span>
+                <span v-else-if="detailObj.reportType=='3'">公众号使用</span>
+              </div>
               </div>
             </div>
           </el-col>
@@ -346,13 +350,7 @@ export default {
       //     return '公众号使用'
       //    }
 
-      if (this.detailObj.reportType == "1") {
-        this.detailObj.reportType = "邀约使用";
-      } else if (this.detailObj.reportType == "2") {
-        this.detailObj.reportType = "渠道使用";
-      } else if (this.detailObj.reportType == "3") {
-        this.detailObj.reportType = "公众号使用";
-      }
+     
       this.centerDialogVisible = true;
     },
     addUser() {
@@ -417,10 +415,9 @@ export default {
         };
       }
       this.$http.post(`/report/findAll`, data, (res) => {
-        debugger;
         // console.log(res,'用户测试记录')
         if (res && res.code == 200) {
-          this.tableData = res.data.content;
+          this.tableData = res.data.data;
           console.log(this.tableData);
           this.total = res.data.totalElements;
         } else {

+ 59 - 9
src/views/manage/interfacePrice/interfacePrice.vue

@@ -17,18 +17,28 @@
             <el-button type="success" round icon="el-icon-plus" @click="addPrice"
               >新增</el-button
             >
+            <el-button
+              type="delete"
+              :disabled="multipleSelection.length == 0"
+              round
+              icon="el-icon-delete"
+              @click="mulDeletePrice"
+              >批量删除</el-button
+            >
           </div>
         </el-col>
       </el-row>
 
       <div class="table-content">
         <el-table
+          ref="multipleTable"
           :data="tableData"
           :row-style="{ height: '0px' }"
           :cell-style="{ padding: '5px' }"
+          @selection-change="handleSelectionChange"
         >
-          <!-- <el-table-column prop="name" label="姓名" align="center" width=""  show-overflow-tooltip>
-              </el-table-column> -->
+          <el-table-column type="selection" align="center" width="" show-overflow-tooltip>
+          </el-table-column>
           <el-table-column prop="title" label="标题" align="center" width="">
           </el-table-column>
           <el-table-column prop="price" label="价格" align="center" width="">
@@ -37,7 +47,6 @@
           </el-table-column>
           <el-table-column prop="endNum" label="次数结束" align="center" width="">
           </el-table-column>
-          、
           <el-table-column
             prop="channelLevel"
             label="渠道级别"
@@ -77,7 +86,7 @@
               <el-popconfirm
                 title="确定删除吗?"
                 placement="top"
-                @confirm="deletePrice(scope.$index, scope.row)"
+                @confirm="deletePrice([scope.row.id])"
               >
                 <el-button
                   size="small"
@@ -129,7 +138,7 @@
             <div class="user_out">
               <div class="user_out_sub">次数起始(包含)</div>
               <div class="user_out_subNext">
-                {{ detailObj.beginNum  }}
+                {{ detailObj.beginNum }}
               </div>
             </div>
           </el-col>
@@ -137,7 +146,7 @@
             <div class="user_out">
               <div class="user_out_sub">次数结束(包含)</div>
               <div class="user_out_subNext">
-                {{ detailObj.endNum  }}
+                {{ detailObj.endNum }}
               </div>
             </div>
           </el-col>
@@ -154,7 +163,7 @@
             <div class="user_out">
               <div class="user_out_sub">渠道级别</div>
               <div class="user_out_subNext">
-                {{ detailObj.channelLevel  == "1" ? "级别1" : "级别2" }}
+                {{ detailObj.channelLevel == "1" ? "级别1" : "级别2" }}
               </div>
             </div>
           </el-col>
@@ -174,6 +183,7 @@ export default {
   },
   data() {
     return {
+      multipleSelection: [],
       centerDialogVisible: false,
       editUserFlag: false,
       startTime: "",
@@ -230,6 +240,46 @@ export default {
     this.searchTarget();
   },
   methods: {
+    mulDeletePrice() {
+      let that = this;
+      let ids = [];
+      for (let i = 0; i < this.multipleSelection.length; i++) {
+        ids.push(this.multipleSelection[i].id);
+      }
+
+      this.$confirm("此操作将永久删除该定价, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          that.deletePrice(ids);
+        })
+        .catch(() => {
+          //   this.$message({
+          //     type: 'info',
+          //     message: '已取消删除'
+          //   });
+        });
+      //获取id的集合
+      //   let ids=[]
+      //   for(let i){
+
+      //   }
+    //   this.$http.post(`/price/delete`, [row.id], (res) => {
+    //     //  this.$toast.success({message:'成功'});
+    //     if (res && res.code == 200) {
+    //       this.$message.success("删除成功");
+    //       this.searchTarget();
+    //     } else {
+    //       this.$message.error("删除失败");
+    //     }
+    //   });
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+      console.log(this.multipleSelection);
+    },
     formatterLevel(row) {
       if (row.channelLevel == "1") {
         return "级别1";
@@ -314,8 +364,8 @@ export default {
     editRegisterUser(val) {
       this.$refs.register.edit(val);
     },
-    deletePrice(index, row) {
-      this.$http.post(`/price/delete`, [row.id], (res) => {
+    deletePrice(ids) {
+      this.$http.post(`/price/delete`, ids, (res) => {
         //  this.$toast.success({message:'成功'});
         if (res && res.code == 200) {
           this.$message.success("删除成功");

+ 491 - 0
src/views/manage/interfacePrice/productPrice.vue

@@ -0,0 +1,491 @@
+<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="success" round icon="el-icon-plus" @click="addPrice"
+              >新增</el-button
+            >
+            <el-button
+              type="delete"
+              :disabled="multipleSelection.length == 0"
+              round
+              icon="el-icon-delete"
+              @click="mulDeletePrice"
+              >批量删除</el-button
+            >
+          </div>
+        </el-col>
+      </el-row>
+
+      <div class="table-content">
+        <el-table
+          ref="multipleTable"
+          :data="tableData"
+          :row-style="{ height: '0px' }"
+          :cell-style="{ padding: '5px' }"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column type="selection" align="center" width="" show-overflow-tooltip>
+          </el-table-column>
+          <el-table-column prop="productName" label="产品名" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="reportName" label="报告名" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="price" label="价格" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="times" label="次数" align="center" width="">
+           
+        </el-table-column>
+        <el-table-column
+            prop="status"
+            label="状态"
+            align="center"
+            :formatter="formatterState"
+            width=""
+          >
+          </el-table-column>
+        <el-table-column prop="type" label="接口类型" align="center" :formatter="formatterLevel" width="">
+        </el-table-column>
+        <el-table-column prop="description" label="接口描述" align="center"    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="deletePrice([scope.row.id])"
+              >
+                <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>
+    <ProductRegister 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">产品名</div>
+              <div class="user_out_subNext">
+                {{ detailObj.productName }}
+              </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.reportName  }}
+              </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.price }}
+              </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.times }}
+              </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 == "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.description }}
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { oSessionStorage } from "../../../utils/utils";
+import productRegister from "../../../components/ProductRegister.vue";
+export default {
+  name: "channelManagement",
+  components: {
+    ProductRegister: productRegister,
+  },
+  data() {
+    return {
+      multipleSelection: [],
+      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: {},
+    };
+  },
+  created() {},
+  mounted() {
+    this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
+
+    this.view.channelId = this.$route.query.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.$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: {
+    mulDeletePrice() {
+      let that = this;
+      let ids = [];
+      for (let i = 0; i < this.multipleSelection.length; i++) {
+        ids.push(this.multipleSelection[i].id);
+      }
+
+      this.$confirm("此操作将永久删除该价格, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          that.deletePrice(ids);
+        })
+        .catch(() => {
+          //   this.$message({
+          //     type: 'info',
+          //     message: '已取消删除'
+          //   });
+        });
+      //获取id的集合
+      //   let ids=[]
+      //   for(let i){
+
+      //   }
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+      console.log(this.multipleSelection);
+    },
+    formatterLevel(row) {
+      if (row.type == "1") {
+        return "次卡";
+      } else if (row.type == "2") {
+        return "时效卡";
+      }
+    },
+    goBack() {
+      this.$router.go(-1);
+    },
+    //格式化状态
+    formatterIsDelete(row) {
+      if (row.isDelete == "0") {
+        return "正常";
+      } else if (row.isDelete == "1") {
+        return "已删除";
+      } else {
+        return "";
+      }
+    },
+    //格式化状态
+    formatterState(row) {
+      if (row.status == "1") {
+        return "生效中";
+      } else if (row.status == "0") {
+        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;
+    },
+    addPrice() {
+      this.addRegisterPrice(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 "女";
+      }
+    },
+    addRegisterPrice(val) {
+      this.$refs.register.open(val);
+    },
+    editRegisterUser(val) {
+      this.$refs.register.edit(val);
+    },
+    deletePrice(ids) {
+      this.$http.post(`/product/delete`, ids, (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.get(`/product/find/${this.pageNum}/${this.pageSize}`, {}, (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>

+ 560 - 0
src/views/manage/interfacePrice/reportList.vue

@@ -0,0 +1,560 @@
+<template>
+  <div class="record-warp">
+    <div class="record-main">
+      <el-row>
+        <el-col :span="24">
+          <div class="search-head">
+            <span>渠道:</span>
+            <el-select 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="success" class="add_class" round icon="el-icon-plus" @click="addUser"
+              >新增</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="channelName" label="渠道" align="center" width="">
+              </el-table-column> -->
+        <el-table-column prop="channelName" label="渠道" align="center" width="">
+        </el-table-column>
+          <el-table-column prop="companyName" label="公司名称" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="tax" label="税号" align="center" width="">
+          </el-table-column>
+          <el-table-column
+            prop="reportType"
+            label="报告类型"
+            :formatter="formatterReport"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column prop="createTime" label="生成时间" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="staffName" label="渠道员工" align="center" width="">
+          </el-table-column>
+          <el-table-column
+            prop="status"
+            label="状态"
+            align="center"
+            :formatter="formatterStatus"
+            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
+                @click="editUser(scope.row)"
+                v-if="scope.row.state != 0"
+                type="text"
+                size="small"
+                >编辑</el-button
+              >
+              <el-button
+                @click="viewPDF(scope.row)"
+                v-if="scope.row.state != 0"
+                type="text"
+                size="small"
+                >查看PDF</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>
+    <ReportRegister ref="register" @search="searchTarget" />
+    <ContractPoster ref="poster" @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.channelName }}
+              </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.companyName }}
+              </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.tax }}
+              </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.reportType}}
+                <span v-if="detailObj.reportType=='1'">邀约使用</span>
+                <span v-else-if="detailObj.reportType=='2'">渠道使用</span>
+                <span v-else-if="detailObj.reportType=='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.createTime}}
+              </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.staffName }}
+              </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 == "0" ? "生成中" : "已完成" }}
+              </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 == "0" ? "生成中" : "已完成" }}
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+    </el-dialog>
+    <el-dialog title="PDF预览" :visible.sync="viewPDFFlag" top="5vh" width="80%" center>
+      <div>
+        <embed  width="100%" height=700px :src="pdfUrl">
+        </embed >
+      </div>
+    </el-dialog>
+
+   
+  </div>
+</template>
+
+<script>
+import { oSessionStorage } from "../../../utils/utils";
+import reportRegister from "../../../components/ReportRegister.vue";
+
+import contractPoster from "../../../components/ContractPoster.vue";
+import contractTopUp from "../../../components/ContractTopUp.vue";
+import { basePath } from "../../..//utils/http";
+export default {
+  name: "channelManagement",
+  components: {
+    ReportRegister: reportRegister,
+    ContractPoster: contractPoster,
+  },
+  data() {
+    return {
+      linkId: "",
+      pdfUrl:'',
+      viewPDFFlag:false,
+      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;
+
+    //判断是超级管理员吗
+    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: "/" });
+    }
+    this.linkId = this.$route.query.id;
+    this.searchTarget();
+    this.getChannel();
+  },
+  methods: {
+    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);
+        }
+      });
+    },
+    //报告类型
+    formatterReport(row) {
+      if (row.reportType == "1") {
+        return "邀约使用";
+      } else if (row.reportType == "2") {
+        return "渠道使用";
+      } else if (row.reportType == "3") {
+        return "公众号使用";
+      }
+    },
+    //查看海报
+    viewPoster(row) {
+      this.$refs.poster.open(row);
+    },
+    //格式化自定义首尾页
+    formatterSelfPage(row) {
+      if (row.selfPage == "0") {
+        return "否";
+      } else {
+        return "是";
+      }
+    },
+    //员工管理
+    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 "生成中";
+      }
+    },
+    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);
+    },
+    viewPDF(val) {
+     this.pdfUrl= basePath+`/report/preview/${val.id}`
+        this.viewPDFFlag=true;
+    //   this.$http.getImg(`/report/preview/${val.id}`, {}, (res) => {
+    //     //  this.$toast.success({message:'成功'});
+    //     if (res && res.code == 200) {
+    //       //   this.$message.success("重置成功");
+    //       //   this.searchTarget();
+    //     } else {
+    //       this.$message.error(res.msg);
+    //     }
+    //   });
+    },
+    viewUser(row) {
+      this.detailObj = row;
+
+      //   if(row.reportType=='1'){
+      //      return '邀约使用'
+      //    }else if(row.reportType=='2'){
+      //     return '渠道使用'
+      //    }else if(row.reportType=='3'){
+      //     return '公众号使用'
+      //    }
+
+      // if (this.detailObj.reportType == "1") {
+      //   this.detailObj.reportType = "邀约使用";
+      // } else if (this.detailObj.reportType == "2") {
+      //   this.detailObj.reportType = "渠道使用";
+      // } else if (this.detailObj.reportType == "3") {
+      //   this.detailObj.reportType = "公众号使用";
+      // }
+      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(`/report/findAll`, data, (res) => {
+        // console.log(res,'用户测试记录')
+        if (res && res.code == 200) {
+          this.tableData = res.data.data;
+          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;
+
+      .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>

+ 67 - 31
src/views/manage/manageMain.vue

@@ -306,34 +306,69 @@ export default {
           ],
         },
         {
-            id: '2',
-            name: "财税报告",
-            icon: "el-icon-user-solid",
-            path: "2",
-            showItem: true,
-            child:[{
-                id: '21',
-                name: "接口价格",
-                icon: "el-icon-user-solid",
-                path: "/manage/interfacePrice",
-                parentName: "渠道管理",
-                showItem: true,
-              },
-              // {
-              //   id: '22',
-              //   name: "产品定价",
-              //   icon: "el-icon-user-solid",
-              //   path: "/manage/agencyUserManage",
-              //   showItem: true,
-              // },{
-              //   id: '23',
-              //   name: "报告记录",
-              //   icon: "el-icon-user-solid",
-              //   path: "/manage/agencyUserManage",
-              //   showItem: true,
-              // }
-            ]
-          },
+          id: "2",
+          name: "财税报告",
+          icon: "el-icon-user-solid",
+          path: "2",
+          showItem: true,
+          child: [
+            {
+              id: "21",
+              name: "接口价格",
+              icon: "el-icon-user-solid",
+              path: "/manage/interfacePrice",
+              parentName: "渠道管理",
+              showItem: true,
+            },
+            {
+              id: "22",
+              name: "产品定价",
+              icon: "el-icon-user-solid",
+              parentName: "渠道管理",
+              path: "/manage/productPrice",
+              showItem: true,
+            },
+            {
+              id: "23",
+              name: "报告记录",
+              parentName: "渠道管理",
+              icon: "el-icon-user-solid",
+              path: "/manage/reportList",
+              showItem: true,
+            },
+          ],
+        },
+        {
+          id: "3",
+          name: "订单管理",
+          icon: "el-icon-user-solid",
+          path: "3",
+          showItem: true,
+          child: [
+            {
+              id: "31",
+              name: "用户订单",
+              icon: "el-icon-user-solid",
+              path: "/manage/userOrder",
+              showItem: true,
+            },
+            {
+              id: "32",
+              name: "邀约订单",
+              icon: "el-icon-user-solid",
+              parentName: "订单管理",
+              path: "/manage/orderInvite",
+              showItem: true,
+            },
+            {
+              id: "33",
+              name: "订单结算",
+              icon: "el-icon-user-solid",
+              path: "/manage/agencyUserManage",
+              showItem: true,
+            },
+          ],
+        },
         /*  
         
           {
@@ -609,8 +644,10 @@ export default {
   font-size: 12px;
   color: #909399;
 }
-.el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, .el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, .el-menu--horizontal>.el-submenu .el-submenu__title:hover {
-    background-color: transparent !important;
+.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
+.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
+.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
+  background-color: transparent !important;
 }
 </style>
 <style lang="less" scoped>
@@ -772,7 +809,6 @@ export default {
   border-bottom: none !important;
 }
 
-
 /deep/.el-menu--horizontal > .el-submenu .el-submenu__icon-arrow {
   color: #161616;
 }

+ 542 - 0
src/views/manage/orderManage/orderInvite.vue

@@ -0,0 +1,542 @@
+<template>
+  <div class="record-warp">
+    <div class="record-main">
+      <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;
+            <span>用户:</span>
+            <el-select v-model="staffId" placeholder="请选择用户">
+              <el-option
+                :label="item.name"
+                :value="item.id"
+                v-for="item in userList"
+                :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="success" class="add_class" round icon="el-icon-plus" @click="addUser"
+              >新增</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="channelName" label="渠道" align="center" width="">
+              </el-table-column> -->
+          <el-table-column prop="staffName" label="员工" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="title" label="标题" align="center" width="">
+          </el-table-column>
+          <el-table-column prop="orderNo" label="订单号" align="center" width="">
+          </el-table-column>
+          <el-table-column
+            prop="effectiveDays"
+            label="有效期:天"
+            align="center"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column prop="times" 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"
+            :formatter="formatterStatus"
+            width=""
+          >
+          </el-table-column>
+          <el-table-column prop="createDate" 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
+                @click="viewRecord(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.staffName }}
+              </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.title }}
+              </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.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.effectiveDays }}
+              </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.times }}
+              </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">
+                {{ 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.createDate }}
+              </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" }],
+      staffId: "",
+      userList: [{ 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) {
+      //如果用户信息不存在跳转登陆页
+      this.$router.push({ path: "/" });
+    }
+    this.searchTarget();
+  },
+  methods: {
+    //渠道发生变化
+    changeChannel() {
+      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.staffId='';
+      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 = {};
+
+      data = {
+        pageNum: this.pageNum,
+        pageSize: this.pageSize,
+        channelId: this.channel,
+        staffId: this.staffId,
+      };
+
+      this.$http.post(`/link/find`, data, (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;
+
+      .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>