Browse Source

订单统计表,下拉框数据修改

jbb 2 years ago
parent
commit
6a9c934d6e

+ 1 - 0
src/views/reportForms/order-statistics/chart/external/customerChart.vue

@@ -59,6 +59,7 @@ export default {
               this.iquantityArr.push(parseFloat(item.iquantity))
               this.inatMoneyArr.push(parseFloat(item.inatMoney))
             })
+            this.$emit('option-ccusName',this.ccusNameArr)
             // console.log('部门三数组', this.ccusNameArr, this.iquantityArr, this.inatMoneyArr)
           }
 

+ 1 - 0
src/views/reportForms/order-statistics/chart/external/departmentChart.vue

@@ -60,6 +60,7 @@ export default {
               this.iquantityArr.push(parseFloat(item.iquantity))
               this.inatMoneyArr.push(parseFloat(item.inatMoney))
             })
+            that.$emit('option',that.cdepNameArr)
             // console.log('部门三数组', this.cdepNameArr, this.iquantityArr, this.inatMoneyArr)
           }
 

+ 1 - 0
src/views/reportForms/order-statistics/chart/interior/customerChart.vue

@@ -59,6 +59,7 @@ export default {
               this.iquantityArr.push(item.iquantity)
               this.inatMoneyArr.push(item.inatMoney)
             })
+            this.$emit('option-ccusName',this.ccusNameArr)
             // console.log('部门三数组', this.ccusNameArr, this.iquantityArr, this.inatMoneyArr)
           }
 

+ 1 - 0
src/views/reportForms/order-statistics/chart/interior/departmentChart.vue

@@ -62,6 +62,7 @@ export default {
               this.iquantityArr.push(item.iquantity)
               this.inatMoneyArr.push(item.inatMoney)
             })
+            this.$emit('option',this.cdepNameArr)
             // console.log('部门三数组', this.cdepNameArr, this.iquantityArr, this.inatMoneyArr)
           }
 

+ 20 - 4
src/views/reportForms/order-statistics/external-statistics.vue

@@ -27,7 +27,7 @@
                 <j-search-select-tag
                   placeholder="请选择部门"
                   v-model="queryParam.department"
-                  dict="view_department,department,department">
+                  :dictOptions="cdepNameOption">
                 </j-search-select-tag>
               </a-form-item>
             </a-col>
@@ -36,7 +36,7 @@
                 <j-search-select-tag
                   placeholder="请选择客户"
                   v-model="queryParam.customer"
-                  dict="view_customer,customername,customername">
+                  :dictOptions="ccusNameOption">
                 </j-search-select-tag>
               </a-form-item>
             </a-col>
@@ -68,11 +68,11 @@
       <div class="chart">
         <!-- 部门 -->
         <div class="depChartStyle" style="background:rgba(255, 165, 0,.09);">
-          <departmentChart ref="departmentChart" />
+          <departmentChart ref="departmentChart" @option="getCdepNameOption" />
         </div>
         <!-- 客户 -->
         <div class="cusChartStyle" style="background:rgba(134, 151, 201,.08);">
-          <customerChart ref="customerChart" />
+          <customerChart ref="customerChart" @option-ccusName="getCcusNameOption"/>
         </div>
       </div>
     </a-card>
@@ -154,6 +154,8 @@ export default {
         { title: '本币金额', width: 150, dataIndex: 'inatMoney', className: 'replacecolor' }
       ],
       extStadata: [],
+      cdepNameOption: [], //部门下拉数据
+      ccusNameOption: [],//客户下拉数据
       loading: false, // 表格加载
       // 查询条件
       queryParam: {
@@ -330,6 +332,20 @@ export default {
       this.getExternalData()
     },
     
+    //整理部门下拉框数据
+    getCdepNameOption(val){
+       val.map(item=>{
+         this.cdepNameOption.push({text:item,value:item})
+       })
+    },
+
+    //整理客户下拉框数据
+    getCcusNameOption(index) {
+       index.map(item=>{
+         this.ccusNameOption.push({text:item,value:item})
+       })
+    }
+    
   }
 }
 </script>

+ 21 - 5
src/views/reportForms/order-statistics/interior-statistics.vue

@@ -26,7 +26,7 @@
                 <j-search-select-tag
                   placeholder="请选择部门"
                   v-model="queryParam.department"
-                  dict="view_department,department,department">
+                  :dictOptions="cdepNameOption">
                 </j-search-select-tag>
               </a-form-item>
             </a-col>
@@ -36,7 +36,7 @@
                 <j-search-select-tag
                   placeholder="请选择客户"
                   v-model="queryParam.customer"
-                  dict="view_customer,customername,customername">
+                  :dictOptions="ccusNameOption">
                 </j-search-select-tag>
               </a-form-item>
             </a-col>
@@ -70,11 +70,11 @@
       <div class="chart">
         <!-- 部门 -->
         <div class="depChartStyle" style="background:rgba(255, 165, 0,.09);">
-          <departmentChart ref="departmentChart" />
+          <departmentChart ref="departmentChart" @option="getCdepNameOption"/>
         </div>
         <!-- 客户 -->
-        <div class="cusChartStyle" style="background:rgba(134, 151, 201,.08);">
-          <customerChart ref="customerChart" />
+        <div class="cusChartStyle" style="background:rgba(134, 151, 201,.08);" >
+          <customerChart ref="customerChart"  @option-ccusName="getCcusNameOption"/>
         </div>
       </div>
     </a-card>
@@ -157,6 +157,8 @@ export default {
         { title: '本币金额', width: 150, dataIndex: 'inatMoney', className: 'replacecolor' }
       ],
       data: [],
+      cdepNameOption: [], //部门下拉数据
+      ccusNameOption: [],//客户下拉数据
       loading: false, // 表格加载
 
       // 查询条件
@@ -336,6 +338,20 @@ export default {
     handleTableChange(pagination, filters, sorter) {
       this.queryParam.pageNo = pagination.current
       this.getExternalData()
+    },
+
+      //整理部门下拉框数据
+    getCdepNameOption(val){
+       val.map(item=>{
+         this.cdepNameOption.push({text:item,value:item})
+       })
+    },
+
+      //整理客户下拉框数据
+    getCcusNameOption(index) {
+       index.map(item=>{
+         this.ccusNameOption.push({text:item,value:item})
+       })
     }
   }
 }