MS-QJVSRANLTYEO\Administrator 4 vuotta sitten
vanhempi
commit
da30c4d0f3

+ 17 - 6
Yijia-SaaS/yijia-ui/src/views/station/common/priceAdjust.vue

@@ -1,11 +1,11 @@
 <template>
   <div class="priceAdjust">
-    <el-tabs v-model="activeName"  >
-      <el-tab-pane label="油品信息" name="price" :key="'price'">
-        <child1></child1>
+    <el-tabs v-model="activeName" @tab-click="handleClick" >
+      <el-tab-pane  label="油品信息" name="price" >
+        <child1 v-if="isChildUpdate1" ></child1>
       </el-tab-pane>
-      <el-tab-pane label="调价记录" name="adjust" :key="'adjust'">
-        <child2></child2>
+      <el-tab-pane ref="child2" label="调价记录" name="adjust">
+        <child2 v-if="isChildUpdate2"></child2>
       </el-tab-pane>
     </el-tabs>
   </div>
@@ -21,10 +21,21 @@
     },
     data() {
       return {
-        activeName: 'price'
+        activeName: 'price',
+        isChildUpdate1: true,
+        isChildUpdate2: false
       };
     },
     methods: {
+      handleClick (tab) {
+        if (tab.name === 'price') {
+          this.isChildUpdate1 = true
+          this.isChildUpdate2 = false
+        } else if (tab.name === 'adjust') {
+          this.isChildUpdate1 = false
+          this.isChildUpdate2 = true
+        }
+      }
 
     }
   };

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

@@ -72,7 +72,14 @@
           <el-input v-model="form.oilGunNo" placeholder="请输入油枪号" />
         </el-form-item>
         <el-form-item label="油品名称" prop="oilName">
-          <el-input v-model="form.oilName" placeholder="请输入油品名称" />
+          <el-select v-model="form.oilName" placeholder="油品名称" clearable size="small">
+            <el-option
+              v-for="dict in oilNameOptions"
+              :key="dict.dictLabel"
+              :label="dict.dictLabel"
+              :value="dict.dictLabel"
+            />
+          </el-select>
         </el-form-item>
         <el-form-item label="单价" prop="oilPrice">
           <el-input v-model="form.oilPrice" placeholder="请输入单价" />
