Explorar o código

提交一下

1
mo %!s(int64=4) %!d(string=hai) anos
pai
achega
ac9077c3f7

+ 1 - 1
src/views/main/baseinfo/management.vue

@@ -121,7 +121,7 @@ export default {
             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)
+                .numeral(item[0].value + item[1].value)
                 .format("0,0.00")}元`,
               ...item.map((d) => {
                 return `<br/>${d.marker}${

+ 1 - 0
src/views/main/constant.js

@@ -46,6 +46,7 @@ export const descs = {
   WAIT_CREATE_PAYMENT_CALENDER:'缴费项目有效期结束前7天',
   NO_CLASS_MUSIC_GROUP_STUDENT_INFO: '进行中乐团不在班级中的在读学员提醒',
   COURSE_TIME_ERROR: '上课时间在00:00~06:00时间段内为时间安排异常',
+  TOTAL_AMOUNT:'总收入:现金收入 + 余额收入'
 }
 
 const dates = {

+ 31 - 0
src/views/reaplceMusicPlayer/api.js

@@ -36,3 +36,34 @@ export function openPayReplacement (data) {
     requestType: 'form',
   })
 }
+
+// 根据声部查询品牌乐器
+export function getInstrumentSoundList (data) {
+  return request2({
+    url: api + `/replacementInstrument/queryPage`,
+    method: 'get',
+    params: data,
+    requestType: 'form',
+  })
+}
+
+// 查询详情页列表 replacementInstrumentActivity/queryPage
+export function getInstrumentActivityList (data) {
+  return request2({
+    url: api + `/replacementInstrumentActivity/queryPage`,
+    method: 'get',
+    params: data,
+    requestType: 'form',
+  })
+}
+
+// 修改声部和乐器
+export function updateInstrumentActivity (data) {
+  return request2({
+    url: api + `/replacementInstrumentActivity/update`,
+    method: 'get',
+    params: data,
+    requestType: 'form',
+  })
+}
+

+ 1 - 1
src/views/reaplceMusicPlayer/index.vue

@@ -165,7 +165,7 @@
       width="1000px"
       v-if="detailVisible"
     >
-      <detail ref="detail" @close="close" :activeRow='activeRow'/>
+      <detail ref="detail" @close="close" :detail="activeRow"/>
       <div slot="footer">
         <el-button type="primary" @click="detailVisible = false"
           >确定</el-button

+ 99 - 51
src/views/reaplceMusicPlayer/modals/detail.vue

@@ -4,10 +4,10 @@
       :inline="true"
       :model="searchForm"
       ref="searchForm"
-      @submit="search"
-      @reset="onReSet"
+      @submit.native.prevent="search"
+      @reset.native.prevent="onReSet"
     >
-      <el-form-item>
+      <el-form-item prop="search">
         <el-input
           v-model.trim="searchForm.search"
           clearable
@@ -15,30 +15,32 @@
           placeholder="学生姓名或手机号"
         ></el-input>
       </el-form-item>
-      <el-form-item prop="organId">
+      <el-form-item prop="subjectId">
         <el-select
-          v-model.trim="searchForm.organId"
+          v-model.trim="searchForm.subjectId"
           filterable
           clearable
           placeholder="请选择声部"
+          @change="changeSound"
         >
           <el-option
-            v-for="(item, index) in selects.branchs"
-            :key="index"
+            v-for="(item, i) in selects.subjects"
+            :key="i"
             :label="item.name"
             :value="item.id"
           ></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="organId">
+      <el-form-item prop="brand">
         <el-select
-          v-model.trim="searchForm.organId"
+          v-model.trim="searchForm.brand"
           filterable
           clearable
-          placeholder="请选择乐器"
+          placeholder="请选择品牌型号"
+          :disabled="!searchForm.subjectId"
         >
           <el-option
-            v-for="(item, index) in selects.branchs"
+            v-for="(item, index) in branchList"
             :key="index"
             :label="item.name"
             :value="item.id"
@@ -58,33 +60,30 @@
       >
         <el-table-column
           align="center"
-          prop="studentId"
+          prop="subjectName"
           label="声部"
         ></el-table-column>
         <el-table-column
           align="center"
