Jelajahi Sumber

营销-SPD-商机:商机达成率报表时间选择报错问题处理;

001295 2 tahun lalu
induk
melakukan
bc28ac9997
1 mengubah file dengan 8 tambahan dan 5 penghapusan
  1. 8 5
      src/views/business/spd/bo/statement/proportion/index.vue

+ 8 - 5
src/views/business/spd/bo/statement/proportion/index.vue

@@ -1,11 +1,12 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="商机日期" prop="code">
+      <el-form-item label="商机日期" prop="yearMonth">
         <el-date-picker
           type="month"
           v-model="queryParams.yearMonth"
           placeholder="选择月份"
+          @change="yearMonthChange"
           >
         </el-date-picker>
       </el-form-item>
@@ -104,8 +105,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        // yearMonth: new Date().Format(),
-        yearMonth: new Date(),
+        yearMonth: new Date().Format(),
         boType: null,
         boSource: null,
         deptName: null,
@@ -124,7 +124,6 @@ export default {
     /** 查询职责列表 */
     getList() {
       this.loading = true;
-      this.queryParams.yearMonth = this.queryParams.yearMonth.Format();
       listProportion(this.queryParams).then(response => {
         this.list = response.rows;
         for(let item of this.list) {
@@ -167,7 +166,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
-      this.queryParams.yearMonth = new Date();
+      this.queryParams.yearMonth = new Date().Format();
       this.handleQuery();
     },
     // 多选框选中数据
@@ -234,6 +233,10 @@ export default {
       try{m+=s2.split(".")[1].length}catch(e){}
       return Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m)
     },
+    //选月份后
+    yearMonthChange(value) {
+      this.queryParams.yearMonth = value.Format();
+    },
   }
 };
 </script>