Преглед на файлове

优化页面信息班结,日报折线图,调价

MS-QJVSRANLTYEO\Administrator преди 4 години
родител
ревизия
a52678aa34

+ 1 - 1
Yijia-SaaS/yijia-ui/src/api/dataSource/saleReport.js

@@ -41,7 +41,7 @@ export function listDayReport(query) {
 }
 export function getDetails(query) {
   return request({
-    url: '/station/order/list',
+    url: '/station/order/listInfo',
     method: 'get',
     params: query
   })

+ 359 - 297
Yijia-SaaS/yijia-ui/src/views/dataSource/dayReport.vue

@@ -1,79 +1,74 @@
 <template>
-  <el-scrollbar  style='height:100%'>
+  <el-scrollbar style="height:100%">
     <div>
       <div>
-        <el-form :model="queryParams" style="margin-left: 20px;" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+        <el-form
+          :model="queryParams"
+          style="margin-left: 20px;"
+          ref="queryForm"
+          :inline="true"
+          v-show="showSearch"
+          label-width="68px"
+        >
           <el-form-item>
-            <el-button  size="mini" @click="dayDataSource">今天</el-button>
-            <el-button  size="mini" @click="yesDataSource">昨天</el-button>
-            <el-button  size="mini" @click="workDataSource">本周</el-button>
-            <el-button  size="mini" @click="monthDataSource">本月</el-button>
-            <el-date-picker style="margin: 0px 10px;"
-                            size="mini"
+            <el-button size="mini" @click="dayDataSource">今天</el-button>
+            <el-button size="mini" @click="yesDataSource">昨天</el-button>
+            <el-button size="mini" @click="workDataSource">本周</el-button>
+            <el-button size="mini" @click="monthDataSource">本月</el-button>
+            <el-date-picker
+              style="margin: 0px 10px;"
+              size="mini"
               v-model="dateRangeCreatedDate"
               type="daterange"
               range-separator="至"
               start-placeholder="开始日期"
-              end-placeholder="结束日期">
-            </el-date-picker>
-            <el-button  size="mini" @click="queryDataSource">查询</el-button>
+              end-placeholder="结束日期"
+            ></el-date-picker>
+            <el-button size="mini" @click="queryDataSource">查询</el-button>
           </el-form-item>
         </el-form>
-        <span  style="color:#ff9955;font-size:25px;" >|</span><span style="font-size:20px;">数据概览</span>
+        <span style="color:#ff9955;font-size:25px;">|</span>
+        <span style="font-size:20px;">数据概览</span>
         <el-row :gutter="10" class="panel-group">
-          <el-col :xs="12" :sm="12" :lg="6" >
+          <el-col :xs="12" :sm="12" :lg="6">
             <div class="flex xiaoliang">
-              <div style="line-height: 62px;font-size: 44px;">
-                {{ form.zongliters }}L
-              </div>
-              <div style="font-size: 28px;">
-                总销量
-              </div>
+              <div style="line-height: 62px;font-size: 44px;">{{ form.zongliters }}L</div>
+              <div style="font-size: 28px;">总销量</div>
             </div>
           </el-col>
           <el-col :xs="12" :sm="12" :lg="6">
-            <div  class="flex xiaoe">
-              <div style="line-height: 62px;font-size: 44px;">
-                {{ form.zongAmt }}元
-              </div>
-              <div style="font-size: 28px;">
-                总金额
-              </div>
+            <div class="flex xiaoe">
+              <div style="line-height: 62px;font-size: 44px;">{{ form.zongAmt }}元</div>
+              <div style="font-size: 28px;">总金额</div>
             </div>
           </el-col>
-          <el-col :xs="12" :sm="12" :lg="6" >
+          <el-col :xs="12" :sm="12" :lg="6">
             <div class="flex xiaoliang">
-              <div style="line-height: 62px;font-size: 44px;">
-                {{ form.cyamt}}元
-              </div>
-              <div style="font-size: 28px;">
-                柴油
-              </div>
+              <div style="line-height: 62px;font-size: 44px;">{{ form.cyamt}}元</div>
+              <div style="font-size: 28px;">柴油</div>
             </div>
           </el-col>
 
-          <el-col :xs="12" :sm="12" :lg="6" >
+          <el-col :xs="12" :sm="12" :lg="6">
             <div class="flex xiaoliang">
-              <div style="line-height: 62px;font-size: 44px;">
-                {{ form.qyamt }}元
-              </div>
-              <div style="font-size: 28px;">
-                汽油
-              </div>
+              <div style="line-height: 62px;font-size: 44px;">{{ form.qyamt }}元</div>
+              <div style="font-size: 28px;">汽油</div>
             </div>
           </el-col>
         </el-row>
       </div>
       <div style="width:100%; height: 360px;margin: 0px 30px;background: #FFFFFF;">
-        <span  style="color:#ff9955;font-size:25px;" >|</span><span style="font-size:20px;">销售情况</span>
-        <div  ref="myChart"  style="width:100%; height: 350px;" ></div>
+        <span style="color:#ff9955;font-size:25px;">|</span>
+        <span style="font-size:20px;">销售情况</span>
+        <div ref="myChart" style="width:100%; height: 350px;"></div>
       </div>
       <div style="width:100%; height: 181px;">
-        <span  style="color:#ff9955;font-size:25px;" >|</span><span style="font-size:20px;">详情:</span>
+        <span style="color:#ff9955;font-size:25px;">|</span>
+        <span style="font-size:20px;">详情:</span>
         <el-table v-loading="loading" :data="dayReportList">
-          <el-table-column label="日期" align="center" prop="payDate" >
+          <el-table-column label="日期" align="center" prop="payDate">
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.payDate, '{y}-{m}-{d}') }}</span>
+              <span>{{ parseTime(scope.row.createdDate, '{y}-{m}-{d}') }}</span>
             </template>
           </el-table-column>
           <el-table-column label="销额" align="center" prop="amt" />
@@ -81,9 +76,8 @@
           <el-table-column label="汽油" align="center" prop="qyAmt" />
           <el-table-column label="柴油" align="center" prop="cyAmt" />
           <el-table-column label="订单数" align="center" prop="orderNo" />
-          <el-table-column label="营销费" align="center" prop="" />
-          <el-table-column label="应收" align="center" prop="menberAmt" />
-          <el-table-column label="到账" align="center" prop="" />
+          <el-table-column label="应收" align="center" prop="receivableAmt" />
+          <el-table-column label="到账" align="center" prop ="receivedAmt"/>
           <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
               <el-button
@@ -91,44 +85,54 @@
                 type="text"
                 icon="el-icon-edit"
                 @click="handleLook(scope.row)"
-                v-hasPermi="['station:gun:list']"
               >详情</el-button>
             </template>
           </el-table-column>
         </el-table>
       </div>
-      <el-dialog :title="title" :visible.sync="open"  append-to-body>
-      <el-table v-loading="loading" :data="dayReportDetailsList" >
-        <el-table-column label="油品" align="center" prop="oilName" />
-        <el-table-column label="油枪号" align="center" prop="oilGun" />
-        <el-table-column label="销量(L)" align="center" prop="orderLiters"/>
-        <el-table-column label="销额(元)" align="center" prop="amt" />
-        <el-table-column label="优惠" align="center" prop="" v-if="false" />
-        <el-table-column label="优惠卷" align="center" prop="" />
-        <el-table-column label="实收" align="center" prop="" />
-        <el-table-column label="会员支付" align="center" prop="menberAmt" />
-        <el-table-column label="微信支付" align="center" prop="wxAmt" />
-        <el-table-column label="支付宝支付" align="center" prop="zfbAmt" />
-        <el-table-column label="会员充值" align="center" prop="" v-if="false"/>
-        <el-table-column label="积分消费" align="center" prop="" v-if="false"/>
-
-      </el-table>
-      <pagination
-        v-show="total1>0"
-        :total="total1"
-        :page.sync="queryInfo.pageNum"
-        :limit.sync="queryInfo.pageSize"
-        @pagination="getLookOrder"
-      />
-    </el-dialog>
+      <el-dialog :title="title" width="800px"  :visible.sync="open" append-to-body>
+        <el-table v-loading="loading" :data="dayReportDetailsList">
+          <el-table-column label="油品" align="center" prop="oilName" />
+          <el-table-column label="油枪号" align="center" prop="oilGun" />
+          <el-table-column label="销量(L)" align="center" prop="orderLiters" />
+          <el-table-column label="销额(元)" align="center" prop="amt" />
+          <el-table-column label="优惠" align="center" prop v-if="false" />
+          <el-table-column label="优惠卷" align="center" prop />
+          <el-table-column label="实收" align="center" prop />
+          <el-table-column label="会员支付" align="center" prop="menberAmt" />
+          <el-table-column label="微信支付" align="center" prop="wxAmt" />
+          <el-table-column label="支付宝支付" align="center" prop="zfbAmt" />
+          <el-table-column label="会员充值" align="center" prop v-if="false" />
+          <el-table-column label="积分消费" align="center" prop v-if="false" />
+        </el-table>
+        <pagination
+          v-show="total1>0"
+          :total="total1"
+          :page.sync="queryInfo.pageNum"
+          :limit.sync="queryInfo.pageSize"
+          @pagination="getLookOrder"
+        />
+      </el-dialog>
     </div>
   </el-scrollbar>
 </template>
 
 <script>
