|
@@ -1,7 +1,10 @@
|
|
<template>
|
|
<template>
|
|
<el-container class="app-container">
|
|
<el-container class="app-container">
|
|
<el-header height="50px" class="header">
|
|
<el-header height="50px" class="header">
|
|
- <el-page-header @back="handleBack" :content="!id ? !edit? '新增':'编辑' : '详情页面'">
|
|
|
|
|
|
+ <el-page-header
|
|
|
|
+ @back="handleBack"
|
|
|
|
+ :content="!id ? (!edit ? '新增' : '编辑') : '详情页面'"
|
|
|
|
+ >
|
|
</el-page-header>
|
|
</el-page-header>
|
|
</el-header>
|
|
</el-header>
|
|
<div class="line">
|
|
<div class="line">
|
|
@@ -11,7 +14,7 @@
|
|
</div>
|
|
</div>
|
|
<el-main v-if="!id">
|
|
<el-main v-if="!id">
|
|
<el-row v-if="conditionBox.length">
|
|
<el-row v-if="conditionBox.length">
|
|
- <el-row :gutter="50" >
|
|
|
|
|
|
+ <el-row :gutter="50">
|
|
<el-col
|
|
<el-col
|
|
:xs="24"
|
|
:xs="24"
|
|
:sm="24"
|
|
:sm="24"
|
|
@@ -40,6 +43,8 @@
|
|
</el-row>
|
|
</el-row>
|
|
<el-row>
|
|
<el-row>
|
|
<el-table
|
|
<el-table
|
|
|
|
+ ref="multipleTable"
|
|
|
|
+ v-loading="listLoadingArr[`listLoading${index}`]"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
:data="item"
|
|
:data="item"
|
|
border
|
|
border
|
|
@@ -57,7 +62,7 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copyText="scope.row.materialName" />
|
|
<CopyButton :copyText="scope.row.materialName" />
|
|
- <span>{{scope.row.materialName}}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.materialName }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -68,7 +73,7 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copyText="scope.row.specification" />
|
|
<CopyButton :copyText="scope.row.specification" />
|
|
- <span>{{scope.row.specification}}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.specification }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -144,9 +149,8 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copyText="scope.row.materialName" />
|
|
<CopyButton :copyText="scope.row.materialName" />
|
|
- <span>{{scope.row.materialName}}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.materialName }}</span>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="specification"
|
|
prop="specification"
|
|
@@ -156,7 +160,7 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copyText="scope.row.specification" />
|
|
<CopyButton :copyText="scope.row.specification" />
|
|
- <span>{{scope.row.specification}}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.specification }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -277,7 +281,7 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copyText="scope.row.materialNumber" />
|
|
<CopyButton :copyText="scope.row.materialNumber" />
|
|
- <span>{{scope.row.materialNumber}}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.materialNumber }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -289,7 +293,7 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copyText="scope.row.materialName" />
|
|
<CopyButton :copyText="scope.row.materialName" />
|
|
- <span>{{scope.row.materialName}}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.materialName }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -301,7 +305,7 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copyText="scope.row.specification" />
|
|
<CopyButton :copyText="scope.row.specification" />
|
|
- <span>{{scope.row.specification}}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.specification }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -398,7 +402,7 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copyText="scope.row.materialNumber" />
|
|
<CopyButton :copyText="scope.row.materialNumber" />
|
|
- <span>{{scope.row.materialNumber}}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.materialNumber }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -410,7 +414,7 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copyText="scope.row.materialName" />
|
|
<CopyButton :copyText="scope.row.materialName" />
|
|
- <span>{{scope.row.materialName}}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.materialName }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -422,7 +426,7 @@
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<CopyButton :copyText="scope.row.specification" />
|
|
<CopyButton :copyText="scope.row.specification" />
|
|
- <span>{{scope.row.specification}}</span>
|
|
|
|
|
|
+ <span>{{ scope.row.specification }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -458,13 +462,13 @@ import {
|
|
addPoliyCondition,
|
|
addPoliyCondition,
|
|
getConditionMaterialDetail,
|
|
getConditionMaterialDetail,
|
|
getConditionMaterialList,
|
|
getConditionMaterialList,
|
|
- getMaterialList
|
|
|
|
-} from '@/api/policy_list'
|
|
|
|
-import TabelTransfer from './TabelTransfer.vue'
|
|
|
|
|
|
+ getMaterialList,
|
|
|
|
+} from "@/api/policy_list";
|
|
|
|
+import TabelTransfer from "./TabelTransfer.vue";
|
|
|
|
|
|
-import { mapState } from 'vuex'
|
|
|
|
-import AddModel from './AddModel'
|
|
|
|
-import Minxin from '@/mixin'
|
|
|
|
|
|
+import { mapState } from "vuex";
|
|
|
|
+import AddModel from "./AddModel";
|
|
|
|
+import Minxin from "@/mixin";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
mixins: [Minxin],
|
|
mixins: [Minxin],
|
|
@@ -520,14 +524,15 @@ export default {
|
|
fang: false,
|
|
fang: false,
|
|
newConditionBox: [],
|
|
newConditionBox: [],
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
- edit:''
|
|
|
|
|
|
+ edit: "",
|
|
|
|
+ listLoadingArr:{}
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getCommonApi();
|
|
this.getCommonApi();
|
|
},
|
|
},
|
|
computed: mapState({
|
|
computed: mapState({
|
|
- comCode: (state) => state.sales.code ,
|
|
|
|
|
|
+ comCode: (state) => state.sales.code,
|
|
}),
|
|
}),
|
|
methods: {
|
|
methods: {
|
|
getList() {},
|
|
getList() {},
|
|
@@ -557,32 +562,37 @@ export default {
|
|
},
|
|
},
|
|
async getCommonApi(policyId) {
|
|
async getCommonApi(policyId) {
|
|
if (this.id || policyId) {
|
|
if (this.id || policyId) {
|
|
- this.edit = 'eidt'
|
|
|
|
|
|
+ this.edit = "eidt";
|
|
|
|
|
|
- const res = await getConditionMaterialDetail({ id: this.policyId || policyId });
|
|
|
|
|
|
+ const res = await getConditionMaterialDetail({
|
|
|
|
+ id: this.policyId || policyId,
|
|
|
|
+ });
|
|
this.pop = res.data.pop;
|
|
this.pop = res.data.pop;
|
|
let pop = res.data.pop.split(":");
|
|
let pop = res.data.pop.split(":");
|
|
- this.conditionBox = []
|
|
|
|
|
|
+ this.conditionBox = [];
|
|
for (let i = 0; i < pop.length; i++) {
|
|
for (let i = 0; i < pop.length; i++) {
|
|
if (i == 0) {
|
|
if (i == 0) {
|
|
this.limit = pop[i];
|
|
this.limit = pop[i];
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
this.$set(this.popArr, `line_${i - 1}`, pop[i]);
|
|
this.$set(this.popArr, `line_${i - 1}`, pop[i]);
|
|
|
|
+ this.$set(this.listLoadingArr,`listLoading${i}`,false)
|
|
}
|
|
}
|
|
|
|
+
|
|
for (let k = 0; k < pop.length; k++) {
|
|
for (let k = 0; k < pop.length; k++) {
|
|
|
|
+ this.listLoadingArr[`listLoading${k}`]=true
|
|
const { data } = await getConditionMaterialList({
|
|
const { data } = await getConditionMaterialList({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: -1,
|
|
pageSize: -1,
|
|
policyConditionId: res.data.id,
|
|
policyConditionId: res.data.id,
|
|
popType: k + 1,
|
|
popType: k + 1,
|
|
});
|
|
});
|
|
- if (policyId){
|
|
|
|
|
|
+ if (policyId) {
|
|
this.conditionBox.push(data.records);
|
|
this.conditionBox.push(data.records);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
this.conditionBoxs.push(data.records);
|
|
this.conditionBoxs.push(data.records);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ this.listLoadingArr[`listLoading${k}`]=false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -664,6 +674,7 @@ export default {
|
|
}
|
|
}
|
|
this.conditionBox[index] = [];
|
|
this.conditionBox[index] = [];
|
|
this.$set(this.conditionBox, index, arr);
|
|
this.$set(this.conditionBox, index, arr);
|
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 更改每页数量
|
|
// 更改每页数量
|
|
@@ -693,8 +704,7 @@ export default {
|
|
let datas = [];
|
|
let datas = [];
|
|
for (let j = 0; j < this.conditionBox.length; j++) {
|
|
for (let j = 0; j < this.conditionBox.length; j++) {
|
|
datas = [...datas, ...this.conditionBox[j]];
|
|
datas = [...datas, ...this.conditionBox[j]];
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* @value newConditionBox 首页保存的所有选中者,即条件1
|
|
* @value newConditionBox 首页保存的所有选中者,即条件1
|
|
@@ -703,7 +713,6 @@ export default {
|
|
* 如:上一个或者所有条件中已经存在disabled
|
|
* 如:上一个或者所有条件中已经存在disabled
|
|
*/
|
|
*/
|
|
if (this.newConditionBox.length) {
|
|
if (this.newConditionBox.length) {
|
|
-
|
|
|
|
this.conditList = res.data.records;
|
|
this.conditList = res.data.records;
|
|
if (this.conditionBox[index].length) {
|
|
if (this.conditionBox[index].length) {
|
|
for (let n = 0; n < this.newConditionBox.length; n++) {
|
|
for (let n = 0; n < this.newConditionBox.length; n++) {
|
|
@@ -738,7 +747,7 @@ export default {
|
|
}
|
|
}
|
|
this.conditList = res.data.records;
|
|
this.conditList = res.data.records;
|
|
} else {
|
|
} else {
|
|
- console.log(datas,'4455454' ,res.data.records)
|
|
|
|
|
|
+ console.log(datas, "4455454", res.data.records);
|
|
const newData = datas;
|
|
const newData = datas;
|
|
if (newData.length) {
|
|
if (newData.length) {
|
|
for (let i = 0; i < res.data.records.length; i++) {
|
|
for (let i = 0; i < res.data.records.length; i++) {
|