Forráskód Böngészése

feature: 销售执行明细列表

chenqilong 2 éve
szülő
commit
953566bdce

+ 19 - 0
src/api/policy_list.js

@@ -1,5 +1,24 @@
 import request from '@/utils/request'
 
+// 政策-列表V2
+export function policyListV2(data) {
+  return request({
+    url: `/policy/list/v2?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//政策列表V2-导出
+export function policyListV2Export(data, name) {
+  return postBlob({
+    url: '/policy/list/v2/export',
+    method: 'post',
+    data,
+    name
+  })
+}
+
 // 销售政策
 export function getList(params) {
   return request({

+ 10 - 10
src/views/sales_policy/components/AddCondition.vue

@@ -436,12 +436,12 @@ export default {
   methods: {
     getList() {},
     handleBack() {
-      if (this.$parent.isShow == 10) {
-        this.$parent.isShow = 8
-      } else if (this.$parent.isShow == 12) {
-        this.$parent.isShow = 4
+      if (this.$parent.$parent.$parent.isShow == 10) {
+        this.$parent.$parent.$parent.isShow = 8
+      } else if (this.$parent.$parent.$parent.isShow == 12) {
+        this.$parent.$parent.$parent.isShow = 4
       } else {
-        this.$parent.isCondition = 0
+        this.$parent.$parent.$parent.isCondition = 0
         Object.assign(this.$data, this.$options.data())
       }
     },
@@ -523,7 +523,7 @@ export default {
       for (let i = 0; i < this.conditionBox.length; i++) {
         for (let j = 0; j < this.conditionBox[i].length; j++) {
           this.conditionBox[i][j].popType = i + 1
-          this.conditionBox[i][j].policyId = this.$parent.searchForm.code || this.comCode
+          this.conditionBox[i][j].policyId = this.$parent.$parent.$parent.searchForm.code || this.comCode
           this.conditionBox[i][j].id = ''
           //  this.conditionBox[i][j].policyMaterialId =this.conditionBox[i][j].materialId
         }
@@ -542,7 +542,7 @@ export default {
       const params = {
         id: '',
         policyConditionMaterials: tableData,
-        policyId: this.$parent.searchForm.code || this.comCode,
+        policyId: this.$parent.$parent.$parent.searchForm.code || this.comCode,
         policyName: '',
         pop: pop.join(':')
       }
@@ -554,8 +554,8 @@ export default {
         this.limit = ''
         this.pop = ''
         this.popArr = {}
-        this.$parent.isCondition = 0
-        this.$parent.isFlag = 1
+        this.$parent.$parent.$parent.isCondition = 0
+        this.$parent.$parent.$parent.isFlag = 1
         // Object.assign(this.$data, this.$options.data());
         this.$emit('handleSubmitCon', this.$parent.searchForm.code || this.comCode)
       })
@@ -607,7 +607,7 @@ export default {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         saleTypeCode: this.saleTypeCode,
-        policyId: this.$parent.searchForm.code || this.comCode
+        policyId: this.$parent.$parent.$parent.searchForm.code || this.comCode
       }).then(res => {
         let datas = []
 

+ 57 - 56
src/views/sales_policy/components/AddPolicy.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="app-container">
     <div v-show="isCondition == 0">
-      <el-header height="50px" class="header">
+      <!-- <el-header height="50px" class="header">
         <el-page-header content="新增" @back=";($parent.isShow = 1), ($parent.isFlag = '')" />
-      </el-header>
+      </el-header> -->
       <div>
         <div class="screen-container">
           <h4>销售政策信息</h4>
@@ -84,7 +84,7 @@
               </el-col>
               <el-col :xs="24" :ms="24" :lg="24">
                 <el-form-item label="政策封面图">
-                  <ImageUpload :file-list="fileList" multiple :limit="3"/>
+                  <ImageUpload :file-list="fileList" multiple :limit="3" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -386,7 +386,7 @@
           <div style="margin: 20px 20px 20px 0; display: flex; justify-content: space-between">
             <div>
               <el-button type="primary" size="mini" @click="handleNewInfo">添加</el-button>
-              <el-button type="primary" size="mini" @click="handleSave"  v-loading="fullscreenLoading">保存</el-button>
+              <el-button type="primary" size="mini" @click="handleSave" v-loading="fullscreenLoading">保存</el-button>
             </div>
             <!--            <el-pagination-->
             <!--              :current-page="dcurrentPage"-->
@@ -560,7 +560,7 @@ export default {
       dpageSize: 10,
       dcurrentPage: 1,
       rebateList: [],
-      fullscreenLoading:false
+      fullscreenLoading: false
     }
   },
   computed: {
@@ -631,13 +631,13 @@ export default {
         this.k3List = [...this.k3List, ...res.data.records]
       })
     },
-    async remoteMethodType(query, type){
+    async remoteMethodType(query, type) {
       console.log(111)
       // 获取销售类型列表
       const params = {
         pageNum: 1,
-        pageSize:-1,
-        saleCode:query,
+        pageSize: -1,
+        saleCode: query,
         saleName: '',
         status: ''
       }
@@ -856,26 +856,26 @@ export default {
         return
       }
 
-      const fomrtData = (type) => {
+      const fomrtData = type => {
         var arr = []
         if (type != 'assign') {
           policyCustomers.forEach(el => {
-          arr.push({
-            customerId: el.id,
-            customerName: el.name,
-            customerNumber: el.number,
-            lastOrderTime: '',
-            limitTakeNum: 0,
-            policyId: this.searchForm.code || this.comCode,
-            policyTitle: '',
-            remark: ''
+            arr.push({
+              customerId: el.id,
+              customerName: el.name,
+              customerNumber: el.number,
+              lastOrderTime: '',
+              limitTakeNum: 0,
+              policyId: this.searchForm.code || this.comCode,
+              policyTitle: '',
+              remark: ''
+            })
           })
-        })
-        } 
+        }
 
         let imgUrl = []
-        this.fileList.forEach(k=>{
-              imgUrl.push(k.url)
+        this.fileList.forEach(k => {
+          imgUrl.push(k.url)
         })
         const params = {
           adminCompanyId: '',
@@ -899,8 +899,9 @@ export default {
         addPoliy(params).then(res => {
           console.log(res)
           this.$successMsg('新增成功')
-          this.$parent.getList()
-          this.$parent.isShow = 1
+          // this.$parent.getList()
+          this.$parent.$parent.$refs.pageRef.refreshList()
+          this.$parent.$parent.isShow = 1
         })
       }
 
@@ -929,28 +930,27 @@ export default {
     },
     handleNewInfo() {
       // 物料列表
-    this.$nextTick(()=>{
-      this.dataList.push({
-        id: '',
-        discAmount: 0,
-        materialId: '',
-        materialName: '',
-        materialNumber: '',
-        policyId: this.comCode,
-        price: '',
-        remark: '',
-        saleTypeCode: '',
-        saleTypeId: '',
-        saleTypeName: '',
-        specification: '',
-        rebateWalletIds: [],
-        walletIds: [this.NoRebateWalletList[0].id],
-        walletRelaList: [],
-        
+      this.$nextTick(() => {
+        this.dataList.push({
+          id: '',
+          discAmount: 0,
+          materialId: '',
+          materialName: '',
+          materialNumber: '',
+          policyId: this.comCode,
+          price: '',
+          remark: '',
+          saleTypeCode: '',
+          saleTypeId: '',
+          saleTypeName: '',
+          specification: '',
+          rebateWalletIds: [],
+          walletIds: [this.NoRebateWalletList[0].id],
+          walletRelaList: []
+        })
+        this.sleectBox.currentPage = 1
       })
-      this.sleectBox.currentPage = 1
-    })
-     
+
       // this.listTotal += 1;
       // this.dataList.push(this.addList[this.addList.length-1])
     },
@@ -980,19 +980,20 @@ export default {
           return
         }
       }
-      savePolicy(this.dataList).then(res => {
-        this.dataList = []
-        this.dcurrentPage = 1
-        this.sleectBox.currentPage = 1
-        this.fullscreenLoading = false
+      savePolicy(this.dataList)
+        .then(res => {
+          this.dataList = []
+          this.dcurrentPage = 1
+          this.sleectBox.currentPage = 1
+          this.fullscreenLoading = false
 
-        this.$successMsg('保存成功')
+          this.$successMsg('保存成功')
 
-        this.handletwoList()
-      }).finally(()=>{
-        this.fullscreenLoading = false
-
-      })
+          this.handletwoList()
+        })
+        .finally(() => {
+          this.fullscreenLoading = false
+        })
     },
     handleK3List(e, row, index, name) {
       const item = this.k3List.filter(k => {

+ 2 - 1
src/views/sales_policy/components/EditCondition.vue

@@ -305,8 +305,9 @@ export default {
   methods: {
     getList() {},
     handleBack() {
+      console.log(this.$parent)
       console.log(this.id, this.policyId)
-      this.$parent.isEdit = 1
+      // this.$parent.isEdit = 1
     },
     /**
      * 根据条件禁用行复选框

+ 85 - 75
src/views/sales_policy/components/Examine.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="app-container">
     <div v-if="isEdit == 1">
-      <el-header height="50px" class="header">
+      <!-- <el-header height="50px" class="header">
         <el-page-header :content="funTitle()" @back=";($parent.isShow = 1), ($parent.id = '')" />
-      </el-header>
+      </el-header> -->
       <div>
         <div class="diy-table-1">
           <el-row>
@@ -86,7 +86,7 @@
             </el-col>
           </el-row>
 
-          <el-row v-if="detail.imgSrc && $parent.isShow !== 5" class="img-box">
+          <el-row v-if="detail.imgSrc && $parent.$parent.$parent.isShow !== 5" class="img-box">
             <el-col :span="24" class="item">
               <div class="label" style="height: 150px">政策封面图</div>
               <div class="value" style="height: 150px">
@@ -116,7 +116,7 @@
               </div>
             </el-col>
           </el-row>
-          <el-row v-if="$parent.isShow == 5">
+          <el-row v-if="$parent.$parent.$parent.isShow == 5">
             <el-col :span="24" class="item">
               <div class="label" style="height: 150px">政策封面图</div>
               <div class="value" style="height: 150px">
@@ -124,7 +124,7 @@
               </div>
             </el-col>
           </el-row>
-          <el-row v-if="this.$parent.isShow == 4">
+          <el-row v-if="this.$parent.$parent.$parent.isShow == 4">
             <el-col :span="8" class="item">
               <div class="label">审核人</div>
               <div class="value">{{ detail.examineBy }}</div>
@@ -168,7 +168,7 @@
               <el-col :span="12">
                 <h4 style="display: inline-block; margin-right: 20px">货品信息</h4>
                 <ExportButton
-                  v-if="$parent.isShow === 4"
+                  v-if="$parent.$parent.$parent.isShow === 4"
                   style="display: inline-block"
                   :ex-url="'policy/material/export'"
                   ex-text="导出货品"
@@ -176,7 +176,7 @@
                 />
 
                 <el-upload
-                  v-if="$parent.isShow == 5"
+                  v-if="$parent.$parent.$parent.isShow == 5"
                   class="import-btn"
                   :action="baseURL + 'student/import'"
                   :http-request="handleImport"
@@ -321,7 +321,7 @@
             </el-table-column>
             <el-table-column label="操作" align="left" width="150">
               <template slot-scope="scope">
-                <template v-if="$parent.isShow == 5">
+                <template v-if="$parent.$parent.$parent.isShow == 5">
                   <el-button type="text" size="small" @click="getCommonApi(scope.row)">编辑</el-button>
                   <el-popconfirm
                     confirm-button-text="好的"
@@ -339,9 +339,9 @@
                   type="text"
                   size="small"
                   @click="
-                    ;($parent.isShow = 10),
-                      ($parent.policyId = scope.row.id),
-                      $parent.isShow === 8 ? (detailFang = false) : (detailFang = true)
+                    ;($parent.$parent.$parent.isShow = 10),
+                      ($parent.$parent.$parent.policyId = scope.row.id),
+                      $parent.$parent.$parent.isShow === 8 ? (detailFang = false) : (detailFang = true)
                   "
                   >查看条件</el-button
                 >
@@ -355,14 +355,13 @@
                 <h4 style="display: inline-block; margin-right: 20px">经销商使用范围</h4>
                 <template v-if="detail.flag == 0">
                   <ExportButton
-                  v-if="$parent.isShow === 4"
-                  style="display: inline-block"
-                  :ex-url="'policy/customer/export'"
-                  ex-text="导出经销商"
-                  :ex-params="{ policyId: detail.code }"
-                />
+                    v-if="$parent.$parent.$parent.isShow === 4"
+                    style="display: inline-block"
+                    :ex-url="'policy/customer/export'"
+                    ex-text="导出经销商"
+                    :ex-params="{ policyId: detail.code }"
+                  />
                 </template>
-               
               </el-col>
             </el-row>
             <el-divider />
@@ -374,45 +373,45 @@
               <el-radio label="2" :disabled="detail.flag != 2">佛山经销商</el-radio>
             </el-radio-group>
           </div>
-      
-          <template v-if="$parent.isShow != 5">
+
+          <template v-if="$parent.$parent.$parent.isShow != 5">
             <template v-if="detail.flag == 0">
-            <el-table
-              v-loading="listLoading"
-              :data="custoList"
-              element-loading-text="Loading"
-              border
-              fit
-              highlight-current-row
-              stripe
-            >
-              <el-table-column fixed type="index" label="序号" width="50" align="left" />
-              <el-table-column prop="customerNumber" label="经销商编码" align="left">
-                <template slot-scope="scope">
-                  <CopyButton :copy-text="scope.row.customerNumber" />
-                  <span>{{ scope.row.customerNumber }}</span>
-                </template></el-table-column
+              <el-table
+                v-loading="listLoading"
+                :data="custoList"
+                element-loading-text="Loading"
+                border
+                fit
+                highlight-current-row
+                stripe
               >
-              <el-table-column prop="customerName" label="经销商名称" align="left">
-                <template slot-scope="scope">
-                  <CopyButton :copy-text="scope.row.customerName" />
-                  <span>{{ scope.row.customerName }}</span>
-                </template>
-              </el-table-column>
-            </el-table>
-            <!-- 分页 -->
-            <div style="margin: 20px 0">
-              <el-pagination
-                :current-page="currentPages"
-                :page-sizes="[10, 20, 30, 50]"
-                :page-size="10"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="clistTotals"
-                @size-change="handleSizeChanges"
-                @current-change="handleCurrentChanges"
-              />
-            </div>
-          </template>
+                <el-table-column fixed type="index" label="序号" width="50" align="left" />
+                <el-table-column prop="customerNumber" label="经销商编码" align="left">
+                  <template slot-scope="scope">
+                    <CopyButton :copy-text="scope.row.customerNumber" />
+                    <span>{{ scope.row.customerNumber }}</span>
+                  </template></el-table-column
+                >
+                <el-table-column prop="customerName" label="经销商名称" align="left">
+                  <template slot-scope="scope">
+                    <CopyButton :copy-text="scope.row.customerName" />
+                    <span>{{ scope.row.customerName }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <!-- 分页 -->
+              <div style="margin: 20px 0">
+                <el-pagination
+                  :current-page="currentPages"
+                  :page-sizes="[10, 20, 30, 50]"
+                  :page-size="10"
+                  layout="total, sizes, prev, pager, next, jumper"
+                  :total="clistTotals"
+                  @size-change="handleSizeChanges"
+                  @current-change="handleCurrentChanges"
+                />
+              </div>
+            </template>
           </template>
           <template v-else>
             <el-row :gutter="20">
@@ -513,8 +512,7 @@
                 </div> -->
               </el-col>
             </el-row>
-    
-        </template>
+          </template>
           <div>
             <h4 style="display: inline-block; margin-right: 20px">经销商上限</h4>
             <el-divider />
@@ -609,7 +607,10 @@
               />
             </div>
           </div>
-          <div v-if="$parent.isShow == 8 && detail.examineStatus == 'WAIT'" class="descriptions diy-table-1">
+          <div
+            v-if="$parent.$parent.$parent.isShow == 8 && detail.examineStatus == 'WAIT'"
+            class="descriptions diy-table-1"
+          >
             <el-row>
               <el-col :span="6">审核人</el-col>
               <el-col :span="6">{{ $store.getters.name }}</el-col>
@@ -635,7 +636,9 @@
           </div>
         </div>
         <div>
-          <el-button v-if="$parent.isShow == 5" type="primary" size="default" @click="handleSave">保存</el-button>
+          <el-button v-if="$parent.$parent.$parent.isShow == 5" type="primary" size="default" @click="handleSave"
+            >保存</el-button
+          >
         </div>
       </div>
     </div>
@@ -665,6 +668,12 @@ import Minxin from '@/mixin'
 
 export default {
   name: 'Examine',
+  props: {
+    id: {
+      type: String,
+      default: ''
+    }
+  },
   components: {
     EditCondition,
     ImageUpload
@@ -746,9 +755,9 @@ export default {
     comTitle() {
       console.log(this.detailFang, 'kkk')
       let title = '详情页'
-      if (this.$parent.isShow == 5) {
+      if (this.$parent.$parent.$parent.isShow == 5) {
         title = '编辑页'
-      } else if (this.$parent.isShow == 8 && !this.detailFang) {
+      } else if (this.$parent.$parent.$parent.isShow == 8 && !this.detailFang) {
         title = '审核页'
       } else {
         title = '详情页'
@@ -761,9 +770,9 @@ export default {
     funTitle() {
       console.log()
       let title = '详情页'
-      if (this.$parent.isShow == 5) {
+      if (this.$parent.$parent.$parent.isShow == 5) {
         title = '编辑页'
-      } else if (this.$parent.isShow == 8 && !this.detailFang) {
+      } else if (this.$parent.$parent.$parent.isShow == 8 && !this.detailFang) {
         title = '审核页'
       } else {
         title = '详情页'
@@ -772,13 +781,13 @@ export default {
     },
     getList() {
       this.listLoading = true
-      getPolicyDetail({ policyId: this.$parent.id }).then(res => {
+      getPolicyDetail({ policyId: this.$parent.$parent.$parent.id }).then(res => {
         this.detail = res.data
-          this.detail.imgSrc = this.detail.imgSrc.split(',')
-        this.detail.imgSrc.forEach(k=>{
-          this.srcList.push(this.$imageUrl+k)
+        this.detail.imgSrc = this.detail.imgSrc.split(',')
+        this.detail.imgSrc.forEach(k => {
+          this.srcList.push(this.$imageUrl + k)
         })
-        if (this.$parent.isShow == 5 && this.detail.imgSrc) {
+        if (this.$parent.$parent.$parent.isShow == 5 && this.detail.imgSrc) {
           this.fileList = [
             {
               hover: '',
@@ -798,7 +807,7 @@ export default {
       getPolicyList({
         pageNum: this.policyList.currentPages,
         pageSize: this.policyList.pageSize,
-        policyId: this.$parent.id,
+        policyId: this.$parent.$parent.$parent.id,
         keyword: this.policyList.keyword
       }).then(res => {
         this.list = res.data.records
@@ -851,8 +860,8 @@ export default {
       this.currentPages = 1
       this.getCond()
     },
-       // 检查文件类型
-       checkFileType(url) {
+    // 检查文件类型
+    checkFileType(url) {
       if (!url) return ''
       const fileSuffix = url.substring(url.lastIndexOf('.') + 1)
 
@@ -912,12 +921,13 @@ export default {
     handleSubmit() {
       toExamine({
         examineStatus: this.examineStatus,
-        policyId: this.$parent.id,
+        policyId: this.$parent.$parent.$parent.id,
         examineRemark: this.remark
       }).then(res => {
         this.$successMsg('已提交审核')
-        this.$parent.isShow = 1
-        this.$parent.getList()
+        this.$parent.$parent.$parent.isShow = 1
+        // this.$parent.getList()
+        this.$parent.$parent.$parent.$refs.pageRef.refreshList()
       })
     },
     // 获取货品信息
@@ -1120,7 +1130,7 @@ export default {
         await this.getCond()
         this.$successMsg('编辑成功')
         this.fileList = []
-        this.$parent.isShow = 1
+        this.$parent.$parent.$parent.isShow = 1
       }
     }
   }

+ 77 - 70
src/views/sales_policy/components/editPolicy.vue

@@ -1,9 +1,9 @@
 <template>
   <div>
     <div v-show="isCondition == 0" class="app-container mymain-container">
-      <el-header height="50px" class="header">
+      <!-- <el-header height="50px" class="header">
         <el-page-header content="编辑" @back=";($parent.isShow = 1), ($parent.isFlag = '')" />
-      </el-header>
+      </el-header> -->
       <div>
         <div class="screen-container">
           <h4>销售政策信息</h4>
@@ -87,7 +87,7 @@
               </el-col>
               <el-col :xs="24" :ms="24" :lg="24">
                 <el-form-item label="政策封面图">
-                  <ImageUpload :file-list="fileList" multiple :limit="3"/>
+                  <ImageUpload :file-list="fileList" multiple :limit="3" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -201,7 +201,7 @@
                     filterable
                     @change="handleSalesType($event, scope.row, scope.$index, 'saleTypeId')"
                   >
-                    <el-option v-for="(item,index) in typeList" :key="index" :label="item.saleName" :value="item.id" />
+                    <el-option v-for="(item, index) in typeList" :key="index" :label="item.saleName" :value="item.id" />
                   </el-select>
                 </template>
               </pl-table-column>
@@ -389,7 +389,7 @@
           <div style="margin: 20px 20px 20px 0; display: flex; justify-content: space-between">
             <div>
               <el-button type="primary" size="mini" @click="handleNewInfo">添加</el-button>
-              <el-button type="primary" size="mini" @click="handleSave"   v-loading="fullscreenLoading">保存</el-button>
+              <el-button type="primary" size="mini" @click="handleSave" v-loading="fullscreenLoading">保存</el-button>
             </div>
             <!--            <el-pagination-->
             <!--              :current-page="dcurrentPage"-->
@@ -494,6 +494,12 @@ import ImageUpload from '@/components/Common/image-upload.vue'
 import { PlTable, PlTableColumn } from 'pl-table'
 
 export default {
+  props: {
+    id: {
+      type: String,
+      default: ''
+    }
+  },
   directives: {
     'el-select-loadmore': {
       bind(el, binding) {
@@ -574,8 +580,8 @@ export default {
       cid: '',
       cpolicyId: '',
       region: 0,
-      fullscreenLoading:false,
-      srcList:[]
+      fullscreenLoading: false,
+      srcList: []
     }
   },
   computed: {
@@ -648,13 +654,13 @@ export default {
         this.k3List = [...this.k3List, ...res.data.records]
       })
     },
-    async remoteMethodType(query, type){
+    async remoteMethodType(query, type) {
       console.log(111)
       // 获取销售类型列表
       const params = {
         pageNum: 1,
-        pageSize:-1,
-        saleCode:query,
+        pageSize: -1,
+        saleCode: query,
         saleName: '',
         status: ''
       }
@@ -708,30 +714,30 @@ export default {
 
       this.typeList = typeData.data.records
     },
-    handleSalesType(e, row, index, name) { 
+    handleSalesType(e, row, index, name) {
       let item
       try {
-        item= this.typeList.filter(k => {
-        return k.id === e
-      })[0]
-  
-      const linshi = []
-      const rebateList = []
-      this.rebateList.forEach(k => {
-        k.saleTypes.forEach(j => {
-          if (!linshi.includes(j.saleTypeId) && j.saleTypeId === e) {
-            rebateList.push(k)
-            linshi.push(j.saleTypeId)
-          }
+        item = this.typeList.filter(k => {
+          return k.id === e
+        })[0]
+
+        const linshi = []
+        const rebateList = []
+        this.rebateList.forEach(k => {
+          k.saleTypes.forEach(j => {
+            if (!linshi.includes(j.saleTypeId) && j.saleTypeId === e) {
+              rebateList.push(k)
+              linshi.push(j.saleTypeId)
+            }
+          })
         })
-      })
 
-      if (rebateList.length) {
-        this.dataList[index].rebateWalletIds = [...new Set([...row.rebateWalletIds, rebateList[0].walletRebateId])]
-        this.$set(row, 'rebateWalletIds', [...new Set([...row.rebateWalletIds, rebateList[0].walletRebateId])])
-      }
+        if (rebateList.length) {
+          this.dataList[index].rebateWalletIds = [...new Set([...row.rebateWalletIds, rebateList[0].walletRebateId])]
+          this.$set(row, 'rebateWalletIds', [...new Set([...row.rebateWalletIds, rebateList[0].walletRebateId])])
+        }
       } catch (error) {
-        console.log(error);
+        console.log(error)
       }
       this.dataList[index][name] = row[name]
       this.dataList[index].saleTypeCode = item.saleCode
@@ -799,9 +805,9 @@ export default {
     },
     async getList() {
       await this.getCommonApi()
-      await getPolicyDetail({ policyId: this.$parent.id }).then(async res => {
+      await getPolicyDetail({ policyId: this.id }).then(async res => {
         this.detail = res.data
-        ;(this.searchForm = {
+        this.searchForm = {
           code: this.detail.code,
           endTime: this.detail.endTime,
           imgSrc: this.detail.imgSrc,
@@ -811,19 +817,18 @@ export default {
           type: this.detail.type,
           isFullRebate: this.detail.isFullRebate,
           commercialType: this.detail.commercialType
-        }),
-          (this.region = res.data.flag)
+        }
+        this.region = res.data.flag
 
         // this.srcList = [this.$imageUrl + this.detail.imgSrc]
-        if (this.$parent.isShow === 5 && this.detail.imgSrc) {
-          this.detail.imgSrc.split(',').forEach(k=>{
+        if (this.isShow === 5 && this.detail.imgSrc) {
+          this.detail.imgSrc.split(',').forEach(k => {
             this.fileList.push({
               hover: '',
-              url:k
+              url: k
             })
-            this.srcList.push(this.$imageUrl+k)
+            this.srcList.push(this.$imageUrl + k)
           })
-
         }
         await this.handletwoList()
         // 获取条件政策
@@ -934,7 +939,7 @@ export default {
         //   }
         // });
         let imgUrl = []
-        this.fileList.forEach(k=>{
+        this.fileList.forEach(k => {
           imgUrl.push(k.url)
         })
         const params = {
@@ -949,8 +954,9 @@ export default {
         updatePolicy(params).then(res => {
           console.log(res)
           this.$successMsg('编辑成功')
-          this.$parent.getList()
-          this.$parent.isShow = 1
+          // this.$parent.getList()
+          this.$parent.$parent.$parent.$refs.pageRef.refreshList()
+          this.isShow = 1
         })
       }
 
@@ -984,25 +990,25 @@ export default {
     handleNewInfo() {
       // 物料列表
 
-      this.$nextTick(()=>{
+      this.$nextTick(() => {
         this.dataList.push({
-        id: '',
-        discAmount: '',
-        materialId: '',
-        materialName: '',
-        materialNumber: '',
-        policyId: this.searchForm.code,
-        price: '',
-        remark: '',
-        saleTypeCode: '',
-        saleTypeId: '',
-        saleTypeName: '',
-        specification: '',
-        walletIds: [this.NoRebateWalletList[0].id],
-        walletRelaList: [],
-        rebateWalletIds:[]
-      })
-      this.sleectBox.currentPage = 1
+          id: '',
+          discAmount: '',
+          materialId: '',
+          materialName: '',
+          materialNumber: '',
+          policyId: this.searchForm.code,
+          price: '',
+          remark: '',
+          saleTypeCode: '',
+          saleTypeId: '',
+          saleTypeName: '',
+          specification: '',
+          walletIds: [this.NoRebateWalletList[0].id],
+          walletRelaList: [],
+          rebateWalletIds: []
+        })
+        this.sleectBox.currentPage = 1
       })
       // this.listTotal += 1;
       // this.dataList.push(this.addList[this.addList.length-1])
@@ -1033,18 +1039,19 @@ export default {
         }
       }
 
-      savePolicy(this.dataList).then(res => {
-        this.dataList = []
-        this.sleectBox.currentPage = 1
-        this.dcurrentPage = 1
-        this.fullscreenLoading = false
-
-        this.$successMsg('保存成功')
-        this.handletwoList()
-      }).finally(()=>{
-        this.fullscreenLoading = false
+      savePolicy(this.dataList)
+        .then(res => {
+          this.dataList = []
+          this.sleectBox.currentPage = 1
+          this.dcurrentPage = 1
+          this.fullscreenLoading = false
 
-      })
+          this.$successMsg('保存成功')
+          this.handletwoList()
+        })
+        .finally(() => {
+          this.fullscreenLoading = false
+        })
     },
     handleK3List(e, row, index, name) {
       const item = this.k3List.filter(k => {

+ 199 - 375
src/views/sales_policy/policy_list.vue

@@ -1,296 +1,11 @@
 <template>
-  <div v-if="isShow === 1" class="app-container">
-    <div class="screen-container">
-      <Collapse :screen-form="screenForm">
-        <template #right_btn>
-          <el-button size="mini" @click="resetScreenForm">清空</el-button>
-          <el-button type="primary" size="mini" @click="submitScreenForm">搜索</el-button>
-        </template>
-        <template #search>
-          <el-form
-            ref="screenForm"
-            size="mini"
-            :model="screenForm"
-            :inline="false"
-            label-width="120px"
-            label-position="left"
-          >
-            <el-row>
-              <el-row :gutter="20">
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="销售政策编号" prop="code">
-                    <el-input v-model="screenForm.code" placeholder="销售政策编号" size="mini" />
-                  </el-form-item>
-                </el-col>
-
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="销售政策说明" prop="title">
-                    <el-input v-model="screenForm.title" placeholder="销售政策说明" size="mini" />
-                  </el-form-item>
-                </el-col>
-
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="表头备注" prop="remark">
-                    <el-input v-model="screenForm.remark" placeholder="表头备注" size="mini" />
-                  </el-form-item>
-                </el-col>
-
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="生效日期" prop="startTime1">
-                    <el-date-picker
-                      v-model="screenForm.startTime1"
-                      type="datetime"
-                      size="mini"
-                      placeholder="生效日期"
-                      value-format="yyyy-MM-dd HH:mm:ss"
-                    />
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <el-row :gutter="20">
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="结束日期" prop="endTime1">
-                    <el-date-picker
-                      v-model="screenForm.endTime1"
-                      type="datetime"
-                      size="mini"
-                      placeholder="结束日期"
-                      value-format="yyyy-MM-dd HH:mm:ss"
-                    />
-                  </el-form-item>
-                </el-col>
-
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="制表日期" prop="startCreateTime">
-                    <el-date-picker
-                      v-model="screenForm.startCreateTime"
-                      type="datetime"
-                      size="mini"
-                      placeholder="制表日期"
-                      value-format="yyyy-MM-dd HH:mm:ss"
-                    />
-                  </el-form-item>
-                </el-col>
-
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="制表人" prop="createBy">
-                    <el-input v-model="screenForm.createBy" placeholder="制表人" size="mini" />
-                  </el-form-item>
-                </el-col>
-
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="审核人" prop="examineBy">
-                    <el-input v-model="screenForm.examineBy" placeholder="审核人" size="mini" />
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <el-row :gutter="20">
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="状态" prop="status">
-                    <el-select
-                      v-model="screenForm.status"
-                      clearable
-                      size="mini"
-                      placeholder="状态"
-                      class="select_height"
-                    >
-                      <el-option
-                        v-for="(item, index) in statusOptions"
-                        :key="index"
-                        :label="item.label"
-                        :value="item.value"
-                      />
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="销售政策类型" prop="type">
-                    <el-select
-                      v-model="screenForm.type"
-                      size="mini"
-                      clearable
-                      placeholder="销售政策类型"
-                      class="select_height"
-                    >
-                      <el-option
-                        v-for="item in typeOptions"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value"
-                      />
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="经销商名称" prop="customerId">
-                    <el-select
-                      v-model="screenForm.customerId"
-                      size="mini"
-                      filterable
-                      clearable
-                      placeholder="经销商名称"
-                      class="select_height"
-                    >
-                      <el-option v-for="item in CrList" :key="item.id" :label="item.name" :value="item.id" />
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="经销商编码" prop="customerNumber">
-                    <el-select
-                      v-model="screenForm.customerNumber"
-                      size="mini"
-                      filterable
-                      clearable
-                      placeholder="经销商编码"
-                      class="select_height"
-                    >
-                      <el-option v-for="item in CrList" :key="item.id" :label="item.number" :value="item.number" />
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-
-                <el-col :xs="24" :ms="6" :lg="6">
-                  <el-form-item label="机型" prop="specification">
-                    <el-input v-model="screenForm.specification" placeholder="机型" size="mini" />
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </el-row>
-          </el-form>
-        </template>
-      </Collapse>
-    </div>
-    <div class="btn-group">
-      <el-row type="flex">
-        <el-button
-          v-if="$checkBtnRole('add', $route.meta.roles)"
-          size="mini"
-          type="primary"
-          icon="el-icon-plus"
-          @click="hanlenewInfo"
-          >新增</el-button
-        >
-      </el-row>
-    </div>
-    <div class="mymain-container">
-      <div class="table">
-        <el-table :data="dataList" :row-class-name="tableRowClassName" border style="width: 100%">
-          <el-table-column fixed="left" label="操作" min-width="250" align="center">
-            <template slot-scope="scope">
-              <el-button
-                v-if="scope.row.examineStatus == 'SAVE'"
-                type="text"
-                size="mini"
-                @click=";(isShow = 5), (id = scope.row.id)"
-                >编辑</el-button
-              >
-              <el-button type="text" size="mini" @click=";(isShow = 4), (id = scope.row.id), (code = scope.row.code)"
-                >详情</el-button
-              >
-
-              <el-button
-                v-if="scope.row.examineStatus == 'WAIT' && $checkBtnRole('examine', $route.meta.roles)"
-                type="text"
-                size="mini"
-                @click=";(isShow = 8), (id = scope.row.id), (policyId = scope.row.policyId), (code = scope.row.code)"
-                >审核</el-button
-              >
-              <!-- </el-popconfirm> -->
-              <el-popconfirm
-                v-if="scope.row.examineStatus == 'SAVE'"
-                style="margin-left: 10px"
-                title="提审?"
-                @onConfirm="handlesubmit(scope.row)"
-              >
-                <el-button slot="reference" type="text" size="mini">提审</el-button>
-              </el-popconfirm>
-              <el-popconfirm
-                v-if="scope.row.examineStatus === 'OK' && scope.row.status"
-                style="margin-left: 10px"
-                title="作废?"
-                @onConfirm="handleNullify(scope.row)"
-              >
-                <el-button slot="reference" type="text" size="mini">作废</el-button>
-              </el-popconfirm>
-              <el-popconfirm
-                v-if="scope.row.examineStatus === 'OK'"
-                style="margin-left: 10px"
-                title="克隆?"
-                @onConfirm="handleClone(scope.row)"
-              >
-                <!--  -->
-                <el-button slot="reference" type="text" size="mini">克隆</el-button>
-              </el-popconfirm>
-              <el-popconfirm
-                v-if="scope.row.examineStatus != 'OK'"
-                style="margin-left: 10px"
-                title="删除吗?"
-                @onConfirm="hanleDelete(scope.row.id)"
-              >
-                <el-button slot="reference" type="text" size="mini">删除</el-button>
-              </el-popconfirm>
-              <el-popconfirm
-                v-if="scope.row.examineStatus == 'OK'"
-                style="margin-left: 10px"
-                title="弃审吗?"
-                @onConfirm="hanleAbandon(scope.row.id)"
-              >
-                <el-button slot="reference" type="text" size="mini">弃审</el-button>
-              </el-popconfirm>
-            </template>
-          </el-table-column>
-          <el-table-column label="状态" width="120" align="left">
-            <template slot-scope="scope">
-              <el-tag size="mini" type="success" v-if="scope.row.status == '1'">已生效</el-tag>
-              <el-tag size="mini" type="danger" v-else-if="scope.row.status == '0'">未生效 </el-tag>
-            </template>
-          </el-table-column>
-          <el-table-column label="审核状态" width="120" align="left">
-            <template slot-scope="scope">
-              <el-tag size="mini" v-if="scope.row.examineStatus == 'SAVE'">保存</el-tag>
-              <el-tag size="mini" type="warning" v-else-if="scope.row.examineStatus == 'WAIT'">待审核 </el-tag>
-              <el-tag size="mini" type="success" v-else-if="scope.row.examineStatus == 'OK'">通过 </el-tag>
-              <el-tag size="mini" type="danger" v-else>不通过 </el-tag>
-            </template>
-          </el-table-column>
-          <el-table-column prop="code" label="销售政策编号" show-overflow-tooltip min-width="200" align="left" />
-          <el-table-column show-overflow-tooltip prop="title" label="销售政策名称" min-width="150" align="left" />
-          <!-- <el-table-column
-          prop="mainName"
-          label="产品类别"
-          align="left"
-        ></el-table-column> -->
-          <el-table-column show-overflow-tooltip prop="remark" label="销售政策说明" min-width="150" align="left" />
-          <el-table-column min-width="200" show-overflow-tooltip prop="startTime" label="生效日期" align="left" />
-          <el-table-column min-width="200" show-overflow-tooltip prop="endTime" label="结束日期" align="left" />
-          <el-table-column show-overflow-tooltip prop="createBy" label="制表人" min-width="200" align="left" />
-          <el-table-column show-overflow-tooltip prop="createTime" label="制表日期" min-width="200" align="left" />
-          <el-table-column show-overflow-tooltip prop="examineBy" label="审核人" min-width="200" align="left" />
-        </el-table>
-        <!-- 分页 -->
-        <div class="fr">
-          <el-pagination
-            :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
-            :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal"
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-          />
-        </div>
-      </div>
-    </div>
-  </div>
-  <AddPolicy v-else-if="isShow === 2" />
+  <!-- <AddPolicy v-else-if="isShow === 2" />
   <AddCondition v-else-if="isShow === 10 || isShow === 12" :id="id" :policy-id="policyId" />
   <EditPolicy v-else-if="isShow === 5" />
   <Details v-else-if="isShow === 4" />
-  <Examine v-else />
+  <Examine v-else /> -->
 
-  <!-- <template-page
+  <template-page
     ref="pageRef"
     :getList="getList"
     :operation="operation()"
@@ -300,8 +15,15 @@
     :tableAttributes="tableAttributes"
     :tableEvents="tableEvents"
   >
-    
-  </template-page> -->
+    <Popu v-if="isShow !== 1">
+      <el-page-header slot="head" :content="content" @back="handleClose" />
+      <AddPolicy v-if="isShow === 2" />
+      <AddCondition v-if="isShow === 10 || isShow === 12" :id="id" :policy-id="policyId" />
+      <EditPolicy v-if="isShow === 5" :id="id" />
+      <Details v-if="isShow === 4" />
+      <Examine v-if="isShow === 8" />
+    </Popu>
+  </template-page>
 </template>
 
 <script>
@@ -319,7 +41,9 @@ import {
   getpolicySubmit,
   getTypeList,
   toExamine,
-  setAbandon
+  setAbandon,
+  policyListV2,
+  policyListV2Export
 } from '@/api/policy_list'
 import Minxin from '@/mixin'
 import { downloadFiles, handleImport } from '@/utils/util'
@@ -336,13 +60,29 @@ export default {
   mixins: [Minxin, add_callback_mixin],
   data() {
     return {
+      showPage: true,
+      content: '商用工程信息单',
+      // 关闭新增弹窗
+      handleClose: this.addOff(() => {
+        if (this.isShow === 2 || this.isShow === 5) {
+          this.isShow = 1
+        }
+        if (this.isShow === 8) {
+          this.isShow = 1
+          this.id = ''
+        }
+        this.showPage = true
+        this.$refs.pageRef.refreshList()
+      }),
       // 事件组合
       optionsEvensGroup: [
         [
           [
             {
               name: '新增',
-              click: this.addOn(() => {})
+              click: this.addOn(() => {
+                this.hanlenewInfo()
+              })
             }
           ]
         ]
@@ -350,7 +90,7 @@ export default {
       // 表格属性
       tableAttributes: {
         // 启用勾选列
-        selectColumn: true
+        selectColumn: false
       },
       // 表格事件
       tableEvents: {
@@ -431,9 +171,9 @@ export default {
   }),
   methods: {
     // 列表请求函数
-    // getList: levelList,
+    getList: policyListV2,
     // 列表导出函数
-    // exportList: exportLevelList,
+    exportList: policyListV2Export,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
       return defaultData
@@ -446,42 +186,126 @@ export default {
       return (h, { row, index, column }) => {
         return (
           <div class="operation-btns">
-            <el-button size="mini" type="text" onClick={async () => {}}>
-              详情
-            </el-button>
-            <el-popconfirm
-              onConfirm={async () => {
-                this.$refs.pageRef.refreshList()
-                this.$message.success('作废成功')
-              }}
-              title="是否确定需要作废该项内容?"
-            >
-              <el-button slot="reference" size="mini" type="text">
-                作废
-              </el-button>
-            </el-popconfirm>
-            <el-popconfirm
-              onConfirm={async () => {
-                this.$refs.pageRef.refreshList()
-                this.$message.success('克隆成功')
-              }}
-              title="是否确定需要克隆该项内容?"
-            >
-              <el-button slot="reference" size="mini" type="text">
-                克隆
+            {row.examineStatus == '保存' ? (
+              <el-button
+                size="mini"
+                type="text"
+                onClick={async () => {
+                  this.isShow = 5
+                  this.id = row.id
+                }}
+              >
+                编辑
               </el-button>
-            </el-popconfirm>
-            <el-popconfirm
-              onConfirm={async () => {
-                this.$refs.pageRef.refreshList()
-                this.$message.success('弃审成功')
+            ) : (
+              ''
+            )}
+
+            <el-button
+              size="mini"
+              type="text"
+              onClick={async () => {
+                this.isShow = 4
+                this.id = row.id
+                this.code = row.code
               }}
-              title="是否确定需要弃审该项内容?"
             >
-              <el-button slot="reference" size="mini" type="text">
-                弃审
+              详情
+            </el-button>
+
+            {row.examineStatus == '待审核' && this.$checkBtnRole('examine', this.$route.meta.roles) ? (
+              <el-button
+                size="mini"
+                type="text"
+                onClick={async () => {
+                  this.isShow = 8
+                  this.id = row.id
+                  this.code = row.code
+                  this.policyId = row.policyId
+                }}
+              >
+                审核
               </el-button>
-            </el-popconfirm>
+            ) : (
+              ''
+            )}
+
+            {row.examineStatus == '保存' ? (
+              <el-popconfirm
+                onOnConfirm={async () => {
+                  this.handlesubmit(row)
+                }}
+                title="是否确定需要提审该项内容?"
+              >
+                <el-button slot="reference" size="mini" type="text">
+                  提审
+                </el-button>
+              </el-popconfirm>
+            ) : (
+              ''
+            )}
+
+            {row.examineStatus == '审核通过' && row.status ? (
+              <el-popconfirm
+                onOnConfirm={async () => {
+                  this.handleNullify(row)
+                  this.$refs.pageRef.refreshList()
+                  this.$message.success('作废成功')
+                }}
+                title="是否确定需要作废该项内容?"
+              >
+                <el-button slot="reference" size="mini" type="text">
+                  作废
+                </el-button>
+              </el-popconfirm>
+            ) : (
+              ''
+            )}
+
+            {row.examineStatus == '审核通过' ? (
+              <el-popconfirm
+                onOnConfirm={async () => {
+                  this.handleClone(row)
+                }}
+                title="是否确定需要克隆该项内容?"
+              >
+                <el-button slot="reference" size="mini" type="text">
+                  克隆
+                </el-button>
+              </el-popconfirm>
+            ) : (
+              ''
+            )}
+
+            {row.examineStatus != '审核通过' ? (
+              <el-popconfirm
+                onOnConfirm={async () => {
+                  this.hanleDelete(row.id)
+                }}
+                title="是否确定需要删除该项内容?"
+              >
+                <el-button slot="reference" size="mini" type="text">
+                  删除
+                </el-button>
+              </el-popconfirm>
+            ) : (
+              ''
+            )}
+
+            {row.examineStatus == '审核通过' ? (
+              <el-popconfirm
+                onOnConfirm={async () => {
+                  this.hanleAbandon(row.id)
+                }}
+                title="是否确定需要弃审该项内容?"
+              >
+                <el-button slot="reference" size="mini" type="text">
+                  弃审
+                </el-button>
+              </el-popconfirm>
+            ) : (
+              ''
+            )}
           </div>
         )
       }
@@ -503,54 +327,54 @@ export default {
     },
     handleClone(row) {
       cloneList({ policyId: row.id }).then(res => {
-        this.$successMsg('克隆成功')
-        this.getList()
+        this.$refs.pageRef.refreshList()
+        this.$message.success('克隆成功')
       })
     },
-    getList() {
-      this.listLoading = true
-      const params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        code: this.screenForm.code,
-        type: this.screenForm.type,
-        createBy: this.screenForm.createBy,
-        endCreateTime: this.screenForm.endCreateTime,
-        endTime1: this.screenForm.endTime1,
-        endTime2: this.screenForm.endTime2,
-        examineBy: this.screenForm.examineBy,
-        remark: this.screenForm.remark,
-        startCreateTime: this.screenForm.startCreateTime,
-        startTime1: this.screenForm.startTime1,
-        startTime2: this.screenForm.startTime2,
-        status: this.screenForm.status,
-        title: this.screenForm.title,
-        customerId: this.screenForm.customerId,
-        customerNumber: this.screenForm.customerNumber,
-        specification: this.screenForm.specification
-      }
-      getList(params).then(res => {
-        this.dataList = res.data.records
-        console.log(this.dataList)
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-      // 产品类型
-      // const paramsType = {
-      //   pageNum: 1,
-      //   pageSize: 10,
-      //   saleCdoe: '',
-      //   saleName: '',
-      //   stauts: ''
-      // }
-      // getTypeList(paramsType).then(res => {
-      //   this.typeList = res.data.records
-      // })
-    },
+    // getList() {
+    //   this.listLoading = true
+    //   const params = {
+    //     pageNum: this.currentPage,
+    //     pageSize: this.pageSize,
+    //     code: this.screenForm.code,
+    //     type: this.screenForm.type,
+    //     createBy: this.screenForm.createBy,
+    //     endCreateTime: this.screenForm.endCreateTime,
+    //     endTime1: this.screenForm.endTime1,
+    //     endTime2: this.screenForm.endTime2,
+    //     examineBy: this.screenForm.examineBy,
+    //     remark: this.screenForm.remark,
+    //     startCreateTime: this.screenForm.startCreateTime,
+    //     startTime1: this.screenForm.startTime1,
+    //     startTime2: this.screenForm.startTime2,
+    //     status: this.screenForm.status,
+    //     title: this.screenForm.title,
+    //     customerId: this.screenForm.customerId,
+    //     customerNumber: this.screenForm.customerNumber,
+    //     specification: this.screenForm.specification
+    //   }
+    //   getList(params).then(res => {
+    //     this.dataList = res.data.records
+    //     console.log(this.dataList)
+    //     this.listTotal = res.data.total
+    //     this.listLoading = false
+    //   })
+    //   // 产品类型
+    //   // const paramsType = {
+    //   //   pageNum: 1,
+    //   //   pageSize: 10,
+    //   //   saleCdoe: '',
+    //   //   saleName: '',
+    //   //   stauts: ''
+    //   // }
+    //   // getTypeList(paramsType).then(res => {
+    //   //   this.typeList = res.data.records
+    //   // })
+    // },
     hanleAbandon(id) {
       setAbandon({ policyId: id }).then(res => {
-        this.$successMsg('弃审成功')
-        this.getList()
+        this.$refs.pageRef.refreshList()
+        this.$message.success('弃审成功')
       })
     },
     hanleDelete(id) {
@@ -558,8 +382,8 @@ export default {
         deletePolicy({
           id: ids[0]
         }).then(res => {
-          this.$successMsg('删除成功')
-          this.getList()
+          this.$refs.pageRef.refreshList()
+          this.$message.success('删除成功')
         })
       })
     },
@@ -602,8 +426,8 @@ export default {
     },
     handlesubmit(e) {
       getpolicySubmit({ policyId: e.id }).then(res => {
-        this.$successMsg('已提交')
-        this.getList()
+        this.$refs.pageRef.refreshList()
+        this.$message.success('提审成功')
       })
     },
     hanleExamine(e) {