Jelajahi Sumber

优化数据信息

MS-QJVSRANLTYEO\Administrator 4 tahun lalu
induk
melakukan
832cc9dddd

+ 7 - 0
Yijia-SaaS/yijia-ui/src/api/customer/manage.js

@@ -51,3 +51,10 @@ export function exportManage(query) {
     params: query
   })
 }
+export function getOrderInfo(query) {
+  return request({
+    url: '/station/order/list',
+    method: 'get',
+    params: query
+  })
+}

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

@@ -66,6 +66,24 @@ export function listQydata97(query) {
     method: 'get',
     params: query
   })
+}export function listQydata0(query) {
+  return request({
+    url: '/station/order/listQydata0',
+    method: 'get',
+    params: query
+  })
+}export function listQydata10(query) {
+  return request({
+    url: '/station/order/listQydata10',
+    method: 'get',
+    params: query
+  })
+}export function listQydata20(query) {
+  return request({
+    url: '/station/order/listQydata20',
+    method: 'get',
+    params: query
+  })
 }
 export function listXdata(query) {
   return request({

+ 74 - 29
Yijia-SaaS/yijia-ui/src/views/customer/manage/index.vue

@@ -43,14 +43,14 @@
           <el-option label="请选择字典生成" value="" />
         </el-select>
       </el-form-item>
-      <el-form-item label="油品" prop="oils">
+      <el-form-item label="油品" prop="oilName">
         <el-select
-          v-model="queryParams.oils"
+          v-model="queryParams.oilName"
           placeholder="请选择油品"
           clearable
           size="small">
           <el-option
-            v-for="dict in oilsOptions"
+            v-for="dict in oilNameOptions"
             :key="dict.dictValue"
             :label="dict.dictLabel"
             :value="dict.dictValue"
@@ -90,14 +90,14 @@
 
 
     <el-table v-loading="loading" :data="manageList" @selection-change="handleSelectionChange">
-      <el-table-column label="油站名称" align="center" prop="id" v-if="false" />
+      <el-table-column label="客户表id" align="center" prop="id" v-if="false" />
       <el-table-column label="会员id" align="center" prop="memberId" />
       <el-table-column label="客户姓名" align="center" prop="customerName" />
       <el-table-column label="推荐人" align="center" prop="commendMan" />
       <el-table-column label="会员等级" align="center" prop="memberGrade" />
       <el-table-column label="手机号" align="center" prop="phoneNumber" />
       <el-table-column label="车牌号" align="center" prop="carNumber" />
-      <el-table-column label="油品" align="center" prop="oils" />
+      <el-table-column label="油品" align="center" prop="oilName" />
       <el-table-column label="余额" align="center" prop="balance" />
       <el-table-column label="积分" align="center" prop="integral" />
       <el-table-column label="专车类型" align="center" prop="specialCarType" />
@@ -115,16 +115,12 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['station:manage:edit']"
           >编辑</el-button>
           <el-button
             size="mini"
             type="text"
-            icon="el-icon-search
-
-"
-            @click=""
-            v-hasPermi="['station:manage:list']"
+            icon="el-icon-search"
+            @click="lookinfo(scope.row)"
           >查询</el-button>
         </template>
       </el-table-column>
@@ -159,10 +155,10 @@
         <el-form-item label="车牌号" prop="carNumber">
           <el-input v-model="form.carNumber" placeholder="请输入车牌号" />
         </el-form-item>
-        <el-form-item label="油品" prop="oils">
-          <el-select v-model="form.oils" multiple placeholder="请选择">
+        <el-form-item label="油品" prop="oilName">
+          <el-select v-model="form.oilName" multiple placeholder="请选择">
             <el-option
-              v-for="dict in oilsOptions"
+              v-for="dict in oilNameOptions"
               :key="dict.dictValue"
               :label="dict.dictLabel"
               :value="dict.dictValue"
@@ -212,6 +208,43 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+    <el-dialog :title="titleOrderInfo" :visible.sync="openOrderInfo" width="700px" append-to-body>
+      <el-table v-loading="loading" :data="orderList" >
+        <el-table-column v-if="false" label="订单id" align="center" prop="orderId" />
+        <el-table-column label="订单号"  width="200" align="center" prop="orderNo" />
+        <el-table-column label="油品名称" align="center" prop="oilName" />
+        <el-table-column label="油品价格" align="center" prop="oilPirce" />
+        <el-table-column label="加油升数" align="center" prop="orderLiters" />
+        <el-table-column label="金额" align="center" prop="amt" />
+        <el-table-column label="消费者" width="120" align="center" prop="consumer" />
+        <el-table-column label="加油员" width="120" align="center" prop="oilPersonnel" />
+        <el-table-column label="加油枪号" align="center" prop="oilGun" />
+        <el-table-column label="支付类型" align="center" prop="payType" :formatter="payTypeFotmat"/>
+        <el-table-column label="油站名称" width="120" align="center" v-if="false" prop="stationName" />
+        <el-table-column v-if="false" label="用户id(消费者)" align="center" prop="consumerId" />
+        <el-table-column v-if="false" label="油站id" align="center" prop="stationId" />
+        <el-table-column label="状态" align="center" prop="status" :formatter="statusFotmat"/>
+        <el-table-column label="支付方式" align="center" prop="payWay" :formatter="payWayFotmat"/>
+        <el-table-column label="支付时间" align="center" prop="payDate" width="150">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.payDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建时间" align="center" prop="createdDate" width="150">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.createdDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="订单类型" align="center" prop="orderType" v-if="false" />
+      </el-table>
+      <pagination
+        v-show="totalOrder>0"
+        :total="totalOrder"
+        :page.sync="queryOrder.pageNum"
+        :limit.sync="queryOrder.pageSize"
+        @pagination="lookinfo"
+      />
+    </el-dialog>
   </div>
 </template>
 
@@ -235,15 +268,19 @@ export default {
       showSearch: true,
       // 总条数
       total: 0,
+      totalOrder: 0,
       // 客户管理表格数据
       manageList: [],
       //油站信息
       stationOptions:[],
+      orderList:[],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
       open: false,
-      oilsOptions:[],
+      openOrderInfo: false,
+      titleOrderInfo:"",
+      oilNameOptions:[],
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -254,7 +291,7 @@ export default {
         memberGrade: null,
         phoneNumber: null,
         carNumber: null,
-        oils: null,
+        oilName: null,
         balance: null,
         integral: null,
         specialCarType: null,
@@ -262,6 +299,12 @@ export default {
         stationId: null,
         stationNam: null
       },
+      queryOrder:{
+        pageNum: 1,
+        pageSize: 10,
+        oilName: null,
+        stationId: null,
+      },
       // 表单参数
       form: {},
       // 表单校验
@@ -275,7 +318,7 @@ export default {
       this.stationOptions = response.rows;
     });
     this.getDicts("oil").then(response => {
-      this.oilsOptions = response.data;
+      this.oilNameOptions = response.data;
     });
   },
   methods: {
@@ -288,21 +331,11 @@ export default {
         this.loading = false;
       });
     },
-    oilsOptionsFotmat(row, column){
-      if(row.oils === '1'){
-        return '汽油'
-      }else if(row.oils === '2'){
-        return '柴油'
-      }else if(row.oils === '3'){
-        return '柴油和汽油'
-      }
-    },
     onInstitutionChang(e){
       let obj = {};
       obj = this.stationOptions.find((item)=>{//这里的userList就是上面遍历的数据源
         return item.stationId === e;//筛选出匹配数据
       })
-      console.log("油站名称"+obj.stationName);
       this.form.stationNam=obj.stationName;
     },
     // 取消按钮
@@ -320,7 +353,7 @@ export default {
         memberGrade: null,
         phoneNumber: null,
         carNumber: null,
-        oils: null,
+        oilName: null,
         balance: null,
         integral: null,
         specialCarType: null,
@@ -362,6 +395,17 @@ export default {
         this.title = "修改客户管理";
       });
     },
+    lookinfo(row){
+      const id = row.id || this.ids
+      this.queryOrder.oilName=row.oilName;
+      this.queryOrder.stationId=row.stationId;
+      getOrderInfo(this.queryOrder).then(response => {
+        this.orderList = response.data;
+        this.openOrderInfo = true;
+        this.titleOrderInfo = "查看客户订单信息";
+        this.loading = false;
+      });
+    },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {
@@ -408,7 +452,8 @@ export default {
         }).then(response => {
           this.download(response.msg);
         })
-    }
+    },
+
   }
 };
 </script>

