|
@@ -70,7 +70,11 @@
|
|
|
:prop="'itemList.' + index + '.itemCategory'"
|
|
|
:rules="rules['itemCategory']"
|
|
|
>
|
|
|
- <el-select v-model="item.itemCategory" placeholder="请选择成本类型">
|
|
|
+ <el-select
|
|
|
+ @change="changeCategory(item)"
|
|
|
+ v-model="item.itemCategory"
|
|
|
+ placeholder="请选择成本类型"
|
|
|
+ >
|
|
|
<el-option label="业务类型" :value="1"></el-option>
|
|
|
<el-option label="非分成" :value="2"></el-option>
|
|
|
</el-select>
|
|
@@ -229,6 +233,7 @@ export default {
|
|
|
callback(new Error("最低价不能小于最高价"));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if (businessId) {
|
|
|
const levelList = this.itemList.filter(
|
|
|
(e) => e.businessId == list.businessId
|
|
@@ -324,6 +329,10 @@ export default {
|
|
|
changeBus(data, projectId) {
|
|
|
data.projectId = projectId;
|
|
|
},
|
|
|
+ changeCategory(data) {
|
|
|
+ data.educationTypeId = undefined;
|
|
|
+ this.changeEdu(data);
|
|
|
+ },
|
|
|
add(index, data) {
|
|
|
data = data || {
|
|
|
projectId: undefined,
|
|
@@ -402,6 +411,7 @@ export default {
|
|
|
}
|
|
|
list = list.sort((a, b) => a.minValue - b.minValue);
|
|
|
for (let i = 0, len = list.length - 1; i < len; i++) {
|
|
|
+ console.log(i, list);
|
|
|
if (list[i].maxValue >= list[i + 1].minValue) {
|
|
|
return "阶梯计价存在范围冲突";
|
|
|
}
|