|
@@ -1,22 +1,37 @@
|
|
|
<template>
|
|
|
<div class="teamCourseList">
|
|
|
- <p class="coreTitle">乐保</p>
|
|
|
+ <p class="coreTitle">
|
|
|
+ 乐保
|
|
|
+
|
|
|
+ <el-form-item
|
|
|
+ label="是否展示"
|
|
|
+ prop="isShowMusicInsuranceForPay"
|
|
|
+ v-if="allCourseCurrentPrice == 0"
|
|
|
+ class="titleFormItem"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ style="width: 100% !important"
|
|
|
+ v-model="form.isShowMusicInsuranceForPay"
|
|
|
+ placeholder="请选择是否展乐保费用"
|
|
|
+ size="mini"
|
|
|
+ >
|
|
|
+ <el-option label="是" :value="true"> </el-option>
|
|
|
+ <el-option label="否" :value="false"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </p>
|
|
|
<el-table
|
|
|
- class="courseTable"
|
|
|
+ class="courseTable"
|
|
|
:data="form.leBaoList"
|
|
|
style="width: 100% !important; background: #f9f9f9"
|
|
|
:header-cell-style="{ background: '#F9F9F9', color: '#444' }"
|
|
|
>
|
|
|
- <el-table-column
|
|
|
- width="170px"
|
|
|
- label="乐器保养"
|
|
|
-
|
|
|
- >
|
|
|
+ <el-table-column width="170px" label="乐器保养">
|
|
|
<template slot-scope="scope">
|
|
|
<p>乐器保养</p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="年限" prop="num" key="num" width="170px">
|
|
|
+ <el-table-column label="年限" prop="num" key="num" width="170px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
:prop="'leBaoList.' + scope.$index + '.num'"
|
|
@@ -44,7 +59,12 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="售价(元)" prop="actualAmount" key="actualAmount" width="170px">
|
|
|
+ <el-table-column
|
|
|
+ label="售价(元)"
|
|
|
+ prop="actualAmount"
|
|
|
+ key="actualAmount"
|
|
|
+ width="170px"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
:prop="'leBaoList.' + scope.$index + '.actualAmount'"
|
|
@@ -73,7 +93,7 @@
|
|
|
prop="originalAmount"
|
|
|
key="originalAmount"
|
|
|
label="原价(元)"
|
|
|
- width="170px"
|
|
|
+ width="170px"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
@@ -91,15 +111,14 @@
|
|
|
:controls="false"
|
|
|
:precision="0"
|
|
|
:min="0"
|
|
|
- :disabled='true'
|
|
|
+ :disabled="true"
|
|
|
placeholder="请输入原价"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="close" key="close">
|
|
|
- <template slot-scope="scope">
|
|
|
- </template>
|
|
|
+ <template slot-scope="scope"> </template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<!-- v-if="!isCommon && $listeners.create" @click="$listeners.create"-->
|
|
@@ -108,7 +127,7 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
export default {
|
|
|
- props: ["form",'leBaoInfo'],
|
|
|
+ props: ["form", "leBaoInfo"],
|
|
|
data() {
|
|
|
return {
|
|
|
charges: [],
|
|
@@ -119,22 +138,38 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- changeYear(val){
|
|
|
- this.leBaoInfo.forEach(element => {
|
|
|
- if(element.id == '189'){
|
|
|
- this.$set(this.form.leBaoList[0],'actualAmount',val*element.paranValue)
|
|
|
+ changeYear(val) {
|
|
|
+ this.leBaoInfo.forEach((element) => {
|
|
|
+ if (element.id == "189") {
|
|
|
+ this.$set(
|
|
|
+ this.form.leBaoList[0],
|
|
|
+ "actualAmount",
|
|
|
+ val * element.paranValue
|
|
|
+ );
|
|
|
}
|
|
|
- if(element.id == '202'){
|
|
|
- this.$set(this.form.leBaoList[0],'originalAmount',val*element.paranValue)
|
|
|
+ if (element.id == "202") {
|
|
|
+ this.$set(
|
|
|
+ this.form.leBaoList[0],
|
|
|
+ "originalAmount",
|
|
|
+ val * element.paranValue
|
|
|
+ );
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
},
|
|
|
change() {},
|
|
|
},
|
|
|
- computed:{
|
|
|
-
|
|
|
- }
|
|
|
+ computed: {
|
|
|
+ allCourseCurrentPrice() {
|
|
|
+ let price = 0;
|
|
|
+ this.form.leBaoList.forEach((element) => {
|
|
|
+ price += element.actualAmount;
|
|
|
+ });
|
|
|
+ if (price > 0) {
|
|
|
+ this.form.isShowMusicInsuranceForPay = true;
|
|
|
+ }
|
|
|
+ return price;
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|