+ 87 - 4
Yijia-SaaS/yijia-ui/src/views/dataSource/dayReport.vue

@@ -128,7 +128,7 @@
 <script>
 import echarts from 'echarts'
 require('echarts/theme/macarons') // echarts theme
-import { listSum,listOilType,listDayReport,getDetails,listXdata,listQydata92,listQydata95,listQydata97 } from "@/api/dataSource/saleReport";
+import { listSum,listOilType,listDayReport,getDetails,listXdata,listQydata92,listQydata95,listQydata97,listQydata0,listQydata10,listQydata20 } from "@/api/dataSource/saleReport";
 
 export default {
   name: "source",
@@ -160,6 +160,12 @@ export default {
       qydata95:[],
       //97#汽油数据
       qydata97:[],
+      //0#柴油数据
+      qydata0:[],
+      //-10#柴油数据
+      qydata10:[],
+      //-20#柴油数据
+      qydata20:[],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -237,7 +243,7 @@ export default {
           }
         },
         legend: {
-          data: ['92#', '95#','97#']
+          data: ['92#', '95#','97#',"0#","-10#","-20#"]
         },
         series: [{
           name: '92#', itemStyle: {
@@ -288,6 +294,57 @@ export default {
             data: this.qydata97,
             animationDuration: 2800,
             animationEasing: 'quadraticOut'
+          },
+          {
+            name: '0#',
+            smooth: true,
+            type: 'line',
+            itemStyle: {
+              normal: {
+                color: '#00ff00',
+                lineStyle: {
+                  color: '#00ff00',
+                  width: 2
+                },
+              }
+            },
+            data: this.qydata97,
+            animationDuration: 2800,
+            animationEasing: 'quadraticOut'
+          },
+          {
+            name: '-10#',
+            smooth: true,
+            type: 'line',
+            itemStyle: {
+              normal: {
+                color: '#00bfff',
+                lineStyle: {
+                  color: '#00bfff',
+                  width: 2
+                },
+              }
+            },
+            data: this.qydata97,
+            animationDuration: 2800,
+            animationEasing: 'quadraticOut'
+          },
+          {
+            name: '-20#',
+            smooth: true,
+            type: 'line',
+            itemStyle: {
+              normal: {
+                color: '#ffb6c1',
+                lineStyle: {
+                  color: '#ffb6c1',
+                  width: 2
+                },
+              }
+            },
+            data: this.qydata97,
+            animationDuration: 2800,
+            animationEasing: 'quadraticOut'
           }]
       });
     },
