|
@@ -434,6 +434,7 @@
|
|
|
<el-select placeholder="选择乐器"
|
|
|
filterable
|
|
|
clearable
|
|
|
+ @change="onInstrumentChange"
|
|
|
v-model="maskForm.musicGoodsIdList">
|
|
|
<el-option v-for="(item, index) in INSTRUMENTLIST"
|
|
|
:key="index"
|
|
@@ -445,10 +446,11 @@
|
|
|
<el-col :span="1"> </el-col>
|
|
|
<el-col :span="11">
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="maskForm.musicPrice"
|
|
|
+ <el-input type="number" @mousewheel.native.prevent :disabled="kitStatus" v-model="maskForm.musicPrice"
|
|
|
placeholder="输入金额">
|
|
|
<el-select v-model="maskForm.kitGroupPurchaseType"
|
|
|
style="width: 80px !important;"
|
|
|
+ @change="onKitGroupChnage"
|
|
|
slot="prepend">
|
|
|
<el-option label="免费"
|
|
|
value="FREE"></el-option>
|
|
@@ -742,7 +744,8 @@ export default {
|
|
|
studentName: '',
|
|
|
payMoney: '',
|
|
|
payMonth: []
|
|
|
- }
|
|
|
+ },
|
|
|
+ kitStatus: false, // 乐器提供方式
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -824,6 +827,33 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ onInstrumentChange(value) { // 乐器切换时
|
|
|
+ let tempkitType = this.maskForm.kitGroupPurchaseType
|
|
|
+ if(tempkitType == 'GROUP') {
|
|
|
+ this.INSTRUMENTLIST.forEach(item => {
|
|
|
+ if(item.value == value) {
|
|
|
+ this.maskForm.musicPrice = item.marketPrice
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onKitGroupChnage(value) { // 乐器提供方式
|
|
|
+ this.kitStatus = false
|
|
|
+ if(value == 'FREE') {
|
|
|
+ this.kitStatus = true
|
|
|
+ this.maskForm.musicPrice = 0
|
|
|
+ } else if(value == 'GROUP') {
|
|
|
+ if(this.INSTRUMENTLIST.length > 0 && this.maskForm.musicGoodsIdList) {
|
|
|
+ this.INSTRUMENTLIST.forEach(item => {
|
|
|
+ if(item.value == this.maskForm.musicGoodsIdList) {
|
|
|
+ this.maskForm.musicPrice = item.marketPrice
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if(value == 'LEASE') {
|
|
|
+ this.maskForm.musicPrice = null
|
|
|
+ }
|
|
|
+ },
|
|
|
onMusicGroupExport () {
|
|
|
let url = '/api-web/export/musicGroupStudent'
|
|
|
let data = {
|
|
@@ -968,10 +998,6 @@ export default {
|
|
|
mixClass: '',
|
|
|
highClass: '',
|
|
|
snapClass: [], --> */
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
let maskForm = this.maskForm
|
|
|
if (!maskForm.signClass && !maskForm.mixClass && !maskForm.highClass) {
|
|
|
if (!maskForm.snapClass || !(maskForm.snapClass && maskForm.snapClass.length >= 1)) {
|
|
@@ -979,6 +1005,17 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if(maskForm.musicGoodsIdList && (maskForm.musicPrice === '' || maskForm.musicPrice === null)) {
|
|
|
+ this.$message.error('请输入乐器金额')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if(maskForm.instrGoodsIdList && maskForm.instrGoodsIdList.length > 0 && (maskForm.instrPrice === '' || maskForm.instrPrice === null)) {
|
|
|
+ this.$message.error('请输入辅件金额')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
let snapClassIds;
|
|
|
|
|
|
maskForm.snapClass ? snapClassIds = maskForm.snapClass.join(',') : snapClassIds = null
|
|
@@ -1059,7 +1096,8 @@ export default {
|
|
|
result.forEach(item => {
|
|
|
tempArr.push({
|
|
|
label: item.name,
|
|
|
- value: item.id
|
|
|
+ value: item.id,
|
|
|
+ marketPrice: item.marketPrice
|
|
|
})
|
|
|
})
|
|
|
if (type == 'ACCESSORIES') {
|