瀏覽代碼

自动升学内容

natasha 6 小時之前
父節點
當前提交
a854500657
共有 2 個文件被更改,包括 149 次插入49 次删除
  1. 72 48
      src/views/bookStore/Subscribe.vue
  2. 77 1
      src/views/personalCenter/components/OrderList.vue

+ 72 - 48
src/views/bookStore/Subscribe.vue

@@ -191,6 +191,16 @@
                       ><svg-icon icon-class="icon-mark"></svg-icon
                     ></el-button>
                   </el-tooltip>
+                  <el-tooltip
+                    placement="right"
+                    style="height: 32px"
+                    v-if="studyTips"
+                  >
+                    <div slot="content">{{ studyTips }}</div>
+                    <el-button class="tooltip-btn"
+                      ><svg-icon icon-class="icon-mark"></svg-icon
+                    ></el-button>
+                  </el-tooltip>
                 </ul>
                 <div
                   v-if="
@@ -272,7 +282,9 @@
                     </ul>
                   </div>
                 </div>
-                <template v-if="orderTotalNumber !== -1">
+                <template
+                  v-if="orderTotalNumber !== -1 && orderTotalNumber !== -3"
+                >
                   <template v-if="orderTotalNumber === -2">
                     <el-input-number
                       v-model="customizeNum"
@@ -385,6 +397,19 @@
                 <span class="old-price">¥30.20</span>
               </div>
             </div> -->
+            <!-- <div class="info-item order-item" v-if="orderTotalNumber === -1">
+              <label>自动升学</label>
+              <el-radio-group v-model="is_auto" class="is-auto-box">
+                <el-radio label="false">否</el-radio>
+                <el-radio label="true">是</el-radio>
+              </el-radio-group>
+              <el-tooltip placement="right">
+                <div slot="content">双刊、特辑、寒暑假合刊除外</div>
+                <el-button class="tooltip-btn"
+                  ><svg-icon icon-class="icon-mark"></svg-icon
+                ></el-button>
+              </el-tooltip>
+            </div> -->
           </div>
           <div class="btn-box">
             <el-button
@@ -519,54 +544,12 @@ export default {
           label: "年订阅(当月起订)",
           value: -1,
         },
-      ],
-      orderTable: [
-        {
-          name: "915 期(合刊)",
-          date: "2023-06-26",
-          price: 12,
-        },
         {
-          name: "915 期(合刊)",
-          date: "2023-06-26",
-          price: 12,
-        },
-        {
-          name: "915 期(合刊)",
-          date: "2023-06-26",
-          price: 12,
-        },
-        {
-          name: "915 期(合刊)",
-          date: "2023-06-26",
-          price: 12,
-        },
-        {
-          name: "915 期(合刊)",
-          date: "2023-06-26",
-          price: 12,
-        },
-        {
-          name: "915 期(合刊)",
-          date: "2023-06-26",
-          price: 12,
-        },
-        {
-          name: "915 期(合刊)",
-          date: "2023-06-26",
-          price: 12,
-        },
-        {
-          name: "915 期(合刊)",
-          date: "2023-06-26",
-          price: 12,
-        },
-        {
-          name: "915 期(合刊)",
-          date: "2023-06-26",
-          price: 12,
+          label: "年订阅(当月起订)",
+          value: -3,
         },
       ],
+      orderTable: [],
       customizeNum: 1, // 自定义期数
       customPage: 0,
       custonList: [
@@ -693,6 +676,8 @@ export default {
       coverObj: [], // 存放选中期数的封面图
       coverSrc: "", // 显示的封面图
       coverNew: "", // 新的封面图
+      is_auto: "true", // 自动升学
+      studyTips: "",
     };
   },
   //计算属性 类似于data概念