@@ -295,7 +352,6 @@ export default {
     getDatas(){
       listXdata(this.queryParams).then(response => {
         this.xdata=[];
-        console.log("查询到的xdata",response.rows);
         if (response.rows === "undefined") {
         } else {
           for (let i in response.rows){
@@ -330,6 +386,33 @@ export default {
           }
         }
       });
+      listQydata0(this.queryParams).then(response => {
+        this.qydata0=[];
+        if (response.rows === "undefined") {
+        } else {
+          for (let i in response.rows){
+            this.qydata97.push(response.rows[i].amt);
+          }
+        }
+      });
+      listQydata10(this.queryParams).then(response => {
+        this.qydata10=[];
+        if (response.rows === "undefined") {
+        } else {
+          for (let i in response.rows){
+            this.qydata97.push(response.rows[i].amt);
+          }
+        }
+      });
+      listQydata20(this.queryParams).then(response => {
+        this.qydata20=[];
+        if (response.rows === "undefined") {
+        } else {
+          for (let i in response.rows){
+            this.qydata97.push(response.rows[i].amt);
+          }
+        }
+      });
     },
 
     /** 查询优惠劵管理列表 */
@@ -494,7 +577,7 @@ export default {
       };
     },
 
-    /** 修改按钮操作 */
+    /** 查看详情按钮操作 */
     handleLook(row) {
       const payDate = row.payDate;
       this.queryInfo.likePayDate=payDate;

+ 3 - 3
Yijia-SaaS/yijia-ui/src/views/station/gun/index.vue

@@ -67,9 +67,9 @@
 
     <!-- 添加或修改油枪管理对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
         <el-form-item label="油枪号" prop="oilGunNo">
-          <el-input v-model="form.oilGunNo" placeholder="请输入油枪号" />
+          <el-input v-model="form.oilGunNo" placeholder="请输入油枪号" style="width: 150px"/>
         </el-form-item>
         <el-form-item label="油品名称" prop="oilName">
           <el-select v-model="form.oilName" placeholder="油品名称" clearable size="small">
@@ -82,7 +82,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="单价" prop="oilPrice">
-          <el-input v-model="form.oilPrice" placeholder="请输入单价" />
+          <el-input-number v-model="form.oilPrice" :precision="2" :step="0.1" ></el-input-number>
         </el-form-item>
         <el-form-item label="油站名称" prop="stationId" >
             <el-select

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

@@ -83,6 +83,9 @@
         <el-form-item label="设备名称" prop="deviceName">
           <el-input v-model="form.deviceName" placeholder="请输入设备名称" />
         </el-form-item>
+        <el-form-item label="设备序列号" prop="deviceSerialNum">
+          <el-input v-model="form.deviceSerialNum" placeholder="请输入设备序列号" />
+        </el-form-item>
         <el-form-item label="设备类型" >
           <el-select v-model="form.deviceType"  placeholder="请选择" clearable size="small">
             <el-option
@@ -93,9 +96,6 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="设备序列号" prop="deviceSerialNum">
-          <el-input v-model="form.deviceSerialNum" placeholder="请输入设备序列号" />
-        </el-form-item>
         <el-form-item label="油站名称" prop="stationId" >
           <el-select
             v-model="form.stationId"
@@ -252,7 +252,7 @@ export default {
         deviceType: null,
         deviceSerialNum: null,
         gunNo: null,
-        deviceStatus: "0",
+        deviceStatus: null,
         deviceFactory: null
       };
       this.resetForm("form");

+ 3 - 3
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="80px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
         <el-form-item label="油品名称" prop="oilName">
           <el-select v-model="form.oilName" placeholder="油品名称" clearable size="small">
             <el-option
@@ -50,7 +50,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="油品价格" prop="oilPrice">
-          <el-input v-model="form.oilPrice" placeholder="请输入油品价格" />
+          <el-input-number v-model="form.oilPrice" :precision="2" :step="0.1" ></el-input-number>
         </el-form-item>
         <el-form-item label="油站名称" prop="stationId" >
           <el-select
@@ -91,7 +91,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="调整价格" prop="oilAdjustPrice">
-          <el-input v-model="form1.oilAdjustPrice" placeholder="请输入油品调整价格" />
+          <el-input-number v-model="form1.oilAdjustPrice" :precision="2" :step="0.1" ></el-input-number>
         </el-form-item>
         <el-form-item label="生效状态">
           <el-radio-group v-model="form1.takeEffectStatus">

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

@@ -423,11 +423,6 @@ export default {
         this.getClassInfo();
       });
     }
-  },
-  // watch:{
-  //   $route(to){
-  //     this.$router.go(0);
-  //   }
-  // }
+  }
 };
 </script>