lex преди 2 години
родител
ревизия
035422f4d6

+ 6 - 2
public/project/initiation.html

@@ -273,10 +273,10 @@
 
     <van-popup v-model:show="submitStatus" round style="width: 75%" :close-on-click-overlay="false">
       <div class="submit-container">
-        <img class="icon-close" src="./images/initiation/icon-close.png" @click="submitStatus = false" />
+        <img class="icon-close" src="./images/initiation/icon-close.png" @click="onLinkUrl" />
         <img src="./images/initiation/popup-submit.png" class="submit-img" />
         <p class="submit-tips">提交成功,感谢您的参与!</p>
-        <van-button type="primary" color="#FF8057" block round @click="submitStatus = false">确认</van-button>
+        <van-button type="primary" color="#FF8057" block round @click="onLinkUrl">确认</van-button>
       </div>
     </van-popup>
   </div>
@@ -364,6 +364,10 @@
         this.setLoading(false)
       },
       methods: {
+        onLinkUrl() {
+          this.submitStatus = false
+          window.location.href = window.location.origin + '/orchestra-student/#/download'
+        },
         async checkchangePhone(val) {
           try {
             await this.$refs.form.validate('phone')

+ 6 - 2
public/project/preRegister.html

@@ -278,10 +278,10 @@
 
     <van-popup v-model:show="submitStatus" round style="width: 75%" :close-on-click-overlay="false">
       <div class="submit-container">
-        <img class="icon-close" src="./images/initiation/icon-close.png" @click="submitStatus = false" />
+        <img class="icon-close" src="./images/initiation/icon-close.png" @click="onLinkUrl" />
         <img src="./images/initiation/popup-submit.png" class="submit-img" />
         <p class="submit-tips">提交成功,感谢您的参与!</p>
-        <van-button type="primary" color="#9A64FF" block round @click="submitStatus = false">确认</van-button>
+        <van-button type="primary" color="#9A64FF" block round @click="onLinkUrl">确认</van-button>
       </div>
     </van-popup>
   </div>
@@ -386,6 +386,10 @@
         this.setLoading(false)
       },
       methods: {
+        onLinkUrl() {
+          this.submitStatus = false
+          window.location.href = window.location.origin + '/orchestra-student/#/download'
+        },
         async checkchangePhone(val) {
           try {
             await this.$refs.form.validate('phone')

+ 7 - 3
public/project/schoolRegister.html

@@ -136,15 +136,15 @@
 
     <van-popup v-model:show="showPicker" position="bottom" round>
       <van-picker show-toolbar :columns="columns" @cancel="showPicker = false" @confirm="onConfirm"
-        :columns-field-names="{ text: 'name', value: 'code' }" />
+        :columns-field-names="{ text: 'name', value: 'code', children: 'areas' }" />
     </van-popup>
 
     <van-popup v-model:show="submitStatus" round style="width: 75%" :close-on-click-overlay="false">
       <div class="submit-container">
-        <img class="icon-close" src="./images/initiation/icon-close.png" @click="submitStatus = false" />
+        <img class="icon-close" src="./images/initiation/icon-close.png" @click="onLinkUrl" />
         <img src="./images/initiation/popup-submit.png" class="submit-img" />
         <p class="submit-tips">提交成功,感谢您的参与!</p>
-        <van-button type="primary" color="#64A9FF" block round @click="submitStatus = false">确认</van-button>
+        <van-button type="primary" color="#64A9FF" block round @click="onLinkUrl">确认</van-button>
       </div>
     </van-popup>
   </div>
@@ -230,6 +230,10 @@
         this.setLoading(false)
       },
       methods: {
+        onLinkUrl() {
+          this.submitStatus = false
+          window.location.href = window.location.origin + '/orchestra-student/#/download?type=manage'
+        },
         async onSubmit() {
           this.btnLoading = true
           try {

+ 9 - 13
src/components/o-protocol/index.tsx

@@ -21,7 +21,7 @@ export default defineComponent({
       default: false
     },
     prototcolType: {
-      type: String as PropType<'BUY_ORDER' | 'REGISTER'>,
+      type: String as PropType<'BUY_ORDER' | 'REGISTER' | 'WITHDRAW'>,
       default: 'BUY_ORDER'
     }
   },
@@ -36,18 +36,14 @@ export default defineComponent({
   },
   async mounted() {
     try {
-      // const res = await request.get(
-      //   '/api-student/schoolContractTemplate/queryLatestContractTemplate',
-      //   {
-      //     params: {
-      //       contractType: this.prototcolType
-      //     }
-      //   }
-      // )
-      // console.log(res)
-      // this.exists = res.data
-      // this.checked = this.checked || this.exists
-      // this.$emit('update:modelValue', this.checked || this.exists)
+      const { data } = await request.get('/api-student/userContractRecord/checkContractSign', {
+        params: {
+          contractType: this.prototcolType
+        }
+      })
+      this.exists = data || false
+      this.checked = this.checked || this.exists
+      this.$emit('update:modelValue', this.checked || this.exists)
     } catch {
       //
     }

+ 15 - 5
src/school/orchestra/compontent/information.tsx

@@ -39,7 +39,9 @@ export default defineComponent({
 
       params: {
         startTime: dayjs().year() - 1 + '-09-01 00:00:00',
-        endTime: dayjs().year() + '-03-01 00:00:00',
+        endTime: dayjs(dayjs().year() + '-03-01 00:00:00')
+          .subtract(1, 'day')
+          .format('YYYY-MM-DD HH:mm:ss'),
         page: 1,
         rows: 20
       },
@@ -59,10 +61,14 @@ export default defineComponent({
 
       if (val.value === 'up') {
         state.params.startTime = Number(state.currentData[0]) - 1 + '-09-01 00:00:00'
-        state.params.endTime = state.currentData[0] + '-03-01 00:00:00'
+        state.params.endTime = dayjs(state.currentData[0] + '-03-01 00:00:00')
+          .subtract(1, 'day')
+          .format('YYYY-MM-DD HH:mm:ss')
       } else if (val.value === 'down') {
         console.log(dayjs().add(1, 'year'), 'dayjs().add(1, ')
-        state.params.startTime = state.currentData[0] + '-03-01 00:00:00'
+        state.params.startTime = dayjs(state.currentData[0] + '-03-01 00:00:00')
+          .subtract(1, 'day')
+          .format('YYYY-MM-DD HH:mm:ss')
         state.params.endTime = Number(state.currentData[0]) + '-09-01 00:00:00'
       }
       onSearch()
@@ -72,9 +78,13 @@ export default defineComponent({
       state.currentData = date.selectedValues
       if (state.actionType == 'up') {
         state.params.startTime = Number(date.selectedValues[0]) - 1 + '-09-01 00:00:00'
-        state.params.endTime = date.selectedValues[0] + '-03-01 00:00:00'
+        state.params.endTime = dayjs(date.selectedValues[0] + '-03-01 00:00:00')
+          .subtract(1, 'day')
+          .format('YYYY-MM-DD HH:mm:ss')
       } else if (state.actionType == 'down') {
-        state.params.startTime = date.selectedValues[0] + '-03-01 00:00:00'
+        state.params.startTime = dayjs(date.selectedValues[0] + '-03-01 00:00:00')
+          .subtract(1, 'day')
+          .format('YYYY-MM-DD HH:mm:ss')
         state.params.endTime = Number(date.selectedValues[0]) + '-09-01 00:00:00'
       }
       state.timeShow = false

+ 15 - 5
src/school/orchestra/compontent/plan.tsx

@@ -35,7 +35,9 @@ export default defineComponent({
 
       params: {
         startTime: dayjs().year() - 1 + '-09-01 00:00:00',
-        endTime: dayjs().year() + '-03-01 00:00:00',
+        endTime: dayjs(dayjs().year() + '-03-01 00:00:00')
+          .subtract(1, 'day')
+          .format('YYYY-MM-DD HH:mm:ss'),
         page: 1,
         rows: 20
       }
@@ -52,10 +54,14 @@ export default defineComponent({
 
       if (val.value === 'up') {
         state.params.startTime = Number(state.currentData[0]) - 1 + '-09-01 00:00:00'
-        state.params.endTime = state.currentData[0] + '-03-01 00:00:00'
+        state.params.endTime = dayjs(state.currentData[0] + '-03-01 00:00:00')
+          .subtract(1, 'day')
+          .format('YYYY-MM-DD HH:mm:ss')
       } else if (val.value === 'down') {
         console.log(dayjs().add(1, 'year'), 'dayjs().add(1, ')
-        state.params.startTime = state.currentData[0] + '-03-01 00:00:00'
+        state.params.startTime = dayjs(state.currentData[0] + '-03-01 00:00:00')
+          .subtract(1, 'day')
+          .format('YYYY-MM-DD HH:mm:ss')
         state.params.endTime = Number(state.currentData[0]) + '-09-01 00:00:00'
       }
       onSearch()
@@ -65,9 +71,13 @@ export default defineComponent({
       state.currentData = date.selectedValues
       if (state.actionType == 'up') {
         state.params.startTime = Number(date.selectedValues[0]) - 1 + '-09-01 00:00:00'
-        state.params.endTime = date.selectedValues[0] + '-03-01 00:00:00'
+        state.params.endTime = dayjs(date.selectedValues[0] + '-03-01 00:00:00')
+          .subtract(1, 'day')
+          .format('YYYY-MM-DD HH:mm:ss')
       } else if (state.actionType == 'down') {
-        state.params.startTime = date.selectedValues[0] + '-03-01 00:00:00'
+        state.params.startTime = dayjs(date.selectedValues[0] + '-03-01 00:00:00')
+          .subtract(1, 'day')
+          .format('YYYY-MM-DD HH:mm:ss')
         state.params.endTime = Number(date.selectedValues[0]) + '-09-01 00:00:00'
       }
       state.timeShow = false

+ 3 - 0
src/school/train-planning/component/course-preview/index.tsx

@@ -270,6 +270,9 @@ export default defineComponent({
                       type.includes('DIFF_SCHOOL_TEACHER') &&
                       type.includes('SAME_SCHOOL_TEACHER')
                     ) {
+                      // 老师冲突 SAME_SCHOOL_TEACHER
+                      // 学校冲突 DIFF_SCHOOL_TEACHER
+
                       state.conflictMessage =
                         '该时间段伴学指导在其他学校有课 \n 伴学指导在本学校时间有冲突'
                     } else if (type.includes('DIFF_SCHOOL_TEACHER')) {

+ 76 - 1
src/school/train-planning/component/practice/index.tsx

@@ -5,6 +5,7 @@ import {
   Checkbox,
   CheckboxGroup,
   DatePicker,
+  Dialog,
   Field,
   Icon,
   Picker,
@@ -15,18 +16,52 @@ import {
   Sticky,
   Tag
 } from 'vant'
-import { defineComponent, reactive } from 'vue'
+import { defineComponent, onMounted, reactive } from 'vue'
 import { weekdays, weekFormat } from '../../create'
 import styles from './index.module.less'
 import { forms } from '../../create'
 import dayjs from 'dayjs'
 import { useRouter } from 'vue-router'
+import OPopup from '@/components/o-popup'
+import ClassList from '../../modal/class-list'
+import request from '@/helpers/request'
+import { state } from '@/state'
 
 export default defineComponent({
   name: 'practice',
   setup() {
     const router = useRouter()
+
+    // 查询没有设置指导老师的班级
+    const getClasses = async (show = true) => {
+      try {
+        const { data } = await request.post('/api-school/classGroup/page', {
+          data: {
+            page: 1,
+            rows: 200,
+            schoolId: state.user.data.school.id,
+            hasTeacher: false,
+            orchestraType: 'DELIVERY'
+          }
+        })
+        // 班级数据
+        forms.classList = data.rows || []
+        // 判断没有设置伴学指导的班级
+        if (forms.classList.length > 0 && show) {
+          forms.status = true
+        }
+      } catch {
+        //
+      }
+    }
+
     const onSubmit = () => {
+      // 判断是否有班级没有设置伴学指导
+      if (forms.classList.length > 0) {
+        forms.status = true
+        return
+      }
+
       if (forms.classType.length <= 0) {
         showToast('请选择课程类型')
         return
@@ -59,6 +94,10 @@ export default defineComponent({
 
       router.push('/practice-detail')
     }
+
+    onMounted(() => {
+      getClasses()
+    })
     return () => (
       <div class={styles.practice}>
         <div class={styles.tips}>
@@ -203,6 +242,42 @@ export default defineComponent({
             }}
           />
         </Popup>
+
+        <Dialog
+          v-model:show={forms.status}
+          message={`您有${forms.classList.length}个班级尚未指定伴学指导,请完成指定后再进行训练规划。`}
+          messageAlign="left"
+          confirmButtonText="去设置"
+          cancelButtonText="暂不设置"
+          showCancelButton
+          onConfirm={() => {
+            forms.classStatus = true
+          }}
+        >
+          {{
+            title: () => (
+              <div class={styles.dialogTitle}>
+                <i></i>
+                指定伴学指导
+              </div>
+            )
+          }}
+        </Dialog>
+
+        <OPopup
+          v-model:modelValue={forms.classStatus}
+          position="bottom"
+          style={{ background: '#F6F6F6' }}
+          destroy
+        >
+          <ClassList
+            classList={forms.classList}
+            onClose={() => (forms.classStatus = false)}
+            onConfirm={() => {
+              getClasses(false)
+            }}
+          />
+        </OPopup>
       </div>
     )
   }

+ 1 - 1
src/school/train-planning/modal/class-list/index.tsx

@@ -125,7 +125,7 @@ export default defineComponent({
           <TeacherList
             header={false}
             mode={'sticky'}
-            courseType={state.selectItem.type}
+            courseType={state.selectItem.courseType}
             onClose={() => (state.teacherStatus = false)}
             onSelect={(val: any) => {
               state.selectItem.teacherId = val.id

+ 16 - 4
src/student/music-group/pre-apply/component/order.tsx

@@ -16,7 +16,7 @@ import {
   showToast
 } from 'vant'
 import { defineComponent, onMounted, reactive, ref } from 'vue'
-import { useRoute } from 'vue-router'
+import { useRoute, useRouter } from 'vue-router'
 import request from '../../request-music'
 import styles from '../index.module.less'
 
@@ -24,6 +24,7 @@ export default defineComponent({
   name: 'order',
   emits: ['next'],
   setup() {
+    const router = useRouter()
     const route = useRoute()
     const form = reactive({
       isClick: false,
@@ -145,6 +146,16 @@ export default defineComponent({
       getList()
     }
 
+    // 查看详情
+    const onDetails = (item: any) => {
+      router.push({
+        path: 'payment-result',
+        query: {
+          orderNo: item.orderNo
+        }
+      })
+    }
+
     onMounted(() => {
       getDefaultParams()
       getList()
@@ -162,7 +173,7 @@ export default defineComponent({
             immediateCheck={false}
           >
             {form.list.map((item: any) => (
-              <CellGroup inset class={styles.orderCellGroup}>
+              <CellGroup inset class={styles.orderCellGroup} onClick={() => onDetails(item)}>
                 <Cell
                   title={item.createTime}
                   titleClass={styles.payTime}
@@ -207,12 +218,13 @@ export default defineComponent({
                           </>
                         )} */}
                         {/* 订单成功 订单金额大于0 */}
-                        {item.status === 'PAID' && item.paymentCashAmount > 0 && (
+                        {item.status === 'PAID' && (
                           <Button
                             round
                             plain
                             color="#AAAAAA"
-                            onClick={() => {
+                            onClick={(e: any) => {
+                              e.stopPropagation()
                               form.refundSelect = item
                               form.refundStatus = true
                             }}

+ 1 - 1
src/student/music-group/pre-apply/order-detail.tsx

@@ -29,7 +29,7 @@ export default defineComponent({
       hasFreight: route.query.hf ? false : true, // 是否显示
       freight: '', // 运费
 
-      agreeStatus: false //是否勾选协议
+      agreeStatus: true //是否勾选协议
     })
 
     const orderType = computed(() => {

+ 1 - 2
src/student/trade-record/component/paid-list.tsx

@@ -242,8 +242,7 @@ export default defineComponent({
                 <Cell style={'padding: 0'}>
                   {{
                     title: () =>
-                      item.status === 'PAID' &&
-                      item.paymentCashAmount > 0 && (
+                      item.status === 'PAID' && (
                         <Button
                           block
                           class={styles.refundBtn}