| 
					
				 | 
			
			
				@@ -2,7 +2,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <el-form :model="form" :rules="rules" ref="form" label-width="100px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form-item label="原乐器" prop="name"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-input v-model="form.name"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <span v-if="detail">{{detail.subjectName}}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form-item label="原教辅" prop="name"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-input v-model="form.name"></el-input> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -18,12 +18,18 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-date-picker> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form-item label="更改声部" prop="name"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-select style="width: 100%" v-model="value" clearable placeholder="请选择声部"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          style="width: 100%" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          v-model="form.subjectId" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          clearable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          @change="subjectChange" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          placeholder="请选择声部" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-option 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            v-for="item in options" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            :key="item.value" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            :label="item.label" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            :value="item.value"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            v-for="item in voiceList" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            :key="item.subjectId" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            :label="item.subjectName" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            :value="item.subjectId"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form-item> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -71,16 +77,90 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { getApplyDetail, getSubjectGoodsAndInfo } from '@/api/buildTeam' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const formatCourseScheduleInfo = courseScheduleInfo => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  let tempCheck = {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    tempCourse = {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (courseScheduleInfo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    for (const i in courseScheduleInfo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (courseScheduleInfo.hasOwnProperty(i)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const item = courseScheduleInfo[i]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (item.isNew === 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          item.isStatus = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          tempCheck[i] = {...item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          tempCourse[i] = {...item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    tempCheck, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    tempCourse, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const formatMusicGroupSubjectGoodsGroupList = goodsGroupList => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  let instrumentInfo = {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  for (const item of goodsGroupList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (item.type === 'INSTRUMENT') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      let KGPTJ = item.kitGroupPurchaseTypeJson ? JSON.parse(item.kitGroupPurchaseTypeJson) : {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      for (const key of KGPTJ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let tempItem = {...item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tempItem.marketPrice = tempItem.goodsList[0].marketPrice 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tempItem.kitType = key 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tempItem.coupon = KGPTJ[key] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const formatGoods = data => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  const { courseScheduleInfo, musicGroupSubjectGoodsGroupList, musicGroupSubjectPlan, otherGoods, studentGoods } = data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  props: ['detail', 'musicGroupId', 'voiceList'], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   data() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       options: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       options2: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      form: {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      rules: {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      form: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        subjectId: '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      rules: {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  watch: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    detail() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (this.detail) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.fetchDetail() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  mounted() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    console.log(this.detail, this.voiceList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (this.detail) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.fetchDetail() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    fetchDetail() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      getApplyDetail({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        musicGroupId: this.musicGroupId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        studentId: this.detail.studentId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      .then(res => console.log(res)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    subjectChange(id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      getSubjectGoodsAndInfo({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        musicGroupId: this.musicGroupId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        subjectId: id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     submit() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$listeners.close() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 |