Browse Source

Merge remote-tracking branch 'origin/mergeBranch' into mergeBranch

qymljy 2 years ago
parent
commit
b0ca3ac5dc

+ 7 - 3
src/Form/salerPrivatecustomer/add.vue

@@ -255,7 +255,7 @@
         <el-button size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
 <!--        <el-button size="small" type="primary" @click="duplicateChecking" class="normal-btn-width">查 重</el-button>-->
         <duplicateCheck ref="check" :data="form" @onSuccess="onClose"></duplicateCheck>
-        <el-button size="small" type="primary" @click="onSave" class="normal-btn-width">确 定</el-button>
+        <el-button size="small" type="primary" :loading="loading" @click="onSave" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
     <enterprise
@@ -367,7 +367,8 @@ export default {
   },
   computed:{
     ...mapGetters({
-      dataToForm:'dataToForm'
+      dataToForm:'dataToForm',
+      loading:'loading'
     })
   },
   methods:{
@@ -449,7 +450,10 @@ export default {
      this.$refs.form.validate((valid) => {
        if (!valid) return false
        this.$refs.check.creatShow = true
-       this.$refs.check.queryRule()
+       this.$store.commit('setLoading',true)
+       this.$refs.check.queryRule(() => {
+        this.$store.commit('setLoading',false)
+       })
      })
     },
     onClose () {

+ 1 - 1
src/HDrpManagement/collectionRule/index.vue

@@ -69,7 +69,7 @@ export default {
     async listData(){
       const res = await this.$api.requested(this.params)
       this.list = res.data
-      this.total = res.total
+      this.total = res.pageTotal
       console.log(this.list)
     },
     handleSizeChange(val) {

+ 3 - 2
src/HDrpManagement/workReport/modules/createReport/index.vue

@@ -18,9 +18,10 @@
       size="800px">
       <div class="drawer__panel" v-if="drawer">
         <template v-for="item in detail">
-          <div :style="{'display':item.editable ? 'block' : 'none','margin-bottom':'40px'}">
+          <!-- <div :style="{'display':item.editable ? 'block' : 'none','margin-bottom':'40px'}"> -->
+          <div :style="{'margin-bottom':'40px'}">
             <p class="normal-title" style="margin-bottom:20px">{{ item.title }}</p>
-            <p ref="content" contenteditable="true" class="content">
+            <p ref="content" :contenteditable="item.editable ? true : false" class="content" :style="!item.editable ? 'background:#FAFAFA' : ''">
               <template v-for="item2 in item.content">
                 {{ item2.content }}<br/>
               </template>

+ 3 - 12
src/HDrpManagement/workReport/modules/reportSet/components/addPeople.vue

@@ -86,18 +86,9 @@ export default {
       this.dialog = false
     },
     async allData () {
-      let res = await this.$api.requested({
-        "id": "20230522101302",
-        "content": {
-            "sys_workreportmodelid": this.data ? this.data.sys_workreportmodelid : 0,
-            "type": 1, //汇报人员,汇报对象
-            "pageNumber": 1,
-            "pageSize": 999999999,
-            "where": {
-                "condition": ""
-            }
-        },
-      })
+      let param = JSON.parse(JSON.stringify(this.params))
+      param.content.pageSize = 9999999
+      let res = await this.$api.requested(param)
       this.$confirm(`总共有${res.total}位员工,是否选中`,'提示',{
         confirmButtonText:'确定',
         cancelButtonText:'取消',

+ 16 - 3
src/HDrpManagement/workReport/modules/reportSet/components/edit.vue

@@ -286,7 +286,9 @@ export default {
         },
       })
       this.tool.showMessage(res,() => {
-        this.getSelectPeople()
+        setTimeout(() => {
+          this.getSelectPeople()
+        },1000)
       })
     },
     async selectOptionFun (data) {
@@ -332,11 +334,22 @@ export default {
         this.selectOption.splice(this.selectOption.findIndex(item => item.sys_workreportpresetid == data.sys_workreportpresetid),1)
       })
     },
-    onSubmit(){
+    async onSubmit(){
       this.form.sys_workreportpresetids = this.selectOption.map((item) => {
         return {id:item.sys_workreportpresetid,sequence:item.sequence}
       })
-      this.form.hrids = this.selectPeople.map(item => item.hrid)
+      let res2 = await this.$api.requested({
+        "id": "20230522140702",
+        "content": {
+            "sys_workreportmodelid": this.data.sys_workreportmodelid,
+            "pageNumber": 1,
+            "pageSize": 999999,
+            "where": {
+                "condition": ""
+            }
+        },
+      })
+      this.form.hrids = res2.data.map(item => item.hrid)
       this.form.reporttohrids = this.selectReport.map(item => item.hrid)
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false

+ 12 - 2
src/HDrpManagement/workReport/modules/reportSet/index.vue

@@ -26,9 +26,19 @@
           </el-table-column>
           <el-table-column
             label="操作"
-            width="80">
+            width="120">
             <template slot-scope="scope">
-              <Edit :data="scope.row"></Edit>
+              <Edit class="inline-16" :data="scope.row"></Edit>
+              <customBtn
+                class="inline-16"
+                btnName="删 除"
+                type="text"
+                message="确定删除当前汇报模板吗?"
+                idName="20230520160302"
+                keyName="sys_workreportmodelid"
+                :id="scope.row.sys_workreportmodelid"
+                @onSuccess="getModelList"
+              />
             </template>
           </el-table-column>
         </el-table>

+ 11 - 3
src/HManagement/personalTarget/target/modules/edit/index.vue

@@ -162,9 +162,17 @@ export default {
       } else {
         this.errorurl = null
       }
-      this.tool.showMessage(res1,()=>{
-        this.mainData()
-      })
+      if (this.errorurl) {
+        this.$message({
+          message:'导入失败请查看错误文件',
+          type:'warning'
+        })
+      } else {
+        this.tool.showMessage(res1,()=>{
+          this.mainData()
+        })
+      }
+      
     }
   },
   mounted () {

+ 2 - 1
src/components/duplicatesCheck/customerCheck.vue

@@ -203,7 +203,7 @@ export default {
       this.listData()
     },
     /*查询规则*/
-    async queryRule(){
+    async queryRule(callback){
       const res = await this.$api.requested({
         "id": "20230410090502",
         "content": {},
@@ -212,6 +212,7 @@ export default {
       this.fields2 = res.data.custcheckrule.fields2
       this.fields3 = res.data.custcheckrule.fields3
       this.listData()
+      callback && callback()
     }
   },
   created() {

+ 27 - 3
src/components/newLayout/index.vue

@@ -5,7 +5,7 @@
       <div style="flex:100" class="body__panel">
         <headeTemp></headeTemp>
         <div>
-          <menuTemp class="sticky normal-margin" ref="menu"></menuTemp>
+          <menuTemp class="sticky normal-margin" :style="marginTrue ? 'margin-bottom:70px !important' : 'margin-bottom:16px'" ref="menu"></menuTemp>
           <div class="radius">
             <keep-alive :include="pageCache">
               <router-view></router-view>
@@ -43,14 +43,38 @@ export default {
   },
   data () {
     return {
-
+      timer:null,
+      marginTrue:false
     }
   },
   methods:{
     getModules (mod,type) {
       // this.$refs['menu'].setModules(mod,type)
+    },
+    debouned () {
+      if (this.timer) {
+        clearTimeout(this.timer)
+      }
+      this.timer = setTimeout(() => {
+        if (this.$refs.menu.$el.clientWidth < 1210) {
+          this.marginTrue = true
+        } else {
+          this.marginTrue = false
+        }
+      },200)
     }
-  }
+  },
+  created() {
+    window.addEventListener('resize',this.debouned)
+
+    this.$nextTick(() => {
+      if (this.$refs.menu.$el.clientWidth < 1210) {
+        this.marginTrue = true
+      } else {
+        this.marginTrue = false
+      }
+    })
+  },
 }
 
 </script>

+ 3 - 0
src/store/index.js

@@ -54,6 +54,9 @@ export default new Vuex.Store({
     
   },
   mutations: {
+    setLoading(state,value) {
+      state.loading = value
+    },
     setSiteInfo(state,res) {
       state.siteinfo = res.data
     },