Browse Source

修复销售目标溢出问题

zhangqiOMG 2 years ago
parent
commit
65f6cb627e

+ 19 - 17
src/SManagement/personal_target/components/table.vue

@@ -452,7 +452,8 @@
       <el-table-column 
         prop="operation"
         label="操作"
-        width="120">
+        width="120"
+        :fixed="Object.keys(tableData).length != 0 ? 'right' : ''">
         <template slot-scope="scope">
             <slot :data="{data:scope.row,year:year}" name="edit"/>
             <slot :data="{data:scope.row,year:year}" name="detail"/>
@@ -468,7 +469,17 @@ export default {
     return {
       tableData:[],
       year:String((new Date()).getFullYear()),
-      condition:''
+      params: {
+      "id": 20220904165302,
+        "content": {
+        "nocache":true,
+          "year": '',
+          "type":'',
+          "where":{
+              "condition":""//支持部门名称查询
+          }
+        },
+      }
     }
   },
   watch: {
@@ -480,21 +491,12 @@ export default {
   },
   methods:{
     async queryData () {
-      let res = await this.$api.requested({
-        "id": 20220904165302,
-        "content": {
-          "nocache":true,
-            "year": this.year,
-            "type":1,
-            "where":{
-                "condition":""//支持部门名称查询
-            }
-        },
-    })
-    this.tableData = res.data
-    console.log(this.tableData);
-    
-    }
+      this.params.content.year = this.year
+      let res = await this.$api.requested(this.params)
+      this.tableData = res.data
+      console.log(this.tableData);
+    },
+
   },
   mounted () {
     this.queryData()

+ 23 - 3
src/SManagement/personal_target/index.vue

@@ -4,7 +4,13 @@
       <el-button size="small" @click="export1" v-if="tool.checkAuth($route.name,'export')">导出</el-button>
     </Header>
     <div class="container normal-panel">
-      <select-panel @yearChange="yearChange" />
+      <select-panel 
+        @yearChange="yearChange" 
+        @targetChange="targetChange" 
+        @clearTarget="targetClear" 
+        @searchActive="searchActive" 
+        @clearData="searchClear"
+      />
       <Table ref="table">
         <template v-slot:detail="scope">
           <el-button v-if="tool.checkAuth($route.name,'read')" type="text" size="small" @click="$router.push({path:'/PersonalDetail',query:{id:scope.data.data.hrid,year:scope.data.year}})">详情</el-button>
@@ -36,10 +42,24 @@ export default {
   },
   methods: {
     yearChange(time) {
-      console.log(this.$refs.table.year);
-      
       this.$refs.table.year = time
     },
+    targetChange(data) {
+      this.$refs.table.params.content.type = data
+      this.$refs.table.queryData()
+    },
+    targetClear() {
+      this.$refs.table.params.content.type = ''
+      this.$refs.table.queryData()
+    },
+    searchActive(data) {
+      this.$refs.table.params.content.where.condition = data
+      this.$refs.table.queryData()
+    },
+    searchClear() {
+      this.$refs.table.params.content.where.condition = ''
+      this.$refs.table.queryData()
+    },
     async export1() {
       if(!Object.keys(this.$refs.table.tableData).length > 0) return
       let res = await this.$api.requested({

+ 5 - 2
src/SManagement/project_target/components/selectPanel.vue

@@ -13,7 +13,7 @@
     <Search @searchActive="searchActive" @clearData="clearData" />
     <div class="target">
       <span>考核指标:</span>
-      <el-select v-model="target" placeholder="请选择" size="small" clearable @clear="$emit('clearTarget')">
+      <el-select placeholder="请选择" v-model="target" size="small" @change="change" clearable @clear="$emit('clearTarget')">
         <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
         </el-option>
       </el-select>
@@ -28,7 +28,7 @@ export default {
   data () {
     return {
       year: String(new Date().getFullYear()),
-      target: '',
+      target:'',
       options: [
         { label: '开票指标', value: '1' },
         { label: '订单金额', value: '2' },
@@ -50,6 +50,9 @@ export default {
     },
     clearData() {
       this.$emit('clearData')
+    },
+    change(data) {
+      this.$emit('targetChange',data)      
     }
   },
 };

+ 24 - 19
src/SManagement/project_target/components/table.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <select-panel @searchActive="searchActive" @clearData="clearData" @clearTarget="clearTarget" @yearChange="yearChange" style="margin-bottom:16px"/>
+    <select-panel @searchActive="searchActive" @clearData="clearData" @targetChange="targetChange" @clearTarget="clearTarget" @yearChange="yearChange" style="margin-bottom:16px"/>
     <el-table
       :data="tableData"
       style="width: 100%"
@@ -471,7 +471,8 @@
       <el-table-column 
         prop="operation"
         label="操作"
-        width="120">
+        width="120"
+        :fixed="Object.keys(tableData).length != 0 ? 'right' : ''">
         <template slot-scope="scope">
             <slot :data="{data:scope.row,year:year}" name="edit"/>
             <slot :data="{data:scope.row,year:year}" name="detail"/>
@@ -488,7 +489,17 @@ export default {
     return {
       tableData:[],
       year:String((new Date()).getFullYear()),
-      condition:''
+      params: {
+        "id": 20220909154602,
+        "content": {
+            "nocache":true,
+            "year": '',
+            "type":'',
+            "where":{
+                "condition":''//支持部门名称查询
+            }
+        },
+      }
     }
   },
   components:{selectPanel},
@@ -501,35 +512,29 @@ export default {
   },
   methods:{
     async queryData () {
-      const res = await this.$api.requested({
-        "id": 20220909154602,
-        "content": {
-            "nocache":true,
-            "year": this.year,
-            "type":1,
-            "where":{
-                "condition":this.condition//支持部门名称查询
-            }
-        },
-      })
+      this.params.content.year = this.year
+      let res = await this.$api.requested(this.params)
       this.tableData = res.data
-      console.log(this.tableData);
-      
     },
     /* 清空指标 */
     clearTarget() {
-
+      this.params.content.type = ''
+      this.queryData()
+    },
+    targetChange(data) {
+      this.params.content.type = data
+      this.queryData()
     },
     /* 年度更改 */
     yearChange(time) {
       this.year = time
     },
     searchActive(data) {
-      this.condition = data
+      this.params.content.where.condition = data
       this.queryData()
     },
     clearData() {
-      this.condition = ''
+      this.params.content.where.condition = ''
       this.queryData()
     }
   },

+ 0 - 1
yos/css/210.0a3f3fe3.css

@@ -1 +0,0 @@
-.title[data-v-b598169c]{height:20px;line-height:20px;font-size:14px;text-indent:7px;font-weight:700;color:#333;margin-bottom:20px;border-left:.3rem solid #3874f6}.mb-40[data-v-b598169c]{margin-bottom:40px}

+ 0 - 1
yos/css/476.0a3f3fe3.css

@@ -1 +0,0 @@
-.title[data-v-b598169c]{height:20px;line-height:20px;font-size:14px;text-indent:7px;font-weight:700;color:#333;margin-bottom:20px;border-left:.3rem solid #3874f6}.mb-40[data-v-b598169c]{margin-bottom:40px}

+ 0 - 1
yos/css/702.d1a3c8de.css

@@ -1 +0,0 @@
-.el-input-group__append,.el-input-group__prepend{background-color:#4f7bfd;color:#fff;border:1px solid #4f7bfd;cursor:pointer}.search-panel p[data-v-819aa2b2]{flex:1 0 auto;width:40px;font-size:14px}.dialog-footer[data-v-070e76b2],.dialog-footer[data-v-189d68b6]{margin-top:32px;text-align:center}.role_panel{padding:10px;border:1px solid #ebe3e3;font-size:.875rem;cursor:pointer;border-radius:4px;color:#666;transition:.2s linear}.on[data-v-0096b51c]{border:1px solid #4f7bfd;background:#4f7bfd;color:#fff}.title[data-v-b598169c]{height:20px;line-height:20px;font-size:14px;text-indent:7px;font-weight:700;color:#333;margin-bottom:20px;border-left:.3rem solid #3874f6}.mb-40[data-v-b598169c]{margin-bottom:40px}.borderRight[data-v-4cff6729]{border-right:1px solid #ccc}

File diff suppressed because it is too large
+ 0 - 0
yos/css/app.09f1a246.css


File diff suppressed because it is too large
+ 0 - 34
yos/img/iconfont.69177fb1.svg


+ 9 - 1
yos/index.html

@@ -1 +1,9 @@
-<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"><link rel="icon" href="favicon.ico"><title>yos_manage</title><script defer="defer" type="module" src="js/chunk-vendors.8e4fd6d5.js"></script><script defer="defer" type="module" src="js/app.3b6f74f7.js"></script><link href="css/app.09f1a246.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.d9087565.js" nomodule></script><script defer="defer" src="js/app-legacy.2f041322.js" nomodule></script></head><body><noscript><strong>We're sorry but yos_manage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
+<<<<<<< HEAD
+<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"><link rel="icon" href="favicon.ico"><title>yos_manage</title><script defer="defer" type="module" src="js/chunk-vendors.8e4fd6d5.js"></script><script defer="defer" type="module" src="js/app.3b6f74f7.js"></script><link href="css/app.09f1a246.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.d9087565.js" nomodule></script><script defer="defer" src="js/app-legacy.2f041322.js" nomodule></script></head><body><noscript><strong>We're sorry but yos_manage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
+=======
+<<<<<<< HEAD
+<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"><link rel="icon" href="favicon.ico"><title>yos_manage</title><script defer="defer" type="module" src="js/chunk-vendors.8e4fd6d5.js"></script><script defer="defer" type="module" src="js/app.3ea5792b.js"></script><link href="css/app.09f1a246.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.d9087565.js" nomodule></script><script defer="defer" src="js/app-legacy.d23bdc96.js" nomodule></script></head><body><noscript><strong>We're sorry but yos_manage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
+=======
+<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"><link rel="icon" href="favicon.ico"><title>yos_manage</title><script defer="defer" type="module" src="js/chunk-vendors.8e4fd6d5.js"></script><script defer="defer" type="module" src="js/app.d49521f5.js"></script><link href="css/app.1831ed6a.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.d9087565.js" nomodule></script><script defer="defer" src="js/app-legacy.0163b094.js" nomodule></script></head><body><noscript><strong>We're sorry but yos_manage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
+>>>>>>> xiaoqin
+>>>>>>> 1526631212b13265af8daa8a2296fefd9e1a6e8b

File diff suppressed because it is too large
+ 0 - 0
yos/js/457-legacy.3b298f1d.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/457.af51bf08.js


Some files were not shown because too many files changed in this diff