Tang 3 éve
szülő
commit
fe9be07b5e

+ 240 - 11
src/layout/components/Navbar.vue

@@ -202,12 +202,13 @@ export default {
           id: id,
         },
       });
-      this.dialog_haveRead = false;
+      // this.dialog_haveRead = false;
     },
     /**
      * 获取未读数据列表
      */
     getDontReadList() {
+      var self = this;
       let val = {
         receiptStatus: 0,
         systemStatus: 1,
@@ -216,9 +217,122 @@ export default {
         this.tableData = result.rows;
         this.total = result.total;
         if (this.total > 0) {
-          this.dialog_haveRead = true;
+          const h = this.$createElement;
+          let arrays = result.rows.map((item, index) => {
+            return h(
+              "div",
+              {
+                style: {
+                  borderBottom:
+                    result.total === index + 1 ? "none" : "1px solid #D9D9D9",
+                  marginTop: "26px",
+                  paddingBottom: "26px",
+                },
+              },
+              [
+                h(
+                  "strong",
+                  {
+                    style: {
+                      fontSize: "16px",
+                      fontWeight: "bold",
+                      color: "#222222",
+                      marginBottom: "12px",
+                    },
+                  },
+                  item.remind
+                ),
+                h(
+                  "p",
+                  {
+                    style: {
+                      fontSize: "14px",
+                      color: "#606266",
+                      marginBottom: "12px",
+                    },
+                  },
+                  item.text
+                ),
+                h(
+                  "p",
+                  {
+                    style: {
+                      fontSize: "12px",
+                      color: "#999999",
+                      marginBottom: "12px",
+                    },
+                  },
+                  this.$methodsTools.onlyForma(item.sendTime)
+                ),
+                h(
+                  "el-button",
+                  {
+                    attrs: {
+                      size: "small",
+                      type: "primary",
+                    },
+                    on: {
+                      click: function () {
+                        self.newSee(item.id);
+                        self.$notify.closeAll();
+                      },
+                    },
+                  },
+                  "立即查看"
+                ),
+                h(
+                  "el-button",
+                  {
+                    attrs: {
+                      size: "small",
+                    },
+                    on: {
+                      click: async function () {
+                        await self.changeReadStatus(item.id);
+                        self.$notify.closeAll();
+                        self.$nextTick(() => {
+                          self.getDontReadList();
+                        });
+                      },
+                    },
+                  },
+                  "标记为已读"
+                ),
+              ]
+            );
+          });
+          this.$notify({
+            title: `${result.total}条未读信息`,
+            position: "bottom-right",
+            dangerouslyUseHTMLString: true,
+            duration: 0,
+            customClass: "notiSty",
+            message: h("div", [
+              h(
+                "div",
+                {
+                  class: "znxStyle",
+                },
+                arrays
+              ),
+              h(
+                "div",
+                {
+                  class: "btn_bottom_style",
+                  on: {
+                    click: function () {
+                      self.seeAllRead();
+                      self.$notify.closeAll();
+                    },
+                  },
+                },
+                "查看所有"
+              ),
+            ]),
+          });
+          // this.dialog_haveRead = true;
         } else {
-          this.dialog_haveRead = false;
+          // this.dialog_haveRead = false;
         }
       });
     },
