Joe vor 4 Jahren
Ursprung
Commit
b256589d4f

+ 1 - 1
src/router/index.js

@@ -59,7 +59,7 @@ export const constantRoutes = [
     children: [
       {
         path: 'index',
-        component: (resolve) => require(['@/views/index'], resolve),
+        component: (resolve) => require(['@/views/overview/Overview_Summary'], resolve),
         name: '首页',
         meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
       }

+ 12 - 4
src/views/customer/Customer_Grade.vue

@@ -26,12 +26,12 @@
         </template>
       </af-table-column>
 
-      <af-table-column label="优惠 (元/L)" align="center" prop="discountAmt" />
+      <af-table-column label="优惠金额(元/L或元/kg)" align="center" prop="discountAmt" />
       <af-table-column
         label="操作"
         align="center"
         class-name="small-padding fixed-width "
-        width="120px"
+        width="100px"
       >
         <template slot-scope="scope">
           <!-- <el-button
@@ -60,6 +60,7 @@
             placeholder="油品名称"
             clearable
             size="small"
+            @change="oilNameChange"
           >
             <el-option
               v-for="dict in oilNameOptions"
@@ -101,7 +102,7 @@
             :min="0"
             placeholder="请输入优惠金额"
           />
-          元/L
+          元/<span>{{oilType=="4"?"kg":"L"}}</span>
         </el-form-item>
         <el-form-item label="类型" v-show="false" prop="growthValue">
           <el-input v-model="form.gradeType" value="1" />
@@ -118,11 +119,11 @@
 <script>
 import {
   listSetting,
-  getSetting,
   delSetting,
   addSetting,
   updateSetting,
 } from "@/api/customer/setting";
+import { queryOilType } from "@/utils/oil";
 
 import { listPrice } from "@/api/station/price";
 export default {
@@ -150,6 +151,7 @@ export default {
       pageStatus: 0,
       // 总条数
       total: 0,
+      oilType: 0,
       settingList: [],
       //下拉油品名称
       oilNameOptions: [],
@@ -182,6 +184,7 @@ export default {
     this.getList();
     listPrice().then((response) => {
       this.oilNameOptions = response.rows;
+
     });
   },
   methods: {
@@ -202,6 +205,11 @@ export default {
       this.open = false;
     },
 
+    oilNameChange(val){
+      queryOilType(val).then((res) => {
+        this.oilType = res;
+      });
+    },
     /** 新增按钮操作 */
     handleAdd() {
       this.open = true;

+ 1 - 35
src/views/order/Order_NotOil.vue

@@ -89,12 +89,6 @@
         width="120px"
         :formatter="statusFotmat"
       />
-      <af-table-column
-        label="支付方式"
-        align="center"
-        prop="payWay"
-        :formatter="payWayFotmat"
-      />
       <af-table-column label="支付时间" align="center" prop="payDate">
         <template slot-scope="scope">
           <span>{{
@@ -109,14 +103,6 @@
           }}</span>
         </template>
       </af-table-column>
-      <af-table-column
-        label="订单类型"
-        align="center"
-        prop="
-
-"
-        v-if="false"
-      />
     </el-table>
     <pagination
       v-show="total > 0"
@@ -129,8 +115,6 @@
 </template>
 <script>
 import { listOrder, exportOrder } from "@/api/station/noorder";
-import { stationinfo } from "@/api/station/gun";
-
 export default {
   name: "Order_NotOil",
   data() {
@@ -141,14 +125,8 @@ export default {
       total: 0,
       // 订单支付表格数据
       orderList: [],
-      oilNameOptions: [],
       //字典
       payTypeOptions: [],
-      payWayOptions: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -160,8 +138,6 @@ export default {
       },
       // 表单参数
       form: {},
-      // 表单校验
-      rules: {},
     };
   },
   created() {
@@ -169,10 +145,7 @@ export default {
     //字典
     this.getDicts("pay_type").then((response) => {
       this.payTypeOptions = response.data;
-    });
-    this.getDicts("pay_way").then((response) => {
-      this.payWayOptions = response.data;
-    });
+    })
   },
   methods: {
     payTypeFotmat(row, column) {
@@ -192,13 +165,6 @@ export default {
         return "卡包支付";
       }
     },
-    payWayFotmat(row, column) {
-      if (row.payWay === "02") {
-        return "公众号";
-      } else if (row.payWay === "03") {
-        return "小程序";
-      }
-    },
     statusFotmat(row, column) {
       if (row.status === "0") {
         return "未支付";

+ 0 - 23
src/views/order/Order_Oil.vue

@@ -135,12 +135,6 @@
         prop="status"
         :formatter="statusFotmat"
       />
-      <af-table-column
-        label="支付方式"
-        align="center"
-        prop="payWay"
-        :formatter="payWayFotmat"
-      />
       <af-table-column label="支付时间" align="center" prop="payDate">
         <template slot-scope="scope">
           <span>{{
@@ -155,12 +149,6 @@
           }}</span>
         </template>
       </af-table-column>
-      <af-table-column
-        label="订单类型"
-        align="center"
-        prop="orderType"
-        v-if="false"
-      />
     </el-table>
     <pagination
       v-show="total > 0"
@@ -189,7 +177,6 @@ export default {
       oilNameOptions: [],
       // 字典
       payTypeOptions: [],
-      payWayOptions: [],
       // 下拉油站
       stationOptions: [],
       // 弹出层标题
@@ -218,9 +205,6 @@ export default {
     this.getDicts("pay_type").then((response) => {
       this.payTypeOptions = response.data;
     });
-    this.getDicts("pay_way").then((response) => {
-      this.payWayOptions = response.data;
-    });
     stationinfo().then((response) => {
       this.stationOptions = response.rows;
     });
@@ -251,13 +235,6 @@ export default {
         return "卡包支付";
       }
     },
-    payWayFotmat(row, column) {
-      if (row.payWay === "02") {
-        return "公众号";
-      } else if (row.payWay === "03") {
-        return "小程序";
-      }
-    },
     statusFotmat(row, column) {
       if (row.status === "0") {
         return "未支付";

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

@@ -113,7 +113,6 @@
             type="text"
             icon="el-icon-download"
             @click="handleExport(scope.row)"
-            v-hasPermi="['station:structure:export']"
             >下载</el-button
           >
         </template>

+ 1 - 2
src/views/overview/Overview_Summary.vue

@@ -224,8 +224,7 @@ import {
   listSum,
   listOilType,
   listViewData,
-  listCZData,
-  listXFData,
+  listCZXFData,
   listHYData,
   listJRHYData,
 } from "@/api/dataSource/saleReport";

+ 8 - 9
src/views/point/Point_Product.vue

@@ -220,10 +220,8 @@ import {
   editInfoWares,
   addWares,
   updateWares,
-  exportWares,
 } from "@/api/integral/wares";
 import { getToken } from "@/utils/auth";
-import { getDept } from "@/api/system/dept";
 export default {
   name: "Wares",
   data() {
@@ -307,6 +305,8 @@ export default {
     handleAdd() {
       this.reset();
       this.operation = 3;
+      console.log("process.envBASE_URL",process.env.BASE_URL);
+       console.log("process.VUE_APP_URL",process.env.VUE_APP_URL);
       this.open = true;
       this.title = "添加商品信息";
     },
@@ -391,13 +391,12 @@ export default {
     },
     // 文件上传成功处理++ =
     handleAvatarSuccess(res, file) {
-      let imgurl =
-        location.protocol +
-        "//" +
-        location.host +
-        process.env.VUE_APP_BASE_API +
-        res.fileName;
-      this.form.waresPic = imgurl;
+      console.log("res",res);
+      console.log("file",file);
+      let imgurl = process.env.VUE_APP_BASE_API + res.fileName;
+      //this.form.waresPic = imgurl;
+      this.form.waresPic = res.url;  
+       console.log("this.form.waresPic",this.form.waresPic);
     },
     beforeAvatarUpload(file) {
       // const isJPG = file.type === "image/jpeg" || "image/png";

+ 16 - 30
src/views/point/Point_Rule.vue

@@ -288,8 +288,6 @@
 
 <script>
 import { getToken } from "@/utils/auth";
-// import { queryPageStatus } from "@/utils/pageStatus";
-
 import {
   addRule,
   updateRule,
@@ -297,7 +295,6 @@ import {
   gradeList,
   listRuleOne,
 } from "@/api/integral/rule";
-import { getStationPay, updatePay } from "@/api/station/pay";
 import { queryOilType } from "@/utils/oil";
 
 export default {
@@ -479,16 +476,18 @@ export default {
         pageNum: 1,
         pageSize: 100,
       }).then((response) => {
-        this.form = response.data;
+        const imgFileList = response.data.imgFileList
+        response.data.imgFileList = [];
+         this.form  = response.data;
+        setTimeout(() =>{
+          this.form = {...response.data, imgFileList}
+        }, 1000)
         this.form.collectClickCalendar = [];
         this.form.collectClickDay = "";
         if (!this.form.itemsDetail || this.form.itemsDetail.length == 0) {
           this.form.itemsDetail = [{}];
         }
         if (this.form.datePicker == "1" || this.form.datePicker == "2") {
-          // if( this.form.datePickerTime == ""){
-          //   this.form.collectClickCalendar = [];
-          // }
           this.form.collectClickCalendar = this.form.datePickerTime
             .split(",")
             .map(parseFloat);
@@ -545,19 +544,7 @@ export default {
       });
     },
     handleRemove(file, fileList) {
-      if (fileList != null && fileList.length > 0) {
-        this.form.imgFileList = [];
-        for (let i = 0; i < fileList.length; i++) {
-          let fileName = fileList[i].name;
-          let imgurl = fileList[i].url;
-          this.form.imgFileList.push({
-            name: fileName,
-            url: imgurl,
-          });
-        }
-      } else {
-        this.form.imgFileList = fileList;
-      }
+      this.form.imgFileList = fileList;
     },
     beforeAvatarUpload(file) {
       const isLt5M = file.size / 1024 / 1024 < 1;
@@ -568,16 +555,13 @@ export default {
     },
     //上传成功
     handlepaymentSuccess(response, file, fileList) {
-      let imgurl =
-        location.protocol +
-        "//" +
-        location.host +
-        process.env.VUE_APP_BASE_API +
-        response.fileName;
-      this.form.imgFileList.push({
-        name: file.name,
-        url: imgurl,
-      });
+      this.form.imgFileList = [
+        ...this.form.imgFileList,
+        {
+          name: file.name,
+          url:  response.url,
+        },
+      ];
     },
     /** 提交按钮 */
     submitForm() {
@@ -592,10 +576,12 @@ export default {
           if (this.form.id != null) {
             updateRule(this.form).then((response) => {
               this.msgSuccess("更新成功");
+              this.listRule();
             });
           } else {
             addRule(this.form).then((response) => {
               this.msgSuccess("新增成功");
+               this.listRule();
             });
           }
         }

+ 1 - 1
src/views/station/Station_Adjustment/adjust.vue

@@ -322,7 +322,7 @@ export default {
       this.$refs["addForm"].validate((valid) => {
         if (valid) {
           addPrice(this.addForm).then((response) => {
-            this.msgSuccess("调价成功");
+            this.msgSuccess("添加油品成功");
             this.addOpen = false;
             this.getList();
           });

+ 17 - 54
src/views/station/Station_Configuration/applet.vue

@@ -6,8 +6,8 @@
       :rules="rules"
       label-width="130px"
     >
-      <el-form-item label="油站名称" prop="stationName" v-show="false">
-        <el-input v-model="ruleForm.stationName" placeholder="请输入油站名称" />
+      <el-form-item label="油站名称" prop="deptName" v-show="false">
+        <el-input v-model="ruleForm.deptName" placeholder="请输入油站名称" />
       </el-form-item>
       <el-form-item label="首页轮播图" prop="payMode">
         <el-upload
@@ -17,7 +17,7 @@
           :headers="headers"
           multiple
           list-type="picture-card"
-          :limit="4"
+          :limit="5"
           :file-list="ruleForm.imgFileList"
           accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
           :before-upload="beforeAvatarUpload"
@@ -27,7 +27,7 @@
         >
           <i class="el-icon-plus"></i>
           <div class="el-upload__tip" slot="tip">
-            只能上传图片文件,单张图片不要太
+            只能上传图片文件,单张图片大小不能超过 2MB
           </div>
         </el-upload>
         <el-dialog :visible.sync="dialogVisible" append-to-body>
@@ -44,32 +44,21 @@
       </el-form-item>
       <el-form-item label="班结是否打印">
         <el-radio-group v-model="ruleForm.wsPrintFlag">
-          <el-radio
-            v-for="dict in wsPrintFlagOptions"
-            :key="dict.dictValue"
-            :label="dict.dictValue"
-            >{{ dict.dictLabel }}</el-radio
-          >
+          <el-radio label="1">打印</el-radio>
+          <el-radio label="2">不打印</el-radio>
         </el-radio-group>
       </el-form-item>
       <el-form-item label="小票打印模板">
         <el-radio-group v-model="ruleForm.printSetting">
-          <el-radio
-            v-for="dict in printSettingOptions"
-            :key="dict.dictValue"
-            :label="dict.dictValue"
-            >{{ dict.dictLabel }}</el-radio
-          >
+          <el-radio label="1">客户联</el-radio>
+          <el-radio label="2">商户联</el-radio>
+          <el-radio label="3">客户联和商户联</el-radio>
         </el-radio-group>
       </el-form-item>
       <el-form-item label="兑换积分小票打印">
         <el-radio-group v-model="ruleForm.integralPrintFlag">
-          <el-radio
-            v-for="dict in integralPrintFlagOptions"
-            :key="dict.dictValue"
-            :label="dict.dictValue"
-            >{{ dict.dictLabel }}</el-radio
-          >
+          <el-radio label="1">是</el-radio>
+          <el-radio label="0">否</el-radio>
         </el-radio-group>
       </el-form-item>
     </el-form>
@@ -87,11 +76,6 @@ export default {
   data() {
     return {
       // 遮罩层
-      wsPrintFlagOptions: [],
-      printSettingOptions: [],
-      cardEnabledFlagOptions: [],
-      discountSettingOptions: [],
-      isNoOilOptions: [],
       integralPrintFlagOptions: [],
       deleteImgFileList: [], //存已被删除了的图片的id
       dialogImageUrl: "",
@@ -102,52 +86,31 @@ export default {
       // 表单校验
       rules: {},
       headers: { Authorization: "Bearer " + getToken() },
-      addressUrl: process.env.VUE_APP_BASE_API + "/common/upload",
+      addressUrl:  location.protocol +"//" +location.host +process.env.VUE_APP_BASE_API + "/common/upload",
     };
   },
   created() {
     this.getInfo();
-    this.getDicts("ws_print_flag").then((response) => {
-      this.wsPrintFlagOptions = response.data;
-    });
-    this.getDicts("print_setting_flag").then((response) => {
-      this.printSettingOptions = response.data;
-    });
-    this.getDicts("card_enabled_flag").then((response) => {
-      this.cardEnabledFlagOptions = response.data;
-    });
-    this.getDicts("discount_setting").then((response) => {
-      this.discountSettingOptions = response.data;
-    });
-    this.getDicts("is_flag").then((response) => {
-      this.isNoOilOptions = response.data;
-    });
-    this.getDicts("is_flag").then((response) => {
-      this.integralPrintFlagOptions = response.data;
-    });
   },
   methods: {
     handleRemove(file, fileList) {
       this.ruleForm.imgFileList = fileList;
     },
     beforeAvatarUpload(file) {
-      // const isType = file.type === "image/jpeg" || "image/png";
-      const isLt5M = file.size / 1024 / 1024 < 5;
-      // if (!isType) {
-      //   this.$message.error("上传头像图片只能是 JPG 或 PNG格式!");
-      // }
+      const isLt5M = file.size / 1024 / 1024 < 2;
       if (!isLt5M) {
-        this.$message.error("上传头像图片大小不能超过 5MB!");
+        this.$message.error("上传头像图片大小不能超过 2MB!");
       }
       return isLt5M;
     },
     //上传成功
     handlepaymentSuccess(response, file, fileList) {
+      console.log("img",response);
       this.ruleForm.imgFileList = [
         ...this.ruleForm.imgFileList,
         {
           name: file.name,
-          url: process.env.VUE_APP_BASE_API + response.fileName,
+          url:  response.url,
         },
       ];
     },
@@ -166,7 +129,7 @@ export default {
     submitForm() {
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
-          if (this.ruleForm.payId != null) {
+          if (this.ruleForm.deptId != null) {
             updatePay(this.ruleForm).then((response) => {
               this.msgSuccess("修改配置成功");
               this.getInfo();

+ 10 - 12
src/views/station/Station_Configuration/info.vue

@@ -86,14 +86,10 @@
 <script>
 import {
   listInfo,
-  getInfo,
-  delInfo,
-  addInfo,
   updateInfo,
   exportInfo,
 } from "@/api/station/info";
 import { getToken } from "@/utils/auth";
-import { treeselect } from "@/api/system/dept";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 export default {
@@ -176,7 +172,6 @@ export default {
         this.form = response.rows[0];
       });
     },
-
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate((valid) => {
@@ -212,13 +207,16 @@ export default {
         });
     },
     handleAvatarSuccess(res, file) {
-      console.log("img", res, file);
-      let imgurl =
-        location.protocol +
-        "//" +
-        location.host +
-        process.env.VUE_APP_BASE_API +
-        res.fileName;
+      //console.log("img", res, file);
+      // let imgurl =
+      //   location.protocol +
+      //   "//" +
+      //   location.host +
+      //   process.env.VUE_APP_BASE_API +
+      //   res.fileName;
+      let imgurl=res.url;
+      console.log("img",imgurl);
+      console.log("img",res);
       this.form.stationPic = imgurl;
     },
     beforeAvatarUpload(file) {

+ 9 - 1
src/views/station/Station_Employee.vue

@@ -221,7 +221,15 @@ export default {
     submitForm() {
       this.$refs["form"].validate((valid) => {
         if (valid) {
-          this.form.gunNo = this.form.checkedGunList.toString();
+          let list=[];
+          for(let i=0;i<this.form.checkedGunList.length;i++){
+            for(let j=0;j<this.allGunList.length;j++){
+              if(this.form.checkedGunList[i]== this.allGunList[j].oilGunNo){
+                list.push(this.allGunList[j].oilGunNo);
+              }
+            }
+          }
+          this.form.gunNo=list.toString();
           if (!!this.form.personnelId) {
             updatePersonnel(this.form).then((response) => {
               this.msgSuccess("修改成功");

+ 0 - 16
src/views/station/Station_Equipment.vue

@@ -90,11 +90,6 @@
       </af-table-column>
       <af-table-column label="绑定油枪号" align="center" prop="gunNo" />
       <af-table-column label="设备厂家" align="center" prop="deviceFactory" />
-      <af-table-column label="启动状态" align="center" prop="deviceStatus">
-        <template slot-scope="scope">
-          {{ scope.row.deviceStatus == "1" ? "开启" : "关闭" }}
-        </template>
-      </af-table-column>
       <af-table-column
         label="操作"
         align="center"
@@ -224,17 +219,6 @@
             </el-checkbox-group>
           </template>
         </el-form-item>
-        <el-form-item label="设备状态" prop="deviceStatus">
-          <el-select
-            v-model="dialogForm.deviceStatus"
-            clearable
-            size="small"
-            placeholder="请选择"
-          >
-            <el-option label="在用" value="1"></el-option>
-            <el-option label="停用" value="2"></el-option>
-          </el-select>
-        </el-form-item>
         <el-form-item label="设备厂家" prop="deviceFactory">
           <el-input
             v-model="dialogForm.deviceFactory"

+ 1 - 1
src/views/station/Station_OilGun.vue

@@ -16,7 +16,7 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-          >搜索</el-button
+          >刷新</el-button
         >
         <el-button icon="el-icon-plus" size="mini" @click="handleAdd"
           >新增</el-button