Explorar el Código

提交测试

1
mo hace 4 años
padre
commit
c3cd5b6b12

+ 16 - 13
src/views/main/baseinfo/business.vue

@@ -83,14 +83,14 @@ export default {
         },
         yAxis: {
           //纵轴标尺固定
-          minInterval:1,
+          minInterval: 1,
           type: "value",
           scale: true,
           min: 0,
-          max:100,
-          axisLabel:{
-            formatter:'{value}%'
-          }
+          max: 100,
+          axisLabel: {
+            formatter: "{value}%",
+          },
         },
         tooltip: {
           axisPointer: {
@@ -160,16 +160,19 @@ export default {
     };
   },
   mounted() {
-    let nowTiem = this.$helpers.dayjs(new Date()).format("YYYY-MM-DD");
-    let startTime = this.$helpers
-      .dayjs(getNowDateAndMonday(nowTiem))
-      .subtract(49, "day")
-      .format("YYYY-MM-DD");
-    let endTime = getNowDateAndSunday(nowTiem);
-    this.mdate = [startTime, endTime];
-    this.FetchDetail();
+    this.init()
   },
   methods: {
+    init() {
+      let nowTiem = this.$helpers.dayjs(new Date()).format("YYYY-MM-DD");
+      let startTime = this.$helpers
+        .dayjs(getNowDateAndMonday(nowTiem))
+        .subtract(49, "day")
+        .format("YYYY-MM-DD");
+      let endTime = getNowDateAndSunday(nowTiem);
+      this.mdate = [startTime, endTime];
+      this.FetchDetail();
+    },
     changeValue(date) {
       // 请求更改数据
       this.mdate = date;

+ 28 - 18
src/views/main/baseinfo/index.vue

@@ -1,7 +1,5 @@
 <template>
-  <div
-    class="container"
-  >
+  <div class="container">
     <save-form
       inline
       :model="search"
@@ -61,19 +59,28 @@
         <useCourse :data="dataInfo" />
       </el-col>
       <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
-        <management :data="dataInfo" :search="search" @resetDate="resetDate" />
+        <management
+          ref="management"
+          :data="dataInfo"
+          :search="search"
+          @resetDate="resetDate"
+        />
       </el-col>
       <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
-        <business :data="dataInfo" :search="search" @resetDate="resetDate" />
+        <business
+          ref="business"
+          :data="dataInfo"
+          :search="search"
+          @resetDate="resetDate"
+        />
       </el-col>
-        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
         <curriculum :data="dataInfo" :search="search" @resetDate="resetDate" />
       </el-col>
       <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
         <student :data="dataInfo" :search="search" @resetDate="resetDate" />
       </el-col>
 
-
       <!-- <el-col :xs="24" :sm="24" :md="12">
         <operate :data="dataInfo"/>
       </el-col> -->
@@ -112,10 +119,10 @@ export default {
   data() {
     return {
       pickerOptions: {
-          firstDayOfWeek: 1,
-        disabledDate: a => {
-          const { dayjs } = this.$helpers
-          return dayjs(a).isAfter(dayjs().subtract(1, 'day'))
+        firstDayOfWeek: 1,
+        disabledDate: (a) => {
+          const { dayjs } = this.$helpers;
+          return dayjs(a).isAfter(dayjs().subtract(1, "day"));
         },
         shortcuts: [
           {
@@ -151,7 +158,7 @@ export default {
         ],
       },
       search: {
-        dates:[],
+        dates: [],
         organId: null,
       },
       dataInfo: {},
@@ -164,14 +171,11 @@ export default {
       return !Object.keys(this.dataInfo).length;
     },
   },
-  created() {
-
-
-  },
+  created() {},
   mounted() {
-     this.$set(this.search, "dates", this.getInitDate());
-    this.FetchDetail();
+    this.$set(this.search, "dates", this.getInitDate());
     this.$store.dispatch("setBranchs");
+    this.FetchDetail();
   },
   methods: {
     getInitDate() {
@@ -209,6 +213,12 @@ export default {
         console.log(error);
       }
       this.dataInfo = data;
+      if (this.$refs.business) {
+        this.$refs["business"].init();
+      }
+      if (this.$refs.management) {
+        this.$refs["management"].init();
+      }
     },
     resetDate(data) {
       this.dataInfo = data;

+ 31 - 18
src/views/main/baseinfo/management.vue

@@ -6,7 +6,7 @@
         :title="'经营数据'"
         @changeValue="changeValue"
         :isShowQuert="true"
-        :endDate='endDate'
+        :endDate="endDate"
       />
     </div>
     <statistic :col="5" class="statistic" :cols="0">
@@ -43,11 +43,12 @@
         </el-radio-group>
       </div>
       <!--   v-if="timer == 'day'"    DD-->
-      <ve-line
+      <ve-histogram
         :data="timer == 'day' ? chartData : chartDataForMoth"
         height="350px"
         :data-empty="dataEmpty"
         :extend="chartExtend"
+        :settings="chartSettings"
         :legend="legend"
       />
       <!-- <ve-line
@@ -70,6 +71,7 @@
 import "echarts/lib/component/dataZoom";
 import countTo from "vue-count-to";
 import veLine from "v-charts/lib/line.common";
+import histogram from "v-charts/lib/histogram.common";
 import searchHeader from "./modals/searchHeader";
 import { getIndex } from "../api";
 import { getTimes } from "@/utils";
@@ -80,6 +82,7 @@ export default {
   components: {
     "ve-line": veLine,
     "count-to": countTo,
+    "ve-histogram": histogram,
     searchHeader,
   },
   computed: {
@@ -90,16 +93,19 @@ export default {
     },
     items() {
       return {
+        TOTAL_AMOUNT: this.data["TOTAL_AMOUNT"] || {},
         FINANCE_AMOUNT: this.data["FINANCE_AMOUNT"] || {},
         FINANCE_BALANCE_AMOUNT: this.data["FINANCE_BALANCE_AMOUNT"] || {},
         FINANCE_PAY: this.data["FINANCE_PAY"] || {},
       };
+      //
     },
     chartExtend() {
       return {
         series: {
           smooth: false,
         },
+
         yAxis: {
           //纵轴标尺固定
           minInterval: 1,
@@ -114,11 +120,15 @@ export default {
           formatter: (item) => {
             return [
               item[0].axisValueLabel,
+               `<br/><span style="margin-right:5px;border-radius:10px;width:10px;height:10px;display:inline-block;"></span>总收入:${this.$helpers
+                .numeral(item[0].value + item[1].value-item[2].value)
+                .format("0,0.00")}元`,
               ...item.map((d) => {
                 return `<br/>${d.marker}${
                   d.seriesName
-                }: ${this.$helpers.numeral(d.value[1]).format("0,0.00")}元`;
+                }: ${this.$helpers.numeral(d.value).format("0,0.00")}元`;
               }),
+
             ].join("");
           },
         },
@@ -148,8 +158,9 @@ export default {
           months[key][item.title] = row.percent;
         }
       }
+      // console.log(values);
       return {
-        columns: ["日期", ...values.map((item) => item.title)],
+        columns: ["日期", "现金收入", "余额收入", "财务支出"],
         rows: Object.values(months),
         loading: true,
       };
@@ -175,35 +186,37 @@ export default {
           }
         }
       }
-
       return {
-        columns: ["月份", ...values.map((item) => item.title)],
+        columns: ["月份", "现金收入", "余额收入", "财务支出"],
         rows: Object.values(months),
         loading: true,
       };
     },
-
     dataEmpty() {
       return !this.chartData.rows.length;
     },
   },
   data() {
+    this.chartSettings = {
+      stack: { 总收入: [`现金收入`, `余额收入`] },
+    };
     return {
       active: "SHOULD_INCOME_MONEY",
       timer: "day",
-      mdate:[],
+      mdate: [],
       loading: false,
-      endDate:''
+      endDate: "",
     };
   },
   created() {
-    this.mdate = this.getInitDate()
-    this.endDate = this.$helpers
-        .dayjs(new Date())
-        .format("YYYY-MM-DD");
-    this.changeValue(this.mdate)
+    this.init();
   },
   methods: {
+    init() {
+      this.mdate = this.getInitDate();
+      this.endDate = this.$helpers.dayjs(new Date()).format("YYYY-MM-DD");
+      this.changeValue(this.mdate);
+    },
     changeValue(date) {
       // 请求更改数据
       this.mdate = date;
@@ -218,7 +231,9 @@ export default {
         const res = await getIndex({
           ...rest,
           ...getTimes(this.mdate, ["startDate", "endDate"]),
-          dataTypes: "FINANCE_AMOUNT,FINANCE_BALANCE_AMOUNT,FINANCE_PAY",
+          //
+          dataTypes:
+            "FINANCE_AMOUNT,FINANCE_BALANCE_AMOUNT,FINANCE_PAY,TOTAL_AMOUNT",
         });
         for (const item of res.data) {
           // 再循环一遍
@@ -253,9 +268,7 @@ export default {
       }
     },
     getInitDate() {
-      const end = this.$helpers
-        .dayjs(new Date())
-        .format("YYYY-MM-DD");
+      const end = this.$helpers.dayjs(new Date()).format("YYYY-MM-DD");
       const start = this.$helpers
         .dayjs(new Date())
         .set("date", 1)

+ 58 - 43
src/views/main/baseinfo/modals/searchHeader.vue

@@ -2,71 +2,77 @@
   <div class="titleWrap">
     <div class="box">
       <span class="shape"></span>
-      <span>{{title}}</span>
+      <span>{{ title }}</span>
     </div>
     <div class="right">
-      <el-radio-group v-model="timer" size="mini" @change="changeQuick" v-if="isShowQuert">
+      <el-radio-group
+        v-model="timer"
+        size="mini"
+        @change="changeQuick"
+        v-if="isShowQuert"
+      >
         <el-radio-button label="month">本月</el-radio-button>
         <el-radio-button label="year">本年度</el-radio-button>
         <el-radio-button label="lastYear">去年</el-radio-button>
       </el-radio-group>
       <el-date-picker
-      v-if="isShowQuert"
+        v-if="isShowQuert"
         v-model="date"
         type="daterange"
-        style="width: 300px;padding: 0 10px"
+        style="width: 300px; padding: 0 10px"
         range-separator="-"
         start-placeholder="开始日期"
         end-placeholder="结束日期"
-          value-format="yyyy-MM-dd"
-          format="yyyy-MM-dd"
+        value-format="yyyy-MM-dd"
+        format="yyyy-MM-dd"
         size="mini"
         @change="changeValue"
-     :picker-options="bigin()"
+        :picker-options="bigin()"
       >
       </el-date-picker>
-            <el-date-picker
-      v-else
+      <el-date-picker
+        v-else
         v-model="date"
         type="daterange"
-        style="width: 300px;padding: 0 10px"
+        style="width: 300px; padding: 0 10px"
         range-separator="-"
         start-placeholder="开始日期"
         end-placeholder="结束日期"
-          value-format="yyyy-MM-dd"
-          format="yyyy-MM-dd"
+        value-format="yyyy-MM-dd"
+        format="yyyy-MM-dd"
         size="mini"
-      @change="changeWeek"
-   :picker-options="bigin()"
+        @change="changeWeek"
+        :picker-options="bigin()"
       >
       </el-date-picker>
-
-
     </div>
   </div>
 </template>
 <script>
-import {
-  getNowDateAndSunday,
-  getNowDateAndMonday,
-} from "@/utils/date";
+import { getNowDateAndSunday, getNowDateAndMonday } from "@/utils/date";
 export default {
-  props:['title','dates','isShowQuert','endDate'],
+  props: ["title", "dates", "isShowQuert", "endDate"],
   data() {
     return {
       timer: "",
-      date:this.dates,
+      date:this.dates
     };
   },
+  watch:{
+    dates(val){
+      this.date = val
+    }
+  },
+
   methods: {
-    changeWeek(val){
-      this.date = [getNowDateAndMonday(val[0]),getNowDateAndSunday(val[1])]
-       this.submitDate( this.date)
+    changeWeek(val) {
+      this.date = [getNowDateAndMonday(val[0]), getNowDateAndSunday(val[1])];
+      this.submitDate(this.date);
     },
     changeValue(val) {
-       this.timer = ''
-       this.date = val;
-        this.submitDate( this.date)
+      this.timer = "";
+      this.date = val;
+      this.submitDate(this.date);
     },
     changeQuick(val) {
       let startDate;
@@ -77,18 +83,28 @@ export default {
           .dayjs(new Date())
           .set("date", 1)
           .format("YYYY-MM-DD");
-          this.endDate?endDate=this.endDate: endDate = this.$helpers.dayjs(new Date()).subtract(1, 'day').format("YYYY-MM-DD");
+        this.endDate
+          ? (endDate = this.endDate)
+          : (endDate = this.$helpers
+              .dayjs(new Date())
+              .subtract(1, "day")
+              .format("YYYY-MM-DD"));
         this.date = [startDate, endDate];
-        this.submitDate( this.date)
+        this.submitDate(this.date);
       } else if (val == "year") {
         startDate = this.$helpers
           .dayjs(new Date())
           .set("month", 0)
           .set("date", 1)
           .format("YYYY-MM-DD");
-        this.endDate?endDate=this.endDate: endDate = this.$helpers.dayjs(new Date()).subtract(1, 'day').format("YYYY-MM-DD");
+        this.endDate
+          ? (endDate = this.endDate)
+          : (endDate = this.$helpers
+              .dayjs(new Date())
+              .subtract(1, "day")
+              .format("YYYY-MM-DD"));
         this.date = [startDate, endDate];
-        this.submitDate( this.date)
+        this.submitDate(this.date);
       } else if (val == "lastYear") {
         startDate = this.$helpers
           .dayjs(new Date())
@@ -102,27 +118,26 @@ export default {
           .endOf("year")
           .format("YYYY-MM-DD");
         this.date = [startDate, endDate];
-          this.submitDate( this.date)
+        this.submitDate(this.date);
       }
     },
-    submitDate(date){
-      this.$emit('changeValue',date)
+    submitDate(date) {
+      this.$emit("changeValue", date);
     },
-    bigin(){
+    bigin() {
       let self = this;
       return {
         firstDayOfWeek: 1,
         disabledDate(time) {
-          if(self.endDate){
-            let endTime = self.$helpers.dayjs(self.endDate).valueOf()
-            return time.getTime()> endTime
-          }else{
-            return time.getTime() >= Date.now()-24 * 60 * 60 * 1000;
+          if (self.endDate) {
+            let endTime = self.$helpers.dayjs(self.endDate).valueOf();
+            return time.getTime() > endTime;
+          } else {
+            return time.getTime() >= Date.now() - 24 * 60 * 60 * 1000;
           }
-
         },
       };
-    }
+    },
   },
 };
 </script>

+ 2 - 2
src/views/resetTeaming/index.vue

@@ -7,8 +7,8 @@
       <el-popover placement="left" width="1000" trigger="hover" >
         <teamJournal :teamid="teamid" />
         <!--  v-if="team_status" -->
-        <p slot="reference" class="msg"  :class="team_status">
-          <img :src="stepImgs[team_status]" alt="" />
+        <p slot="reference" class="msg"  :class="team_status"  >
+          <img :src="stepImgs[team_status]" alt="" v-if="stepImgs[team_status]"/>
           {{ musicGroupType[team_status] }}
         </p>
       </el-popover>

+ 2 - 2
src/views/teamBuild/modals/change-voice.vue

@@ -339,7 +339,7 @@ export default {
     },
     filterVoiceList() {
       return this.voiceList.filter(
-        (item) => item.subjectId != this.detail.subjectId
+        (item) => item.subjectId != this.detail.actualSubjectId
       );
     },
     activeAccessories() {
@@ -541,7 +541,7 @@ export default {
               this.form.musicalGoods === "OWNED" ? 0 : this.form.musicalGoods,
             originalCost: this.item.originalCost,
             organId: this.item.organId,
-            originalSubjectId: this.detail?.subjectId,
+            originalSubjectId: this.detail?.actualSubjectId,
             changeSubjectId: this.form.subjectId,
           }).then((res) => {
             this.$listeners.close();

+ 27 - 9
src/views/teamBuild/signupList.vue

@@ -57,7 +57,12 @@
           >
             延长报名
           </div>
-          <div class="newBand" @click="onCreateQRCode('payment')">报名链接</div>
+          <div class="newBand" @click="onCreateQRCode('payment')"   v-show="
+              status == 'PAY' ||
+              status == 'APPLY' ||
+              status == 'PROGRESS' ||
+              status == 'PREPARE'
+            ">报名链接</div>
           <div class="newBand" @click="onCreateQRCode('detail')">缴费详情</div>
           <div
             class="newBand"
@@ -218,7 +223,12 @@
           v-permission="'musicGroup/updateExpectedStudentNum'"
           style="margin-right: 20px; margin-top: 20px"
         >
-          <el-button v-show="!isEdit" @click="isEdit = true">编辑</el-button>
+          <el-button v-show="!isEdit&&(
+              status == 'PAY' ||
+              status == 'APPLY' ||
+              status == 'PROGRESS' ||
+              status == 'PREPARE')
+            " @click="isEdit = true">编辑</el-button>
           <el-button v-show="isEdit" @click="saveIsEdit">保存</el-button>
         </div>
       </div>
@@ -295,9 +305,18 @@
             fixed="right"
             width="240"
             align="center"
+
           >
+          <!--  v-show="
+              status == 'PAY' || status == 'PROGRESS' || status == 'PREPARE' || status=='APPLY'
+            " -->
             <template slot-scope="scope">
-              <div>
+              <div   v-show="
+              status == 'PAY' ||
+              status == 'APPLY' ||
+              status == 'PROGRESS' ||
+              status == 'PREPARE'
+            ">
                 <auth :auths="'studentRegistration/batchUpdateSubject'">
                   <el-button
                     type="text"
@@ -947,13 +966,9 @@ export default {
             if (res.code == 200) {
               this.$message.success("开启成功");
               this.paymentStatus = false;
+              this.$store.dispatch("delVisitedViews", this.$route);
               this.$router.push({
-                path: "/business/signupList",
-                query: {
-                  status: "PAY",
-                  id: this.$route.query.id,
-                  name: this.$route.query.name,
-                },
+                path: "/teamList",
               });
               this.status = "PAY";
               this.paymentExpireDate = this.paymentForm.paymentExpireDate;
@@ -1165,6 +1180,7 @@ export default {
           }).then((res) => {
             if (res.code == 200) {
               this.$message.success("停止成功");
+              this.$store.dispatch("delVisitedViews", this.$route);
               this.$router.push({
                 path: "/teamList",
               });
@@ -1178,7 +1194,9 @@ export default {
     },
     // 修改专业
     resetSubject(row) {
+      console.log(row)
       this.activeId = row.studentId;
+      this.maskForm.subject = row.actualSubjectId
       this.subjectVisible = true;
       //   resetStudentSubject().then(res=>{]})
     },

+ 4 - 3
vue.config.js

@@ -20,8 +20,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-let target = 'http://dev.dayaedu.com' // 开发环境
-// let target = 'https://test.dayaedu.com' //测试环境
+// let target = 'http://dev.dayaedu.com' // 开发环境
+let target = 'https://test.dayaedu.com' //测试环境
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
@@ -66,8 +66,9 @@ module.exports = {
       // let target = 'http://dev.dayaedu.com'
       // 'http://dev.dayaedu.com'
       '/api-auth': {
-        target: 'http://dev.dayaedu.com',
+        // target: 'http://dev.dayaedu.com',
         // target: 'http://47.114.176.40:8000',
+        target : 'https://test.dayaedu.com',
         changeOrigin: true,
         pathRewrite: {
           '^api-auth': ''