Browse Source

添加字段

lex-xin 4 months ago
parent
commit
97244b4b28
1 changed files with 55 additions and 33 deletions
  1. 55 33
      src/views/resetTeaming/modals/giveMemberModel.vue

+ 55 - 33
src/views/resetTeaming/modals/giveMemberModel.vue

@@ -25,34 +25,54 @@
           <el-option label="微信支付" value="wx_pub"></el-option>
         </el-select>
       </el-form-item>
+
+      <el-table
+        style="width: 100%"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        :data="tableList"
+      >
+        <el-table-column align="center" prop="name" label="学员姓名">
+        </el-table-column>
+        <el-table-column align="center" prop="phone" label="手机号">
+        </el-table-column>
+        <el-table-column align="center" prop="memberName" label="学练宝版本">
+        </el-table-column>
+        <el-table-column align="center" prop="type" label="周期">
+          <template slot-scope="scope">
+            {{ scope.row.type | memberEnumType }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="time"
+          label="数量"
+        ></el-table-column>
+        <el-table-column align="center" label="缴费金额(元)">
+          <template slot-scope="scope">
+            {{ scope.row.amount | hasMoneyFormat }}
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <el-form-item
+        style="padding-top: 12px; margin-bottom: 8px;"
+        prop="payType"
+        label="是否向学生发送激活提醒短信:"
+      >
+        <el-radio-group v-model="payForm.sendSmsFlag">
+          <el-radio :label="1">是</el-radio>
+          <el-radio :label="0">否</el-radio>
+        </el-radio-group>
+      </el-form-item>
+
+      <el-alert
+        v-if="payForm.sendSmsFlag == 1"
+        title="【管乐迷】您购买的{团练宝版本名称}已成功激活,请打开管乐迷APP开始练习吧!"
+        :closable="false"
+        type="error"
+      >
+      </el-alert>
     </el-form>
-    <el-table
-      style="width: 100%"
-      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
-      :data="tableList"
-    >
-      <el-table-column align="center" prop="name" label="学员姓名">
-      </el-table-column>
-      <el-table-column align="center" prop="phone" label="手机号">
-      </el-table-column>
-      <el-table-column align="center" prop="memberName" label="学练宝版本">
-      </el-table-column>
-      <el-table-column align="center" prop="type" label="周期">
-        <template slot-scope="scope">
-          {{ scope.row.type | memberEnumType }}
-        </template>
-      </el-table-column>
-      <el-table-column
-        align="center"
-        prop="time"
-        label="数量"
-      ></el-table-column>
-      <el-table-column align="center" label="缴费金额(元)">
-        <template slot-scope="scope">
-          {{ scope.row.amount | hasMoneyFormat }}
-        </template>
-      </el-table-column>
-    </el-table>
 
     <span slot="footer" class="dialog-footer">
       <el-button
@@ -93,7 +113,8 @@ export default {
   data() {
     return {
       payForm: {
-        payType: null
+        payType: null,
+        sendSmsFlag: 1
       },
       pay_channel: null, //支付渠道
       selectStudentMoney: 0, // 选中学生金额
@@ -113,6 +134,10 @@ export default {
       this.$refs.payForm.validate(async _ => {
         if (_) {
           try {
+            const tableList = this.tableList || [];
+            tableList.forEach(item => {
+              item.sendSmsFlag = this.payForm.sendSmsFlag;
+            });
             const res = await cloudPay(this.tableList);
             console.log(res);
             if (res.data.amount == 0 && res.data.orderNo) {
@@ -155,11 +180,8 @@ export default {
               "&returnUrl=" +
               returnUrl +
               "&type=" +
-              res.data.type
-              "&wxAppId=" +
-              wxAppId +
-              "&alipayAppId=" +
-              alipayAppId;
+              res.data.type;
+            "&wxAppId=" + wxAppId + "&alipayAppId=" + alipayAppId;
             console.log(this.codeUrl, "codeUrl");
             this.payMentVisible = true;
           } catch (e) {}