@@ -737,7 +722,7 @@ export default {
       }
       this.tips = "";
       if (this.bookType === "baozhi") {
-        if (this.orderTotalNumber !== -1) {
+        if (this.orderTotalNumber !== -1 && this.orderTotalNumber !== -3) {
           let MethodName =
             "/ShopServer/Client/ReservationQuery/GetReservationInfo_Issue";
           let data = {
@@ -747,6 +732,8 @@ export default {
               this.orderTotalNumber !== 10000
                 ? this.orderTotalNumber === -2
                   ? this.customizeNum
+                  : this.orderTotalNumber === -3
+                  ? -1
                   : this.orderTotalNumber
                 : this.customOrderNumberList.length,
             is_custom_select_issue_no:
@@ -801,6 +788,8 @@ export default {
           (this.orderTotalNumber !== 10000
             ? this.orderTotalNumber === -2
               ? this.customizeNum
+              : this.orderTotalNumber === -3
+              ? -1
               : this.orderTotalNumber
             : this.customOrderNumberList.length)
         ) {
@@ -810,7 +799,7 @@ export default {
         }
       } else if (this.bookType === "huakan") {
         this.loading = false;
-        if (this.orderTotalNumber !== -1) {
+        if (this.orderTotalNumber !== -1 && this.orderTotalNumber !== -3) {
           let MethodName =
             "/ShopServer/Client/ReservationQuery/GetReservationInfo_Issue";
           let data = {
@@ -820,6 +809,8 @@ export default {
               this.orderTotalNumber !== 10000
                 ? this.orderTotalNumber === -2
                   ? this.customizeNum
+                  : this.orderTotalNumber === -3
+                  ? -1
                   : this.orderTotalNumber
                 : this.customOrderNumberList.length,
             is_custom_select_issue_no:
@@ -905,6 +896,8 @@ export default {
           (this.orderTotalNumber !== 10000
             ? this.orderTotalNumber === -2
               ? this.customizeNum
+              : this.orderTotalNumber === -3
+              ? -1
               : this.orderTotalNumber
             : this.customOrderNumberList.length)
         ) {
@@ -956,6 +949,8 @@ export default {
           this.orderTotalNumber !== 10000
             ? this.orderTotalNumber === -2
               ? this.customizeNum
+              : this.orderTotalNumber === -3
+              ? -1
               : this.orderTotalNumber
             : this.customOrderNumberList.length,
         is_custom_select_issue_no:
@@ -1004,6 +999,7 @@ export default {
       this.handleCoverSrc();
       this.handleOrderYearStartNO();
       await this.handleIssueLength();
+      this.handleBeginDate();
     },
     changeOrderNumber(item, flag) {
       if (flag && item.value !== -2) return false;
@@ -1056,8 +1052,12 @@ export default {
           this.orderTotalNumber !== 10000
             ? this.orderTotalNumber === -2
               ? this.customizeNum
+              : this.orderTotalNumber === -3
+              ? -1
               : this.orderTotalNumber
             : this.customOrderNumberList.length,
+        is_auto_adjust_study_phase:
+          this.orderTotalNumber === -3 ? "true" : "false",
         is_custom_select_issue_no:
           this.orderTotalNumber !== 10000 ? "false" : "true",
         issue_no_list: this.customOrderNumberList,
@@ -1209,6 +1209,20 @@ export default {
         }
       }
     },
+    // 计算学段的下一学段与起始日期
+    handleBeginDate() {
+      let MethodName =
+        "/ShopServer/Client/ReservationQuery/ComputeNextStudyPhaseAndBeginDate";
+      let data = {
+        study_phase: this.bookType === "baozhi" ? this.studyType : 1,
+      };
+      getLogin(MethodName, data)
+        .then((res) => {
+          this.studyTips =
+            res.begin_date + "自动升学为" + res.next_study_phase_name + "内容";
+        })
+        .catch(() => {});
+    },
     // 计算年订阅起始期数
     handleOrderYearStartNO() {
       let MethodName =
@@ -1222,8 +1236,11 @@ export default {
           if (res.status === 1 && res.issue_no_start) {
             this.orderList[5].label =
               "年订阅(当月起订," + res.issue_no_start + "期起)";
+            this.orderList[6].label =
+              "年订阅(当月起订," + res.issue_no_start + "期起)(自动升学)";
           } else {
             this.orderList[5].label = "年订阅(当月起订)";
+            this.orderList[5].label = "年订阅(当月起订)(自动升学)";
           }
         })
         .catch(() => {});
@@ -1280,6 +1297,7 @@ export default {
       this.handleOrder();
     }
     this.getTotalSales();
+    this.handleBeginDate();
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
@@ -1765,6 +1783,12 @@ export default {
     }
   }
 }
+.is-auto-box {
+  display: flex;
+  :deep .el-radio {
+    width: 40px !important;
+  }
+}
 </style>
 <style lang="scss">
 .bookItem {

+ 77 - 1
src/views/personalCenter/components/OrderList.vue

@@ -128,6 +128,17 @@
           </div>
         </template>
       </el-table-column>
+      <el-table-column label="自动升学" width="80">
+        <template slot-scope="scope">
+          <span>{{
+            scope.row.is_reservation === "true"
+              ? scope.row.is_auto_adjust_study_phase === "true"
+                ? "是"
+                : "否"
+              : ""
+          }}</span>
+        </template>
+      </el-table-column>
       <el-table-column prop="status" label="退款申请状态" width="112">
         <template
           slot-scope="scope"
@@ -177,7 +188,7 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column prop="status" label="操作" width="140" fixed="right">
+      <el-table-column prop="status" label="操作" width="210" fixed="right">
         <template slot-scope="scope">
           <template
             v-if="
@@ -199,6 +210,15 @@
           >
             <a class="apply" @click="handleToShlef">去查看</a>
           </template>
+          <template
+            v-if="
+              scope.row.sale_model === 0 &&
+              scope.row.is_reservation === 'true' &&
+              scope.row.is_auto_adjust_study_phase === 'true'
+            "
+          >
+            <a class="apply" @click="handleOrderInfo(scope.row)">订单详情</a>
+          </template>
           <!-- <template v-if="scope.row.operate==='3'">
                     <a class="order-detail"><svg-icon icon-class="question-line"></svg-icon>详情</a>
                 </template>
@@ -377,6 +397,46 @@
         >
       </span>
     </el-dialog>
+    <el-dialog :visible.sync="shelveVisible" width="500px" v-if="orderInfo">
+      <template
+        v-if="
+          orderInfo.sale_model === 0 &&
+          orderInfo.is_reservation === 'true' &&
+          orderInfo.is_auto_adjust_study_phase === 'true'
+        "
+      >
+        <h4>
+          年预定【{{
+            orderInfo.is_auto_adjust_study_phase === "true"
+              ? "自动升学"
+              : "不自动升学"
+          }}】
+        </h4>
+        <p>
+          {{
+            orderInfo.valid_period_1_study_phase_name +
+            " &nbsp;&nbsp; " +
+            orderInfo.valid_period_1_begin_date +
+            " &nbsp;&nbsp;至&nbsp;&nbsp; " +
+            orderInfo.valid_period_1_end_date
+          }}
+        </p>
+        <p v-if="orderInfo.valid_period_2_study_phase !== 0">
+          {{
+            orderInfo.valid_period_2_study_phase_name +
+            " &nbsp;&nbsp; " +
+            orderInfo.valid_period_2_begin_date +
+            " &nbsp;&nbsp;至&nbsp;&nbsp; " +
+            orderInfo.valid_period_2_end_date
+          }}
+        </p>
+      </template>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" type="primary" @click="shelveVisible = false"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -529,6 +589,8 @@ export default {
       invoiceLoading: false,
       messageSuccess: null,
       options: [],
+      orderInfo: null, // 订单详情
+      shelveVisible: false,
     };
   },
   //计算属性 类似于data概念
@@ -879,6 +941,20 @@ export default {
       //   { value: "2", label: "选项2" },
       // ]; // 示例数据更新到options中。
     },
+    // 订单详情
+    handleOrderInfo(row) {
+      this.orderInfo = null;
+      let Mnames = "/ShopServer/Manager/FinanceManager/GetOrderInfo";
+      let datas = {
+        id: row.id,
+      };
+      getLogin(Mnames, datas).then((res) => {
+        if (res.status === 1) {
+          this.orderInfo = res.order_info;
+          this.shelveVisible = true;
+        }
+      });
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {