浏览代码

修改报表查询

zangguocen 4 年之前
父节点
当前提交
3bb7701643

+ 2 - 1
package.json

@@ -91,7 +91,8 @@
     "serve-static": "1.13.2",
     "svg-sprite-loader": "4.1.3",
     "svgo": "1.2.0",
-    "vue-template-compiler": "2.6.10"
+    "vue-template-compiler": "2.6.10",
+    "webpack": "^4.0.0"
   },
   "engines": {
     "node": ">=8.9",

+ 14 - 5
src/views/order/Order_Oil.vue

@@ -6,6 +6,15 @@
       :inline="true"
       label-width="68px"
     >
+      <el-form-item label="订单号" prop="orderNo">
+        <el-input
+          v-model="queryParams.orderNo"
+          placeholder="请输入订单号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="客户姓名" prop="likeConsumer">
         <el-input
           v-model="queryParams.likeConsumer"
@@ -94,6 +103,7 @@
         align="center"
         prop="orderId"
       />
+      <af-table-column label="订单号" align="center" prop="orderNo" />
       <af-table-column label="油品名称" align="center" prop="oilName" />
       <af-table-column label="油品价格" align="center" prop="oilPirce" />
       <af-table-column label="加油升数" align="center" prop="orderLiters" />
@@ -149,7 +159,7 @@
           }}</span>
         </template>
       </af-table-column>
-      <af-table-column label="订单号" align="center" prop="orderNo" />
+      
     </el-table>
     <pagination
       v-show="total > 0"
@@ -190,11 +200,12 @@ export default {
         pageSize: 10,
         oilGun: null,
         oilName: null,
-        stationId: this.deptId,
+        stationId: null,
         orderType: 1,
         oilPersonnel: null,
         createdDate: null,
         likeConsumer: null,
+        orderNo:null
       },
       // 表单校验
       rules: {},
