Browse Source

Merge branch '11/24SAAS' of http://git.dayaedu.com/yonge/dy-admin-manager into 11/24SAAS

mo 3 years ago
parent
commit
ddb433377f

+ 1 - 1
src/views/businessManager/orderManager/payRecord.vue

@@ -310,7 +310,7 @@ import {
   updateFinancialExpenditure,
 } from "@/api/orderManager";
 import { getEmployeeOrgan, getCooperation } from "@/api/buildTeam";
-import { getToken } from "@/utils/auth";
+import { getToken, getTenantId } from "@/utils/auth";
 import { paymentChannelStatus } from "@/utils/searchArray";
 import recorddetail from "@/views/businessManager/orderManager/payRecordConponents/payRecordDetail";
 import load from "@/utils/loading";

+ 49 - 0
src/views/editionManager/editionList.vue

@@ -13,6 +13,25 @@
       >
         新建
       </el-button>
+      <el-upload
+        v-permission="'import/importRedemptionCode'"
+        style="display: inline-block;margin-left:10px;"
+        action="/api-web/import/importRedemptionCode"
+        :show-file-list="false"
+        :before-upload="beforeUpload"
+        accept=".xlsx,.xls"
+        :headers="headers"
+        :on-error="handleError"
+        :on-success="handleSuccess"
+      >
+        <el-button
+          type="primary"
+          style="margin-bottom:20px"
+        >
+          导入兑换码
+        </el-button>
+      </el-upload>
+
       <save-form :inline="true" @submit="search" :model="searchForm">
         <el-form-item label="客户端">
           <el-select clearable v-model="searchForm.search">
@@ -187,7 +206,9 @@ import {
   resetAppVersionInfo,
 } from "@/api/systemManage";
 import pagination from "@/components/Pagination/index";
+import { getToken, getTenantId} from "@/utils/auth";
 import { decode } from "js-base64";
+import load from "@/utils/loading";
 export default {
   components: {
     pagination,
@@ -235,6 +256,10 @@ export default {
         ],
       },
       isNew: false,
+      headers: {
+        Authorization: getToken(),
+        tenantId: getTenantId()
+      },
     };
   },
   activated() {
@@ -269,6 +294,30 @@ export default {
         }
       });
     },
+    beforeUpload(file) {
+      load.startLoading();
+    },
+    handleSuccess(response, file, fileList) {
+      // 导入商品
+      // 报表导出
+      load.endLoading();
+      if (response.code == 200) {
+        this.$message.success(response.msg || "导入成功");
+      } else if (response.code == 0) {
+        let str = this.fomatStr(response.msg);
+        this.$alert(str, "导入结果", {
+          confirmButtonText: "确定",
+          dangerouslyUseHTMLString: true,
+          callback: (action) => {
+          },
+        });
+      } else {
+        this.$message.error(response.msg);
+      }
+    },
+    handleError(err, file, fileList) {
+      load.endLoading();
+    },
     createEdi() {
       this.isNew = true;
       this.sectionVisible = true;

+ 2 - 5
src/views/teamBuild/signupList.vue

@@ -1528,12 +1528,9 @@ export default {
       // 生成报名二维码
       let id = this.id;
       this.codeStatus = true;
-      let tenantConfig = sessionStorage.getItem('tenantConfig')
-      tenantConfig = tenantConfig ? JSON.parse(tenantConfig) : {}
-      const tenantId = tenantConfig.tenantId || 0
       if (type == "payment") {
         this.codeTitle = "学员报名链接";
-        this.qrCodeUrl = vaildStudentUrl() + "/#/login?musicGroupId=" + id + '&tenantId=' + tenantId;
+        this.qrCodeUrl = vaildStudentUrl() + "/#/login?musicGroupId=" + id + '&organId=' + this.organId;
       } else if (type == "detail") {
         let teamName = this.$route.query.name;
         this.codeTitle = "报名缴费详情";
@@ -1546,7 +1543,7 @@ export default {
       } else if (type == "rePayment") {
         this.codeTitle = "学生报名链接(无乐器)";
         this.qrCodeUrl =
-          vaildStudentUrl() + "/#/login?musicGroupId=" + id + '&tenantId=' + tenantId + "&instrument=1";
+          vaildStudentUrl() + "/#/login?musicGroupId=" + id + '&organId=' + this.organId + "&instrument=1";
       }
     },
     onCreateQRCode2() {