zh 2 rokov pred
rodič
commit
2e4ca0410f

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

@@ -2,7 +2,7 @@
   <el-container class="">
     <el-header height="20px">
       <el-page-header @back="handleBack" :content="content"> </el-page-header>
-    </el-header>
+    </el-header> 
     <div class="line">
       <el-divider></el-divider>
       <h4>限定条件</h4>
@@ -366,6 +366,12 @@ export default {
     policyId: {
       type: String,
       default: ''
+    },
+    isShow:{
+      type: Number,
+    },
+    isFlag:{
+      type: [Number,String],
     }
   },
   watch: {
@@ -441,7 +447,7 @@ export default {
     comCode: state => state.sales.code,
     content() {
       const textArr = ['新增条件', '编辑条件', '条件详情']
-      const isShow = this.$parent.$parent.$parent.$parent.isShow - 2
+      const isShow = this.isShow - 2
       let len = isShow ? 2 : isShow
       return textArr[len]
     }
@@ -449,7 +455,7 @@ export default {
   methods: {
     getList() {},
     handleBack() {
-      const isShow = this.$parent.$parent.$parent.$parent.isShow
+      const isShow = this.isShow
       if ([4, 5].includes(isShow)) {
         this.$parent.isEdit = 1
       } else {
@@ -568,7 +574,7 @@ export default {
         this.pop = ''
         this.popArr = {}
         this.$parent.isCondition = 0
-        this.$parent.$parent.$parent.$parent.isFlag = 1
+        this.isFlag = 1
         // Object.assign(this.$data, this.$options.data());
         this.$emit('handleSubmitCon', this.$parent.searchForm.code || this.comCode)
       })

+ 4 - 9
src/views/sales_policy/components/AddPolicy.vue

@@ -1,9 +1,6 @@
 <template>
   <div>
     <div v-show="isCondition == 0">
-      <!-- <el-header height="50px" class="header">
-        <el-page-header content="新增" @back=";($parent.isShow = 1), ($parent.isFlag = '')" />
-      </el-header> -->
       <div>
         <div class="screen-container">
           <h4>销售政策信息</h4>
@@ -458,7 +455,7 @@
         </div>
       </div>
     </div>
-    <AddCondition v-show="isCondition == 1" @handleSubmitCon="handleSubmitCon" />
+    <AddCondition v-show="isCondition == 1" @handleSubmitCon="handleSubmitCon"  :isShow="isShow" :isFlag="isFlag"/>
   </div>
 </template>
 
@@ -509,6 +506,7 @@ export default {
       }
     }
   },
+  props: ['isShow','isFlag'],
   mixins: [Minxin],
   data() {
     return {
@@ -576,10 +574,7 @@ export default {
     this.searchForm.code = this.comCode
   },
   created() {
-    // console.log(this.$store.code);
-    // if (this.$parent.isFlag) {
-    //    this.handletwoList()
-    // }
+
   },
 
   methods: {
@@ -773,7 +768,7 @@ export default {
     },
     async getList() {
       await this.getCommonApi()
-      if (this.$parent.isFlag) {
+      if (this.isFlag) {
         await this.handletwoList()
       }
     },

+ 0 - 3
src/views/sales_policy/components/Examine.vue

@@ -1,9 +1,6 @@
 <template>
   <div class="">
     <div v-if="isEdit == 1">
-      <!-- <el-header height="50px" class="header">
-        <el-page-header :content="funTitle()" @back=";($parent.isShow = 1), ($parent.id = '')" />
-      </el-header> -->
       <div>
         <div class="diy-table-1">
           <el-row>

+ 2 - 30
src/views/sales_policy/components/details.vue

@@ -1,9 +1,6 @@
 <template>
   <div class="">
     <div v-if="isEdit == 1">
-      <!-- <el-header height="50px" class="header">
-        <el-page-header :content="funTitle()" @back=";($parent.isShow = 1), ($parent.id = '')" />
-      </el-header> -->
       <div>
         <div class="diy-table-1">
           <el-row>
@@ -173,9 +170,7 @@
                 </el-upload>
               </el-col>
               <el-col :span="12" class="tr">
-                <!-- <el-button size="mini" @click="$parent.isShow = 10"
-                >查看条件</el-button
-              > -->
+
               </el-col>
             </el-row>
             <el-divider />
@@ -265,30 +260,7 @@
                   {{ scope.row.status ? '启用' : '作废' }}
                 </template>
               </el-table-column>
-              <!-- <el-table-column
-              label="操作"
-              align="left"
-              width="150"
-              v-if="$parent.isShow == 5 && detail.examineStatus == 'SAVE'"
-            >
-              <template slot-scope="scope">
-                <el-popconfirm
-                  confirm-button-text="好的"
-                  cancel-button-text="不用了"
-                  icon="el-icon-info"
-                  icon-color="red"
-                  title="内容确定删除吗?"
-                  @onConfirm="hanleDelete(scope.row.id)"
-                >
-                  <el-button
-                    slot="reference"
-                    type="text"
-                    class="textColor el-popover-left"
-                    >删除</el-button
-                  >
-                </el-popconfirm>
-              </template>
-            </el-table-column> -->
+
             </el-table>
           </div>
           <!-- 分页 -->

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

@@ -1,9 +1,6 @@
 <template>
   <div>
     <div v-show="isCondition == 0" class="">
-      <!-- <el-header height="50px" class="header">
-        <el-page-header content="编辑" @back=";($parent.isShow = 1), ($parent.isFlag = '')" />
-      </el-header> -->
       <div>
         <div class="screen-container">
           <h4>销售政策信息</h4>
@@ -462,8 +459,8 @@
         </div>
       </div>
     </div>
-    <AddCondition v-show="isCondition === 1" ref="comDom" @handleSubmitCon="handleSubmitCon" />
-    <AddCondition v-show="isCondition === 2" :id="cid" ref="cond" />
+    <AddCondition v-show="isCondition === 1" ref="comDom" @handleSubmitCon="handleSubmitCon" :isShow="isShow" :isFlag="isFlag"/>
+    <AddCondition v-show="isCondition === 2" :id="cid" ref="cond" :isShow="isShow" :isFlag="isFlag"/>
   </div>
 </template>
 
@@ -498,6 +495,12 @@ export default {
     id: {
       type: String,
       default: ''
+    },
+    isShow:{
+      type: Number,
+    },
+    isFlag:{
+      type: [Number,String],
     }
   },
   directives: {
@@ -591,10 +594,7 @@ export default {
   },
 
   created() {
-    // console.log(this.$store.code);
-    // if (this.$parent.isFlag) {
-    //   // this.handletwoList()
-    // }
+
   },
   methods: {
     ...mapMutations('sales', ['initData']),
@@ -834,7 +834,7 @@ export default {
         // 获取条件政策
         await this.handleSubmitCon()
       })
-      if (this.$parent.isFlag) {
+      if (this.isFlag) {
         await this.handletwoList()
       }
     },

+ 2 - 2
src/views/sales_policy/policy_list.vue

@@ -11,8 +11,8 @@
   >
     <Popu v-if="isShow !== 1">
       <el-page-header slot="head" :content="content" @back="handleClose" />
-      <AddPolicy v-if="isShow === 2" @close="handleClose" />
-      <EditPolicy v-if="isShow === 3" :id="id" @close="handleClose" />
+      <AddPolicy v-if="isShow === 2" @close="handleClose" :isShow="isShow" :isFlag="isFlag"/>
+      <EditPolicy v-if="isShow === 3" :id="id" @close="handleClose" :isShow="isShow" :isFlag="isFlag"/>
       <Details v-if="isShow === 4" @close="handleClose" :id="id" :isShow="isShow" />
       <Examine v-if="isShow === 5" @close="handleClose" :id="id" :isShow="isShow"/>
     </Popu>

+ 2 - 0
src/views/supply/apply/apply_list.vue

@@ -492,6 +492,8 @@ export default {
       this.isShowExamine = false
       this.isShowForm = false
       this.isShowReturnForm = false
+      this.$refs.pageRef.refreshList()
+
     },
 
     handleDelete(id) {

+ 1 - 1
src/views/supply/apply/components/apply_examine.vue

@@ -371,7 +371,7 @@ export default {
           this.$successMsg('审批成功')
           this.$emit('shuaxinlb')
           this.goBack()
-          this.$parent?.getList()
+          
         })
         .finally(res => {
           this.formLoading = false

+ 2 - 2
src/views/supply/apply/components/apply_form.vue

@@ -705,14 +705,14 @@ export default {
               this.$emit('shuaxinlb')
               this.$successMsg('编辑成功')
               this.goBack()
-              this.$parent?.getList()
+              
             })
           } else {
             addApply(params).then(res => {
               this.$emit('shuaxinlb')
               this.$successMsg('添加成功')
               this.goBack()
-              this.$parent?.getList()
+              
             })
           }
         }

+ 4 - 4
src/views/supply/apply/components/apply_return_form.vue

@@ -404,7 +404,7 @@ export default {
   },
   name: 'ApplyReturnForm',
   componentName: 'ApplyReturnForm',
-  props: ['listItem'],
+  props: ['listItem','isShow'],
   data() {
     return {
       mainForm: {
@@ -494,7 +494,7 @@ export default {
     // 返回列表
     goBack() {
       console.log(45454)
-      if (this.$parent.isShow == 'true') {
+      if (this.isShow == 'true') {
         this.$router.replace('/supply/implement/sum_list')
       } else {
         this.$emit('backListFormDetail')
@@ -755,14 +755,14 @@ export default {
               this.$emit('shuaxinlb')
               this.$successMsg('编辑成功')
               this.goBack()
-              this.$parent?.getList()
+              
             })
           } else {
             addApplyReturn(params).then(res => {
               this.$emit('shuaxinlb')
               this.$successMsg('添加成功')
               this.goBack()
-              this.$parent?.getList()
+              
             })
           }
         }

+ 1 - 0
src/views/supply/apply/new_apply.vue

@@ -715,6 +715,7 @@ export default {
       this.isShowExamine = false
       this.isShowForm = false
       this.isShowReturnForm = false
+      this.getList()
     },
 
     handleDelete(id) {

+ 1 - 0
src/views/supply/apply/new_engin.vue

@@ -752,6 +752,7 @@ export default {
       this.isShowExamine = false
       this.isShowForm = false
       this.isShowReturnForm = false
+      this.getList()
     },
 
     handleDelete(id) {

+ 2 - 2
src/views/supply/deliver/components/engin_return_form.vue

@@ -972,13 +972,13 @@ export default {
             editEngin(params).then(res => {
               this.$successMsg('编辑成功')
               this.goBack()
-              this.$parent.getList()
+             
             })
           } else {
             addApplyReturn(params).then(res => {
               this.$successMsg('添加成功')
               this.goBack()
-              this.$parent.getList()
+             
             })
           }
         }

+ 1 - 1
src/views/supply/direct/components/direct_examine.vue

@@ -309,7 +309,7 @@ export default {
           examineData(params).then(res => {
             this.$successMsg()
             this.goBack()
-            this.$parent.getList()
+            
           })
         })
         .catch(() => {})

+ 0 - 1
src/views/supply/direct/components/direct_form.vue

@@ -446,7 +446,6 @@ export default {
           editData(params).then(res => {
             this.$successMsg('编辑成功')
             this.goBack()
-            this.$parent.getList()
           })
         }
       })

+ 1 - 0
src/views/supply/direct/direct_list.vue

@@ -475,6 +475,7 @@ export default {
       this.isShowDetail = false
       this.isShowExamine = false
       this.isShowForm = false
+      this.getList()
     },
 
     // 删除