-          prop="studentId"
+          prop="userName"
           label="学员姓名"
         ></el-table-column>
         <el-table-column
           align="center"
-          prop="studentId"
+          prop="mobileNo"
           label="联系电话"
         ></el-table-column>
-        <el-table-column
-          align="center"
-          prop="studentId"
-          label="品牌"
-        ></el-table-column>
-        <el-table-column
-          align="center"
-          prop="studentId"
-          label="型号"
-        ></el-table-column>
+        <el-table-column align="center" prop="studentId" label="品牌型号">
+          <template slot-scope="scope">
+            <div>{{ scope.row.brand }}{{ scope.row.specification }}</div>
+          </template>
+        </el-table-column>
         <el-table-column align="center" prop="studentId" label="操作">
           <template slot-scope="scope">
             <div>
-              <el-button type="text" @click="resetMusic(scope.row)">修改</el-button>
+              <el-button type="text" @click="resetMusic(scope.row)"
+                >修改</el-button
+              >
             </div>
           </template>
         </el-table-column>
@@ -99,32 +98,39 @@
       />
     </div>
     <el-dialog
-        title="修改信息"
-        :visible.sync="dialogVisible"
-        width="1000px"
-        append-to-body v-if="dialogVisible">
-        <resetInfo @close="close"/>
-        <div slot="footer">
-            <el-button @click="dialogVisible = false">取 消</el-button>
-            <el-button type="primary" @click="dialogVisible = false">确认修改</el-button>
-        </div>
+      title="修改信息"
+      :visible.sync="dialogVisible"
+      width="600px"
+      append-to-body
+      v-if="dialogVisible"
+    >
+      <resetInfo @close="close" :detail="resetRow" ref='resetInfo'/>
+      <div slot="footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="updateInfo"
+          >确认修改</el-button
+        >
+      </div>
     </el-dialog>
   </div>
 </template>
 <script>
 import pagination from "@/components/Pagination/index";