@@ -212,9 +223,7 @@ export default {
     this.getDicts("oil_name").then((response) => {
       this.oilNameOptions = response.data;
     });
-    listPrice({
-      stationId: this.deptId,
-    }).then((response) => {
+    listPrice({}).then((response) => {
       this.oilNameOptions = response.rows;
     });
   },

+ 1 - 1
src/views/overview/Overview_AccountingReport.vue

@@ -215,7 +215,7 @@ export default {
       // 查询参数
       queryParams: {
         pageNum: 1,
-        pageSize: 3,
+        pageSize: 10,
         classesNo: "",
         startDate: null,
         endDate: null,

+ 0 - 36
src/views/overview/Overview_Daily.vue

@@ -223,10 +223,6 @@ export default {
     this.$nextTick(() => {
       this.queryParams.beginTime = this.getMonthDate();
       this.queryParams.endTime = this.getEndFormatDate(new Date());
-      this.queryParams.stationId=this.$store.selectDeptId;
-      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
-        this.queryParams.stationId =this.$store.state.user.deptId;
-      }
       setTimeout(() => {
         this.initChart();
       }, 1000);
@@ -238,10 +234,6 @@ export default {
     this.reset();
     this.queryParams.beginTime = this.getMonthDate();
     this.queryParams.endTime = this.getEndFormatDate(new Date());
-    this.queryParams.stationId=this.$store.selectDeptId;
-    if(this.queryParams.stationId==null || this.queryParams.stationId==""){
-        this.queryParams.stationId =this.$store.state.user.deptId;
-      }
     this.getDatas();
   },
   methods: {
@@ -484,9 +476,6 @@ export default {
 
     /** 查询优惠劵管理列表 */
     getList() {
-      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
-        this.queryParams.stationId =this.$store.state.user.deptId;
-      }
       listSum(this.queryParams).then(response => {
         if (response.data!=null) {
           this.form.zongAmt = response.data.amt;
@@ -519,10 +508,6 @@ export default {
       this.dateRangeCreatedDate=null;
       this.queryParams.beginTime = this.getNowFormatDate(new Date());
       this.queryParams.endTime = this.getEndFormatDate(new Date());
-      this.queryParams.stationId=this.$store.selectDeptId;
-      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
-        this.queryParams.stationId =this.$store.state.user.deptId;
-      }
       this.getList();
     },
     //昨天的数据
@@ -531,10 +516,6 @@ export default {
       this.dateRangeCreatedDate=null;
       this.queryParams.beginTime = this.getFormatDate(new Date());
       this.queryParams.endTime = this.getNowFormatDate(new Date());
-      this.queryParams.stationId=this.$store.selectDeptId;
-      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
-        this.queryParams.stationId =this.$store.state.user.deptId;
-      }
       this.getList();
     },
     //本周的数据
@@ -543,10 +524,6 @@ export default {
       this.dateRangeCreatedDate=null;
       this.queryParams.beginTime = this.getDates();
       this.queryParams.endTime = this.getEndFormatDate(new Date());
-      this.queryParams.stationId=this.$store.selectDeptId;
-      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
-        this.queryParams.stationId =this.$store.state.user.deptId;
-      }
       //this.initChart();
       //this.getDatas();
       this.getList();
@@ -558,10 +535,6 @@ export default {
       this.dateRangeCreatedDate=null;
       this.queryParams.beginTime = this.getMonthDate();
       this.queryParams.endTime = this.getEndFormatDate(new Date());
-      this.queryParams.stationId=this.$store.selectDeptId;
-      if(this.queryParams.stationId==null || this.queryParams.stationId==""){
-        this.queryParams.stationId =this.$store.state.user.deptId;
-      }
       //this.getDatas();
       this.getList();
     },
@@ -570,21 +543,13 @@ export default {
     queryDataSource() {
       this.reset();
       if(this.dateRangeCreatedDate==null){
-        this.queryParams.stationId=this.$store.selectDeptId;
         this.queryParams.beginTime = null;
         this.queryParams.endTime = null;
-        if(this.queryParams.stationId==null || this.queryParams.stationId==""){
-          this.queryParams.stationId =this.$store.state.user.deptId;
-        }
         //  this.getDatas();
         this.getList();
       }else {
         this.queryParams.beginTime = this.dateRangeCreatedDate[0];
         this.queryParams.endTime = this.dateRangeCreatedDate[1];
-        this.queryParams.stationId=this.$store.selectDeptId;
-        if(this.queryParams.stationId==null || this.queryParams.stationId==""){
-          this.queryParams.stationId =this.$store.state.user.deptId;
-        }
         // this.getDatas();
         this.getList();
       }
@@ -706,7 +671,6 @@ export default {
       this.queryInfo.pageNum=row.page;
       this.queryInfo.pageSize =row.limit;
       this.queryInfo.orderType = "1";
-      this.queryInfo.stationId=this.$store.selectDeptId;
       getDetails(this.queryInfo).then(response => {
         this.dayReportDetailsList = response.rows;
         this.total1 = response.total;

+ 7 - 4
src/views/overview/Overview_Summary.vue

@@ -355,7 +355,7 @@ export default {
       });
      
       // 汇总电子卡数据
-      listHYData({ stationId: query.stationId }).then((response) => {
+      listHYData(query).then((response) => {
         if (response.data!=null ) {
           if (response.data.amt) {
             this.infoFrom.yeAmt = response.data.amt;
@@ -384,7 +384,7 @@ export default {
       let day;
       this.reset()
       const query = {
-        stationId: this.deptId,
+        stationId: null,
         createdDate: null,
         stationName: null,
         beginTime: null,
@@ -409,8 +409,10 @@ export default {
           break;
         case 3: // 本月
           day = new Date().getDay();
-          day = -(day - 1);
-          query.beginTime = this.dateCalculate(day);
+          let datetime =new Date();
+          query.beginTime =datetime.getFullYear() +"-" + (new Date().getMonth() + 1) +
+          "-01 00:00:00";
+           //query.beginTime = this .dateCalculate(day);
           query.endTime = this.dateCalculate(1);
           break;
         case 4: // 指定日期
@@ -421,6 +423,7 @@ export default {
       }
       this.getList(query)
     },
+    
 
     dateCalculate(num = 0, date = false) {
       if (!date) {

+ 2 - 2
vue.config.js

@@ -35,9 +35,9 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        // target: `http://localhost:8080`,
+        target: `http://localhost:8080`,
         // target:"http://www.huiyj.com:9002/prod-api",
-        target:"http://demo.huijy.net/prod-api",
+        //target:"http://demo.huijy.net/prod-api",
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''