Browse Source

11/30 14:45

1
mo 4 years ago
parent
commit
07432d39a6

+ 9 - 0
src/api/buildTeam.js

@@ -1386,3 +1386,12 @@ export function getCourseStudents (data) {
     params: data
   })
 }
+
+// 课程合并
+export function courseMerge (data) {
+  return request({
+    url: api + '/courseSchedule/courseMerge',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}

+ 1 - 0
src/router/notKeepAliveList.js

@@ -1,5 +1,6 @@
 export default [
   '/setSilder/save-form',
   '/contentManager/accompaniment',
+  '/orderList/orderAudit'
   // '/operateManager/HumanResources'
 ]

+ 63 - 63
src/views/businessManager/orderManager/orderAudit/index.vue

@@ -5,8 +5,8 @@
       <div class="squrt"></div>订单审核
     </h2>
     <div class="m-core">
-      <el-form :inline="true"
-               :model="searchForm">
+ 
+      <saveform ref="searchForm" :model.sync="searchForm" inline style="margin-top: 20px">
         <el-form-item>
           <el-input v-model.trim="searchForm.transNo"
                     @keyup.enter.native="transNo"
@@ -55,7 +55,7 @@
           <el-button @click="onReSet"
                      type="primary">重置</el-button>
         </el-form-item>
-      </el-form>
+      </saveform>
       <div class="tableWrap">
         <el-table style="width: 100%"
                   :header-cell-style="{background:'#EDEEF0',color:'#444'}"
@@ -129,7 +129,9 @@
             </template>
           </el-table-column>
         </el-table>
-        <pagination :total="rules.total"
+        <pagination 
+        sync
+        :total.sync="rules.total"
                     :page.sync="rules.page"
                     :limit.sync="rules.limit"
                     :page-sizes="rules.page_size"
@@ -170,21 +172,22 @@ import { getToken } from "@/utils/auth";
 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 { getRouteOrderList } from '@/api/orderManager'
-import { goodsQuery } from '@/api/businessManager'
-import { formatData } from '@/utils/utils';
-import Tooltip from '@/components/Tooltip/index'
+import { orderServerList, orderAuditTypeList } from "@/utils/searchArray";
+import orderAuditDetail from "./orderAuditDetail";
+import { getRouteOrderList } from "@/api/orderManager";
+import { goodsQuery } from "@/api/businessManager";
+import { formatData } from "@/utils/utils";
+import Tooltip from "@/components/Tooltip/index";
+import saveform from '@/components/save-form'
 export default {
-  components: { pagination, orderAuditDetail, Tooltip },
-  data () {
+  components: { pagination, orderAuditDetail, Tooltip,saveform },
+  data() {
     return {
       searchForm: {
         transNo: null,
         organId: null,
         auditStatus: null,
-        type: null
+        type: null,
       },
       tableList: [],
       organList: [],
@@ -195,104 +198,101 @@ export default {
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
       orderVisible: false,
       activceId: null,
       activeRow: null,
-      isLook: null
+      isLook: null,
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created () { },
+  created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
-    getEmployeeOrgan().then(res => {
+  mounted() {
+    getEmployeeOrgan().then((res) => {
       if (res.code == 200) {
         this.organList = res.data;
       }
     });
     // 获取分部
-    goodsQuery({ status: 1, rows: 99999 }).then(res => {
+    goodsQuery({ status: 1, rows: 99999 }).then((res) => {
       if (res.code === 200) {
-
-        this.shopList = res.data.rows
+        this.shopList = res.data.rows;
       }
-    })
+    });
 
     this.init();
   },
-  activated () {
+  activated() {
     this.init();
   },
   methods: {
-    init () {
-      this.getList()
+    init() {
+      this.getList();
     },
-    search () {
+    search() {
       this.rules.page = 1;
-      this.getList()
+      this.getList();
     },
-    onReSet () {
+    onReSet() {
       this.searchForm = {
         transNo: null,
         organId: null,
         auditStatus: null,
-        type: null
-      }
-      this.search()
+        type: null,
+      };
+      this.search();
     },
-    getList () {
-      let params = this.searchForm
-      params.rows = this.rules.limit
-      params.page = this.rules.page
-      getRouteOrderList(params).then(res => {
+    getList() {
+      let params = this.searchForm;
+      params.rows = this.rules.limit;
+      params.page = this.rules.page;
+      getRouteOrderList(params).then((res) => {
         if (res.code == 200) {
-          this.tableList = res.data.rows
-          this.rules.total = res.data.total
-          this.orderVisible = false
+          this.tableList = res.data.rows;
+          this.rules.total = res.data.total;
+          this.orderVisible = false;
         }
-
-      })
+      });
     },
-    lookDetail (row) {
-      this.activceId = row.id
-      this.activeRow = row
-      this.isLook = true
-      this.orderVisible = true
+    lookDetail(row) {
+      this.activceId = row.id;
+      this.activeRow = row;
+      this.isLook = true;
+      this.orderVisible = true;
     },
-    resetDetail (row) {
-      this.activceId = row.id
-      this.activeRow = row
-      this.isLook = false
-      this.orderVisible = true
+    resetDetail(row) {
+      this.activceId = row.id;
+      this.activeRow = row;
+      this.isLook = false;
+      this.orderVisible = true;
     },
-    submit (str) {
+    submit(str) {
       let message;
-      str == 'REJECT' ? message = '驳回' : message = '同意'
+      str == "REJECT" ? (message = "驳回") : (message = "同意");
       this.$confirm(`是否${message}审核`, "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
-          this.$refs.orderAuditDetail.auditOutOrder(str)
+          this.$refs.orderAuditDetail.auditOutOrder(str);
         })
-        .catch(() => { });
-
+        .catch(() => {});
     },
-    submitReaet () {
+    submitReaet() {
       this.$confirm(`是否提交修改`, "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
-          this.$refs.orderAuditDetail.submitReaet()
+          this.$refs.orderAuditDetail.submitReaet();
         })
-        .catch(() => { });
-    }
-  }
+        .catch(() => {});
+    },
+  },
 };
 </script>
 <style lang='scss' scoped>

+ 7 - 3
src/views/businessManager/orderManager/orderAudit/orderAuditDetail.vue

@@ -125,8 +125,9 @@
                   v-model="form.serviceAmount"
                   placeholder="请输入收入金额" />
       </el-form-item>
-      <div v-if="form.applyType == 'SELL'">
-        <div v-for="(goodsList, index) in form.goodsList"
+
+      <div  v-if="form.applyType == 'SELL'">
+        <div v-for="(goodsList, index) in form.goodsList" 
              :key="index">
           <el-form-item :label="'商品名称' + (index + 1)"
                         :label-width="formLabelWidth"
@@ -299,7 +300,10 @@ export default {
       } catch {
       }
       console.log(arr)
-      return arr
+      return arr.length>0? arr:[{
+          id: null,
+          number: null
+        }]
     },
     auditOutOrder (status) {
       const that = this;

+ 5 - 2
src/views/teamDetail/componentCourse/addCompound.vue

@@ -104,7 +104,6 @@ export default {
   },
   methods: {
     cancleCom (row) {
-      console.log('来了')
       this.$emit('cancleCompound', row)
     },
     clearCom () {
@@ -137,7 +136,11 @@ export default {
 
     },
     getList () { },
-    closeReset () { }
+    closeReset () {
+      this.clearCom()
+      this.show = false
+      this.$emit('getList')
+     }
   },
   watch: {
     compoundList (val) {

+ 3 - 2
src/views/teamDetail/componentCourse/compoundClass.vue

@@ -165,7 +165,7 @@
 </template>
 <script>
 import { diffTimerFormMinute, addTimerFormMinute } from '@/utils/date'
-import { getTeacher, resetCourse, getCourseScheduleDetail,getCourseStudents } from "@/api/buildTeam";
+import { getTeacher, courseMerge, getCourseScheduleDetail,getCourseStudents } from "@/api/buildTeam";
 import viewStudentList from '../components/modals/view-student-list'
 import { getTeachSchool } from "@/api/teacherManager";
 import cleanDeep from 'clean-deep'
@@ -238,8 +238,9 @@ export default {
             groupType: maskForm.groupType,
             schoolId: this.maskForm.address,
             teachMode: this.maskForm.teachMode,
+            mergeCourseIds:this.idList
           };
-          resetCourse(cleanDeep(obj)).then(res => {
+          courseMerge(obj).then(res => {
             if (res.code == 200) {
               this.$message.success("修改成功");
               this.$emit('getList')

+ 1 - 2
src/views/teamDetail/componentCourse/studentWork.vue

@@ -87,8 +87,7 @@
             <div>
               <!--   -->
               <el-button type="text"
-                         v-if="scope.row.urlList"
-                         :disabled='!scope.row.createTime'
+                         v-if="scope.row.urlList&&scope.row.createTime"
                          @click="lookWork(scope.row)">查看作业</el-button>
             </div>
           </template>

+ 8 - 2
src/views/teamDetail/components/modals/view-student-list.vue

@@ -23,7 +23,13 @@
         align="center"
         width="120"
         label="性别"
-      ></el-table-column>
+      >
+      <template slot-scope="scope">
+        <div>
+          {{scope.row.gender| sex}}
+        </div>
+      </template>
+      </el-table-column>
       <el-table-column
         prop="phone"
         align="center"
@@ -48,7 +54,7 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-.dialog-footer{
+/deep/.dialog-footer{
   margin-top: 10px;
 }