Explorar o código

Merge branch 'master' of https://e.coding.net/chuanghaikeji/moxuanyunshangwaimai/moxuan_takeaway_manage
aborts the commit.

嘀嘀嘀 hai 1 ano
pai
achega
c4a783ef24

+ 5 - 0
npm-shrinkwrap.json

@@ -3456,6 +3456,11 @@
 			"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz",
 			"integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI="
 		},
+		"dayjs": {
+			"version": "1.11.13",
+			"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
+			"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
+		},
 		"de-indent": {
 			"version": "1.0.2",
 			"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",

+ 1 - 0
package.json

@@ -18,6 +18,7 @@
     "babel-plugin-component": "0.10.1",
     "babel-polyfill": "6.26.0",
     "crypto-js": "^4.2.0",
+    "dayjs": "^1.11.13",
     "element-china-area-data": "^5.0.2",
     "element-ui": "2.8.2",
     "fs": "0.0.1-security",

+ 1 - 2
src/main.js

@@ -32,8 +32,7 @@ Vue.use(Viewer, {
   }
 });
 // Vue.prototype.Tupiantou ='https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload'//线上
-Vue.prototype.Tupiantou =
-  "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast/alioss/upload"; //线下
+Vue.prototype.Tupiantou ="https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast/alioss/upload"; //线下
 Vue.prototype.Tupian = function(img) {
   return "https://mxys.chuanghai-tech.com/wmfile" + img;
 }; //全局图片请求头

+ 12 - 0
src/utils/lastSevenDays.js

@@ -0,0 +1,12 @@
+export function getLastSevenDays() {
+  const days = [];
+  for (let i = 6; i >= 0; i--) {
+    const date = new Date();
+    date.setDate(date.getDate() - i); // 从今天往前推 i 天
+    const year = date.getFullYear();
+    const month = String(date.getMonth() + 1).padStart(2, "0"); // 月份补零
+    const day = String(date.getDate()).padStart(2, "0"); // 日期补零
+    days.push(`${year}-${month}-${day}`);
+  }
+  return days;
+}

+ 19 - 4
src/views/entryManagement/entryManagement.vue

@@ -83,6 +83,18 @@
           >
           </el-date-picker>
         </div>
+        <div style="display: inline-block;margin: 5px;">
+          <span>异常订单:</span>
+          <el-select
+            @change="phoneSelect"
+            :clearable="true"
+            v-model="flag"
+            placeholder="请选择异常订单"
+          >
+            <el-option label="非异常" value="0"></el-option>
+            <el-option label="异常" value="1"></el-option>
+          </el-select>
+        </div>
         <el-button
           style="margin-left:15px;"
           size="mini"
@@ -108,14 +120,14 @@
         >
           导出Excel
         </el-button>
-        <el-button
+        <!-- <el-button
           style="margin-left:15px;"
           size="mini"
           type="primary"
           icon="document"
           @click="abnormity"
           >查询异常订单</el-button
-        >
+        > -->
       </div>
       <div style="color: orange;">
         *
