Kaynağa Gözat

组织架构编辑新增状态的判断

qymljy 6 ay önce
ebeveyn
işleme
b01ea2339e

+ 20 - 4
src/HManagement/department/staff/list/modules/edit.vue

@@ -224,7 +224,8 @@ export default {
       tradefields:[],
       tablecols:[],
       list:[],
-      salerList:[]
+      salerList:[],
+      oldStatus:''
     }
   },
   methods:{
@@ -237,6 +238,8 @@ export default {
         }
       })
       this.form = Object.assign({},this.form, res.data)
+      this.oldStatus = res.data.status
+      console.log(this.oldStatus,'原状态')
       /*this.form.discountrate = Math.round((this.form.discountrate*100)*100)/100*/
       this.issalehr = this.form.issalehr
       this.salerList = res.data.salearea.map(item=>{
@@ -348,9 +351,22 @@ export default {
             message: this.$t('编辑成功'),
             type: 'success'
           });
-
-          this.dialogFormVisible = false
-          this.$emit('onSuccess')
+          if (this.oldStatus == 0 && this.form.status == 1){
+            this.$confirm('已删除离职人员的业务员档案信息', '提示', {
+              confirmButtonText: '确定',
+              showCancelButton:false,
+              type: 'warning'
+            }).then(() => {
+              this.dialogFormVisible = false
+              this.$emit('onSuccess')
+            }).catch(() => {
+              this.dialogFormVisible = false
+              this.$emit('onSuccess')
+            });
+          }else {
+            this.dialogFormVisible = false
+            this.$emit('onSuccess')
+          }
       });
     },
     // 监听汇报对象选择

+ 1 - 0
src/HManagement/marketing2/saler/index.vue

@@ -11,6 +11,7 @@
         :idName="['sa_saleareaid','sa_salearea_hrid','hrid']"
         :apiId="{query:20221011144603,del:20221011144803}"
         :autoQuery="false"
+        :is_cache="true"
         :options="options"
         :detailPath="{
           path:'/saler_detail',param:{portrait:''}

+ 4 - 1
src/components/normal-basic-layout/index.vue

@@ -98,7 +98,7 @@
 import {mapGetters} from 'vuex'
 export default {
   componentName:'normalTable',
-  props:['tableName','idName','tableData','apiId','formPath','oldFormPath','options','autoQuery','detailPath','customTitle','hidePagination','hideSearch','statusHideDetailBtn','specialKey','drawerWidth','isExport','isNewExport','columns','fileName','excelTitle','exportValue','exportName','exporAdd'],
+  props:['tableName','idName','tableData','apiId','formPath','oldFormPath','options','autoQuery','detailPath','customTitle','hidePagination','hideSearch','statusHideDetailBtn','specialKey','drawerWidth','isExport','isNewExport','columns','fileName','excelTitle','exportValue','exportName','exporAdd','is_cache'],
   components:{
     tableTemp: () => import('./modules/table.vue'),
     setColumn: () => import('./modules/setColumn.vue'),
@@ -158,6 +158,9 @@ export default {
     },
     async listData () {
       this.searchValue?this.param.content.where.condition = this.searchValue:''
+      if (this.is_cache){
+        this.param.content.nocache = true
+      }
       this.param.id = this.apiId.query
       const res = await this.$api.requested(this.param)
       this.list = res.data