@@ -138,6 +145,7 @@ export default {
       //下拉油站
       stationOptions:[],
       statusOptions:[],
+      oilNameOptions:[],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -169,6 +177,9 @@ export default {
     this.getDicts("station_gun_status").then(response => {
       this.statusOptions = response.data;
     });
+    this.getDicts("oil_name").then(response => {
+      this.oilNameOptions = response.data;
+    });
   },
   methods: {
     /** 查询油枪管理列表 */

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

@@ -36,19 +36,22 @@
       <el-table-column label="设备厂家" align="center" prop="deviceFactory" />
       <el-table-column label="油站名称id" v-if="false" align="center" prop="stationId" />
       <el-table-column label="绑定油枪号" align="center" prop="gunNo" />
-      <el-table-column label="设备状态" align="center" prop="deviceStatus" />
+      <el-table-column label="设备状态" align="center">
+        <template slot-scope="scope">
+          <el-switch
+            v-model="scope.row.deviceStatus"
+            active-value="1"
+            inactive-value="2"
+            @change="handleStatusUpdate(scope.row)"
+          ></el-switch>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
             type="text"
             icon="el-icon-edit"
-            @click="handleStatusUpdate(scope.row)"
-          >停用</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['station:manage:edit']"
           >修改</el-button>
@@ -251,6 +254,13 @@ export default {
       this.resetForm("form");
       this.gunNoList.length=0;
     },
+    deviceStatusFotmat(row, column){
+      if(row.deviceStatus === '1'){
+        return '在用'
+      }else if(row.deviceStatus === '2'){
+        return '停用'
+      }
+    },
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
@@ -294,7 +304,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(function() {
-          return changeManageStatus(row.deviceId, "2");
+          return changeManageStatus(row.deviceId, row.deviceStatus);
       }).then(() => {
         this.msgSuccess(text + "成功");
         this.handleQuery();

+ 19 - 12
Yijia-SaaS/yijia-ui/src/views/station/order/index.vue

@@ -4,7 +4,7 @@
 
       <el-form-item label="客户姓名" prop="consumer">
         <el-input
-          v-model="queryParams.consumer"
+          v-model="queryParams.likeConsumer"
           placeholder="请输入客户姓名"
           clearable
           size="small"
@@ -13,7 +13,7 @@
       </el-form-item>
       <el-form-item label="联系电话" prop="orderNo">
         <el-input
-          v-model="queryParams.orderNo"
+          v-model="queryParams.likeCustomerPhone"
           placeholder="请输入订单号"
           clearable
           size="small"
@@ -22,7 +22,7 @@
       </el-form-item>
       <el-form-item label="车牌号" prop="orderNo">
         <el-input
-          v-model="queryParams.orderNo"
+          v-model="queryParams.likeCarNo"
           placeholder="请输入订单号"
           clearable
           size="small"
@@ -30,13 +30,14 @@
         />
       </el-form-item>
       <el-form-item label="油品名称" prop="oilName">
-        <el-input
-          v-model="queryParams.oilName"
-          placeholder="请输入油品名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
+        <el-select v-model="queryParams.oilName" placeholder="油品名称" clearable size="small">
+          <el-option
+            v-for="dict in oilNameOptions"
+            :key="dict.dictLabel"
+            :label="dict.dictLabel"
+            :value="dict.dictLabel"
+          />
+        </el-select>
       </el-form-item>
       <el-form-item label="加油员" prop="oilPersonnel">
         <el-input
@@ -101,7 +102,6 @@
       <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">
@@ -148,6 +148,7 @@
         total: 0,
         // 订单支付表格数据
         orderList: [],
+        oilNameOptions: [],
         //字典
         payTypeOptions:[],
         payWayOptions:[],
@@ -181,7 +182,10 @@
           createdMinDate: null,
           oilPersonnel: null,
           createdDate: null,
-          orderType: null
+          orderType: null,
+          likeConsumer: null,
+          likeCustomerPhone: null,
+          likeCarNo: null
         },
         // 表单参数
         form: {},
@@ -205,6 +209,9 @@
       stationinfo().then(response => {
         this.stationOptions = response.rows;
       });
+      this.getDicts("oil_name").then(response => {
+        this.oilNameOptions = response.data;
+      });
     },
     methods: {
       payTypeFotmat(row, column){

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

@@ -78,10 +78,10 @@
       </div>
     </el-dialog>
     <!-- 添加或修改油品调价信息对话框 -->
-    <el-dialog :title="title" :visible.sync="open1" width="500px" append-to-body>
+    <el-dialog :title="titleAdjust" :visible.sync="open1" width="500px" append-to-body>
       <el-form ref="form1" :model="form1"  label-width="80px">
-        <el-form-item label="油品名称" prop="oilName">
-          <el-select v-model="form1.oilName" placeholder="油品名称" clearable size="small">
+        <el-form-item label="油品名称" prop="oilName" >
+          <el-select disabled="disabled" v-model="form1.oilName" placeholder="油品名称" clearable size="small">
             <el-option
               v-for="dict in oilNameOptions"
               :key="dict.dictLabel"
@@ -111,7 +111,7 @@
         </el-form-item>
 
         <el-form-item label="油站名称"  prop="stationId">
-          <el-select
+          <el-select disabled="disabled"
             v-model="form1.stationId"
             placeholder="请选择油站"
             clearable
@@ -279,7 +279,7 @@ export default {
        let sss = this.$refs.multipleTable.selection;
         this.resetAdjust();
         this.form1.stationId=sss[0].stationId;
-        this.form1.stationName=sss[0].stationName;
+        this.form1.stationName=sss[0].stationNanme;
         this.form1.oilName=sss[0].oilName;
         this.form1.oilPriceId=sss[0].oilPriceId;
         this.open1= true;

+ 19 - 9
Yijia-SaaS/yijia-ui/src/views/station/structure/index.vue

@@ -92,15 +92,25 @@ export default {
   },
   created() {
     this.loading = false;
-   let classesNo =this.$route.query.classesNo;
-   if(classesNo!=null){
+    let classesNo =this.$route.query.classesNo;
+    if(classesNo!=null){
      this.resetQuery();
      this.queryParams.classStructureNo=this.$route.query.classesNo;
      this.queryParams.stationId=this.$route.query.stationId;
      this.getClassInfo();
      this.isclose=false;
-   }
-
+    }
+  },
+  activated(){
+    this.loading = false;
+    let classesNo =this.$route.query.classesNo;
+    if(classesNo!=null){
+      this.resetQuery();
+      this.queryParams.classStructureNo=this.$route.query.classesNo;
+      this.queryParams.stationId=this.$route.query.stationId;
+      this.getClassInfo();
+      this.isclose=false;
+    }
   },
   methods: {
     /** 查询班结管理列表 */
@@ -382,10 +392,10 @@ export default {
       });
     }
   },
-  watch:{
-    $route(to){
-      this.$router.go(0);
-    }
-  }
+  // watch:{
+  //   $route(to){
+  //     this.$router.go(0);
+  //   }
+  // }
 };
 </script>

+ 32 - 12
Yijia-SaaS/yijia-ui/src/views/station/summary/index.vue

@@ -3,7 +3,7 @@
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="98px">
       <el-form-item label="班次号" prop="classesNo">
         <el-input
-          v-model="queryParams.classesNo"
+          v-model="queryParams.likeClassesNo"
           placeholder="请输入班次号"
           clearable
           size="small"
@@ -26,14 +26,20 @@
           placeholder="选择结束时间">
         </el-date-picker>
       </el-form-item>
-      <el-form-item label="油站名称" prop="stationName">
-        <el-input
-          v-model="queryParams.stationName"
-          placeholder="请输入油站名称"
+      <el-form-item label="油站名称" prop="stationId">
+        <el-select
+          v-model="queryParams.stationId"
+          placeholder="请选择油站"
           clearable
           size="small"
-          @keyup.enter.native="handleQuery"
-        />
+        >
+          <el-option
+            v-for="item in stationOptions"
+            :key="item.stationId"
+            :label="item.stationName"
+            :value="item.stationId"
+          ></el-option>
+        </el-select>
       </el-form-item>
       <el-form-item label="班结人" prop="classesMan">
         <el-input
@@ -75,9 +81,15 @@
       <el-table-column label="班结人" align="center" prop="classesMan" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <router-link :to="{path:'/station/structure',query:{classesNo:scope.row.classesNo,stationId:scope.row.stationId}}"  class="link-type">
-            <span icon="el-icon-search" >查看 </span>
-          </router-link>
+<!--          <router-link :to="{path:'/station/structure',query:{classesNo:scope.row.classesNo,stationId:scope.row.stationId}}"  class="link-type">-->
+<!--            <span icon="el-icon-search" >查看 </span>-->
+<!--          </router-link>-->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-plus"
+            @click="handlelook(scope.row)"
+          >查看</el-button>
           <el-button
             size="mini"
             type="text"
@@ -102,7 +114,7 @@
 <script>
 import { listSummary } from "@/api/station/summary";
 import { exportStructure } from "@/api/station/structure";
-
+import { stationinfo } from "@/api/station/gun";
 export default {
   name: "Summary",
   data() {
@@ -121,6 +133,7 @@ export default {
       total: 0,
       // 【请填写功能名称】表格数据
       summaryList: [],
+      stationOptions: [],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -141,7 +154,8 @@ export default {
         wxAmt: null,
         zfbAmt: null,
         dzkAmt: null,
-        classesMan: null
+        classesMan: null,
+        likeClassesNo:null
       },
       // 查询参数
       queryParam: {
@@ -196,6 +210,9 @@ export default {
   },
   created() {
     this.getList();
+    stationinfo().then(response => {
+      this.stationOptions = response.rows;
+    });
   },
   methods: {
     /** 查询【请填写功能名称】列表 */
@@ -243,6 +260,9 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
+    handlelook(row){
+      this.$router.push({path:'/station/structure',query:{classesNo:row.classesNo,stationId:row.stationId}});
+    },
     /** 导出按钮操作 */
     handleExport(row) {
       const classesNo = row.classesNo;