Преглед изворни кода

跑腿财务中心加骑手站点筛选
实名验证加骑手站点筛选和编辑按钮
骑手排行加骑手站点筛选
骑手站点页面

hzj18279462576@163.com пре 1 година
родитељ
комит
40318e055f

Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
src/icons/svg/icon-zhandian.svg


+ 12 - 1
src/router/index.js

@@ -86,6 +86,12 @@ const mainRoutes = {
       meta: { title: "导出记录", isTab: true }
     },
     {
+      path: "/entryManagement",
+      component: _import("entryManagement/entryManagement"),
+      name: "entryManagement",
+      meta: { title: "入账管理", isTab: true }
+    },
+    {
       path: "/taskConfig",
       component: _import("taskConfig/taskConfig"),
       name: "taskConfig",
@@ -331,7 +337,12 @@ const mainRoutes = {
       name: "shopduanxinlistRun",
       meta: { title: "商家短信记录", isTab: true }
     },
-
+    {
+      path: "/site",
+      component: _import("site/site"),
+      name: "site",
+      meta: { title: "骑手站点", isTab: true }
+    },
     {
       path: "/missionRun",
       component: _import("runErrands/mission"),

+ 94 - 86
src/utils/httpRequest.js

@@ -1,85 +1,93 @@
-import Vue from 'vue'
-import axios from 'axios'
-import router from '@/router'
-import qs from 'qs'
-import merge from 'lodash/merge'
-import { clearLoginInfo } from '@/utils'
+import Vue from "vue";
+import axios from "axios";
+import router from "@/router";
+import qs from "qs";
+import merge from "lodash/merge";
+import { clearLoginInfo } from "@/utils";
 import {
   encrypt,
   decrypt,
   urlSafeBase64Decode,
   urlSafeBase64Encode
-} from '../utils/cryptojs';
-var ifShangxian=1//1线上,0线下   /login页面还有一个验证码请求参加密
+} from "../utils/cryptojs";
+var ifShangxian = 1; //1线上,0线下   /login页面还有一个验证码请求参加密
 
 const http = axios.create({
   timeout: 1000 * 30,
   // withCredentials: true,
   headers: {
-    'Content-Type': 'application/json; charset=utf-8'
+    "Content-Type": "application/json; charset=utf-8"
   }
-})
+});
 
 /**
  * 请求拦截
  */
-http.interceptors.request.use(config => {
-
-  config.headers['token'] = Vue.cookie.get('token') // 请求头带上token
-  return config
-}, error => {
-  return Promise.reject(error)
-})
+http.interceptors.request.use(
+  config => {
+    config.headers["token"] = Vue.cookie.get("token"); // 请求头带上token
+    return config;
+  },
+  error => {
+    return Promise.reject(error);
+  }
+);
 
 /**
  * 响应拦截
  */