-import resetInfo from './resetInfo'
+import resetInfo from "./resetInfo";
+import { getInstrumentSoundList, getInstrumentActivityList } from "../api";
+import ItemVue from "@/layout/components/Sidebar/Item.vue";
 export default {
-  components: { pagination,resetInfo },
-  props:['activeRow'],
+  components: { pagination, resetInfo },
+  props: ["detail"],
   data() {
     return {
       searchForm: {
-        cooperationOrganId:this.activeRow?.cooperationOrganId,
-        organIdList: "",
+        cooperationOrganId: "",
+        brand: "",
         search: "",
+        subjectId: "",
       },
-      tableList: [{}],
+      tableList: [],
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -132,28 +138,70 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
-      dialogVisible:false
+      dialogVisible: false,
+      branchList: [],
+      resetRow:null
     };
   },
-  mounted() {},
+  mounted() {
+    this.init();
+  },
   methods: {
-    init() {
+    async init() {
+      this.searchForm.cooperationOrganId = this.detail.cooperationOrganId;
+      await this.$store.dispatch("setSubjects");
       this.getList();
     },
-    getList() {},
+    async getList() {
+      try {
+        const res = await getInstrumentActivityList({
+          ...this.searchForm,
+          page: this.rules.page,
+          rows: this.rules.limit,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+      } catch (e) {}
+    },
     search() {
       this.rules.page = 1;
       this.getList();
     },
-    onReSet(){
-        this.$refs.searchForm.resetFields();
-        this.search()
+    onReSet() {
+      this.$refs.searchForm.resetFields();
+      this.searchForm.cooperationOrganId = this.detail.cooperationOrganId;
+      this.search();
+    },
+    resetMusic(row) {
+      this.resetRow = row
+      this.dialogVisible = true;
+    },
+    close() {
+      this.dialogVisible = false;
     },
-    resetMusic(row){
-        this.dialogVisible = true
+    async changeSound(val) {
+      this.searchForm.brand='';
+      if (val) {
+        try {
+          const res = await getInstrumentSoundList({
+            subjectId: val,
+            page: 1,
+            rows: 999,
+          });
+          this.branchList = res.data.rows.map((item) => {
+            return {
+              name: item.brand + item.specification,
+              id: item.brand,
+            };
+          });
+          console.log(res);
+        } catch (e) {
+          console.log(e);
+        }
+      }
     },
-    close(){
-        this.dialogVisible = false
+    updateInfo(){
+      this.$refs.resetInfo.submited()
     }
   },
 };

+ 61 - 32
src/views/reaplceMusicPlayer/modals/resetInfo.vue

@@ -1,53 +1,38 @@
 <template>
   <div>
-    <el-form :model="form" label-width="80px" :inline="true">
+    <el-form :model="form" label-width="80px" :inline="true" ref='form'>
       <el-form-item label="学员姓名">
-        <div style="width:180px"></div>
+        <div style="width: 180px">{{ detail.userName }}</div>
       </el-form-item>
       <el-form-item label="联系电话">
-        <div></div>
+        <div>{{ detail.mobileNo }}</div>
       </el-form-item>
       <br />
-      <el-form-item prop="organIdList" label="声部">
+      <el-form-item prop="subjectId" label="声部"  :rules="[{required: true, message: '请选择声部'}]">
         <el-select
-          v-model.trim="form.organIdList"
+          v-model.trim="form.subjectId"
           filterable
           clearable
           placeholder="请选择声部"
+          @change="changeSound"
         >
           <el-option
-            v-for="(item, index) in selects.branchs"
-            :key="index"
+            v-for="(item, i) in selects.subjects"
+            :key="i"
             :label="item.name"
             :value="item.id"
           ></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="organIdList" label="品牌">
+      <el-form-item prop="instrumentsId" label="品牌型号" :rules="[{required: true, message: '请选择品牌型号'}]">
         <el-select
-          v-model.trim="form.organIdList"
+          v-model.trim="form.instrumentsId"
           filterable
           clearable
-          placeholder="请选择品牌"
+          placeholder="请选择品牌型号"
         >
           <el-option
-            v-for="(item, index) in selects.branchs"
-            :key="index"
-            :label="item.name"
-            :value="item.id"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-
-      <el-form-item prop="organIdList" label="型号">
-        <el-select
-          v-model.trim="form.organIdList"
-          filterable
-          clearable
-          placeholder="请选择型号"
-        >
-          <el-option
-            v-for="(item, index) in selects.branchs"
+            v-for="(item, index) in branchList"
             :key="index"
             :label="item.name"
             :value="item.id"
@@ -58,16 +43,60 @@
   </div>
 </template>
 <script>
+import { getInstrumentSoundList,updateInstrumentActivity } from "../api";
 export default {
+  props: ["detail"],
   data() {
     return {
       form: {
-        sound: "",
-        pinpai: "",
-        xinghao: "",
-        organIdList: "",
+        id:this.detail.id,
+        subjectId: "",
+        instrumentsId: "",
       },
+      branchList: [],
     };
   },
+  async mounted() {
+    await this.$store.dispatch("setSubjects");
+    this.changeSound(this.detail.subjectId);
+    this.form.subjectId = this.detail.subjectId;
+    this.form.instrumentsId = this.detail.instrumentsId;
+  },
+  methods: {
+    async changeSound(val) {
+      this.form.instrumentsId = "";
+      if (val) {
+        try {
+          const res = await getInstrumentSoundList({
+            subjectId: val,
+            page: 1,
+            rows: 999,
+          });
+          this.branchList = res.data.rows.map((item) => {
+            return {
+              name: item.brand + item.specification,
+              id: item.id,
+            };
+          });
+        } catch (e) {
+          console.log(e);
+        }
+      }
+    },
+    submited(){
+      this.$refs.form.validate( async flag=>{
+        if(flag){
+          try{
+           const res = updateInstrumentActivity({...this.form})
+          }catch(e){
+            console.log(e)
+          }
+
+        }
+      })
+      // updateInstrumentActivity
+    }
+
+  },
 };
-</script>
+</script>

+ 4 - 4
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,9 +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',
+        // target : 'https://test.dayaedu.com',
         changeOrigin: true,
         pathRewrite: {
           '^api-auth': ''