|
|
@@ -94,7 +94,10 @@
|
|
|
v-if="scope.row.sevenYear && scope.row.goodsType == 1"
|
|
|
>
|
|
|
<span>七大员继教可选年份:</span>
|
|
|
- <el-checkbox-group v-model="scope.row.checkList">
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="scope.row.checkList"
|
|
|
+ @change="checkFunc"
|
|
|
+ >
|
|
|
<el-checkbox
|
|
|
v-for="(item, index) in computedSevenYear(
|
|
|
scope.row.sevenYear
|
|
|
@@ -246,6 +249,9 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(["getCartCount"]),
|
|
|
+ checkFunc() {
|
|
|
+ this.caculate();
|
|
|
+ },
|
|
|
areaChange(row, index) {
|
|
|
console.log(row);
|
|
|
let node = this.$refs["cascader" + index].getCheckedNodes()[0]; //选中的根节点
|
|
|
@@ -385,9 +391,12 @@ export default {
|
|
|
|
|
|
caculate() {
|
|
|
this.total = 0;
|
|
|
-
|
|
|
this.multipleSelection.forEach(item => {
|
|
|
- this.total += item.standPrice;
|
|
|
+ if (item.sevenYear) {
|
|
|
+ this.total += item.standPrice * item.checkList.length;
|
|
|
+ } else {
|
|
|
+ this.total += item.standPrice;
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
pay() {
|