Ver código fonte

Merge branch 'dev' of http://git.echepei.com/tubao/Smart_platform_ui into dev

Qukatie 2 anos atrás
pai
commit
eb8e1a67b8

+ 77 - 3
src/components/report-dialog/main.vue

@@ -91,6 +91,21 @@ export default {
     },
     corpType: {
       type: String
+    },
+    beginCreateTime: {
+      type: String
+    },
+    endCreateTime: {
+      type: String
+    },
+    salesName: {
+      type: String
+    },
+    corpName: {
+      type: String
+    },
+    brand: {
+      type: String
     }
   },
   filters: {
@@ -208,7 +223,7 @@ export default {
             id: this.reportId,
             userId: userId,
             tenantId: tenantId,
-            corpType: this.corpType
+            salesName: this.salesName
           }
         });
       } else if (name == "经销商-采购单.ureport.xml") {
@@ -220,9 +235,68 @@ export default {
             tenantId: tenantId
           }
         });
+      } else if (name == "销售利润对比表-业务员.ureport.xml") {
+        this.$router.push({
+          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+          query: {
+            tenantId: tenantId,
+            beginCreateTime:this.beginCreateTime,
+            endCreateTime:this.endCreateTime,
+            salesName:this.salesName
+          }
+        });
+      } else if (name == "销售利润对比表-客户.ureport.xml") {
+        this.$router.push({
+          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+          query: {
+            tenantId: tenantId,
+            beginCreateTime:this.beginCreateTime,
+            endCreateTime:this.endCreateTime,
+            corpName:this.corpName
+          }
+        });
+      } else if (name == "销售提成数量表.ureport.xml") {
+        this.$router.push({
+          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+          query: {
+            tenantId: tenantId,
+            beginCreateTime:this.beginCreateTime,
+            endCreateTime:this.endCreateTime,
+            salesName:this.salesName
+          }
+        });
+      } else if (name == "销售规格明细表-品牌.ureport.xml") {
+        this.$router.push({
+          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+          query: {
+            tenantId: tenantId,
+            beginCreateTime:this.beginCreateTime,
+            endCreateTime:this.endCreateTime,
+            brand:this.brand
+          }
+        });
+      } else if (name == "销售规格明细表-客户.ureport.xml") {
+        this.$router.push({
+          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+          query: {
+            tenantId: tenantId,
+            beginCreateTime:this.beginCreateTime,
+            endCreateTime:this.endCreateTime,
+            corpId:this.searchValue.corpId
+          }
+        });
+      } else if (name == "品牌采购对账数据表.ureport.xml") {
+        this.$router.push({
+          path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+          query: {
+            tenantId: tenantId,
+            beginCreateTime:this.searchValue.createStartTime,
+            endCreateTime:this.searchValue.createEndTime,
+            brand:this.searchValue.brand
+          }
+        });
       } else {
-        let userId = JSON.parse(localStorage.getItem("saber-userInfo")).content
-          .user_id;
+        let userId = JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id;
         this.$router.push({
           path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
           query: {

+ 15 - 5
src/views/statisticAnalysis/purchaseReconciliation/index.vue

@@ -4,11 +4,11 @@
       <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
         :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
         @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
-        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
+        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" @search-reset="handleReset">
         <template slot="menuLeft">
-          <!-- <el-button type="info" icon="el-icon-printer" size="small" :loading="exportLoading" @click.stop="statement">
+          <el-button type="info" icon="el-icon-printer" size="small" :loading="exportLoading" @click.stop="statement">
             报表打印
-          </el-button> -->
+          </el-button>
           <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
         </template>
         <template slot-scope="scope" slot="orgOrderNo">
@@ -25,7 +25,7 @@
         </template>
       </avue-crud>
     </basic-container>
-    <report-dialog :switchDialog="switchDialog" :searchValue="statementData" :reportName="'经销商-可用库存表'"
+    <report-dialog :switchDialog="switchDialog" :searchValue="statementData" :reportName="'品牌采购对账数据'"
       @onClose="onClose()" />
   </div>
 </template>
@@ -36,6 +36,7 @@ import { getList } from "@/api/statisticAnalysis/purchaseReconciliation";
 import { micrometerFormat } from "@/util/validate";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
+import {defaultDate} from "@/util/date";
 
 export default {
   name: "index",
@@ -48,7 +49,9 @@ export default {
       switchDialog: false,
       statementData: {},
       form: {},
-      search: {},
+      search: {
+        careteTime:[defaultDate(4)[0],defaultDate(4)[1]]
+      },
       dataList: [],
       loading: false,
       detailData: {},
@@ -117,6 +120,7 @@ export default {
             unlinkPanels: true,
             searchRange: true,
             overHidden: true,
+            clearable: false,
           },
           {
             label: "数量",
@@ -180,6 +184,12 @@ export default {
     cellStyle() {
       return "padding:0;height:40px;";
     },
+    handleReset(item){
+      this.search = {
+        ...item,
+        careteTime:[defaultDate(4)[0],defaultDate(4)[1]]
+      }
+    },
     searchCriteriaSwitch(type) {
       if (type) {
         this.option.height = this.option.height - 46;

+ 38 - 11
src/views/statisticAnalysis/salesDetails/index.vue

@@ -4,10 +4,11 @@
       <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
         :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
         @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
-        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
+        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" @search-reset="handleReset">
         <template slot="menuLeft">
           <el-button type="info" size="small" @click="outExport">导出
           </el-button>
+          <el-button type="info" size="small" @click="switchDialog = !switchDialog">报表打印</el-button>
         </template>
         <template slot="corpIdSearch">
           <crop-select v-model="search.corpId" corpType="KH"></crop-select>
@@ -25,21 +26,38 @@
         </template>
       </avue-crud>
     </basic-container>
+    <report-dialog
+        :switchDialog="switchDialog"
+        reportName="销售规格明细"
+        :beginCreateTime="search.careteTime[0]"
+        :endCreateTime="search.careteTime[1]"
+        :brand="search.brand"
+        :searchValue="{corpId:search.corpId}"
+        @onClose="onClose()"
+    />
   </div>
 </template>
 
 <script>
 import { getToken } from "@/util/auth";
 import { getList } from "@/api/statisticAnalysis/salesDetails"
+import {defaultDate} from "@/util/date";
+import reportDialog from "@/components/report-dialog/main";
 
 export default {
   name: "index",
+  components:{
+    reportDialog
+  },
   data() {
     return {
       form: {},
-      search: {},
+      search: {
+        careteTime:[defaultDate(4)[0] + ' 00:00:00',defaultDate(4)[1] + ' 23:59:59']
+      },
       dataList: [],
       loading: false,
+      switchDialog: false,
       detailData: {},
       page: {
         pageSize: 20,
@@ -95,23 +113,23 @@ export default {
             overHidden: true,
             search: true,
           },
-          // {
-          //   label: "品牌",
-          //   prop: "billType",
-          //   type: "select",
-          //   hide: true,
-          //   showColumn: false,
-          //   search: true
-          // },
+          {
+            label: "品牌",
+            prop: "brand",
+            // hide: true,
+            // showColumn: false,
+            search: true
+          },
           {
             label: "日期",
             prop: "careteTime",
-            type: "datetime",
+            type: "date",
             format: 'yyyy-MM-dd',
             valueFormat: 'yyyy-MM-dd HH:mm:ss',
             searchRange: true,
             searchDefaultTime: ['00:00:00', '23:59:59'],
             overHidden: true,
+            clearable: false,
             search: true,
           },
           {
@@ -185,6 +203,12 @@ export default {
     }
   },
   methods: {
+    handleReset(item){
+      this.search = {
+        ...item,
+        careteTime:[defaultDate(4)[0] + ' 00:00:00',defaultDate(4)[1] + ' 23:59:59']
+      }
+    },
     //查看跳转页面
     beforeOpenPage(row, index) {
       this.$router.$avueRouter.closeTag("/businessManagement/salesOrder/index");
@@ -196,6 +220,9 @@ export default {
     cellStyle() {
       return "padding:0;height:40px;";
     },
+    onClose(val){
+      this.switchDialog = val;
+    },
     searchCriteriaSwitch(type) {
       if (type) {
         this.option.height = this.option.height - 46;

+ 34 - 3
src/views/statisticAnalysis/salesProfitN/index.vue

@@ -4,16 +4,17 @@
       <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
         :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
         @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
-        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
+        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" @search-reset="handleReset">
         <template slot="menuLeft">
           <el-button type="info" size="small" @click="outExport">导出</el-button>
+          <el-button type="info" size="small" @click="switchDialog = !switchDialog">报表打印</el-button>
         </template>
         <template slot="corpNameSearch">
           <crop-select v-model="search.corpName" corpType="KH" :zhKey="true"></crop-select>
         </template>
         <template slot="careteTimeSearch">
           <el-date-picker v-model="search.careteTime" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
-            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']">
+            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']" :clearable="false">
           </el-date-picker>
         </template>
         <template slot="brandSearch">
@@ -33,6 +34,15 @@
         </template>
       </avue-crud>
     </basic-container>
+    <report-dialog
+        :switchDialog="switchDialog"
+        reportName="销售利润"
+        :beginCreateTime="search.careteTime[0]"
+        :endCreateTime="search.careteTime[1]"
+        :salesName="search.salesName"
+        :corpName="search.corpName"
+        @onClose="onClose()"
+    />
   </div>
 </template>
 
@@ -41,14 +51,22 @@ import { getToken } from "@/util/auth";
 import { getList } from "@/api/statisticAnalysis/salesProfitN"
 import _ from "lodash";
 import iconList from "@/config/iconList";
+import reportDialog from "@/components/report-dialog/main";
+import {defaultDate} from "@/util/date";
 export default {
   name: "index",
+  components:{
+    reportDialog
+  },
   data() {
     return {
       form: {},
-      search: {},
+      search: {
+        careteTime:[defaultDate(4)[0] + ' 00:00:00',defaultDate(4)[1] + ' 23:59:59']
+      },
       dataList: [],
       loading: false,
+      switchDialog: false,
       detailData: {},
       page: {
         pageSize: 20,
@@ -106,6 +124,10 @@ export default {
           type: "sum",
           decimals: 2
         },{
+          name: "specialOfferQuantity",
+          type: "sum",
+          decimals: 2
+        },{
           name: "thisUsedProfit",
           type: "sum",
           decimals: 2
@@ -246,6 +268,9 @@ export default {
     })
   },
   methods: {
+    onClose(val){
+      this.switchDialog = val;
+    },
     //查看跳转页面
     beforeOpenPage(row, index) {
       this.$router.$avueRouter.closeTag("/businessManagement/salesOrder/index");
@@ -265,6 +290,12 @@ export default {
       }
       this.$refs.crud.getTableHeight();
     },
+    handleReset(item){
+      this.search = {
+        ...item,
+        careteTime:[defaultDate(4)[0] + ' 00:00:00',defaultDate(4)[1] + ' 23:59:59']
+      }
+    },
     //点击搜索按钮触发
     searchChange(params, done) {
       this.page.currentPage = 1;

+ 21 - 6
src/views/statisticAnalysis/salesmanCommission/index.vue

@@ -4,11 +4,11 @@
       <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
         :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
         @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
-        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
+        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" @search-reset="handleReset">
         <template slot="menuLeft">
-          <!-- <el-button type="info" icon="el-icon-printer" size="small" :loading="exportLoading" @click.stop="statement">
+          <el-button type="info" icon="el-icon-printer" size="small" :loading="exportLoading" @click.stop="statement">
             报表打印
-          </el-button> -->
+          </el-button>
           <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
         </template>
         <template slot="brandSearch">
@@ -25,8 +25,13 @@
         </template>
       </avue-crud>
     </basic-container>
-    <report-dialog :switchDialog="switchDialog" :searchValue="statementData" :reportName="'统计分析-销售人员提成'"
-      @onClose="onClose()" />
+    <report-dialog
+        :switchDialog="switchDialog"
+        :reportName="'销售提成'"
+        :beginCreateTime="search.careteTime[0]"
+        :endCreateTime="search.careteTime[1]"
+        :salesName="search.salesName"
+        @onClose="onClose()"/>
   </div>
 </template>
 
@@ -37,6 +42,7 @@ import { micrometerFormat } from "@/util/validate";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
 import { gainUser } from "@/api/basicData/customerInquiry";
+import {defaultDate} from "@/util/date";
 
 export default {
   name: "index",
@@ -49,7 +55,9 @@ export default {
       switchDialog: false,
       statementData: {},
       form: {},
-      search: {},
+      search: {
+        careteTime:[defaultDate(4)[0] + ' 00:00:00',defaultDate(4)[1] + ' 23:59:59']
+      },
       dataList: [],
       loading: false,
       detailData: {},
@@ -103,6 +111,7 @@ export default {
             unlinkPanels: true,
             searchRange: true,
             overHidden: true,
+            clearable:false,
           },
           {
             label: "尺寸",
@@ -196,6 +205,12 @@ export default {
         });
       })
     },
+    handleReset(item){
+      this.search = {
+        ...item,
+        careteTime:[defaultDate(4)[0] + ' 00:00:00',defaultDate(4)[1] + ' 23:59:59']
+      }
+    },
     searchCriteriaSwitch(type) {
       if (type) {
         this.option.height = this.option.height - 46;