@@ -226,12 +340,15 @@ export default {
      * 更新已读状态
      */
     changeReadStatus(id) {
-      this.$api
-        .editupdateReadStatusBatch({ ids: [id], receiptStatus: 1 })
-        .then((res) => {
-          this.$message.success("已读成功");
-          this.getDontReadList();
-        });
+      return new Promise((resolve, reject) => {
+        this.$api
+          .editupdateReadStatusBatch({ ids: [id], receiptStatus: 1 })
+          .then((res) => {
+            this.$message.success("已读成功");
+            resolve();
+            // this.getDontReadList();
+          });
+      });
     },
     /**
      * 查看所有消息
@@ -240,7 +357,7 @@ export default {
       this.$router.push({
         name: "StationLetter",
       });
-      this.dialog_haveRead = false;
+      // this.dialog_haveRead = false;
     },
     openMsg() {
       this.dialogVisible = true;
@@ -259,7 +376,59 @@ export default {
             location.href = "/index";
           });
         })
-        .catch(() => {});
+        .catch(() => {
+          // var message: h("div", [
+          //       h("strong", null, item.text),
+          //       h("p", null, this.$methodsTools.onlyForma(item.sendTime)),
+          //       h(
+          //         "el-button",
+          //         {
+          //           attrs: {
+          //             size: "small",
+          //             type: "primary",
+          //           },
+          //           on: {
+          //             click: function () {
+          //               self.newSee(item.id);
+          //               self.$notify.closeAll();
+          //             },
+          //           },
+          //         },
+          //         "立即查看"
+          //       ),
+          //       h(
+          //         "el-button",
+          //         {
+          //           attrs: {
+          //             size: "small",
+          //           },
+          //           on: {
+          //             click: function () {
+          //               self.changeReadStatus(item.id);
+          //               instance[index].close();
+          //             },
+          //           },
+          //         },
+          //         "标记已读"
+          //       ),
+          //       h(
+          //         "el-button",
+          //         {
+          //           attrs: {
+          //             size: "small",
+          //             type: "success",
+          //           },
+          //           on: {
+          //             click: function () {
+          //               self.seeAllRead()
+          //               self.$notify.closeAll();
+          //             },
+          //           },
+          //         },
+          //         "查看全部"
+          //       ),
+          //     ]),
+        });
     },
   },
 };
@@ -467,4 +636,64 @@ export default {
     }
   }
 }
+.znxStyle {
+  max-height: 460px;
+  overflow-y: auto;
+  padding: 0px 28px;
+  &::-webkit-scrollbar {
+    width: 4px;
+  }
+  &::-webkit-scrollbar-thumb {
+    border-radius: 10px;
+    -webkit-box-shadow: inset 0 0 5px rgba(165, 165, 165, 0.2);
+    background: rgba(165, 165, 165, 0.2);
+  }
+  &::-webkit-scrollbar-track {
+    -webkit-box-shadow: inset 0 0 5px rgba(165, 165, 165, 0.2);
+    border-radius: 0;
+    background: rgba(226, 225, 225, 0.2);
+  }
+}
+.btn_bottom_style {
+  height: 50px;
+  border-top: 1px solid #d9d9d9;
+  line-height: 50px;
+  text-align: center;
+  color: #222;
+  font-size: 16px;
+  cursor: pointer;
+  transition: all 0.2s;
+  &:hover {
+    background-color: #eee;
+  }
+}
+.btnStyle_s {
+  margin-top: 6px;
+  background-color: skyblue;
+  color: #fff;
+}
+</style>
+<style lang="less">
+.notiSty {
+  width: 400px !important;
+  padding: 0px !important;
+  & > .el-notification__group {
+    margin: 0px;
+    & > .el-notification__title {
+      text-align: center;
+      height: 60px;
+      line-height: 60px;
+      color: #fff;
+      font-size: 18px;
+      font-weight: bold;
+      background-color: #409eff;
+      font-family: OPPOSans-Bold, OPPOSans;
+    }
+    & > .el-notification__closeBtn {
+      color: #fff;
+      font-size: 18px;
+      top: 24px;
+    }
+  }
+}
 </style>

+ 2 - 2
src/utils/request.js

@@ -7,8 +7,8 @@ import methods from '@/utils/methodsTool';
 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
-// export const baseURL = process.env.VUE_APP_BASE_API
-export const baseURL = 'http://192.168.1.24:5030/'
+export const baseURL = process.env.VUE_APP_BASE_API
+// export const baseURL = 'http://192.168.1.24:5030/'
 export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分

+ 59 - 43
src/views/Marketing/order/offlineOrder/batchRecord/secondStep/setGoodsList.vue

@@ -66,9 +66,12 @@
               >
               <el-button :size="size" @click="init">重置</el-button>
             </div>
+            <div v-if="stop" style="text-align: center">
+              加载中<i class="el-icon-loading"></i>
+            </div>
             <div
               style="margin-top: 14px; text-align: center"
-              v-if="!goodsList.length"
+              v-else-if="goodsList.length <= 0 && !stop"
             >
               暂无符合条件商品
             </div>
@@ -79,6 +82,7 @@
                 background: #eee;
                 margin-top: 10px;
               "
+              v-else-if="goodsList.length && !stop"
             >
               <li
                 v-for="(item, index) in goodsList"
@@ -116,6 +120,7 @@
 export default {
   data() {
     return {
+      stop: false,
       disabledBtn: false,
       size: "mini",
       dialogCG: false,
@@ -200,55 +205,65 @@ export default {
         }
       }
     },
-    init() {
+    async init() {
       this.goodsName = "";
       this.goodsPrice = "";
-      this.searchData();
+      await this.searchData();
     },
     /**
      * 科目ID,商品类型
      */
-    activeLi(subjectId, type) {
+    async activeLi(subjectId, type) {
       if (this.active == `${subjectId}-${type}`) return;
-      this.active = `${subjectId}-${type}`;
+      if (this.stop) return;
       this.goodsName = "";
       this.goodsPrice = "";
-      this.searchData();
+      this.active = `${subjectId}-${type}`
+      await this.searchData()
     },
     searchData() {
-      var subjectId = this.active.split("-")[0];
-      var type = this.active.split("-")[1];
-      var priceReg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/;
-      if (this.goodsPrice && !priceReg.test(this.goodsPrice)) {
-        this.$message.warning("请输入正确价格");
-        return;
-      }
-      var data = {
-        goodsType: type,
-        goodsName: this.goodsName || "",
-        standPrice: this.goodsPrice || "",
-        // goodsStatus: 1,
-        status: 1,
-        businessIds: this.oldObj.businessId,
-        subjectId : subjectId
-      };
-      // if (type == 1 || type == 2) {
-      //   data.subjectId = subjectId;
-      // }
-      this.$api.inquiregoodslistToInputList(data).then((res) => {
-        res.rows.forEach((item) => {
-          item.subjectId = subjectId;
-          item.checked = false;
-          this.newDatas.forEach((items) => {
-            if (
-              items.subjectId == item.subjectId &&
-              items.goodsId == item.goodsId
-            ) {
-              item.checked = true;
-            }
+      return new Promise((resolve, reject) => {
+        var subjectId = this.active.split("-")[0];
+        var type = this.active.split("-")[1];
+        var priceReg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/;
+        if (this.goodsPrice && !priceReg.test(this.goodsPrice)) {
+          this.$message.warning("请输入正确价格");
+          return reject();
+        }
+        var data = {
+          goodsType: type,
+          goodsName: this.goodsName || "",
+          standPrice: this.goodsPrice || "",
+          // goodsStatus: 1,
+          status: 1,
+          businessIds: this.oldObj.businessId,
+          subjectId: subjectId,
+        };
+        // if (type == 1 || type == 2) {
+        //   data.subjectId = subjectId;
+        // }
+        this.stop = true;
+        this.$api
+          .inquiregoodslistToInputList(data)
+          .then((res) => {
+            res.rows.forEach((item) => {
+              item.subjectId = subjectId;
+              item.checked = false;
+              this.newDatas.forEach((items) => {
+                if (
+                  items.subjectId == item.subjectId &&
+                  items.goodsId == item.goodsId
+                ) {
+                  item.checked = true;
+                }
+              });
+            });
+            this.goodsList = res.rows;
+            resolve();
+          })
+          .finally(() => {
+            this.stop = false;
           });
-        });
-        this.goodsList = res.rows;
       });
     },
     submitCG() {
@@ -283,17 +298,17 @@ export default {
       this.disabledBtn = false;
       this.dialogCG = false;
     },
-    openBox(oldObj, datas) {
+    async openBox(oldObj, datas) {
       this.newDatas = JSON.parse(JSON.stringify(datas));
       this.copynewDatas = JSON.parse(JSON.stringify(datas));
       this.oldObj = JSON.parse(JSON.stringify(oldObj));
       if (this.active) {
-        this.searchData();
+        await this.searchData();
       }
       // this.active = "";
-      this.goodsName = "";
-      this.goodsPrice = "";
-      this.goodsList = [];
+      // this.goodsName = "";
+      // this.goodsPrice = "";
+      // this.goodsList = [];
       this.$api
         .inquireCourseSubject({
           businessId: Number(oldObj.businessId),
@@ -338,6 +353,7 @@ export default {
   padding: 10px;
 }
 .liStyLI {
+  user-select: none;
   cursor: pointer;
   text-align: center;
   margin-bottom: 10px;

+ 1 - 1
src/views/Marketing/order/offlineOrder/index.vue

@@ -28,7 +28,7 @@
           type="text"
           @click="theOrderJump(props.scope.row, 2)"
           :disabled="
-            props.scope.row.orderFrom == 5 || props.scope.row.orderFrom == 6
+            props.scope.row.orderFrom == 6
           "
           >计费单收费</el-button
         >

+ 22 - 10
src/views/education/notificationManageMent/stationLetter/index.vue

@@ -8,7 +8,7 @@
       <div>
         <el-button size="mini" type="primary" plain @click="haveRead"
           >标记为已读</el-button
-        ><el-button v-if="false" size="mini" type="primary" plain @click="notHaveRead"
+        ><el-button size="mini" type="primary" plain @click="notHaveRead"
           >标记为未读</el-button
         ><span style="font-size: 14px; margin-left: 10px">状态:</span
         ><el-select
@@ -39,6 +39,7 @@
         width="55"
         align="center"
         reserve-selection
+        :selectable="canSelect"
       >
       </el-table-column>
 
@@ -83,7 +84,11 @@
         <template slot-scope="scope">
           <el-button size="mini" @click="newSee(scope.row)" type="text"
             >立即查看</el-button
-          ><el-button size="mini" @click="haveReadID(scope.row.id)" type="text"
+          ><el-button
+            size="mini"
+            :disabled="scope.row.receiptStatus === 1"
+            @click="haveReadID(scope.row.id)"
+            type="text"
             >标记为已读</el-button
           >
         </template>
@@ -179,12 +184,12 @@ export default {
   },
   mounted() {
     this.search();
-    if(this.$route.params.id){
-        this.$api.informsys_user(this.$route.params.id).then(res => {
-            if(res.data){
-                this.newSee(res.data)
-            }
-        })
+    if (this.$route.params.id) {
+      this.$api.informsys_user(this.$route.params.id).then((res) => {
+        if (res.data) {
+          this.newSee(res.data);
+        }
+      });
     }
   },
   methods: {
@@ -240,14 +245,14 @@ export default {
     /**
      * 查看学员
      */
-    submitChecks(v) {
+    submitChecks() {
       this.dialogCG = false;
       const jump = () => {
         //学员详情
         this.$router.push({
           name: "StudentXQ",
           query: {
-            id: v.userId,
+            id: this.newData.studentUserId,
           },
         });
       };
@@ -314,6 +319,13 @@ export default {
       this.formData.pageNum = v;
       this.search();
     },
+    canSelect(row, index) {
+      if (row.receiptStatus === 0) {
+        return true;
+      } else {
+        return false;
+      }
+    },
   },
 };
 </script>

+ 30 - 0
src/views/education/studentManageMent/studentList/index.vue

@@ -85,6 +85,36 @@ export default {
             },
           ],
         },
+        {
+          prop: "hasBindWx",
+          placeholder: "是否绑定微信",
+          scope: "select",
+          options: [
+            {
+              label: "是",
+              value: 1,
+            },
+            {
+              label: "否",
+              value: 0,
+            },
+          ],
+        },
+        {
+          prop: "hasFollowWx",
+          placeholder: "是否关注公众号",
+          scope: "select",
+          options: [
+            {
+              label: "是",
+              value: 1,
+            },
+            {
+              label: "否",
+              value: 0,
+            },
+          ],
+        },
         {
           prop1: "startTime",
           prop2: "endTime",