@@ -271,6 +283,7 @@ export default {
       orderNumber: "", //订单号
       startTime: "", //开始时间:
       endTime: "", //截止时间:
+      flag: "", //异常订单
 
       limit: 10,
       page: 1,
@@ -302,7 +315,8 @@ export default {
           couponName: this.activityTitle,
           orderNumber: this.orderNumber,
           startTime: this.startTime,
-          endTime: this.endTime
+          endTime: this.endTime,
+          flag:this.flag
         })
       }).then(({ data }) => {
         console.log(data, "入账管理");
@@ -403,7 +417,8 @@ export default {
             couponName: this.activityTitle,
             orderNumber: this.orderNumber,
             startTime: this.startTime,
-            endTime: this.endTime
+            endTime: this.endTime,
+            flag:this.flag
           })
         }).then(({ data }) => {
           console.log(data, "导出");

+ 98 - 9
src/views/finance/financeList.vue

@@ -98,6 +98,34 @@
           >
           </el-date-picker>
         </div>
+        <div style="margin:5px;display: inline-block;">
+          <span>操作开始时间:</span>
+          <el-date-picker
+            style="width: 160px;margin-left: 10px;"
+            v-model="outstartTime"
+            align="right"
+            type="datetime"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+            placeholder="选择开始时间"
+          >
+          </el-date-picker
+          >&nbsp;&nbsp;&nbsp;
+        </div>
+        <div style="margin:5px;display: inline-block;">
+          <span>操作截止时间:</span>
+          <el-date-picker
+            style="width: 160px;margin-left: 10px;"
+            v-model="outendTime"
+            align="right"
+            type="datetime"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+            placeholder="选择截止时间"
+          >
+          </el-date-picker
+          >&nbsp;&nbsp;&nbsp;
+        </div>
         <div style="position: relative;display: inline-block;margin:5px;">
           <span>提现总金额:{{ totalMoney }}</span>
         </div>
@@ -119,7 +147,7 @@
           @click="cleans2"
           >重置
         </el-button>
-        <el-button
+        <!-- <el-button
           style="margin:0 0 20px 20px;"
           size="mini"
           type="primary"
@@ -132,6 +160,16 @@
           批量转账
         </el-button>
         <el-button
+          style="margin:0 0 20px 20px;"
+          size="mini"
+          type="warning"
+          icon="document"
+          @click="transferRefuseClcik()"
+          :disabled="checkBoxData.length <= 0 || !isAuth('financeList:refund')"
+        >
+          批量拒绝
+        </el-button> -->
+        <el-button
           style="margin-left:15px;"
           size="mini"
           type="warning"
@@ -1166,6 +1204,8 @@ export default {
       content: "",
       startTime: "",
       endTime: "",
+      outstartTime:"",
+      outendTime:"",
       cashId: "",
       type: -1,
       totalnum: 0,
@@ -1290,7 +1330,7 @@ export default {
                 this.$notify({
                   title: "提示",
                   duration: 1800,
-                  message: data.msg,
+                  message:'转账成功',
                   type: "warning"
                 });
                 // this.dataSelect();
@@ -1299,7 +1339,7 @@ export default {
                 this.$notify({
                   title: "提示",
                   duration: 1800,
-                  message: data.msg,
+                  message: '转账失败',
                   type: "error"
                 });
                 // this.dataSelect();
@@ -1317,7 +1357,7 @@ export default {
                 this.$notify({
                   title: "提示",
                   duration: 1800,
-                  message: data.msg,
+                  message: '转账成功',
                   type: "warning"
                 });
                 // this.dataSelect();
@@ -1337,7 +1377,7 @@ export default {
                 this.$notify({
                   title: "提示",
                   duration: 1800,
-                  message: data.msg,
+                  message: '转账失败',
                   type: "error"
                 });
                 // this.dataSelect();
@@ -1375,6 +1415,47 @@ export default {
       // });
       // }
     }, 100),
+    // 批量拒绝
+    transferRefuseClcik: debounce(function(id) {
+      var ids = id
+        ? [id]
+        : this.checkBoxData.map(item => {
+            return item.id;
+          });
+      console.log(ids, "勾选的ids");
+      for (var i in ids) {
+        this.$http({
+          url: this.$http.adornUrl(`cash/refund`),
+          method: "post",
+          params: this.$http.adornParams({
+            cashId: ids[i],
+            content: ""
+          })
+        }).then(({ data }) => {
+          // console.log(data, "rht转账");
+          if (data.code == 0) {
+            this.$notify({
+              title: "提示",
+              duration: 1800,
+              message: '操作成功',
+              type: "warning"
+            });
+            // this.dataSelect();
+            // return;
+          } else {
+            this.$notify({
+              title: "提示",
+              duration: 1800,
+              message: '操作失败',
+              type: "error"
+            });
+            // this.dataSelect();
+            return;
+          }
+        });
+      }
+      this.dataSelect();
+    }, 100),
     // 多选
     changeFun(val) {
       this.checkBoxData = val;
@@ -1832,7 +1913,9 @@ export default {
           state: this.indentState,
           phone: this.phone,
           startTime: this.startTime,
-          endTime: this.endTime
+          endTime: this.endTime,
+          outstartTime: this.outstartTime,
+          outendTime: this.outendTime
         })
       }).then(({ data }) => {
         console.log(data, "财务中心");
@@ -1856,7 +1939,9 @@ export default {
           state: this.indentState,
           phone: this.phone,
           startTime: this.startTime,
-          endTime: this.endTime
+          endTime: this.endTime,
+          outstartTime: this.outstartTime,
+          outendTime: this.outendTime,
         })
       }).then(({ data }) => {
         this.totalMoney = data.data;
@@ -2032,6 +2117,8 @@ export default {
       this.phone = "";
       this.startTime = "";
       this.endTime = "";
+      this.outstartTime = "";
+      this.outendTime = "";
       this.dataSelect();
     },
     //保证金查询
@@ -2119,7 +2206,9 @@ export default {
             phone: this.phone,
             state: this.indentState,
             startTime: this.startTime,
-            endTime: this.endTime
+            endTime: this.endTime,
+            outstartTime: this.outstartTime,
+          outendTime: this.outendTime,
           })
         }).then(({ data }) => {
           console.log(data, "导出");
@@ -2203,7 +2292,7 @@ export default {
             type: this.indentState3,
             classify: 2,
             startTime: this.startTime,
-            endTime: this.endTime
+            endTime: this.endTime,
           })
         }).then(({ data }) => {
           console.log(data, "导出");

+ 33 - 11
src/views/mission/mission.vue

@@ -1048,6 +1048,7 @@
 </template>
 
 <script>
+import dayjs from "dayjs";
 export default {
   data() {
     return {
@@ -1294,8 +1295,8 @@ export default {
       // },
       startTime: "",
       endTime: "",
-      payStartTime: "", //支付开始时间
-      payEndTime: "",
+      payStartTime: dayjs().subtract(6, 'day').format('YYYY-MM-DD'), //支付开始时间
+      payEndTime: dayjs().format('YYYY-MM-DD'),
 
       // 导出限制
       exportTitle: "导出错误",
@@ -1689,8 +1690,8 @@ export default {
       this.orderType = "";
       this.startTime = "";
       this.endTime = "";
-      this.payStartTime = "";
-      this.payEndTime = "";
+      this.payStartTime = dayjs().subtract(6, 'day').format('YYYY-MM-DD');
+      this.payEndTime = dayjs().format('YYYY-MM-DD');
       this.stationName=""
       this.spEarningTypeId=""
       this.couponType=""
@@ -1766,12 +1767,12 @@ export default {
         })
       }).then(({ data }) => {
         console.log(data, "订单中心");
-
-        this.tableDataLoading = false;
-        let returnData = data.data;
-        this.tableData2 = returnData;
-        console.log(this.tableData2, "hhhhh");
-        for (var i in this.tableData2.list) {
+        if (data.code == 0) {
+          this.tableDataLoading = false;
+          let returnData = data.data;
+          this.tableData2 = returnData;
+          console.log(this.tableData2, "hhhhh");
+          for (var i in this.tableData2.list) {
           this.tableData2.list[i].goodsPriceZ = 0;
           this.totalMoney = this.totalMoney + this.tableData2.list[i].payMoney;
           if (this.tableData2.list[i].address) {
@@ -1789,8 +1790,26 @@ export default {
               this.tableData2.list[i].goodsPriceZ +
               this.tableData2.list[i].orderGoodsList[j].goodsPriceZ;
           }
+          }
+          this.totalMoney = this.totalMoney.toFixed(2);
+          if(!data.data.totalCount){
+            this.$message({
+              message: "此时间段暂无数据",
+              type: "success",
+              duration: 1500,
+              onClose: () => {
+
+              }
+            });
+          }
+        } else {
+          this.$message({
+            message: data.msg,
+            type: "error",
+            duration: 1500,
+            onClose: () => {}
+          });
         }
-        this.totalMoney = this.totalMoney.toFixed(2);
       });
       // this.$http({
       //   url: this.$http.adornUrl("admin/order/selectAllOrderTotalPrice"),
@@ -2241,6 +2260,9 @@ export default {
     this.taskdataSelect();
     this.stationList();
     this.shopTypeList()
+    // let endTime=dayjs().format('YYYY-MM-DD')
+    // let startTime=dayjs().subtract(6, 'day').format('YYYY-MM-DD')
+    // console.log(startTime,endTime);
   }
 };
 </script>

+ 39 - 0
src/views/runErrands/financeList.vue

@@ -99,6 +99,35 @@
             ></el-option> </el-select
           >&nbsp;&nbsp;&nbsp;
         </div>
+        <div style="margin:5px;display: inline-block;">
+          <span>操作开始时间:</span>
+          <el-date-picker
+            style="width: 160px;margin-left: 10px;"
+            v-model="outstartTime"
+            align="right"
+            type="datetime"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+            placeholder="选择开始时间"
+          >
+          </el-date-picker
+          >&nbsp;&nbsp;&nbsp;
+        </div>
+        <div style="margin:5px;display: inline-block;">
+          <span>操作截止时间:</span>
+          <el-date-picker
+            style="width: 160px;margin-left: 10px;"
+            v-model="outendTime"
+            align="right"
+            type="datetime"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+            placeholder="选择截止时间"
+          >
+          </el-date-picker
+          >&nbsp;&nbsp;&nbsp;
+        </div>
+
         <div style="position: relative;display: inline-block;margin:5px;">
           <span>提现总金额:{{ totalMoney }}</span>
         </div>
@@ -1084,6 +1113,8 @@ export default {
       content: "",
       startTime: "",
       endTime: "",
+      outstartTime:"",
+      outendTime:"",
       cashId: "",
       type: 1,
       totalnum: 0,
@@ -1670,6 +1701,8 @@ export default {
       this.phone = "";
       this.startTime = "";
       this.endTime = "";
+      this.outstartTime = "";
+      this.outendTime = "";
       this.dataSelect();
     },
     phoneSelect1() {
@@ -1754,6 +1787,8 @@ export default {
           type: this.type,
           state: this.indentState,
           phone: this.phone,
+          outstartTime: this.outstartTime,
+          outendTime: this.outendTime,
           startTime: this.startTime,
           endTime: this.endTime,
           riderStationId: this.stationName
@@ -1779,6 +1814,8 @@ export default {
           phone: this.phone,
           startTime: this.startTime,
           endTime: this.endTime,
+          outstartTime: this.outstartTime,
+          outendTime: this.outendTime,
           riderStationId: this.stationName
         })
       }).then(({ data }) => {
@@ -2012,6 +2049,8 @@ export default {
             phone: this.phone,
             startTime: this.startTime,
             endTime: this.endTime,
+            outstartTime: this.outstartTime,
+            outendTime: this.outendTime,
             riderStationId: this.stationName // 骑手站点
           })
         }).then(({ data }) => {