Browse Source

Merge branch 'ol_12_30' into online

mo 4 years ago
parent
commit
819c5c385f

+ 4 - 4
src/views/accompanyManager/accompanys.vue

@@ -128,11 +128,11 @@
           </template>
         </el-table-column>
       </el-table>
-      <pagination :total="rules.total"
+      <!-- <pagination :total="rules.total"
                   :page.sync="rules.page"
                   :limit.sync="rules.limit"
                   :page-sizes="rules.page_size"
-                  @pagination="getList" />
+                  @pagination="getList" /> 乔乔说后台没有分页所以一口气都展示-->
     </div>
     <el-dialog title="有效期调整"
                width="400px"
@@ -799,11 +799,11 @@ export default {
       });
     },
     getList () {
-      findPracticeGroupCourseSchedules({ practiceId: this.practiceId, page: this.rules.page, rows: this.rules.limit }).then(
+      // 乔乔说后台分页数据是假的所以不分页 page: this.rules.page, rows: this.rules.limit   this.rules.total = res.data.pageInfo.total;
+      findPracticeGroupCourseSchedules({ practiceId: this.practiceId,  }).then(
         res => {
           if (res.code == 200) {
             this.tableList = res.data.pageInfo.rows;
-            this.rules.total = res.data.pageInfo.total;
           }
         }
       );

+ 1 - 1
src/views/businessManager/orderManager/orderAudit-taoqi/index.vue

@@ -177,7 +177,7 @@ import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { getEmployeeOrgan, getAddress, getCooperation } from "@/api/buildTeam";
 import { orderServerList, orderAuditTypeList } from "@/utils/searchArray";
-import orderAuditDetail from "./orderAuditDetail";
+import orderAuditDetail from "@/views/businessManager/orderManager/orderAudit/orderAuditDetail";
 import { getRouteOrderList } from "@/api/orderManager";
 import { goodsQuery } from "@/api/businessManager";
 import { formatData } from "@/utils/utils";

+ 70 - 16
src/views/businessManager/orderManager/orderAudit/orderAuditDetail.vue

@@ -55,17 +55,17 @@
           ></el-option>
         </el-select>
       </el-form-item>
-          <el-form-item
-            label="缴费单号"
-            prop="calenderId"
-            :label-width="formLabelWidth"
-          >
-            <el-input
-              v-model.trim="form.calenderId"
-              :disabled="!isAdd"
-              placeholder="请输入缴费单号"
-            ></el-input>
-          </el-form-item>
+      <el-form-item
+        label="缴费单号"
+        prop="calenderId"
+        :label-width="formLabelWidth"
+      >
+        <el-input
+          v-model.trim="form.calenderId"
+          :disabled="!isAdd"
+          placeholder="请输入缴费单号"
+        ></el-input>
+      </el-form-item>
       <el-form-item
         label="学员编号"
         prop="userId"
@@ -188,7 +188,11 @@
       </el-form-item>
 
       <div v-if="form.applyType == 'SELL'">
-        <div v-for="(goodsList, index) in form.goodsList" :key="index">
+        <div
+          v-for="(goodsList, index) in form.goodsList"
+          :key="index"
+          class="shopListWrap"
+        >
           <el-form-item
             :label="'商品名称' + (index + 1)"
             :label-width="formLabelWidth"
@@ -199,18 +203,24 @@
             ]"
           >
             <el-select
+              v-if="isAdd"
               v-model.trim="goodsList.id"
               filterable
               :disabled="!isAdd"
               placeholder="请选择商品"
+              :popper-append-to-body="false"
             >
               <el-option
+                :title="item.name"
                 v-for="(item, index) in shopList"
                 :key="index"
                 :label="item.name"
                 :value="item.id"
               ></el-option>
             </el-select>
+            <p class="showShop" v-else>
+              <Tooltip :content="goodsList.id | filterShopId" />
+            </p>
           </el-form-item>
           <el-form-item
             class="setWidth"
@@ -276,8 +286,19 @@
         ></el-input>
       </el-form-item>
     </el-form>
-    <div class="lookTitle" v-if="auditStatus == 'ING'" v-permission="'routeOrder/auditOutOrder'">审核意见</div>
-    <el-form :model="submitForm" v-if="auditStatus == 'ING'" ref="submitForm" v-permission="'routeOrder/auditOutOrder'">
+    <div
+      class="lookTitle"
+      v-if="auditStatus == 'ING'"
+      v-permission="'routeOrder/auditOutOrder'"
+    >
+      审核意见
+    </div>
+    <el-form
+      :model="submitForm"
+      v-if="auditStatus == 'ING'"
+      ref="submitForm"
+      v-permission="'routeOrder/auditOutOrder'"
+    >
       <el-form-item
         prop="memo"
         :rules="[
@@ -301,7 +322,10 @@ import {
 } from "@/api/orderManager";
 import { orderServerList } from "@/utils/searchArray";
 import { getCooperation } from "@/api/buildTeam";
+import Tooltip from "@/components/Tooltip/index";
+let that;
 export default {
+  components: { Tooltip },
   props: ["orderId", "shopList", "organList", "isLook"],
   data() {
     return {
@@ -326,7 +350,7 @@ export default {
         applyType: null,
         userId: "",
         auditComment: "",
-        calenderId:''
+        calenderId: "",
       },
       isAdd: !this.isLook,
       cooperationList: [],
@@ -338,6 +362,9 @@ export default {
       clearSchool: false,
     };
   },
+  created() {
+    that = this;
+  },
   mounted() {
     if (this.orderId) {
       getRouteOrderInfo({ id: this.orderId }).then((res) => {
@@ -359,7 +386,7 @@ export default {
             userId: orderInfo.userId ? orderInfo.userId : "",
             auditComment: orderInfo.auditComment,
             applyType: orderInfo.saleAmount ? "SELL" : "SERVICE",
-            calenderId:orderInfo.calenderId?orderInfo.calenderId:''
+            calenderId: orderInfo.calenderId ? orderInfo.calenderId : "",
           };
           this.auditStatus = orderInfo.auditStatus;
           this.$set(
@@ -470,6 +497,17 @@ export default {
       });
     },
   },
+  filters: {
+    filterShopId(val) {
+      let str = "";
+      that.shopList.forEach((shop) => {
+        if (shop.id == val) {
+          str = shop.name;
+        }
+      });
+      return str;
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>
@@ -484,4 +522,20 @@ export default {
 .setWidth {
   display: inline-block;
 }
+.showShop {
+  height: 40px;
+  line-height: 40px;
+  width: 150px;
+  background-color: #f5f7fa;
+  border-color: #e4e7ed;
+  color: #c0c4cc;
+  cursor: not-allowed;
+  color: #333;
+  opacity: 1;
+  border-radius: 4px;
+  border: 1px solid #dcdfe6;
+  padding: 0 15px;
+  margin-right: 10px;
+}
+.shopListWrap { display: flex; flex-direction: row; justify-content: flex-start;}
 </style>

+ 1 - 1
src/views/businessManager/shopManager/shopList.vue

@@ -288,7 +288,7 @@
               </el-popconfirm> -->
               <!-- {{ scope.row.status }} -->
               <!-- v-permission="scope.row.complementGoodsIdList ? 'goods/update' : '/shopOperation'" -->
-              <el-button v-if="scope.row.status == 0 && permission(scope.row.complementGoodsIdList ? 'goods/update' : '/shopOperation')"
+              <el-button v-if="scope.row.status == 0 && (scope.row.complementGoodsIdList ? 'goods/update' : '/shopOperation')"
                          @click="onShopOperation('update', scope.row)"
                          type="text">修改</el-button>
               <el-button v-if="scope.row.status == 1 && permission(scope.row.complementGoodsIdList ? 'goods/update' : '/shopOperation')"

+ 70 - 45
src/views/vipClass/vipDetail/components/vipStudentList.vue

@@ -52,26 +52,6 @@
         <el-table-column label="操作" align="center">
           <template slot-scope="scope">
             <div>
-              <!-- <el-popover placement="top"
-                          width="160"
-                          trigger="click"
-                          :ref="scope.$index">
-                <p>请输入退费金额</p>
-                <el-input style="margin:10px 0;"
-                          type="number"
-                          v-model.trim="scope.row.fee"></el-input>
-                <div style="text-align: right; margin-top: 20px">
-                  <el-button size="mini"
-                             type="text"
-                             @click="scope._self.$refs[scope.$index].doClose()">取消</el-button>
-                  <el-button type="primary"
-                             size="mini"
-                             @click="leaveSchool(scope)">确定</el-button>
-                </div>
-                <el-button type="text"
-                           slot="reference"
-                           @click="lookFee(scope)">退学</el-button>
-              </el-popover> -->
               <el-button
                 type="text"
                 v-if="
@@ -81,7 +61,6 @@
                 @click="lookFee(scope)"
                 >退学</el-button
               >
-              <!--   v-permission="'vipGroupManage/applyRefundForStudent'" -->
               <el-button
                 type="text"
                 v-if="scope.row.studentStatus == 0"
@@ -144,7 +123,8 @@
         <el-table-column prop="courseSalary" label="课程余额"></el-table-column>
       </el-table>
       <pagination
-        :total="rules.total"
+        sync
+        :total.sync="rules.total"
         :page.sync="rules.page"
         :limit.sync="rules.limit"
         :page-sizes="rules.page_size"
@@ -166,10 +146,19 @@
         :inline="true"
       >
         <el-form-item label="剩余课时">
-          <el-input disabled v-model.trim="adjustmentForm.count" style="width:200px!important"></el-input>
+          <el-input
+            disabled
+            v-model.trim="adjustmentForm.count"
+            style="width: 200px !important"
+          ></el-input>
         </el-form-item>
         <el-form-item label="任课老师" prop="teacher">
-          <el-select v-model.trim="adjustmentForm.teacher" clearable filterable style="width:200px!important">
+          <el-select
+            v-model.trim="adjustmentForm.teacher"
+            clearable
+            filterable
+            style="width: 200px !important"
+          >
             <el-option
               v-for="(item, index) in teacherList"
               :key="index"
@@ -182,6 +171,7 @@
         <el-form-item label="排课起始时间" prop="courseTime">
           <el-date-picker
             v-model.trim="adjustmentForm.courseTime"
+            @change="changeCourseTime"
             :picker-options="pickerOptions"
             style="width: 200px !important"
             type="date"
@@ -189,13 +179,19 @@
             placeholder="选择日期"
           >
           </el-date-picker>
-
         </el-form-item>
+        <!-- vipGroupManage/recoverForStudent1 -->
         <el-form-item label="剩余有效期" prop="days">
-          <el-input style="width:200px!important"  v-model.trim="adjustmentForm.days"></el-input>
+          <el-input-number :controls='false'
+          class="inputNumber"
+            style="width: 200px !important;"
+            :disabled="!permission('vipGroupManage/recoverForStudent1')"
+            v-model.trim="adjustmentForm.days"
+          ></el-input-number>
         </el-form-item>
-        <el-form-item label="有效期截止"  prop="expireDate">
+        <el-form-item label="有效期截止" prop="expireDate">
           <el-date-picker
+            :disabled="true"
             v-model.trim="adjustmentForm.expireDate"
             :picker-options="pickerOptions"
             style="width: 200px !important"
@@ -206,10 +202,11 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item>
-              <el-checkbox
+          <el-checkbox
             style="margin-left: 10px"
             v-model.trim="adjustmentForm.checked"
-            >是否跳过节假日</el-checkbox>
+            >是否跳过节假日</el-checkbox
+          >
         </el-form-item>
       </el-form>
       <div class="WeekWrap">
@@ -226,8 +223,13 @@
             v-for="(item, index) in weekList"
             :key="index"
           >
-            <span class='title'>循环周期: </span>
-            <el-select v-model.trim="item.dayOfWeek" filterable clearable  style="width:200px!important">
+            <span class="title">循环周期: </span>
+            <el-select
+              v-model.trim="item.dayOfWeek"
+              filterable
+              clearable
+              style="width: 200px !important"
+            >
               <el-option
                 v-for="(item, index) in weekDateList"
                 :key="index"
@@ -237,7 +239,7 @@
             </el-select>
             <span style="margin-left: 10px">开始时间</span>
             <el-time-select
-              style="margin-left: 10px; width:100px;"
+              style="margin-left: 10px; width: 100px"
               placeholder=""
               v-model.trim="item.startClassTime"
               :picker-options="{
@@ -266,6 +268,7 @@
 </template>
 <script>
 import pagination from "@/components/Pagination/index";
+import dayjs from 'dayjs'
 import {
   findVipGroupStudents,
   leaveSchool,
@@ -277,6 +280,7 @@ import {
   recoverForStudent,
   findTeacherWithVipGroupOrganAndSubject,
 } from "@/api/vipSeting";
+import { permission } from "@/utils/directivePage";
 export default {
   components: { pagination },
   data() {
@@ -305,8 +309,8 @@ export default {
         courseType: "",
         fee: "",
         teacher: "",
-        days:'',
-        expireDate:''
+        days: "",
+        expireDate: "",
       },
       adjustmentRules: {
         courseTime: [{ required: true, message: "请选择开始时间" }],
@@ -314,7 +318,7 @@ export default {
         courseType: [{ required: true, message: "请选择课程类型" }],
         fee: [{ required: true, message: "请输入费用" }],
         teacher: [{ required: true, message: "请选择老师" }],
-         days: [{ required: true, message: "请输入剩余有效期" }],
+        days: [{ required: true, message: "请输入剩余有效期" }],
         expireDate: [{ required: true, message: "请输入有效期截止" }],
       },
       weekDateList: [
@@ -350,6 +354,10 @@ export default {
     this.__init();
   },
   methods: {
+    permission (str) {
+      console.log(permission(str))
+      return permission(str);
+    },
     __init() {
       let id = this.$route.query.id;
       this.id = id;
@@ -519,20 +527,12 @@ export default {
             // vip状态没暂停 不需要排课
             // 课程编号  学生编号
             const h = this.$createElement;
-            // `将按照当前剩余课时安排上课,排课截至时间, '提示',
-            /**
-             *
-             *     message: h( [
-                h("p", null, "将按照当前剩余课时安排上课"),
-                h("p", { style: "color: red" },),
-              ]),
-             */
             this.$msgbox({
               title: "提示",
               message: h("p", null, [
                 h("p", null, "将按照当前剩余课时安排上课"),
                 // h("span", null, `排课截至时间:`),
-                // h("span", { style: "color: red" }, `${res.data.expireDate}`), 辜经理同意注释
+                // h("span", { style: "color: red" }, `${res.data.expireDate}`), 辜经理同意注释
               ]),
               confirmButtonText: "确定",
               cancelButtonText: "取消",
@@ -556,6 +556,7 @@ export default {
             this.adjustmentVisible = true;
             this.adjustmentForm.teacher = res.data.teacherId;
             this.adjustmentForm.count = `${res.data.totalCourseTimes}+${res.data.giveCourseTimes}`;
+            this.adjustmentForm.days = res.data.days;
           }
         }
       });
@@ -600,6 +601,8 @@ export default {
           obj.courseTimes = [];
           obj.courseTimes = this.weekList;
           obj.vipGroupId = this.id;
+          obj.days = this.adjustmentForm.days;
+          obj.expireDate = this.adjustmentForm.expireDate;
           recoverForStudent(obj).then((res) => {
             if (res.code == 200) {
               this.adjustmentVisible = false;
@@ -612,9 +615,31 @@ export default {
       });
       this.activeStudent;
     },
+    changeCourseTime(val) {
+
+      if(!this.adjustmentForm.days){
+        this.$message.error('请填写剩余有效期');
+        return
+      }
+      if(val){
+        this.adjustmentForm.expireDate = dayjs(val).add(this.adjustmentForm.days,'day').format('YYYY-MM-DD')
+      }else{
+        this.adjustmentForm.expireDate = ''
+      }
+
+    },
   },
 };
 </script>
 <style lang="scss" scoped>
-.title { display: inline-block; width: 110px; text-align: right; margin-right: 10px;}
+.title {
+  display: inline-block;
+  width: 108px;
+  text-align: right;
+  margin-right: 10px;
+}
+
+/deep/.el-input-number .el-input__inner{
+text-align: left!important;
+}
 </style>