-http.interceptors.response.use(response => {
-  if (response.data && response.data.code === 401) { // 401, token失效
-  sessionStorage.clear()
-    clearLoginInfo()
-    router.push({ name: 'login' })
-  }
-  if(ifShangxian==1){
-    // console.log(response.data,'导出',response.data.type)
-    if(response.data.type){
-    }else{
-      const decryptData =decrypt(urlSafeBase64Decode(response.data))
-      response.data=JSON.parse(decryptData)
+http.interceptors.response.use(
+  response => {
+    if (response.data && response.data.code === 401) {
+      // 401, token失效
+      sessionStorage.clear();
+      clearLoginInfo();
+      router.push({ name: "login" });
     }
+    if (ifShangxian == 1) {
+      // console.log(response.data,'导出',response.data.type)
+      if (response.data.type) {
+      } else {
+        const decryptData = decrypt(urlSafeBase64Decode(response.data));
+        response.data = JSON.parse(decryptData);
+      }
+    }
+    // console.log('解密',response.data)
+    return response;
+  },
+  error => {
+    return Promise.reject(error);
   }
-  // console.log('解密',response.data)
-  return response
-}, error => {
-  return Promise.reject(error)
-})
+);
 
 /**
  * 请求地址处理
  * @param {*} actionName action方法名称
  */
-http.adornUrl = (actionName) => {
+http.adornUrl = actionName => {
   // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
   // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
   // return 'http://r8p8gz.natappfree.cc/sqx_fast/' + actionName
   // return 'https://www.daweilinli.com/sqx_fast/' + actionName
-	// return 'http://192.168.0.131:8171/sqx_fast/' + actionName
-	// return 'https://mxys.chuanghai-tech.com/sqx_fast/' + actionName
-	return 'https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast/' + actionName
-}
+  // return 'http://192.168.0.131:8171/sqx_fast/' + actionName
+  // return 'https://mxys.chuanghai-tech.com/sqx_fast/' + actionName
+  return (
+    "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast/" + actionName
+  );
+};
 
-http.adornUrl2 = (actionName) => {
+http.adornUrl2 = actionName => {
   // 非生产环境 && 开启代理, 接口前缀统一使用[/tao/]前缀做代理拦截!
   // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/tao/' : window.SITE_CONFIG.baseUrl) + actionName
-	return '/api' + actionName
-}
-http.adornWss = (actionName) => {
+  return "/api" + actionName;
+};
+http.adornWss = actionName => {
   // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
   // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
-	// return 'wss://www.daweilinli.com/wss/' + actionName
-	// return 'wss://mxys.chuanghai-tech.com/wss/' + actionName
-	return 'wss://mxys.chuanghai-tech.com/wss-test/' + actionName
-}
+  // return 'wss://www.daweilinli.com/wss/' + actionName
+  // return 'wss://mxys.chuanghai-tech.com/wss/' + actionName
+  return "wss://mxys.chuanghai-tech.com/wss-test/" + actionName;
+};
 /**
  * get请求参数处理
  * @param {*} params 参数对象
@@ -88,40 +96,39 @@ http.adornWss = (actionName) => {
 http.adornParams = (params = {}, openDefultParams = false) => {
   setTimeout(function() {
     // console.log(params,'gggg6')
-  },1000)
-
+  }, 1000);
 
   var defaults = {
-    't': new Date().getTime()
-  }
-  if(ifShangxian==1){
-    if(params){
+    t: new Date().getTime()
+  };
+  if (ifShangxian == 1) {
+    if (params) {
       // console.log(params,'gggg6')
-      var arr =Object.entries(params)//对象转为数组
-      var b=[]
+      var arr = Object.entries(params); //对象转为数组
+      var b = [];
       // console.log(arr,'j')
       arr.forEach((element, index) => {
         // console.log(element[1],index,element[1]==undefined)
-        if(element[1]==undefined){
-          element[1]==''
-          arr[index][1] = urlSafeBase64Encode(encrypt(''))
-        }else{
-          arr[index][1] = urlSafeBase64Encode(encrypt(element[1].toString()))
+        if (element[1] == undefined) {
+          element[1] == "";
+          arr[index][1] = urlSafeBase64Encode(encrypt(""));
+        } else {
+          arr[index][1] = urlSafeBase64Encode(encrypt(element[1].toString()));
         }
       });
-      b=arr
-    var	acc=Object.fromEntries(b)//数值还原
-    var returnItem = openDefultParams ? merge(defaults, acc) : acc//线上
-    // console.log(urlSafeBase64Encode(encrypt('5564')),'gggg2')
-    return returnItem
-    // return urlSafeBase64Encode(encrypt(returnItem.toString())) // **加密**
-  }else{
-    return openDefultParams ? merge(defaults, params) : params
-  }
-  }else{
-    return openDefultParams ? merge(defaults, params) : params//测试版
+      b = arr;
+      var acc = Object.fromEntries(b); //数值还原
+      var returnItem = openDefultParams ? merge(defaults, acc) : acc; //线上
+      // console.log(urlSafeBase64Encode(encrypt('5564')),'gggg2')
+      return returnItem;
+      // return urlSafeBase64Encode(encrypt(returnItem.toString())) // **加密**
+    } else {
+      return openDefultParams ? merge(defaults, params) : params;
+    }
+  } else {
+    return openDefultParams ? merge(defaults, params) : params; //测试版
   }
-}
+};
 
 /**
  * post请求数据处理
@@ -131,23 +138,24 @@ http.adornParams = (params = {}, openDefultParams = false) => {
  *  json: 'application/json; charset=utf-8'
  *  form: 'application/x-www-form-urlencoded; charset=utf-8'
  */
-http.adornData = (data = {}, openDefultdata = false, contentType = 'json') => {
+http.adornData = (data = {}, openDefultdata = false, contentType = "json") => {
   var defaults = {
-    't': new Date().getTime()
-  }
-  data = openDefultdata ? merge(defaults, data) : data
-  if(ifShangxian==1){
-    if(data){
+    t: new Date().getTime()
+  };
+  data = openDefultdata ? merge(defaults, data) : data;
+  if (ifShangxian == 1) {
+    if (data) {
       // console.log(data,'l')
-      var returnItem = contentType === 'json' ? JSON.stringify(data) : qs.stringify(data)
+      var returnItem =
+        contentType === "json" ? JSON.stringify(data) : qs.stringify(data);
       // console.log(urlSafeBase64Encode(encrypt(returnItem.toString())),'lo')
-      return '"' + urlSafeBase64Encode(encrypt(returnItem.toString())) + '"'   // **加密**
-    }else{
-      return contentType === 'json' ? JSON.stringify(data) : qs.stringify(data)
+      return '"' + urlSafeBase64Encode(encrypt(returnItem.toString())) + '"'; // **加密**
+    } else {
+      return contentType === "json" ? JSON.stringify(data) : qs.stringify(data);
     }
-  }else{
-    return contentType === 'json' ? JSON.stringify(data) : qs.stringify(data)
+  } else {
+    return contentType === "json" ? JSON.stringify(data) : qs.stringify(data);
   }
-}
+};
 
-export default http
+export default http;

Разлика између датотеке није приказан због своје велике величине
+ 807 - 361
src/views/autonym/autonym.vue


Разлика између датотеке није приказан због своје велике величине
+ 1511 - 804
src/views/common/home.vue


+ 1 - 0
src/views/downLoad/downList.vue

@@ -100,6 +100,7 @@
         align="center"
       >
         <template slot-scope="scope">
+          <span v-if="scope.row.flag==-1">导出中</span>
           <span v-if="scope.row.flag==0">待导出</span>
           <span v-if="scope.row.flag==1">导出完成</span>
           <span v-if="scope.row.flag==2">导出失败</span>

+ 456 - 0
src/views/entryManagement/entryManagement.vue

@@ -0,0 +1,456 @@
+<template>
+  <el-tabs  v-model="activeName" @tab-click="handleClick">
+    <el-tab-pane label="入账管理" name="first">
+      <div style="display: inline-block;">
+        <div style="position: relative;display: inline-block;margin: 3px;">
+          <span>商铺名称:</span>
+          <el-input
+            style="width: 200px;"
+            @keydown.enter.native="phoneSelect"
+            placeholder="请输入商铺名称"
+            v-model="shopName"
+          >
+          </el-input
+          >&nbsp;&nbsp;
+        </div>
+        <div style="position: relative;display: inline-block;margin: 3px;">
+          <span>商铺手机号:</span>
+          <el-input
+            style="width: 200px;"
+            @keydown.enter.native="phoneSelect"
+            placeholder="请输入商铺手机号"
+            v-model="shopPhone"
+          >
+          </el-input
+          >&nbsp;&nbsp;
+        </div>
+        <div style="position: relative;display: inline-block;margin: 3px;">
+          <span>用户手机号:</span>
+          <el-input
+            style="width: 200px;"
+            @keydown.enter.native="phoneSelect"
+            placeholder="请输入用户手机号"
+            v-model="userPhone"
+          >
+          </el-input
+          >&nbsp;&nbsp;
+        </div>
+        <div style="position: relative;display: inline-block;margin: 3px;">
+          <span>优惠活动:</span>
+          <el-input
+            style="width: 200px;"
+            @keydown.enter.native="phoneSelect"
+            placeholder="请输入优惠活动标题"
+            v-model="activityTitle"
+          >
+          </el-input
+          >&nbsp;&nbsp;
+        </div>
+        <div style="position: relative;display: inline-block;margin: 3px;">
+          <span>订单号:</span>
+          <el-input
+            style="width: 200px;"
+            @keydown.enter.native="phoneSelect"
+            placeholder="请输入订单号"
+            v-model="orderNumber"
+          ></el-input
+          >&nbsp;&nbsp;
+        </div>
+        <div style="margin:5px;display: inline-block;">
+          <span>开始时间:</span>
+          <el-date-picker
+            style="width: 220px;margin-left: 10px;"
+            v-model="startTime"
+            align="right"
+            type="datetime"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="选择开始时间"
+          >
+          </el-date-picker
+          >&nbsp;&nbsp;&nbsp;
+        </div>
+        <div style="margin:5px;display: inline-block;">
+          <span>截止时间:</span>
+          <el-date-picker
+            style="width: 220px;margin-left: 10px;"
+            v-model="endTime"
+            align="right"
+            type="datetime"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="选择截止时间"
+          >
+          </el-date-picker>
+        </div>
+        <el-button
+          style="margin-left:15px;"
+          size="mini"
+          type="primary"
+          icon="document"
+          @click="phoneSelect"
+          >查询
+        </el-button>
+        <el-button
+          style="margin-left:15px;"
+          size="mini"
+          type="primary"
+          icon="document"
+          @click="cleans"
+          >重置</el-button
+        >
+        <el-button
+          style="margin-left:15px;"
+          size="mini"
+          type="warning"
+          icon="document"
+          @click="exportList"
+        >
+          导出Excel
+        </el-button>
+        <el-button
+          style="margin-left:15px;"
+          size="mini"
+          type="primary"
+          icon="document"
+          @click="abnormity"
+          >查询异常订单</el-button
+        >
+      </div>
+      <div style="color: orange;">
+        *
+        导出订单提示:导出订单前请进行时间或者状态等筛选,否则导出订单量过多易出现卡顿或系统崩溃
+      </div>
+      <el-table v-loading="tableDataLoading" :data="tableData">
+        <el-table-column
+          fixed
+          prop="id"
+          label="编号"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          fixed
+          prop="shopName"
+          label="店铺"
+        ></el-table-column>
+        <el-table-column
+          fixed
+          prop="shopPhone"
+          label="店铺手机号"
+        ></el-table-column>
+        <el-table-column fixed prop="userName" label="下单用户">
+        </el-table-column>
+        <el-table-column prop="userPhone" label="手机号"></el-table-column>
+        <el-table-column prop="title" label="标题" width="200">
+        </el-table-column>
+        <el-table-column
+          prop="couponName"
+          label="优惠活动标题"
+        ></el-table-column>
+        <el-table-column
+          prop="activityDiscountAmount"
+          label="活动优惠金额"
+        ></el-table-column>
+        <el-table-column
+          prop="couponMoney"
+          label="优惠券优惠金额"
+        ></el-table-column>
+        <el-table-column
+          prop="errandMoney"
+          label="跑腿费"
+        >
+          <template slot-scope="scope">
+            <span @click="errandMoneyClick(scope.row)" style="cursor: pointer;color: #3e8ef7;">{{
+              scope.row.errandMoney
+            }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="orderNumber" label="订单号" width="180">
+          <!-- <template slot-scope="scope">
+            <span style="cursor: pointer;"">{{
+              scope.row.orderNumber
+            }}</span>
+          </template> -->
+        </el-table-column>
+        <el-table-column prop="money" label="金额" width="100">
+        </el-table-column>
+        <el-table-column prop="createTime" label="创建时间"></el-table-column>
+      </el-table>
+      <div style="text-align: center;margin-top: 10px;">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :page-sizes="[10, 20, 30, 40]"
+          :page-size="limit"
+          :current-page="page"
+          layout="total,sizes, prev, pager, next"
+          :total="totalCount"
+        >
+        </el-pagination>
+      </div>
+    </el-tab-pane>
+    <!-- 导出限制 -->
+    <el-dialog
+      custom-class="export"
+      :visible.sync="exportVisible"
+      center
+      :title="exportTitle"
+      :close-on-click-modal="false"
+    >
+      <div class="con" v-show="exportFlag == 1">
+        <img src="../../assets/img/error.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >当前导出条数超过50000条,暂不支持导出</span
+        >
+        <span style="font-size:14px;color: #808080;"
+          >(注:数据中的图片、附件只能以链接的形式导出)</span
+        >
+      </div>
+      <div class="con" v-show="exportFlag == 2">
+        <img class="gundong" src="../../assets/img/loading.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >导出中...</span
+        >
+        <span style="font-size:14px;color: #808080;"
+          >(注:请到个人导出记录查看并下载)</span
+        >
+      </div>
+      <div class="con" v-show="exportFlag == 3">
+        <img src="../../assets/img/success.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >导出成功</span
+        >
+        <span style="font-size:14px;color: #808080;"
+          >(注:请到个人导出记录查看并下载)</span
+        >
+      </div>
+      <div class="con" v-show="exportFlag == 4">
+        <img class="gundong" src="../../assets/img/loading.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >版本迭代中,导出暂时无法使用</span
+        >
+      </div>
+      <div class="btn">
+        <el-button type="primary" @click="exportAffirm">确定</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 点击跑腿费显示内容 -->
+    <el-dialog
+      custom-class="errandMoney"
+      :visible.sync="errandMoneyVisible"
+      center
+      title="内容"
+      :close-on-click-modal="false"
+    >
+      <span style="font-size: 15px;">{{ content }}</span>
+    </el-dialog>
+  </el-tabs>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      activeName:"first",
+      shopName: "", //商铺名称
+      shopPhone: "", //商铺手机号
+      userPhone: "", //用户手机号
+      activityTitle: "", //优惠活动
+      orderNumber: "", //订单号
+      startTime: "", //开始时间:
+      endTime: "", //截止时间:
+
+      limit: 10,
+      page: 1,
+      tableDataLoading:false,
+      tableData:[],
+      totalCount:10,
+
+      exportVisible: false,
+      exportTitle:"",
+      exportFlag:"",
+
+      errandMoneyVisible:false,
+      content:'',
+    };
+  },
+  methods: {
+    // 获取数据列表
+    getList() {
+      this.tableDataLoading = true;
+      this.$http({
+        url: this.$http.adornUrl("shop/shopmoney/accountEntryManagement"),
+        method: "get",
+        params: this.$http.adornParams({
+          page: this.page,
+          limit: this.limit,
+          shopName: this.shopName,
+          shopPhone: this.shopPhone,
+          userPhone: this.userPhone,
+          couponName: this.activityTitle,
+          orderNumber: this.orderNumber,
+          startTime: this.startTime,
+          endTime: this.endTime
+        })
+      }).then(({ data }) => {
+        console.log(data,'入账管理');
+        if (data.code == 0) {
+          this.tableDataLoading = false;
+          this.tableData = data.data.list;
+          this.totalCount=data.data.totalCount
+
+        } else {
+          this.$message({
+            message: data.msg,
+            type: "warning",
+            duration: 1500,
+            onClose: () => {}
+          });
+        }
+      });
+    },
+    phoneSelect(){
+      this.page = 1;
+      this.getList()
+    },
+    cleans(){
+      this.shopName= "" //商铺名称
+      this.shopPhone= "" //商铺手机号
+      this.userPhone= "" //用户手机号
+      this.activityTitle= "" //优惠活动
+      this.orderNumber= "" //订单号
+      this.startTime= "" //开始时间:
+      this.endTime= "" //截止时间:
+      this.page = 1;
+      this.getList()
+    },
+    abnormity(){},
+    handleSizeChange(val) {
+      this.limit = val;
+      this.getList();
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getList();
+    },
+    // 导出
+    exportList() {
+      console.log(this.totalCount, "导出条数");
+      this.exportTitle = "导出";
+      // this.exportFlag = 4;
+      this.exportVisible = true;
+      if (this.totalCount >= 50000) {
+        this.exportTitle = "导出错误";
+        this.exportFlag = 1;
+      } else {
+        this.exportTitle = "导出";
+        this.exportFlag = 2;
+        this.exportVisible = true;
+        var userId = this.$cookie.get("userId");
+        this.$http({
+          url: this.$http.adornUrl("admin/export/excelAccountEntry"),
+          method: "get",
+          // responseType: "blob",
+          params: this.$http.adornParams({
+            // 'page': page,
+            // 'size': this.size,
+            userId: userId,
+            shopName: this.shopName,
+            shopPhone: this.shopPhone,
+            userPhone: this.userPhone,
+            couponName: this.activityTitle,
+            orderNumber: this.orderNumber,
+            startTime: this.startTime,
+            endTime: this.endTime
+          })
+        }).then(({ data }) => {
+          console.log(data, "导出");
+          if (data.code == 0) {
+            this.exportTitle = "导出成功";
+            this.exportFlag = 3;
+          }
+          // let blob = new Blob([data], {
+          //   type:
+          //     "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+          // });
+          // if (window.navigator.msSaveOrOpenBlob) {
+          //   navigator.msSaveBlob(blob);
+          // } else {
+          //   let url = window.URL.createObjectURL(blob);
+          //   let elink = document.createElement("a");
+          //   elink.download = "订单列表.xlsx";
+          //   elink.style.display = "none";
+          //   elink.href = url;
+          //   document.body.appendChild(elink);
+          //   elink.click();
+          //   document.body.removeChild(elink);
+          // }
+        });
+      }
+    },
+    exportAffirm() {
+      this.exportVisible = false;
+    },
+    // tabs切换
+    handleClick(tab, event) {
+      if (tab._props.label == "入账管理") {
+        this.page = 1;
+        this.limit = 10;
+        this.getList();
+      }
+    },
+    errandMoneyClick(row){
+      console.log(row);
+      this.errandMoneyVisible=true;
+      this.content=row.content
+    }
+  },
+
+  mounted() {
+    this.getList()
+  }
+};
+</script>
+
+<style scoped>
+/* 导出限制 */
+.el-tabs >>> .export {
+  width: 500px;
+}
+.el-tabs >>> .export .con {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  margin-bottom: 20px;
+}
+.el-tabs >>> .export .con .gundong {
+  animation: gundong 3s linear infinite;
+}
+@keyframes gundong {
+  /* from表示动画的开始位置,也可以使用0%来表示。 */
+  from {
+    transform: rotate(0deg);
+  }
+  /* to表示动画的结束位置,也可以使用100%来表示。 */
+  to {
+    transform: rotate(360deg);
+  }
+}
+.el-tabs >>> .export img {
+  width: 70px;
+}
+.el-tabs >>> .export .btn {
+  display: flex;
+  flex-direction: row-reverse;
+}
+
+.el-tabs >>> .errandMoney {
+  width: 450px;
+}
+</style>

