natasha 1 місяць тому
батько
коміт
c256e50ab9
1 змінених файлів з 45 додано та 11 видалено
  1. 45 11
      src/views/personalCenter/components/OrderList.vue

+ 45 - 11
src/views/personalCenter/components/OrderList.vue

@@ -131,7 +131,7 @@
       <el-table-column label="自动升学" width="80">
         <template slot-scope="scope">
           <span>{{
-            scope.row.is_reservation === "true"
+            scope.row.is_reservation === "true" && scope.row.period_count === -1
               ? scope.row.is_auto_adjust_study_phase === "true"
                 ? "是"
                 : "否"
@@ -210,13 +210,7 @@
           >
             <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'
-            "
-          >
+          <template>
             <a class="apply" @click="handleOrderInfo(scope.row)">订单详情</a>
           </template>
           <!-- <template v-if="scope.row.operate==='3'">
@@ -397,16 +391,47 @@
         >
       </span>
     </el-dialog>
-    <el-dialog :visible.sync="shelveVisible" width="500px" v-if="orderInfo">
+    <el-dialog
+      :visible.sync="shelveVisible"
+      width="500px"
+      v-if="orderInfo"
+      title="已上架物品列表"
+      class="invoice-dialog"
+    >
+      <el-table :data="goodsListShelve" style="width: 100%">
+        <el-table-column type="index" label="#" width="54"> </el-table-column>
+        <el-table-column prop="name" label="名称" width="200">
+        </el-table-column>
+        <el-table-column prop="issue_no" label="期号" width="60">
+        </el-table-column>
+        <el-table-column prop="study_phase_name" label="学段" width="60">
+        </el-table-column>
+        <el-table-column prop="type" label="商品类型">
+          <template slot-scope="scope">
+            <span
+              class="items-type"
+              :style="{
+                background: typeList[scope.row.type]
+                  ? typeList[scope.row.type].bg
+                  : '',
+                color: typeList[scope.row.type]
+                  ? typeList[scope.row.type].color
+                  : '',
+              }"
+              >{{ typeList[scope.row.type].text }}</span
+            >
+          </template>
+        </el-table-column>
+      </el-table>
       <template
         v-if="
           orderInfo.sale_model === 0 &&
           orderInfo.is_reservation === 'true' &&
-          orderInfo.is_auto_adjust_study_phase === 'true'
+          orderInfo.period_count === -1
         "
       >
         <h4>
-          年预定【{{
+          年订阅【{{
             orderInfo.is_auto_adjust_study_phase === "true"
               ? "自动升学"
               : "不自动升学"
@@ -431,6 +456,12 @@
           }}
         </p>
       </template>
+      <template v-else>
+        <div class="item-info" style="margin-top: 20px">
+          <label style="width: 80px">订阅期数:</label
+          ><span>{{ orderInfo.period_count }}</span>
+        </div>
+      </template>
       <span slot="footer" class="dialog-footer">
         <el-button size="small" type="primary" @click="shelveVisible = false"
           >确 定</el-button
@@ -589,6 +620,7 @@ export default {
       invoiceLoading: false,
       messageSuccess: null,
       options: [],
+      goodsListShelve: [],
       orderInfo: null, // 订单详情
       shelveVisible: false,
     };
@@ -943,6 +975,7 @@ export default {
     },
     // 订单详情
     handleOrderInfo(row) {
+      this.goodsListShelve = [];
       this.orderInfo = null;
       let Mnames = "/ShopServer/Manager/FinanceManager/GetOrderInfo";
       let datas = {
@@ -950,6 +983,7 @@ export default {
       };
       getLogin(Mnames, datas).then((res) => {
         if (res.status === 1) {
+          this.goodsListShelve = res.goods_list_shelve;
           this.orderInfo = res.order_info;
           this.shelveVisible = true;
         }