-import echarts from 'echarts'
-require('echarts/theme/macarons') // echarts theme
-import { listSum,listOilType,listDayReport,getDetails,listXdata,listQydata92,listQydata95,listQydata97,listQydata0,listQydata10,listQydata20 } from "@/api/dataSource/saleReport";
+import echarts from "echarts";
+require("echarts/theme/macarons"); // echarts theme
+import {
+  listSum,
+  listOilType,
+  listDayReport,
+  getDetails,
+  listXdata,
+  listQydata92,
+  listQydata95,
+  listQydata97,
+  listQydata0,
+  listQydata10,
+  listQydata20
+} from "@/api/dataSource/saleReport";
 
 export default {
   name: "source",
@@ -151,21 +155,21 @@ export default {
       // 优惠劵管理表格数据
       couponList: [],
       dayReportDetailsList: [],
-      dateRangeCreatedDate:[],
+      dateRangeCreatedDate: [],
       //x轴数据
-      xdata:[],
+      xdata: [],
       //92#汽油数据
-      qydata92:[],
+      qydata92: [],
       //95#汽油数据
-      qydata95:[],
+      qydata95: [],
       //97#汽油数据
-      qydata97:[],
+      qydata97: [],
       //0#柴油数据
-      qydata0:[],
+      cydata0: [],
       //-10#柴油数据
-      qydata10:[],
+      cydata10: [],
       //-20#柴油数据
-      qydata20:[],
+      cydata20: [],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -175,34 +179,40 @@ export default {
         createdDate: null,
         stationNo: null,
         stationName: null,
-        beginTime:null,
-        endTime:null,
-        payDate:null
+        beginTime: null,
+        endTime: null,
+        payDate: null
       },
       // 查询参数
       queryInfo: {
         pageNum: 1,
         pageSize: 10,
         payDate: null,
-        likePayDate: null
+        status: null,
+        beginTime: null,
+        endTime: null
       },
       //日报数据
       dayReportList: [],
       // 表单参数
       form: {
-        zongAmt:0,
-        zongliters:0,
-        qyamt:0,
-        cyamt:0
+        zongAmt: 0,
+        zongliters: 0,
+        qyamt: 0,
+        cyamt: 0
       },
       // 表单校验
-      rules: {
-      }
+      rules: {}
     };
   },
   mounted() {
     this.$nextTick(() => {
-      this.initChart();
+      this.queryParams.beginTime = this.getMonthDate();
+      this.queryParams.endTime = this.getEndFormatDate(new Date());
+      // this.initChart();
+      setTimeout(() => {
+        this.initChart();
+      }, 1000);
     });
   },
   created() {
@@ -213,208 +223,258 @@ export default {
     this.getDatas();
     this.dayDataSource();
     //不加等待时间的话,初始化了echarts,,getDatas的数据没有获取到。等待后数据获取到,重新加载就可以了。
-    setTimeout(() =>{
-      this.initChart();
-    },1000);
+    // setTimeout(() =>{
+    //   this.initChart();
+    // },2000);
   },
   methods: {
-    initChart(){
+    initChart() {
+      console.log("打印查询参数1", this.queryParams);
       // 初始化echarts
-      this.charts = echarts.init(this.$refs.myChart, 'macarons');
-      console.log("xdata",this.xdata);
-      this.charts.setOption({
-        xAxis: {
-          data: this.xdata,
+      console.log("6", this.xdata);
+      console.log("7", this.cydata0);
+      this.charts = echarts.init(this.$refs.myChart, "macarons");
+      this.charts.setOption(
+        {
+          xAxis: {
+            data: this.xdata,
             boundaryGap: false,
             axisTick: {
-            show: false
-          }
-        },
-        tooltip: {
-          trigger: 'axis',
+              show: false
+            }
+          },
+          tooltip: {
+            trigger: "axis",
             axisPointer: {
-            type: 'cross'
+              type: "cross"
+            },
+            padding: [5, 10]
           },
-          padding: [5, 10]
-        },
-        yAxis: {
-          axisTick: {
-            show: false
-          }
-        },
-        legend: {
-          data: ['92#', '95#','97#',"0#","-10#","-20#"]
-        },
-        series: [{
-          name: '92#', itemStyle: {
-            normal: {
-              color: '#FF005A',
-              lineStyle: {
-                color: '#FF005A',
-                width: 2
-              }
+          yAxis: {
+            axisTick: {
+              show: false
             }
           },
-          smooth: true,
-          type: 'line',
-          data: this.qydata92,
-          animationDuration: 2800,
-          animationEasing: 'cubicInOut'
-        },
-          {
-            name: '95#',
-            smooth: true,
-            type: 'line',
-            itemStyle: {
-              normal: {
-                color: '#3888fa',
-                lineStyle: {
-                  color: '#3888fa',
-                  width: 2
-                },
-              }
-            },
-            data: this.qydata95,
-            animationDuration: 2800,
-            animationEasing: 'quadraticOut'
+          legend: {
+            data: ["92#", "95#", "97#", "0#", "-10#", "-20#"]
           },
-          {
-            name: '97#',
-            smooth: true,
-            type: 'line',
-            itemStyle: {
-              normal: {
-                color: '#ffff00',
-                lineStyle: {
-                  color: '#ffff00',
-                  width: 2
-                },
-              }
+          animation: false,
+          series: [
+            {
+              name: "92#",
+              itemStyle: {
+                normal: {
+                  color: "#FF005A",
+                  lineStyle: {
+                    color: "#FF005A",
+                    width: 2
+                  }
+                }
+              },
+              smooth: true,
+              type: "line",
+              data: this.qydata92
             },
-            data: this.qydata97,
-            animationDuration: 2800,
-            animationEasing: 'quadraticOut'
-          },
-          {
-            name: '0#',
-            smooth: true,
-            type: 'line',
-            itemStyle: {
-              normal: {
-                color: '#00ff00',
-                lineStyle: {
-                  color: '#00ff00',
-                  width: 2
-                },
-              }
+            {
+              name: "95#",
+              smooth: true,
+              type: "line",
+              itemStyle: {
+                normal: {
+                  color: "#3888fa",
+                  lineStyle: {
+                    color: "#3888fa",
+                    width: 2
+                  }
+                }
+              },
+              data: this.qydata95
             },
-            data: this.qydata97,
-            animationDuration: 2800,
-            animationEasing: 'quadraticOut'
-          },
-          {
-            name: '-10#',
-            smooth: true,
-            type: 'line',
-            itemStyle: {
-              normal: {
-                color: '#00bfff',
-                lineStyle: {
-                  color: '#00bfff',
-                  width: 2
-                },
-              }
+            {
+              name: "97#",
+              smooth: true,
+              type: "line",
+              itemStyle: {
+                normal: {
+                  color: "#ffff00",
+                  lineStyle: {
+                    color: "#ffff00",
+                    width: 2
+                  }
+                }
+              },
+              data: this.qydata97
             },
-            data: this.qydata97,
-            animationDuration: 2800,
-            animationEasing: 'quadraticOut'
-          },
-          {
-            name: '-20#',
-            smooth: true,
-            type: 'line',
-            itemStyle: {
-              normal: {
-                color: '#ffb6c1',
-                lineStyle: {
-                  color: '#ffb6c1',
-                  width: 2
-                },
-              }
+            {
+              name: "0#",
+              smooth: true,
+              type: "line",
+              itemStyle: {
+                normal: {
+                  color: "#00ff00",
+                  lineStyle: {
+                    color: "#00ff00",
+                    width: 2
+                  }
+                }
+              },
+              data: this.cydata0
             },
-            data: this.qydata97,
-            animationDuration: 2800,
-            animationEasing: 'quadraticOut'
-          }]
-      });
+            {
+              name: "-10#",
+              smooth: true,
+              type: "line",
+              itemStyle: {
+                normal: {
+                  color: "#00bfff",
+                  lineStyle: {
+                    color: "#00bfff",
+                    width: 2
+                  }
+                }
+              },
+              data: this.cydata10
+            },
+            {
+              name: "-20#",
+              smooth: true,
+              type: "line",
+              itemStyle: {
+                normal: {
+                  color: "#ffb6c1",
+                  lineStyle: {
+                    color: "#ffb6c1",
+                    width: 2
+                  }
+                }
+              },
+              data: this.cydata20
+              /* animationDuration: 2800,
+            animationEasing: 'quadraticOut'*/
+            }
+          ]
+        },
+        true
+      );
     },
-    //获取折线图用到的数据
-    getDatas(){
-      listXdata(this.queryParams).then(response => {
-        this.xdata=[];
+
+    getXData() {
+      return listXdata(this.queryParams).then(response => {
+        this.xdata = [];
         if (response.rows === "undefined") {
         } else {
-          for (let i in response.rows){
+          for (let i in response.rows) {
             this.xdata.push(response.rows[i].createdDate);
           }
         }
       });
-      listQydata92(this.queryParams).then(response => {
-        this.qydata92=[];
+    },
+
+    getQyData92() {
+      return listQydata92(this.queryParams).then(response => {
+        this.qydata92 = [];
         if (response.rows === "undefined") {
         } else {
-          for (let i in response.rows){
-            this.qydata92.push(response.rows[i].amt);
+          for (let i in response.rows) {
+            let data = [];
+            data.push(response.rows[i].createdDate);
+            data.push(response.rows[i].amt);
+            this.qydata92.push(data);
           }
         }
       });
-      listQydata95(this.queryParams).then(response => {
-        this.qydata95=[];
+    },
+
+    getQydata95() {
+      return listQydata95(this.queryParams).then(response => {
+        this.qydata95 = [];
         if (response.rows === "undefined") {
         } else {
-          for (let i in response.rows){
-            this.qydata95.push(response.rows[i].amt);
+          for (let i in response.rows) {
+            let data = [];
+            data.push(response.rows[i].createdDate);
+            data.push(response.rows[i].amt);
+            this.qydata95.push(data);
           }
         }
       });
-      listQydata97(this.queryParams).then(response => {
-        this.qydata97=[];
+    },
+
+    getQydata97() {
+      return listQydata97(this.queryParams).then(response => {
+        this.qydata97 = [];
         if (response.rows === "undefined") {
         } else {
-          for (let i in response.rows){
-            this.qydata97.push(response.rows[i].amt);
+          for (let i in response.rows) {
+            let data = [];
+            data.push(response.rows[i].createdDate);
+            data.push(response.rows[i].amt);
+            this.qydata97.push(data);
           }
         }
       });
-      listQydata0(this.queryParams).then(response => {
-        this.qydata0=[];
+    },
+
+    getQydata0() {
+      return listQydata0(this.queryParams).then(response => {
+        this.cydata0 = [];
         if (response.rows === "undefined") {
         } else {
-          for (let i in response.rows){
-            this.qydata97.push(response.rows[i].amt);
+          for (let i in response.rows) {
+            let data = [];
+            data.push(response.rows[i].createdDate);
+            data.push(response.rows[i].amt);
+            this.cydata0.push(data);
           }
         }
       });
-      listQydata10(this.queryParams).then(response => {
-        this.qydata10=[];
+    },
+
+    getQydata10() {
+      return listQydata10(this.queryParams).then(response => {
+        this.cydata10 = [];
         if (response.rows === "undefined") {
         } else {
-          for (let i in response.rows){
-            this.qydata97.push(response.rows[i].amt);
+          for (let i in response.rows) {
+            let data = [];
+            data.push(response.rows[i].createdDate);
+            data.push(response.rows[i].amt);
+            this.cydata10.push(data);
           }
         }
       });
-      listQydata20(this.queryParams).then(response => {
-        this.qydata20=[];
+    },
+
+    getQydata20() {
+      return listQydata20(this.queryParams).then(response => {
+        this.cydata20 = [];
         if (response.rows === "undefined") {
         } else {
-          for (let i in response.rows){
-            this.qydata97.push(response.rows[i].amt);
+          for (let i in response.rows) {
+            let data = [];
+            data.push(response.rows[i].createdDate);
+            data.push(response.rows[i].amt);
+            this.cydata20.push(data);
           }
         }
       });
     },
 
+    //获取折线图用到的数据
+    getDatas() {
+      Promise.all([
+        this.getXData(),
+        this.getQyData92(),
+        this.getQydata95(),
+        this.getQydata97(),
+        this.getQydata0(),
+        this.getQydata10(),
+        this.getQydata20()
+      ]).then(res => {
+        this.initChart();
+      });
+    },
+
     /** 查询优惠劵管理列表 */
     getList() {
       listSum(this.queryParams).then(response => {
@@ -461,11 +521,9 @@ export default {
       this.reset();
       this.queryParams.beginTime = this.getDates();
       this.queryParams.endTime = this.getEndFormatDate(new Date());
+      //this.initChart();
       this.getDatas();
       this.getList();
-      setTimeout(() =>{
-        this.initChart();
-      },1000);
     },
 
     //本月数据
@@ -475,7 +533,6 @@ export default {
       this.queryParams.endTime = this.getEndFormatDate(new Date());
       this.getDatas();
       this.getList();
-      this.initChart();
     },
 
     //按照指定日期
@@ -485,9 +542,6 @@ export default {
       this.queryParams.endTime = this.dateRangeCreatedDate[1];
       this.getDatas();
       this.getList();
-      setTimeout(() =>{
-        this.initChart();
-      },1000);
     },
     //今天
     getNowFormatDate(date) {
@@ -500,7 +554,8 @@ export default {
       if (strDate >= 0 && strDate <= 9) {
         strDate = "0" + strDate;
       }
-      let currentdate1 = date.getFullYear() + seperator1 + month + seperator1 + strDate;
+      let currentdate1 =
+        date.getFullYear() + seperator1 + month + seperator1 + strDate;
       return currentdate1;
     },
     //明天
@@ -517,7 +572,8 @@ export default {
       if (strDate >= 0 && strDate <= 9) {
         strDate = "0" + strDate;
       }
-      let currentdate2 = myDate.getFullYear() + seperator2 + month + seperator2 + strDate;
+      let currentdate2 =
+        myDate.getFullYear() + seperator2 + month + seperator2 + strDate;
       return currentdate2;
     },
     //昨天
@@ -534,21 +590,27 @@ export default {
       if (strDate >= 0 && strDate <= 9) {
         strDate = "0" + strDate;
       }
-      let currentdate3 = myDate.getFullYear() + seperator3 + month + seperator3 + strDate;
+      let currentdate3 =
+        myDate.getFullYear() + seperator3 + month + seperator3 + strDate;
       return currentdate3;
     },
     getDates() {
-      var new_Date = new Date()
+      var new_Date = new Date();
       var timesStamp = new_Date.getTime();
       var currenDay = new_Date.getDay();
-      var dates = new Date(timesStamp + 24 * 60 * 60 * 1000 * (0 - (currenDay + 6) % 7)).toLocaleDateString().replace(/[年月]/g, '-').replace(/[日上下午]/g, '');
+      var dates = new Date(
+        timesStamp + 24 * 60 * 60 * 1000 * (0 - ((currenDay + 6) % 7))
+      )
+        .toLocaleDateString()
+        .replace(/[年月]/g, "-")
+        .replace(/[日上下午]/g, "");
       let s = dates.replace(/-/g, "/");
       var dt = new Date(s);
       var m = dt.getMonth() + 1;
       var d = dt.getDate();
       m = m < 10 ? "0" + m : m;
       d = d < 10 ? "0" + d : d;
-      dates = dt.getFullYear() + "-" + m + "-" + d
+      dates = dt.getFullYear() + "-" + m + "-" + d;
       return dates;
     },
     //本月第一天
@@ -559,7 +621,8 @@ export default {
       if (month >= 1 && month <= 9) {
         month = "0" + month;
       }
-      let currentdate = date.getFullYear() + seperator1 + month + seperator1 + "01";
+      let currentdate =
+        date.getFullYear() + seperator1 + month + seperator1 + "01";
       return currentdate;
     },
     // 表单重置
@@ -579,11 +642,13 @@ export default {
 
     /** 查看详情按钮操作 */
     handleLook(row) {
-      const payDate = row.payDate;
-      this.queryInfo.likePayDate=payDate;
+      const createdDate = row.createdDate;
+      this.queryInfo.beginTime =createdDate.substring(0,10) +" 00:00:00";
+      this.queryInfo.endTime =createdDate.substring(0,10) +" 23:59:59";
+      this.queryInfo.status = "1";
       this.getLookOrder();
     },
-    getLookOrder(){
+    getLookOrder() {
       getDetails(this.queryInfo).then(response => {
         this.dayReportDetailsList = response.rows;
         this.total1 = response.total;
@@ -592,44 +657,41 @@ export default {
       });
     }
   }
-
 };
 </script>
 <style lang="scss" scoped>
-  .flex{
-    display:flex;
-    align-items:center;
-    justify-content:center;
-    width: 100%;
-    height: 270px;
-    flex-direction:column;
-
-  }
-  .flex-qy{
-    display:flex;
-    align-items:center;
-    justify-content:center;
-  }
-  .flex-qy-sx{
-    display:flex;
-    align-items:center;
-    justify-content:center;
-    flex-direction:column;
-  }
-  .panel-group {
-    padding-left: 10px;
-  }
-
-  .flex-sr{
-    display:flex;
-    align-items:center;
-    justify-content:center;
-    width: 100%;
-    flex-direction:column;
-  }
-  .sr-font{
-    font-size: 20px;
-    color: #F4A645;
-  }
+.flex {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 100%;
+  height: 270px;
+  flex-direction: column;
+}
+.flex-qy {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.flex-qy-sx {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+}
+.panel-group {
+  padding-left: 10px;
+}
 
+.flex-sr {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 100%;
+  flex-direction: column;
+}
+.sr-font {
+  font-size: 20px;
+  color: #f4a645;
+}
 </style>

+ 4 - 4
Yijia-SaaS/yijia-ui/src/views/market/plan/index.vue

@@ -4,7 +4,7 @@
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <div>
         <span  style="color:#ff9955;font-size:25px;" >|</span><span style="font-size:25px;">满减方案</span>
-        <el-button icon="el-icon-plus" size="mini" @click="handleAdd" style="float:right" type="warning" v-hasPermi="['market:setting:add']" >添加满减信息</el-button>
+        <el-button icon="el-icon-plus" size="mini" @click="handleAdd" style="float:right" type="warning" v-hasPermi="['market:plan:add']" >添加满减信息</el-button>
       </div>
     </el-form>
     <el-table v-loading="loading" :data="planList" >
@@ -87,7 +87,7 @@
     <!--立减方案-->
     <el-form :model="selectParams" ref="selectFrom" :inline="true" v-show="showSearch" label-width="68px" style="margin-top: 25px;">
       <span  style="color:#ff9955;font-size:25px;" >|</span><span style="font-size:25px;">立减方案</span>
-      <el-button icon="el-icon-plus" size="mini" @click="handleAddDT" style="float:right"  type="warning" v-hasPermi="['market:setting:add']" >添加立减方案</el-button>
+      <el-button icon="el-icon-plus" size="mini" @click="handleAddDT" style="float:right"  type="warning" v-hasPermi="['market:plan:add']" >添加立减方案</el-button>
     </el-form>
     <el-table v-loading="loading" :data="DTplanList" >
       <el-table-column label="id" align="center" prop="id" v-if="false" />
@@ -106,14 +106,14 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdateDT(scope1.row)"
-            v-hasPermi="['market:setting:edit']"
+            v-hasPermi="['market:plan:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDeleteDT(scope1.row)"
-            v-hasPermi="['market:setting:remove']"
+            v-hasPermi="['market:plan:remove']"
           >删除</el-button>
         </template>
       </el-table-column>

+ 0 - 1
Yijia-SaaS/yijia-ui/src/views/station/order/index.vue

@@ -226,7 +226,6 @@
           return '小程序'
         }
       },
-      //statusFotmat
       statusFotmat(row, column){
         if(row.status === '0'){
           return '未支付'

+ 43 - 21
Yijia-SaaS/yijia-ui/src/views/station/price/index.vue

@@ -38,7 +38,7 @@
 
     <!-- 添加或修改油品价格对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
+      <el-form ref="form" :model="form"  label-width="90px">
         <el-form-item label="油品名称" prop="oilName">
           <el-select v-model="form.oilName" placeholder="油品名称" clearable size="small">
             <el-option
@@ -78,7 +78,7 @@
       </div>
     </el-dialog>
     <!-- 添加或修改油品调价信息对话框 -->
-    <el-dialog :title="titleAdjust" :visible.sync="open1" width="500px" append-to-body>
+    <el-dialog :title="titleAdjust" :visible.sync="open1" :rules="rules" width="500px" append-to-body>
       <el-form ref="form1" :model="form1"  label-width="80px">
         <el-form-item label="油品名称" prop="oilName" >
           <el-select disabled="disabled" v-model="form1.oilName" placeholder="油品名称" clearable size="small">
@@ -91,9 +91,9 @@
           </el-select>
         </el-form-item>
         <el-form-item label="调整价格" prop="oilAdjustPrice">
-          <el-input-number v-model="form1.oilAdjustPrice" :precision="2" :step="0.1" ></el-input-number>
+          <el-input-number v-model="form1.oilAdjustPrice" :precision="2" :min="1" :step="0.1" ></el-input-number>
         </el-form-item>
-        <el-form-item label="生效状态">
+        <el-form-item label="生效状态" prop="takeEffectStatus">
           <el-radio-group v-model="form1.takeEffectStatus">
             <el-radio v-for="dict in takeEffectStatusOptions"
             :key="dict.dictValue"
@@ -188,7 +188,13 @@ export default {
       form1: {},
       // 表单校验
       rules: {
-      }
+        takeEffectStatus: [
+          { required: true, trigger: "blur", message: "生效状态必须选择" }
+        ],
+        oilAdjustPrice: [
+          { required: true, trigger: "blur", message: "调整价格必须慎重填写" }
+        ]
+      },
     };
   },
   created() {
@@ -311,23 +317,39 @@ export default {
       this.resetAdjust();
     },
     submitFormAdjust() {
-      this.$refs["form1"].validate(valid => {
-        if (valid) {
-          if (this.form1.adjustPriceId != null) {
-            updateAdjust(this.form1).then(response => {
-              this.msgSuccess("修改成功");
-              this.open1 = false;
-              this.getList();
-            });
-          } else {
-            addAdjust(this.form1).then(response => {
-              this.msgSuccess("新增成功");
-              this.open1 = false;
-              this.getList();
-            });
+      let status=this.form1.takeEffectStatus;
+      let takeEffectDate=this.form1.takeEffectDate;
+      let a=true;
+      if(status !=null){
+          if(status==2){
+            if(takeEffectDate==null){
+              a=false;
+              this.msgSuccess("请选择生效时间");
+            }
           }
-        }
-      });
+      }else{
+        a=false;
+        this.msgSuccess("请选择生效状态");
+      }
+      if(a){
+        this.$refs["form1"].validate(valid => {
+          if (valid) {
+            if (this.form1.adjustPriceId != null) {
+              updateAdjust(this.form1).then(response => {
+                this.msgSuccess("修改成功");
+                this.open1 = false;
+                this.getList();
+              });
+            } else {
+              addAdjust(this.form1).then(response => {
+                this.msgSuccess("新增成功");
+                this.open1 = false;
+                this.getList();
+              });
+            }
+          }
+        });
+      }
     },
     /** 删除按钮操作 */
     handleDelete(row) {

+ 4 - 1
Yijia-SaaS/yijia-ui/src/views/station/structure/index.vue

@@ -103,7 +103,10 @@ export default {
     }else{
        //初始化数据,在数据中查询上次班结结束时间,这里登陆人,还不能是员工,员工不能登陆,我们只能默认这里的数据是写死的油站
       getAgeClassStructure().then(response => {
-        this.opo.classStartDate = response.data.classStructureDate;
+        if(response.data==undefined){
+        }else{
+          this.opo.classStartDate = response.data.classStructureDate;
+        }
         this.opo.classStructureMan =this.$store.state.user.name;
         this.loading = false;
       });

+ 10 - 15
Yijia-SaaS/yijia-ui/src/views/station/summary/index.vue

@@ -10,20 +10,13 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="开始时间" prop="startDate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.beginTime"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择开始时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="结束时间" prop="endDate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.endTime"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择结束时间">
+      <el-form-item label="班结时间" prop="endDate">
+        <el-date-picker style="width: 350px"
+                        v-model="dateRangeCreatedDate" size="mini" value-format="yyyy-MM-dd HH:mm:ss"
+                        type="datetimerange"
+                        range-separator="至"
+                        start-placeholder="开始日期"
+                        end-placeholder="结束日期">
         </el-date-picker>
       </el-form-item>
       <el-form-item label="油站名称" prop="stationId">
@@ -134,6 +127,7 @@ export default {
       // 【请填写功能名称】表格数据
       summaryList: [],
       stationOptions: [],
+      dateRangeCreatedDate: [],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -218,7 +212,7 @@ export default {
     /** 查询【请填写功能名称】列表 */
     getList() {
       this.loading = true;
-      listSummary(this.queryParams).then(response => {
+      listSummary(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
         this.summaryList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -258,6 +252,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.dateRangeCreatedDate =[];
       this.handleQuery();
     },
     handlelook(row){