caichengyu 7 mesiacov pred
rodič
commit
3219f25071

+ 8 - 0
src/newApi/order.js

@@ -24,6 +24,14 @@ export default {
             params: data
         })
     },
+    //查询接口订单列表
+    inquireApiOrderList(data) {
+        return request({
+            url: '/order/without/list',
+            method: 'get',
+            params: data
+        })
+    },
     //查询复购冲突订单列表
     inquireOrderrebuyListList(data) {
         return request({

+ 4 - 4
src/utils/request.js

@@ -8,11 +8,11 @@ import { paramMate } from "@/utils/common";
 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
-export const baseURL = process.env.VUE_APP_BASE_API
-// export const baseURL = 'https://cloud.xyyxt.net/'
+// export const baseURL = process.env.VUE_APP_BASE_API
+export const baseURL = 'https://cloud.xyyxt.net/'
 // export const baseURL = 'http://192.168.1.123:5030'
-export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
-// export const BASE_IMG_URL = 'https://file.xyyxt.net'
+// export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
+export const BASE_IMG_URL = 'https://file.xyyxt.net'
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
   baseURL: baseURL, 

+ 707 - 0
src/views/Marketing/order/orderList/apiorder.vue

@@ -0,0 +1,707 @@
+<template>
+  <div id="apiorderList">
+    <search-box-new
+      ref="searchBox"
+      :formData="formData"
+      :formList="formList"
+      @search="search"
+      @init="init"
+      :topType="topType"
+    ><template slot="customize">
+        <!-- <el-button size="small" type="success" @click="moreActive"
+          >批量导出</el-button
+        >
+        <el-button size="small" type="success" @click="exportorder"
+          >订单导出</el-button
+        > -->
+      </template></search-box-new>
+    <table-list
+      ref="tableList"
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      @addClick="addClick"
+      :loading="loading"
+      @editInfo="editInfo"
+      @emitData="emitData"
+      rowKey="orderSn"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="jumpDetail(props.scope.row)"
+          >订单收费信息</el-button
+        >
+        <!-- <el-button type="text" @click="del(props.scope.row)">删除</el-button> -->
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+  </div>
+</template>
+
+<script>
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  name: "ApiOrderList",
+  components: { searchBoxNew, tableList, pagination },
+  data() {
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "订单列表",
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: true,
+        addHide: true,
+        openCheckMore: true,
+        backFatherBtn: {
+          status: false,
+          title: "计费单收费",
+        },
+      },
+      topType: true,
+      //搜索
+      formList: [
+        {
+          prop: "educationTypeId",
+          placeholder: "教育类型",
+          scope: "educationType",
+        },
+        {
+          prop: "businessId",
+          placeholder: "业务层次",
+          scope: "businessLevel",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "schoolId",
+          placeholder: "院校",
+          scope: "schoolList",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "majorId",
+          placeholder: "专业",
+          scope: "Professional",
+          edu: "educationTypeId",
+        },
+        {
+          prop1: "startTime",
+          prop2: "endTime",
+          placeholder1: "订单开始时间",
+          placeholder2: "订单结束时间",
+          scope: "moreDataPicker",
+          Diszing: true,
+        },
+        {
+          prop: "goodsPayStatus",
+          placeholder: "支付状态",
+          scope: "select",
+          options: [
+            {
+              label: "未收费",
+              value: 1,
+            },
+            {
+              label: "部分收费",
+              value: 2,
+            },
+            {
+              label: "完全收费",
+              value: 3,
+            },
+            {
+              label: "免费",
+              value: 4,
+            },
+          ],
+        },
+        {
+          prop: "orderGoodsStatus",
+          placeholder: "订单状态",
+          scope: "select",
+          options: [
+            {
+              label: "待支付",
+              value: 0,
+            },
+            {
+              label: "已支付",
+              value: 1,
+            },
+            {
+              label: "已退款",
+              value: 2,
+            },
+            {
+              label: "已取消",
+              value: -1,
+            },
+          ],
+        },
+        // {
+        //   placeholder: "订单来源",
+        //   prop: "orderFroms",
+        //   scope: "select",
+        //   options: [
+        //     {
+        //       label: "祥粤云学堂小程序",
+        //       value: 2,
+        //     },
+        //     {
+        //       label: "祥粤云学堂网站",
+        //       value: 3,
+        //     },
+        //     {
+        //       label: "祥粤e管证小程序",
+        //       value: 4,
+        //     },
+        //     {
+        //       label: "接口",
+        //       value: 7,
+        //     },
+        //   ],
+        // },
+        
+        {
+          prop: "companyName",
+          placeholder: "公司名称",
+        },
+        {
+          prop: "searchKey",
+          placeholder: "订单编码/商品名称/学员姓名/身份证",
+        },
+      ],
+      formData: {
+        goodsType: "",
+        pageSize: 10,
+        pageNum: 1,
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "订单时间",
+          prop: "createTime",
+          hidden: true,
+          scope: "aTimeList",
+          width: "180px",
+        },
+        {
+          label: "订单编码",
+          prop: "orderSn",
+          hidden: true,
+          width: "210px",
+        },
+        {
+          label: "手机号码",
+          prop: "telphone",
+          hidden: true,
+          width: "120px",
+        },
+        {
+          label: "学员姓名",
+          prop: "realname",
+          hidden: true,
+        },
+        {
+          label: "学员身份证",
+          prop: "idCard",
+          hidden: true,
+          width: "190px",
+        },
+        {
+          label: "公司名称",
+          prop: "companyName",
+          hidden: true,
+        },
+        {
+          label: "商品名称",
+          prop: "goodsName",
+          hidden: true,
+          width: "280px",
+        },
+        {
+          label: "商品业务层级",
+          prop1: "educationName",
+          prop2: "projectName",
+          prop3: "businessName",
+          hidden: true,
+          scope: "eduTypes",
+          width: "380px",
+        },
+        {
+          label: "商品年份",
+          prop: "year",
+          hidden: true,
+          ch: "年",
+        },
+        {
+          label: "商品标准价格",
+          prop: "goodsPrice",
+          hidden: true,
+          ch: "元",
+          width: "120px",
+        },
+        // {
+        //   label: "使用优惠劵",
+        //   prop: "publishStatus",
+        //   hidden: true,
+        // },
+        {
+          label: "商品成交价",
+          prop: "goodsRealPrice",
+          hidden: true,
+          ch: "元",
+          width: "110px",
+        },
+        {
+          label: "支付状态",
+          prop: "goodsPayStatus",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "未收费",
+              value: 1,
+            },
+            {
+              label: "部分收费",
+              value: 2,
+            },
+            {
+              label: "完全收费",
+              value: 3,
+            },
+            {
+              label: "免费",
+              value: 4,
+            },
+          ],
+        },
+        {
+          label: "订单状态",
+          prop: "orderGoodsStatus",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "已取消",
+              value: -1,
+            },
+            {
+              label: "待支付",
+              value: 0,
+            },
+            {
+              label: "已支付",
+              value: 1,
+            },
+            {
+              label: "已退款",
+              value: 2,
+            },
+          ],
+        },
+        {
+          label: "已收金额",
+          prop: "goodsReceived",
+          hidden: true,
+          ch: "元",
+        },
+        {
+          label: "未收金额",
+          hidden: true,
+          scope: "refundPrice",
+          ch: "元",
+        },
+        {
+          label: "订单来源",
+          prop: "orderFrom",
+          hidden: false,
+          scope: "isOptions",
+          width: "130px",
+          options: [
+            {
+              label: "业务员普通单",
+              value: 1,
+            },
+            {
+              label: "祥粤云学堂小程序",
+              value: 2,
+            },
+            {
+              label: "祥粤云学堂网站",
+              value: 3,
+            },
+            {
+              label: "祥粤e管证小程序",
+              value: 4,
+            },
+            {
+              label: "业务员录单",
+              value: 5,
+            },
+          ],
+        },
+        {
+          label: "发票状态",
+          prop: "invoiceStatus",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "无",
+              value: null,
+            },
+            {
+              label: "未开票",
+              value: 1,
+            },
+            {
+              label: "已开票",
+              value: 2,
+            },
+            {
+              label: "已退票",
+              value: -1,
+            },
+          ],
+        },
+        {
+          label: "复购-学时冲突",
+          width: "120px",
+          prop: "rebuy",
+          hidden: true,
+          scope: "rebuy",
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+    };
+  },
+  mounted() {
+    if (
+      this.$route.params.educationId &&
+      this.$route.params.businessId &&
+      this.$route.params.goodsType
+    ) {
+      this.$set(
+        this.formData,
+        "educationTypeId",
+        this.$route.params.educationId
+      );
+      this.$set(this.formData, "businessId", this.$route.params.businessId);
+      this.$set(this.formData, "goodsType", this.$route.params.goodsType);
+      this.$refs.searchBox.changeEducationType(
+        this.$route.params.educationId,
+        true
+      );
+      this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
+    }
+    if (this.$route.params.timeType >= 0) {
+      this.$set(
+        this.formData,
+        "startTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[0]
+      );
+      this.$set(
+        this.formData,
+        "endTime",
+        this.$methodsTools.timestampConvert(this.$route.params.timeType)[1]
+      );
+    }
+    this.search();
+  },
+  activated() {
+    this.search();
+    this.$refs.tableList.allCheckData = [];
+  },
+  methods: {
+    exportorder(){
+      let arr = JSON.parse(JSON.stringify(this.formData));
+      delete arr.pageNum
+      delete arr.pageSize
+      if(this.$refs.tableList.allCheckData.length){
+        const ids = this.$refs.tableList.allCheckData.map(
+            (item) => item.orderSn
+          );
+          arr.orderSnList=ids
+      }
+      this.$api.orderexportNew(arr).then((res) => {
+        // console.log(res)
+        // return
+        this.$methodsTools.exportData(res.msg)
+      });
+    },
+    moreActive() {
+      let arr = JSON.parse(JSON.stringify(this.formData));
+      delete arr.pageNum
+      delete arr.pageSize
+      this.$api.orderexportList(arr).then((res) => {
+        this.$methodsTools.exportData(res.msg)
+      });
+    },
+    emitData(option) {
+      if (!option.length) {
+        this.$message.error("请勾选需要操作的订单");
+        return;
+      }
+      var statues = option.some((item) => {
+        return item.payStatus === 3 || item.orderFrom === 2;
+      });
+      if (statues) {
+        this.$message.warning("请勿勾选完全收费及订单来源为小程序的订单");
+        return;
+      }
+      var arrayId = [];
+      for (let i = 0; i < option.length; i++) {
+        arrayId.push(option[i].orderGoodsId);
+      }
+
+      const jump = () => {
+        this.$router.push({
+          path: "orderPrice",
+          query: {
+            goodsArrays: arrayId.toString(),
+          },
+        });
+      };
+      const statusPage = this.$store.state.tagsView.visitedViews.some(
+        (item) => {
+          return item.name == "OrderPrice";
+        }
+      );
+      if (statusPage) {
+        this.$store
+          .dispatch("tagsView/delCachedView", {
+            name: "OrderPrice",
+          })
+          .then((res) => {
+            jump();
+          });
+      } else {
+        jump();
+      }
+    },
+    editInfo(v) {
+      this.addClick(v, 0);
+    },
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          orderFroms: "",
+          goodsType: "",
+          pageSize: 10,
+          pageNum: 1,
+        };
+      }
+      if (int === 3) {
+        this.formData.pageNum = 1;
+      }
+      let data = JSON.parse(JSON.stringify(this.formData));
+      if (this.formData.startTime) {
+        data.startTime = parseInt(data.startTime / 1000);
+      }
+      if (this.formData.endTime) {
+        data.endTime = parseInt(data.endTime / 1000);
+      }
+      data.orderFroms =7;// data.orderFroms || "2,3,4";
+      this.$api
+        .inquireApiOrderList(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    del(v) {
+      this.$alert(
+        "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
+        "提示",
+        {
+          dangerouslyUseHTMLString: true,
+        }
+      )
+        .then(() => {
+          var data = {
+            chapterExamId: v.chapterExamId,
+            status: -1,
+          };
+          this.$api.editbankchapter(data).then((res) => {
+            this.$message.success("删除成功");
+            this.search();
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    addClick(v, int) {
+      if (v === undefined) {
+        this.$router.push({
+          path: "addOrder",
+        });
+      } else {
+        this.$router.push({
+          path: "chapterVolumeManagementEdit",
+          query: {
+            id: v.chapterExamId,
+          },
+        });
+      }
+    },
+    jumpDetail(v) {
+      const jump = () => {
+        this.$router.push({
+          path: "/Marketing/order/orderDetail",
+          query: {
+            orderId: v.orderId,
+            goodsId: v.goodsId,
+            orderSn: v.orderSn,
+            userId: v.userId,
+            orderGoodsId: v.orderGoodsId,
+          },
+        });
+      };
+      const statusPage = this.$store.state.tagsView.visitedViews.some(
+        (item) => {
+          return item.name == "OrderDetail";
+        }
+      );
+      if (statusPage) {
+        this.$store
+          .dispatch("tagsView/delCachedView", {
+            name: "OrderDetail",
+          })
+          .then((res) => {
+            jump();
+          });
+      } else {
+        jump();
+      }
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+</style>