Sfoglia il codice sorgente

账户管理-发送短信通知财务

ZhangWenQiang 4 anni fa
parent
commit
e526dd98da
1 ha cambiato i file con 70 aggiunte e 43 eliminazioni
  1. 70 43
      src/views/hwaccount/HwAccountManager.vue

+ 70 - 43
src/views/hwaccount/HwAccountManager.vue

@@ -18,48 +18,52 @@
           </a-row>
 
         </a-form>
-        <div>
-          <div class="title">我的账户</div>
-          <a-row type="flex" class="account-manager-content">
-            <a-col span="12">
-              <a-row type="flex" align="middle">
-                <a-col span="24">
-                  <a-row type="flex" align="middle">
-                    <a-col span="13">
-                      <div style="color: #7F7F7F;font-size: 18px;">当前余额</div>
-                    </a-col>
-                    <a-col>
-                      <div v-show="information.isOn === 0">
-                        该服务商暂时停用,若有疑问请联系客服
-                      </div>
-                    </a-col>
-                  </a-row>
-                  <a-row type="flex" align="middle" style="margin-top: 15px;">
-                    <a-col span="13">
-                      <div style="color: #A30014;font-size: 28px;">¥ {{information.balance || '0.00'}}</div>
-                    </a-col>
-                    <a-col>
-                      <div v-show="information.id">
-                        <a type="link" @click="handleRecharge">我要充值</a>
-                      </div>
-                    </a-col>
-                  </a-row>
-                </a-col>
-              </a-row>
-            </a-col>
-            <a-col span="2">
-              <a-divider type="vertical" style="height: 100%;margin: 0 30px"/>
-            </a-col>
-            <a-col span="9">
-              <div style="color: #7F7F7F;font-size: 18px;">
-                服务费率
-              </div>
-              <div style="color: #555555;font-size: 28px;">
-                {{information.serviceRate || '0'}}%
-              </div>
-            </a-col>
-          </a-row>
-        </div>
+        <a-spin :spinning="sendLoading">
+          <div>
+            <div class="title">我的账户</div>
+            <a-row type="flex" class="account-manager-content">
+              <a-col span="12">
+                <a-row type="flex" align="middle">
+                  <a-col span="24">
+                    <a-row type="flex" align="middle">
+                      <a-col span="13">
+                        <div style="color: #7F7F7F;font-size: 18px;">当前余额</div>
+                      </a-col>
+                      <a-col>
+                        <div v-show="information.isOn === 0">
+                          该服务商暂时停用,若有疑问请联系客服
+                        </div>
+                      </a-col>
+                    </a-row>
+                    <a-row type="flex" align="middle" style="margin-top: 15px;">
+                      <a-col span="13">
+                        <div style="color: #A30014;font-size: 28px;">¥ {{information.balance || '0.00'}}</div>
+                      </a-col>
+                      <a-col>
+                        <div v-show="information.id">
+                          <a type="link" @click="handleRecharge">我要充值</a>
+                          <a-divider type="vertical" />
+                          <a type="link" @click="handleSendMessage">发送短信</a>
+                        </div>
+                      </a-col>
+                    </a-row>
+                  </a-col>
+                </a-row>
+              </a-col>
+              <a-col span="2">
+                <a-divider type="vertical" style="height: 100%;margin: 0 30px"/>
+              </a-col>
+              <a-col span="9">
+                <div style="color: #7F7F7F;font-size: 18px;">
+                  服务费率
+                </div>
+                <div style="color: #555555;font-size: 28px;">
+                  {{information.serviceRate || '0'}}%
+                </div>
+              </a-col>
+            </a-row>
+          </div>
+        </a-spin>
       </div>
       <!-- 查询区域-END -->
 
@@ -172,7 +176,8 @@
         url: {
           list: '/saasmanager/hwPlatformCompanyAccount/myAccount',
           exportXlsUrl: '/saasmanager/hwPlatformCompanyAccountDetail/exportXlsManager',
-          detail: '/saasmanager/hwPlatformCompanyAccountDetail/managerList'
+          detail: '/saasmanager/hwPlatformCompanyAccountDetail/managerList',
+          sendMessage: '/saasmanager/hwPlatformCompanyAccount/sendMessage'
         },
         dictOptions: {},
         Subcontractor: [],
@@ -184,6 +189,7 @@
         subcontractorKey: '',
         cpType:'',
         companyId:'',
+        sendLoading: false,
       }
     },
     created() {
@@ -216,6 +222,27 @@
         this.$refs.rechargeModal.title = '我要充值'
         this.$refs.rechargeModal.disableSubmit = false
       },
+      //发送短信
+      handleSendMessage(){
+        var params = {};
+        params.subcontractorName = this.information.subcontractorName
+        params.balance = this.information.balance
+        //企业服务商银行信息接口获取
+        params.noPaymentCount = 0;
+        params.noTotalPayment = 0;
+        this.sendLoading = true
+        getAction(this.url.sendMessage, params).then((res) => {
+          if (res.success) {
+            this.$message.success(res.message)
+          } else {
+            this.$message.warning(res.message)
+          }
+          if (res.code === 510) {
+            this.$message.warning(res.message)
+          }
+          this.sendLoading = false
+        })
+      },
       getDetails(arg) {
         //加载数据 若传入参数1则加载第一页的内容
         if (arg === 1) {