Разлика између датотеке није приказан због своје велике величине
+ 2100 - 1439
src/views/finance/financeList.vue


+ 109 - 74
src/views/mission/mission.vue

@@ -94,6 +94,17 @@
           </el-input
           >&nbsp;&nbsp;
         </div>
+        <div style="position: relative;display: inline-block;margin: 3px;">
+          <span>骑手所在站点:</span>
+          <el-select @change="phoneSelect" :clearable="true" v-model="stationName" placeholder="请选择骑手所在站点">
+        <el-option
+          :label="i.stationName"
+          :value="i.id"
+          :key="i.id"
+          v-for="i in stationData"
+        ></el-option>
+      </el-select>&nbsp;&nbsp;
+        </div>
         <div style="position: relative;display: inline-block; margin: 3px;">
           <span>骑手电话:</span>
           <el-input
@@ -572,8 +583,8 @@
         </el-pagination>
       </div>
     </el-tab-pane>
-     <!-- 导出限制 -->
-     <el-dialog
+    <!-- 导出限制 -->
+    <el-dialog
       custom-class="export"
       :visible.sync="exportVisible"
       center
@@ -913,6 +924,8 @@ export default {
   data() {
     return {
       dialogVisible: false,
+      stationData: [], // 骑手站点数据
+      stationName:'',
       imageUrl: [],
       limit: 10,
       page: 1,
@@ -1158,6 +1171,17 @@ export default {
     };
   },
   methods: {
+       // 站点下拉框
+       stationList() {
+      this.$http({
+        url: this.$http.adornUrl("admin/riderStation/stationList"),
+        method: "get",
+        params: this.$http.adornParams({})
+      }).then(({ data }) => {
+        console.log(data, "站点下拉框");
+        this.stationData = data.data;
+      });
+    },
     // 订单跳转到短信界面
     orderSkip(row) {
       console.log(row.indentId);
@@ -1919,65 +1943,65 @@ export default {
     //   });
     // },
     exportList() {
-      console.log(this.tableData2.totalCount,'导出条数');
+      console.log(this.tableData2.totalCount, "导出条数");
       this.exportTitle = "导出";
-      this.exportFlag = 4;
+      // this.exportFlag = 4;
       this.exportVisible = true;
-      // if (this.tableData2.totalCount >= 50000) {
-      //   this.exportTitle = "导出错误";
-      //   this.exportFlag = 1;
-      // } else {
-      //   this.exportTitle = "导出";
-      //   this.exportFlag = 2;
-      //   this.exportVisible = true;
-      //   var userId = this.$cookie.get('userId')
-      //   this.$http({
-      //     url: this.$http.adornUrl("admin/export/excelOrder"),
-      //     method: "get",
-      //     // responseType: "blob",
-      //     params: this.$http.adornParams({
-      //       // 'page': page,
-      //       // 'size': this.size,
-      //       userId:userId,
-      //       phone: this.phone,
-      //       userName: this.userName,
-      //       orderNumber: this.orderNumber,
-      //       status: this.status,
-      //       shopName: this.shopName,
-      //       orderSequence: this.orderSequence,
-      //       orderType: this.orderType,
-      //       reservationFlag: this.reservationFlag,
-      //       indentStatus: this.indentStatus,
-      //       riderPhone: this.riderPhone,
-      //       startTime: this.startTime,
-      //       endTime: this.endTime,
-      //       payStartTime: this.payStartTime,
-      //       payEndTime: this.payEndTime
-      //     })
-      //   }).then(({ data }) => {
-      //     console.log(data, "导出");
-      //     if(data.code==0){
-      //       this.exportTitle = "导出成功";
-      //       this.exportFlag = 3;
-      //     }
-      //     // let blob = new Blob([data], {
-      //     //   type:
-      //     //     "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
-      //     // });
-      //     // if (window.navigator.msSaveOrOpenBlob) {
-      //     //   navigator.msSaveBlob(blob);
-      //     // } else {
-      //     //   let url = window.URL.createObjectURL(blob);
-      //     //   let elink = document.createElement("a");
-      //     //   elink.download = "订单列表.xlsx";
-      //     //   elink.style.display = "none";
-      //     //   elink.href = url;
-      //     //   document.body.appendChild(elink);
-      //     //   elink.click();
-      //     //   document.body.removeChild(elink);
-      //     // }
-      //   });
-      // }
+      if (this.tableData2.totalCount >= 50000) {
+        this.exportTitle = "导出错误";
+        this.exportFlag = 1;
+      } else {
+        this.exportTitle = "导出";
+        this.exportFlag = 2;
+        this.exportVisible = true;
+        var userId = this.$cookie.get("userId");
+        this.$http({
+          url: this.$http.adornUrl("admin/export/excelOrder"),
+          method: "get",
+          // responseType: "blob",
+          params: this.$http.adornParams({
+            // 'page': page,
+            // 'size': this.size,
+            userId: userId,
+            phone: this.phone,
+            userName: this.userName,
+            orderNumber: this.orderNumber,
+            status: this.status,
+            shopName: this.shopName,
+            orderSequence: this.orderSequence,
+            orderType: this.orderType,
+            reservationFlag: this.reservationFlag,
+            indentStatus: this.indentStatus,
+            riderPhone: this.riderPhone,
+            startTime: this.startTime,
+            endTime: this.endTime,
+            payStartTime: this.payStartTime,
+            payEndTime: this.payEndTime
+          })
+        }).then(({ data }) => {
+          console.log(data, "导出");
+          if (data.code == 0) {
+            this.exportTitle = "导出成功";
+            this.exportFlag = 3;
+          }
+          // let blob = new Blob([data], {
+          //   type:
+          //     "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+          // });
+          // if (window.navigator.msSaveOrOpenBlob) {
+          //   navigator.msSaveBlob(blob);
+          // } else {
+          //   let url = window.URL.createObjectURL(blob);
+          //   let elink = document.createElement("a");
+          //   elink.download = "订单列表.xlsx";
+          //   elink.style.display = "none";
+          //   elink.href = url;
+          //   document.body.appendChild(elink);
+          //   elink.click();
+          //   document.body.removeChild(elink);
+          // }
+        });
+      }
     },
     exportAffirm() {
       this.exportVisible = false;
@@ -1987,35 +2011,46 @@ export default {
   mounted() {
     // this.classifySelect()
     this.taskdataSelect();
+    this.stationList();
+    // this.$http({
+    //   url: this.$http.adornUrl(`shop/shopmoney/accountEntryManagement`),
+    //   method: "get",
+    //   params: this.$http.adornParams({
+    //     page: 1,
+    //     limit: 10,
+    //   })
+    // }).then(({ data }) => {
+    //   console.log(data,'入账管理');
+    // });
   }
 };
 </script>
 
 <style scoped>
-  /* 导出限制 */
-  .el-tabs  >>> .export {
+/* 导出限制 */
+.el-tabs >>> .export {
   width: 500px;
 }
-.el-tabs  >>> .export .con {
+.el-tabs >>> .export .con {
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   margin-bottom: 20px;
 }
-.el-tabs  >>> .export .con .gundong {
-  animation: gundong 3s linear infinite ;
+.el-tabs >>> .export .con .gundong {
+  animation: gundong 3s linear infinite;
+}
+@keyframes gundong {
+  /* from表示动画的开始位置,也可以使用0%来表示。 */
+  from {
+    transform: rotate(0deg);
+  }
+  /* to表示动画的结束位置,也可以使用100%来表示。 */
+  to {
+    transform: rotate(360deg);
+  }
 }
-@keyframes gundong{
-        /* from表示动画的开始位置,也可以使用0%来表示。 */
-        from{
-          transform: rotate(0deg)
-        }
-        /* to表示动画的结束位置,也可以使用100%来表示。 */
-        to{
-          transform: rotate(360deg);
-        }
-    }
 .el-tabs >>> .export img {
   width: 70px;
 }

Разлика између датотеке није приказан због своје велике величине
+ 695 - 665
src/views/riderTop/riderTop.vue


Разлика између датотеке није приказан због своје велике величине
+ 1891 - 1389
src/views/runErrands/financeList.vue


Разлика између датотеке није приказан због своје велике величине
+ 582 - 581
src/views/selfShop/specification.vue


Разлика између датотеке није приказан због своје велике величине
+ 1354 - 1013
src/views/shopsList/shopsOrder.vue


+ 264 - 0
src/views/site/site.vue

@@ -0,0 +1,264 @@
+<template>
+  <div>
+    <!-- <div style="margin:2% 0;display: inline-block;">
+      <span>商铺名称:</span>
+      <el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入商铺名称" v-model="shopName1">
+      </el-input>&nbsp;&nbsp;&nbsp;&nbsp;
+    </div> -->
+    <div>
+      <el-button
+        style="margin: 10px 0;"
+        size="mini"
+        type="primary"
+        icon="document"
+        @click="addSite"
+        >添加站点</el-button
+      >
+    </div>
+    <el-table v-loading="tableDataLoading" :data="typeDatas" row-key="id">
+      <el-table-column prop="id" label="编号" width="180" align="center">
+      </el-table-column>
+      <el-table-column align="center" label="站点名称" prop="stationName">
+      </el-table-column>
+      <el-table-column label="操作" align="center" width="250">
+        <template slot-scope="scope">
+          <el-button size="mini" type="primary" @click="updates(scope.row)">
+            修改
+          </el-button>
+          <el-button size="mini" type="danger" @click="deletes(scope.row)">
+            删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!-- 添加站点 -->
+    <el-dialog
+      :title="siteTitle"
+      customClass="customWidth"
+      :visible.sync="inputVisible"
+      :close-on-click-modal="false"
+    >
+      <el-form :model="form" :rules="rules" ref="ruleForm">
+        <el-form-item label="添加站点" prop="ruleName">
+          <el-input
+            v-model="form.ruleName"
+            size="small"
+            style="width:220px;"
+            placeholder="请输入站点名称"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <div style="width: 100%;display: flex;justify-content:flex-end;">
+            <el-button type="primary" @click="submitForm('ruleForm')"
+              >确 定</el-button
+            >
+            <el-button @click="cancelForm('ruleForm')">取 消</el-button>
+          </div>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+    <div style="text-align: center;margin-top: 10px;">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :page-sizes="[10, 20, 30, 50, 100]"
+        :page-size="limit"
+        :current-page="page"
+        layout="total,sizes, prev, pager, next"
+        :total="totals"
+      >
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      size: 10,
+      page: 1,
+      limit: 10,
+      ruleName: "",
+      inputVisible: false,
+      form: {
+        id: "",
+        ruleName: ""
+      },
+      siteTitle: "添加站点",
+      tableDataLoading: false,
+      totals: 0,
+      typeDatas: [],
+      rules: {
+        ruleName: [
+          { required: true, message: "请输入站点名称", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.size = val;
+      this.dataSelect();
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.dataSelect();
+    },
+    // 添加站点
+    addSite() {
+      this.siteTitle = "添加站点";
+      this.inputVisible = true;
+      this.form.ruleName="";
+      this.form.id = "";
+    },
+    // 确定添加站点
+    submitForm(formName) {
+      this.$refs[formName].validate(valid => {
+        if (valid) {
+          if (this.form.id) {
+            this.$http({
+              url: this.$http.adornUrl("admin/riderStation/updateStation"),
+              method: "post",
+              data: this.$http.adornData({
+                id:this.form.id,
+                stationName: this.form.ruleName
+              })
+            }).then(({ data }) => {
+              console.log(data, "修改骑手站点");
+              if (data.code == 0) {
+                this.inputVisible = false;
+                this.$message({
+                  message: "修改成功",
+                  type: "success",
+                  duration: 1500,
+                  onClose: () => {
+                    this.dataSelect();
+                  }
+                });
+                this.dataSelect();
+              }
+            });
+          } else {
+            this.$http({
+              url: this.$http.adornUrl("admin/riderStation/saveStation"),
+              method: "post",
+              data: this.$http.adornData({
+                stationName: this.form.ruleName
+              })
+            }).then(({ data }) => {
+              console.log(data, "添加骑手站点");
+              if (data.code == 0) {
+                this.inputVisible = false;
+                this.$message({
+                  message: "添加成功",
+                  type: "success",
+                  duration: 1500,
+                  onClose: () => {
+                    this.dataSelect();
+                  }
+                });
+                this.dataSelect();
+              }
+            });
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    cancelForm(formName) {
+      this.$refs[formName].resetFields();
+      this.inputVisible = false;
+    },
+    //修改站点
+    updates(row) {
+      this.inputVisible = true;
+      this.siteTitle = "编辑站点";
+      this.form.ruleName = row.stationName;
+      this.form.id = row.id;
+    },
+    // 删除分类
+    deletes(row) {
+      this.$confirm(`确定删除此站点?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.$http({
+            url: this.$http.adornUrl("admin/riderStation/removeStation"),
+            method: "get",
+            params: this.$http.adornParams({
+              id: row.id
+            })
+          }).then(({ data }) => {
+            if (data.code == 0) {
+              if(this.page!=1 && this.typeDatas.length==1){
+                this.page=this.page-1
+                this.$message({
+                  message: "删除成功",
+                  type: "success",
+                  duration: 1500,
+                  onClose: () => {
+                    this.dataSelect();
+                  }
+                });
+              }else{
+                this.$message({
+                  message: "删除成功",
+                  type: "success",
+                  duration: 1500,
+                  onClose: () => {
+                    this.dataSelect();
+                  }
+                });
+              }
+            } else {
+              this.$message({
+                message: data.msg,
+                type: "error",
+                duration: 1500,
+                onClose: () => {}
+              });
+            }
+          });
+        })
+        .catch(() => {});
+    },
+    // 获取分类数据
+    dataSelect() {
+      this.tableDataLoading = true;
+      this.$http({
+        url: this.$http.adornUrl("admin/riderStation/selectStationList"),
+        method: "get",
+        params: this.$http.adornParams({
+          page: this.page,
+          size: this.size
+        })
+      }).then(({ data }) => {
+        console.log(data, "骑手站点");
+        this.tableDataLoading = false;
+        let returnData = data.data.list;
+        this.typeDatas = returnData;
+        this.totals = data.data.totalCount;
+      });
+    }
+  },
+  mounted() {
+    this.dataSelect();
+  }
+};
+</script>
+
+<style>
+.customWidth {
+  width: 500px !important;
+}
+.el-form-item__error {
+  left: 80px;
+}
+</style>