|  | @@ -1,69 +1,82 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  | -  <basic-container>
 | 
	
		
			
				|  |  | -    <avue-crud :option="option"
 | 
	
		
			
				|  |  | -               :data="dataList"
 | 
	
		
			
				|  |  | -               ref="crud"
 | 
	
		
			
				|  |  | -               v-model="form"
 | 
	
		
			
				|  |  | -               :page.sync="page"
 | 
	
		
			
				|  |  | -               :search.sync="search"
 | 
	
		
			
				|  |  | -               @row-del="rowDel"
 | 
	
		
			
				|  |  | -               @row-update="rowUpdate"
 | 
	
		
			
				|  |  | -               :before-open="beforeOpen"
 | 
	
		
			
				|  |  | -               :before-close="beforeClose"
 | 
	
		
			
				|  |  | -               @row-save="rowSave"
 | 
	
		
			
				|  |  | -               @search-change="searchChange"
 | 
	
		
			
				|  |  | -               @search-reset="searchReset"
 | 
	
		
			
				|  |  | -               @selection-change="selectionChange"
 | 
	
		
			
				|  |  | -               @current-change="currentChange"
 | 
	
		
			
				|  |  | -               @size-change="sizeChange"
 | 
	
		
			
				|  |  | -               @refresh-change="refreshChange"
 | 
	
		
			
				|  |  | -               @on-load="onLoad"
 | 
	
		
			
				|  |  | -               @tree-load="treeLoad">
 | 
	
		
			
				|  |  | -      <template slot-scope="{}" slot="startTimeSearchLabel">
 | 
	
		
			
				|  |  | -        <span>有效日期:</span>
 | 
	
		
			
				|  |  | -      </template>
 | 
	
		
			
				|  |  | -      <template slot="corpsSearch">
 | 
	
		
			
				|  |  | -        <select-component
 | 
	
		
			
				|  |  | -          v-model="search.corps"
 | 
	
		
			
				|  |  | -          :configuration="configuration"
 | 
	
		
			
				|  |  | -        ></select-component>
 | 
	
		
			
				|  |  | -      </template>
 | 
	
		
			
				|  |  | -      <template slot-scope="scope" slot="corps">
 | 
	
		
			
				|  |  | -        {{ scope.row.corps }}
 | 
	
		
			
				|  |  | -      </template>
 | 
	
		
			
				|  |  | -      <template slot-scope="scope" slot="menu">
 | 
	
		
			
				|  |  | -        <el-button
 | 
	
		
			
				|  |  | +  <div>
 | 
	
		
			
				|  |  | +    <basic-container v-if="isShow">
 | 
	
		
			
				|  |  | +      <avue-crud :option="option"
 | 
	
		
			
				|  |  | +                 :data="dataList"
 | 
	
		
			
				|  |  | +                 ref="crud"
 | 
	
		
			
				|  |  | +                 v-model="form"
 | 
	
		
			
				|  |  | +                 :page.sync="page"
 | 
	
		
			
				|  |  | +                 :search.sync="search"
 | 
	
		
			
				|  |  | +                 @row-del="rowDel"
 | 
	
		
			
				|  |  | +                 @row-update="rowUpdate"
 | 
	
		
			
				|  |  | +                 :before-open="beforeOpen"
 | 
	
		
			
				|  |  | +                 :before-close="beforeClose"
 | 
	
		
			
				|  |  | +                 @row-save="rowSave"
 | 
	
		
			
				|  |  | +                 @search-change="searchChange"
 | 
	
		
			
				|  |  | +                 @search-reset="searchReset"
 | 
	
		
			
				|  |  | +                 @selection-change="selectionChange"
 | 
	
		
			
				|  |  | +                 @current-change="currentChange"
 | 
	
		
			
				|  |  | +                 @size-change="sizeChange"
 | 
	
		
			
				|  |  | +                 @refresh-change="refreshChange"
 | 
	
		
			
				|  |  | +                 @on-load="onLoad"
 | 
	
		
			
				|  |  | +                 @tree-load="treeLoad">
 | 
	
		
			
				|  |  | +        <template slot-scope="{}" slot="startTimeSearchLabel">
 | 
	
		
			
				|  |  | +          <span>有效日期:</span>
 | 
	
		
			
				|  |  | +        </template>
 | 
	
		
			
				|  |  | +        <template slot="corpsSearch">
 | 
	
		
			
				|  |  | +          <select-component
 | 
	
		
			
				|  |  | +            v-model="search.corps"
 | 
	
		
			
				|  |  | +            :configuration="configuration"
 | 
	
		
			
				|  |  | +          ></select-component>
 | 
	
		
			
				|  |  | +        </template>
 | 
	
		
			
				|  |  | +        <template slot-scope="scope" slot="corps">
 | 
	
		
			
				|  |  | +          {{ scope.row.corps }}
 | 
	
		
			
				|  |  | +        </template>
 | 
	
		
			
				|  |  | +        <template slot-scope="scope" slot="menu">
 | 
	
		
			
				|  |  | +          <el-button
 | 
	
		
			
				|  |  |              type="text"
 | 
	
		
			
				|  |  |              icon="el-icon-view"
 | 
	
		
			
				|  |  |              size="small"
 | 
	
		
			
				|  |  |              @click.stop="beforeOpenPage(scope.row,scope.index)"
 | 
	
		
			
				|  |  | -        >查看
 | 
	
		
			
				|  |  | -        </el-button>
 | 
	
		
			
				|  |  | -        <el-button
 | 
	
		
			
				|  |  | +          >查看
 | 
	
		
			
				|  |  | +          </el-button>
 | 
	
		
			
				|  |  | +          <el-button
 | 
	
		
			
				|  |  |              type="text"
 | 
	
		
			
				|  |  |              icon="el-icon-edit"
 | 
	
		
			
				|  |  |              size="small"
 | 
	
		
			
				|  |  |              @click.stop="editOpen(scope.row,scope.index)"
 | 
	
		
			
				|  |  | -        >编辑
 | 
	
		
			
				|  |  | -        </el-button>
 | 
	
		
			
				|  |  | -        <el-button
 | 
	
		
			
				|  |  | +          >编辑
 | 
	
		
			
				|  |  | +          </el-button>
 | 
	
		
			
				|  |  | +          <el-button
 | 
	
		
			
				|  |  |              type="text"
 | 
	
		
			
				|  |  |              icon="el-icon-delete"
 | 
	
		
			
				|  |  |              size="small"
 | 
	
		
			
				|  |  |              @click.stop="rowDel(scope.row,scope.index)"
 | 
	
		
			
				|  |  | -        >删除
 | 
	
		
			
				|  |  | -        </el-button>
 | 
	
		
			
				|  |  | -      </template>
 | 
	
		
			
				|  |  | -    </avue-crud>
 | 
	
		
			
				|  |  | -  </basic-container>
 | 
	
		
			
				|  |  | +          >删除
 | 
	
		
			
				|  |  | +          </el-button>
 | 
	
		
			
				|  |  | +        </template>
 | 
	
		
			
				|  |  | +      </avue-crud>
 | 
	
		
			
				|  |  | +    </basic-container>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <detail-page
 | 
	
		
			
				|  |  | +      ref="detail"
 | 
	
		
			
				|  |  | +      @goBack="goBack"
 | 
	
		
			
				|  |  | +      :detailData="detailData"
 | 
	
		
			
				|  |  | +      v-else
 | 
	
		
			
				|  |  | +    ></detail-page>
 | 
	
		
			
				|  |  | +  </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import option from "./configuration/mainList.json";
 | 
	
		
			
				|  |  | -import {customerList, typeSave, deleteDetails} from "@/api/maintenance/salesPolicy"
 | 
	
		
			
				|  |  | +import {customerList, typeSave, deleteDetails} from "@/api/maintenance/salesPolicy";
 | 
	
		
			
				|  |  | +import detailPage from "./detailsPageEdit";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "customerInformation",
 | 
	
		
			
				|  |  | +  components: {
 | 
	
		
			
				|  |  | +    detailPage
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        form: {},
 | 
	
	
		
			
				|  | @@ -83,7 +96,9 @@ export default {
 | 
	
		
			
				|  |  |          pageSize: 10,
 | 
	
		
			
				|  |  |          pagerCount: 5,
 | 
	
		
			
				|  |  |          total: 0,
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      isShow: true,
 | 
	
		
			
				|  |  | +      detailData: {},
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
	
		
			
				|  | @@ -154,24 +169,35 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //查看跳转页面
 | 
	
		
			
				|  |  |      beforeOpenPage(row, index) {
 | 
	
		
			
				|  |  | -      this.$router.push({
 | 
	
		
			
				|  |  | -        path: "/salesPolicy_detailsPageEdit",
 | 
	
		
			
				|  |  | -        query: {id: JSON.stringify(row.id)},
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +      this.detailData = {
 | 
	
		
			
				|  |  | +        id: row.id,
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      this.isShow = false;
 | 
	
		
			
				|  |  | +      // this.$router.push({
 | 
	
		
			
				|  |  | +      //   path: "/salesPolicy_detailsPageEdit",
 | 
	
		
			
				|  |  | +      //   query: {id: JSON.stringify(row.id)},
 | 
	
		
			
				|  |  | +      // });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //新增跳转页面
 | 
	
		
			
				|  |  |      beforeOpen(row, index) {
 | 
	
		
			
				|  |  | -      console.log(row)
 | 
	
		
			
				|  |  | -      this.$router.push({
 | 
	
		
			
				|  |  | -        path: "/salesPolicy_detailsPageEdit",
 | 
	
		
			
				|  |  | -        query: {id: JSON.stringify(row.id)},
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +      this.detailData = {
 | 
	
		
			
				|  |  | +        id: row.id,
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      this.isShow = false;
 | 
	
		
			
				|  |  | +      // this.$router.push({
 | 
	
		
			
				|  |  | +      //   path: "/salesPolicy_detailsPageEdit",
 | 
	
		
			
				|  |  | +      //   query: {id: JSON.stringify(row.id)},
 | 
	
		
			
				|  |  | +      // });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      editOpen(row, index) {
 | 
	
		
			
				|  |  | -      this.$router.push({
 | 
	
		
			
				|  |  | -        path: "/salesPolicy_detailsPageEdit",
 | 
	
		
			
				|  |  | -        query: {id: JSON.stringify(row.id)},
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +      this.detailData = {
 | 
	
		
			
				|  |  | +        id: row.id,
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      this.isShow = false;
 | 
	
		
			
				|  |  | +      // this.$router.push({
 | 
	
		
			
				|  |  | +      //   path: "/salesPolicy_detailsPageEdit",
 | 
	
		
			
				|  |  | +      //   query: {id: JSON.stringify(row.id)},
 | 
	
		
			
				|  |  | +      // });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //点击新增时触发
 | 
	
		
			
				|  |  |      beforeClose(done) {
 | 
	
	
		
			
				|  | @@ -229,6 +255,10 @@ export default {
 | 
	
		
			
				|  |  |          resolve(res.data.data.records);
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    goBack() {
 | 
	
		
			
				|  |  | +      this.detailData=this.$options.data().detailData
 | 
	
		
			
				|  |  | +      this.isShow = true;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  </script>
 |