|  | @@ -1,171 +1,186 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  | -  <div class='studentOrder'>
 | 
	
		
			
				|  |  | +  <div class="studentOrder">
 | 
	
		
			
				|  |  |      <div class="headWrap">
 | 
	
		
			
				|  |  |        <div class="left">
 | 
	
		
			
				|  |  |          <div class="headItem">
 | 
	
		
			
				|  |  | -          <p>账户余额:<span>{{ dataInfo.balance }}</span></p>
 | 
	
		
			
				|  |  | -          <el-button type="text" v-permission="'userCashAccount/transferCourseBalanceToBalance'" @click="onMoneyOperation('recharge')">修改</el-button>
 | 
	
		
			
				|  |  | +          <p>
 | 
	
		
			
				|  |  | +            账户余额:
 | 
	
		
			
				|  |  | +            <span>{{ dataInfo.balance }}</span>
 | 
	
		
			
				|  |  | +          </p>
 | 
	
		
			
				|  |  | +          <el-button
 | 
	
		
			
				|  |  | +            type="text"
 | 
	
		
			
				|  |  | +            v-permission="'userCashAccount/transferCourseBalanceToBalance'"
 | 
	
		
			
				|  |  | +            @click="onMoneyOperation('recharge')"
 | 
	
		
			
				|  |  | +          >修改</el-button>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |          <div class="headItem">
 | 
	
		
			
				|  |  | -           <!-- v-if="amountStatus" -->
 | 
	
		
			
				|  |  | -          <p>课程余额:<span>{{ dataInfo.courseBalance }}</span></p>
 | 
	
		
			
				|  |  | +          <!-- v-if="amountStatus" -->
 | 
	
		
			
				|  |  | +          <p>
 | 
	
		
			
				|  |  | +            课程余额:
 | 
	
		
			
				|  |  | +            <span>{{ dataInfo.courseBalance }}</span>
 | 
	
		
			
				|  |  | +          </p>
 | 
	
		
			
				|  |  |            <!-- <p v-else>课程余额:<span>
 | 
	
		
			
				|  |  |                <el-input style="width: 130px;"
 | 
	
		
			
				|  |  |                          v-model.trim="dataInfo.courseBalance"
 | 
	
		
			
				|  |  |                          placeholder="课程余额"></el-input>
 | 
	
		
			
				|  |  | -            </span></p> -->
 | 
	
		
			
				|  |  | +          </span></p>-->
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -          <el-button v-permission="'userCashAccount/updateCourseBalance'"
 | 
	
		
			
				|  |  | -                     @click="onMoneyOperation('account')"
 | 
	
		
			
				|  |  | -                     type="text">修改</el-button>
 | 
	
		
			
				|  |  | +          <el-button
 | 
	
		
			
				|  |  | +            v-permission="'userCashAccount/updateCourseBalance'"
 | 
	
		
			
				|  |  | +            @click="onMoneyOperation('account')"
 | 
	
		
			
				|  |  | +            type="text"
 | 
	
		
			
				|  |  | +          >修改</el-button>
 | 
	
		
			
				|  |  |            <!-- <el-button style="top:0;"
 | 
	
		
			
				|  |  |                       @click="onUpdateCourse"
 | 
	
		
			
				|  |  |                       v-else
 | 
	
		
			
				|  |  | -                     type="text">保存</el-button> -->
 | 
	
		
			
				|  |  | +          type="text">保存</el-button>-->
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |          <div class="headItem">
 | 
	
		
			
				|  |  | -          <p>银行卡:<span>{{ dataInfo.cardNo }}</span></p>
 | 
	
		
			
				|  |  | +          <p>
 | 
	
		
			
				|  |  | +            银行卡:
 | 
	
		
			
				|  |  | +            <span>{{ dataInfo.cardNo }}</span>
 | 
	
		
			
				|  |  | +          </p>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |          <!-- <div class="headItem">
 | 
	
		
			
				|  |  |            <p>支付宝:<span>{{ dataInfo.zfb }}</span></p>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |          <div class="headItem">
 | 
	
		
			
				|  |  |            <p>微信:<span>{{ dataInfo.wxBalance }}</span></p>
 | 
	
		
			
				|  |  | -        </div> -->
 | 
	
		
			
				|  |  | +        </div>-->
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  | -      <el-button @click="onCashAccount" type="primary">交易明细</el-button>
 | 
	
		
			
				|  |  | +      <el-button @click="onCashAccount" v-permission="'userCashAccountDetail/queryPage'" type="primary">交易明细</el-button>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |      <!-- 搜索类型 -->
 | 
	
		
			
				|  |  | -    <el-form :inline="true"
 | 
	
		
			
				|  |  | -             class="searchForm"
 | 
	
		
			
				|  |  | -             v-model.trim="searchForm">
 | 
	
		
			
				|  |  | +    <el-form :inline="true" class="searchForm" v-model.trim="searchForm">
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-date-picker style="width: 400px;"
 | 
	
		
			
				|  |  | -                        v-model.trim="orderDate"
 | 
	
		
			
				|  |  | -                        type="daterange"
 | 
	
		
			
				|  |  | -                        value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | -                        @change="searchCourseDate"
 | 
	
		
			
				|  |  | -                        range-separator="至"
 | 
	
		
			
				|  |  | -                        start-placeholder="订单开始日期"
 | 
	
		
			
				|  |  | -                        end-placeholder="订单结束日期">
 | 
	
		
			
				|  |  | -        </el-date-picker>
 | 
	
		
			
				|  |  | +        <el-date-picker
 | 
	
		
			
				|  |  | +          style="width: 400px;"
 | 
	
		
			
				|  |  | +          v-model.trim="orderDate"
 | 
	
		
			
				|  |  | +          type="daterange"
 | 
	
		
			
				|  |  | +          value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +          @change="searchCourseDate"
 | 
	
		
			
				|  |  | +          range-separator="至"
 | 
	
		
			
				|  |  | +          start-placeholder="订单开始日期"
 | 
	
		
			
				|  |  | +          end-placeholder="订单结束日期"
 | 
	
		
			
				|  |  | +        ></el-date-picker>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-select v-model.trim="searchForm.paymentType"
 | 
	
		
			
				|  |  | -                   filterable
 | 
	
		
			
				|  |  | -                   clearable
 | 
	
		
			
				|  |  | -                   @clear="onClear('paymentType')"
 | 
	
		
			
				|  |  | -                   placeholder="交易类型">
 | 
	
		
			
				|  |  | -          <el-option v-for="(item, index) in orderStatus"
 | 
	
		
			
				|  |  | -                     :key="index"
 | 
	
		
			
				|  |  | -                     :label="item.label"
 | 
	
		
			
				|  |  | -                     :value="item.value"></el-option>
 | 
	
		
			
				|  |  | +        <el-select
 | 
	
		
			
				|  |  | +          v-model.trim="searchForm.paymentType"
 | 
	
		
			
				|  |  | +          filterable
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          @clear="onClear('paymentType')"
 | 
	
		
			
				|  |  | +          placeholder="交易类型"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-option
 | 
	
		
			
				|  |  | +            v-for="(item, index) in orderStatus"
 | 
	
		
			
				|  |  | +            :key="index"
 | 
	
		
			
				|  |  | +            :label="item.label"
 | 
	
		
			
				|  |  | +            :value="item.value"
 | 
	
		
			
				|  |  | +          ></el-option>
 | 
	
		
			
				|  |  |          </el-select>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-input type="text"
 | 
	
		
			
				|  |  | -                  @keyup.enter.native='search'
 | 
	
		
			
				|  |  | -                  v-model.trim="searchForm.remark"
 | 
	
		
			
				|  |  | -                  placeholder="订单说明"></el-input>
 | 
	
		
			
				|  |  | +        <el-input
 | 
	
		
			
				|  |  | +          type="text"
 | 
	
		
			
				|  |  | +          @keyup.enter.native="search"
 | 
	
		
			
				|  |  | +          v-model.trim="searchForm.remark"
 | 
	
		
			
				|  |  | +          placeholder="订单说明"
 | 
	
		
			
				|  |  | +        ></el-input>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-button @click="search"
 | 
	
		
			
				|  |  | -                   type="danger">搜索</el-button>
 | 
	
		
			
				|  |  | -        <el-button @click="onReSet"
 | 
	
		
			
				|  |  | -                   type="primary">重置</el-button>
 | 
	
		
			
				|  |  | +        <el-button @click="search" type="danger">搜索</el-button>
 | 
	
		
			
				|  |  | +        <el-button @click="onReSet" type="primary">重置</el-button>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |      </el-form>
 | 
	
		
			
				|  |  |      <div class="tableWrap">
 | 
	
		
			
				|  |  | -      <el-table :data="tableList"
 | 
	
		
			
				|  |  | -                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
 | 
	
		
			
				|  |  | -        <el-table-column label="订单日期"
 | 
	
		
			
				|  |  | -                         prop="createTime"
 | 
	
		
			
				|  |  | -                        align='center'
 | 
	
		
			
				|  |  | -                         width="150px">
 | 
	
		
			
				|  |  | -                   <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            {{ scope.row.createTime | dateForMinFormat }}
 | 
	
		
			
				|  |  | -          </template>      
 | 
	
		
			
				|  |  | +      <el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
 | 
	
		
			
				|  |  | +        <el-table-column label="订单日期" prop="createTime" align="center" width="150px">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">{{ scope.row.createTime | dateForMinFormat }}</template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column label="交易类型"
 | 
	
		
			
				|  |  | -         align='center'
 | 
	
		
			
				|  |  | -                         width="180px">
 | 
	
		
			
				|  |  | -          <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            {{ scope.row.type | orderType }}
 | 
	
		
			
				|  |  | -          </template>
 | 
	
		
			
				|  |  | -        </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column width="180px"
 | 
	
		
			
				|  |  | -         align='center'
 | 
	
		
			
				|  |  | -                         label="应付金额"
 | 
	
		
			
				|  |  | -                         prop="expectAmount">
 | 
	
		
			
				|  |  | -        </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column width="180px"
 | 
	
		
			
				|  |  | -         align='center'
 | 
	
		
			
				|  |  | -                         label="余额支付"
 | 
	
		
			
				|  |  | -                         prop="balancePaymentAmount">
 | 
	
		
			
				|  |  | -        </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column width="180px"
 | 
	
		
			
				|  |  | -         align='center'
 | 
	
		
			
				|  |  | -                         label="实际金额"
 | 
	
		
			
				|  |  | -                         prop="actualAmount">
 | 
	
		
			
				|  |  | -        </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column width="180px"
 | 
	
		
			
				|  |  | -         align='center'
 | 
	
		
			
				|  |  | -                         label="订单状态"
 | 
	
		
			
				|  |  | -                         prop="status">
 | 
	
		
			
				|  |  | -                         <template slot-scope="scope">
 | 
	
		
			
				|  |  | -                           <div >
 | 
	
		
			
				|  |  | -                              {{scope.row.status | payStatus}}
 | 
	
		
			
				|  |  | -                           </div>
 | 
	
		
			
				|  |  | -                         </template>
 | 
	
		
			
				|  |  | -        </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column label="订单说明"
 | 
	
		
			
				|  |  | -         align='center'
 | 
	
		
			
				|  |  | -                         prop="memo">
 | 
	
		
			
				|  |  | -        </el-table-column>
 | 
	
		
			
				|  |  | -      </el-table>
 | 
	
		
			
				|  |  | -      <pagination :total="pageInfo.total"
 | 
	
		
			
				|  |  | -                  :page.sync="pageInfo.page"
 | 
	
		
			
				|  |  | -                  :limit.sync="pageInfo.limit"
 | 
	
		
			
				|  |  | -                  :page-sizes="pageInfo.page_size"
 | 
	
		
			
				|  |  | -                  @pagination="getList" />
 | 
	
		
			
				|  |  | -    </div>
 | 
	
		
			
				|  |  | -    <el-dialog title='交易明细'
 | 
	
		
			
				|  |  | -               width="800px"
 | 
	
		
			
				|  |  | -               :visible.sync="cashAccount.status">
 | 
	
		
			
				|  |  | -      <el-table :data="cashAccount.gridData">
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         property="createTime"
 | 
	
		
			
				|  |  | -                         label="操作时间"></el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         property="phone"
 | 
	
		
			
				|  |  | -                         label="操作人"></el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         property="subjectName"
 | 
	
		
			
				|  |  | -                         label="金额变动"></el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         property="subjectName"
 | 
	
		
			
				|  |  | -                         label="余额"></el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center' label="交易状态">
 | 
	
		
			
				|  |  | -          <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            {{ scope.row.status | payStatus }}
 | 
	
		
			
				|  |  | -          </template>
 | 
	
		
			
				|  |  | +        <el-table-column label="交易类型" align="center" width="180px">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">{{ scope.row.type | orderType }}</template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center' label="交易类型">
 | 
	
		
			
				|  |  | +        <el-table-column width="180px" align="center" label="应付金额" prop="expectAmount"></el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column width="180px" align="center" label="余额支付" prop="balancePaymentAmount"></el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column width="180px" align="center" label="实际金额" prop="actualAmount"></el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column width="180px" align="center" label="订单状态" prop="status">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            {{ scope.row.type | payType }}
 | 
	
		
			
				|  |  | +            <div>{{scope.row.status | payStatus}}</div>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         property="subjectName"
 | 
	
		
			
				|  |  | -                         label="备注"></el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column label="订单说明" align="center" prop="memo"></el-table-column>
 | 
	
		
			
				|  |  |        </el-table>
 | 
	
		
			
				|  |  | -      <pagination :total="cashAccount.total"
 | 
	
		
			
				|  |  | -                  :page.sync="cashAccount.page"
 | 
	
		
			
				|  |  | -                  :limit.sync="cashAccount.limit"
 | 
	
		
			
				|  |  | -                  :page-sizes="cashAccount.page_size"
 | 
	
		
			
				|  |  | -                  @pagination="getCashAccount" />
 | 
	
		
			
				|  |  | +      <pagination
 | 
	
		
			
				|  |  | +        :total="pageInfo.total"
 | 
	
		
			
				|  |  | +        :page.sync="pageInfo.page"
 | 
	
		
			
				|  |  | +        :limit.sync="pageInfo.limit"
 | 
	
		
			
				|  |  | +        :page-sizes="pageInfo.page_size"
 | 
	
		
			
				|  |  | +        @pagination="getList"
 | 
	
		
			
				|  |  | +      />
 | 
	
		
			
				|  |  | +    </div>
 | 
	
		
			
				|  |  | +    <el-dialog title="交易明细" width="850px" :visible.sync="cashAccount.status">
 | 
	
		
			
				|  |  | +      <el-tabs v-model="activeName" type="border-card">
 | 
	
		
			
				|  |  | +        <el-tab-pane label="账户余额明细" name="first">
 | 
	
		
			
				|  |  | +          <el-table :data="cashAccount.gridData">
 | 
	
		
			
				|  |  | +            <!-- 交易金额,账户可用余额,交易状态,交易类型,操作时间,备注 -->
 | 
	
		
			
				|  |  | +            <el-table-column align="center" property="amount" label="交易金额"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column align="center" property="balance" label="账户可用余额"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column align="center" label="交易状态">
 | 
	
		
			
				|  |  | +              <template slot-scope="scope">{{ scope.row.status | payStatus }}</template>
 | 
	
		
			
				|  |  | +            </el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column align="center" label="交易类型">
 | 
	
		
			
				|  |  | +              <template slot-scope="scope">{{ scope.row.type | payType }}</template>
 | 
	
		
			
				|  |  | +            </el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column align="center" width="160px" property="createTime" label="交易时间"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column align="center" width="140px" label="备注">
 | 
	
		
			
				|  |  | +              <template slot-scope="scope">
 | 
	
		
			
				|  |  | +                <span :title="scope.row.comment">{{ scope.row.comment }}</span>
 | 
	
		
			
				|  |  | +              </template>
 | 
	
		
			
				|  |  | +            </el-table-column>
 | 
	
		
			
				|  |  | +          </el-table>
 | 
	
		
			
				|  |  | +          <pagination
 | 
	
		
			
				|  |  | +            :total="cashAccount.total"
 | 
	
		
			
				|  |  | +            :page.sync="cashAccount.page"
 | 
	
		
			
				|  |  | +            :limit.sync="cashAccount.limit"
 | 
	
		
			
				|  |  | +            :page-sizes="cashAccount.page_size"
 | 
	
		
			
				|  |  | +            @pagination="getCashAccount"
 | 
	
		
			
				|  |  | +          />
 | 
	
		
			
				|  |  | +        </el-tab-pane>
 | 
	
		
			
				|  |  | +        <el-tab-pane label="课程余额明细" name="second">
 | 
	
		
			
				|  |  | +          <el-table :data="courseAccount.gridData">
 | 
	
		
			
				|  |  | +            <!-- 交易金额,账户可用余额,交易状态,交易类型,操作时间,备注 -->
 | 
	
		
			
				|  |  | +            <el-table-column align="center" property="amount" label="交易金额"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column align="center" property="balance" label="课程可用余额"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column align="center" label="交易状态">
 | 
	
		
			
				|  |  | +              <template slot-scope="scope">{{ scope.row.status | payStatus }}</template>
 | 
	
		
			
				|  |  | +            </el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column align="center" label="交易类型">
 | 
	
		
			
				|  |  | +              <template slot-scope="scope">{{ scope.row.type | payType }}</template>
 | 
	
		
			
				|  |  | +            </el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column align="center" width="160px" property="createTime" label="交易时间"></el-table-column>
 | 
	
		
			
				|  |  | +            <el-table-column align="center" width="140px" label="备注">
 | 
	
		
			
				|  |  | +              <template slot-scope="scope">
 | 
	
		
			
				|  |  | +                <span :title="scope.row.comment">{{ scope.row.comment }}</span>
 | 
	
		
			
				|  |  | +              </template>
 | 
	
		
			
				|  |  | +            </el-table-column>
 | 
	
		
			
				|  |  | +          </el-table>
 | 
	
		
			
				|  |  | +          <pagination
 | 
	
		
			
				|  |  | +            :total="courseAccount.total"
 | 
	
		
			
				|  |  | +            :page.sync="courseAccount.page"
 | 
	
		
			
				|  |  | +            :limit.sync="courseAccount.limit"
 | 
	
		
			
				|  |  | +            :page-sizes="courseAccount.page_size"
 | 
	
		
			
				|  |  | +            @pagination="getCourseAccount"
 | 
	
		
			
				|  |  | +          />
 | 
	
		
			
				|  |  | +        </el-tab-pane>
 | 
	
		
			
				|  |  | +      </el-tabs>
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
		
			
				|  |  | -    <el-dialog :title="moneyForm.title" width="450px" @close="onFormClose('moneyForm')" :visible.sync="moneyVisible">
 | 
	
		
			
				|  |  | +    <el-dialog
 | 
	
		
			
				|  |  | +      :title="moneyForm.title"
 | 
	
		
			
				|  |  | +      width="450px"
 | 
	
		
			
				|  |  | +      @close="onFormClose('moneyForm')"
 | 
	
		
			
				|  |  | +      :visible.sync="moneyVisible"
 | 
	
		
			
				|  |  | +    >
 | 
	
		
			
				|  |  |        <el-form ref="moneyForm" :rules="moneyRule" :model="moneyForm" label-width="80px">
 | 
	
		
			
				|  |  |          <el-form-item label="操作选择" prop="type">
 | 
	
		
			
				|  |  |            <el-radio-group v-model="moneyForm.type">
 | 
	
	
		
			
				|  | @@ -174,7 +189,11 @@
 | 
	
		
			
				|  |  |            </el-radio-group>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item :label="moneyForm.titleType == 'account' ? '课程余额' : '账户余额'">
 | 
	
		
			
				|  |  | -          <el-input type="number" disabled :value="moneyForm.titleType == 'account' ? dataInfo.courseBalance : dataInfo.balance"></el-input>
 | 
	
		
			
				|  |  | +          <el-input
 | 
	
		
			
				|  |  | +            type="number"
 | 
	
		
			
				|  |  | +            disabled
 | 
	
		
			
				|  |  | +            :value="moneyForm.titleType == 'account' ? dataInfo.courseBalance : dataInfo.balance"
 | 
	
		
			
				|  |  | +          ></el-input>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item label="金额" prop="money">
 | 
	
		
			
				|  |  |            <el-input type="number" @mousewheel.native.prevent v-model="moneyForm.money"></el-input>
 | 
	
	
		
			
				|  | @@ -189,7 +208,7 @@
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
		
			
				|  |  |      <!-- 充值弹窗 -->
 | 
	
		
			
				|  |  | -     <!-- <el-dialog
 | 
	
		
			
				|  |  | +    <!-- <el-dialog
 | 
	
		
			
				|  |  |        title="课程余额转账户余额"
 | 
	
		
			
				|  |  |        width="400px"
 | 
	
		
			
				|  |  |        :visible.sync="rechargeVisible">
 | 
	
	
		
			
				|  | @@ -211,31 +230,39 @@
 | 
	
		
			
				|  |  |          <el-button @click="rechargeVisible = false">取 消</el-button>
 | 
	
		
			
				|  |  |          <el-button type="primary" @click="submitRecharge">确 定</el-button>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  | -    </el-dialog> -->
 | 
	
		
			
				|  |  | +    </el-dialog>-->
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import pagination from '@/components/Pagination/index'
 | 
	
		
			
				|  |  | -import { studentPaymentOrderList, getUserCashAccountBaseInfo, updateCourseBalance,transferCourseBalanceToBalance, userCashAccountDetail, updateBalance } from '@/api/studentManager'
 | 
	
		
			
				|  |  | -import { orderStatus } from '@/utils/searchArray'
 | 
	
		
			
				|  |  | -import store from '@/store'
 | 
	
		
			
				|  |  | +import pagination from "@/components/Pagination/index";
 | 
	
		
			
				|  |  | +import {
 | 
	
		
			
				|  |  | +  studentPaymentOrderList,
 | 
	
		
			
				|  |  | +  getUserCashAccountBaseInfo,
 | 
	
		
			
				|  |  | +  updateCourseBalance,
 | 
	
		
			
				|  |  | +  transferCourseBalanceToBalance,
 | 
	
		
			
				|  |  | +  userCashAccountDetail,
 | 
	
		
			
				|  |  | +  userCoursesAccount,
 | 
	
		
			
				|  |  | +  updateBalance
 | 
	
		
			
				|  |  | +} from "@/api/studentManager";
 | 
	
		
			
				|  |  | +import { orderStatus } from "@/utils/searchArray";
 | 
	
		
			
				|  |  | +import store from "@/store";
 | 
	
		
			
				|  |  |  let validPrice = (rule, value, callback) => {
 | 
	
		
			
				|  |  | -  if (value == '' && typeof value == 'string' || value == null) {
 | 
	
		
			
				|  |  | -    callback(new Error('请输入金额'))
 | 
	
		
			
				|  |  | +  if ((value == "" && typeof value == "string") || value == null) {
 | 
	
		
			
				|  |  | +    callback(new Error("请输入金额"));
 | 
	
		
			
				|  |  |    } else if (value < 0) {
 | 
	
		
			
				|  |  | -    callback(new Error('输入金额必须大于或等于0'))
 | 
	
		
			
				|  |  | +    callback(new Error("输入金额必须大于或等于0"));
 | 
	
		
			
				|  |  |    } else if (value >= 100000) {
 | 
	
		
			
				|  |  | -    callback(new Error('输入金额必须小于100000'))
 | 
	
		
			
				|  |  | +    callback(new Error("输入金额必须小于100000"));
 | 
	
		
			
				|  |  |    } else {
 | 
	
		
			
				|  |  | -    callback()
 | 
	
		
			
				|  |  | +    callback();
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  | -  name: 'studentOrder',
 | 
	
		
			
				|  |  | +  name: "studentOrder",
 | 
	
		
			
				|  |  |    components: { pagination },
 | 
	
		
			
				|  |  | -  data () {
 | 
	
		
			
				|  |  | +  data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | -      rechargeVisible:false,
 | 
	
		
			
				|  |  | +      rechargeVisible: false,
 | 
	
		
			
				|  |  |        organId: null,
 | 
	
		
			
				|  |  |        orderDate: null,
 | 
	
		
			
				|  |  |        searchForm: {
 | 
	
	
		
			
				|  | @@ -256,23 +283,36 @@ export default {
 | 
	
		
			
				|  |  |        tableList: [],
 | 
	
		
			
				|  |  |        dataInfo: {},
 | 
	
		
			
				|  |  |        amountStatus: true, // 账户余额状态
 | 
	
		
			
				|  |  | -      rechargeForm:{
 | 
	
		
			
				|  |  | -        money:null
 | 
	
		
			
				|  |  | +      rechargeForm: {
 | 
	
		
			
				|  |  | +        money: null
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        moneyVisible: false, //
 | 
	
		
			
				|  |  |        moneyForm: {
 | 
	
		
			
				|  |  | -        title: '账户余额修改',
 | 
	
		
			
				|  |  | -        titleType: 'recharge',
 | 
	
		
			
				|  |  | -        type: 1, // 
 | 
	
		
			
				|  |  | +        title: "账户余额修改",
 | 
	
		
			
				|  |  | +        titleType: "recharge",
 | 
	
		
			
				|  |  | +        type: 1, //
 | 
	
		
			
				|  |  |          money: null,
 | 
	
		
			
				|  |  | -        remark: null, //备注
 | 
	
		
			
				|  |  | +        remark: null //备注
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        moneyRule: {
 | 
	
		
			
				|  |  | -        type: [{ required: true, message: '请选择操作类型', trigger: 'change' }],
 | 
	
		
			
				|  |  | -        money: [{ required: true, validator: validPrice, trigger: 'blur' }],
 | 
	
		
			
				|  |  | -        remark: [{ required: true, message: '请输入备注', trigger: 'blur' }],
 | 
	
		
			
				|  |  | +        type: [
 | 
	
		
			
				|  |  | +          { required: true, message: "请选择操作类型", trigger: "change" }
 | 
	
		
			
				|  |  | +        ],
 | 
	
		
			
				|  |  | +        money: [{ required: true, validator: validPrice, trigger: "blur" }],
 | 
	
		
			
				|  |  | +        remark: [{ required: true, message: "请输入备注", trigger: "blur" }]
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      cashAccount: { // 点名表
 | 
	
		
			
				|  |  | +      cashAccount: {
 | 
	
		
			
				|  |  | +        // 点名表
 | 
	
		
			
				|  |  | +        status: false,
 | 
	
		
			
				|  |  | +        gridData: [],
 | 
	
		
			
				|  |  | +        limit: 10, // 限制显示条数
 | 
	
		
			
				|  |  | +        page: 1, // 当前页
 | 
	
		
			
				|  |  | +        total: 0, // 总条数
 | 
	
		
			
				|  |  | +        page_size: [10, 20, 40, 50] // 选择限制显示条数
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      activeName: "first",
 | 
	
		
			
				|  |  | +      courseAccount: {
 | 
	
		
			
				|  |  | +        // 点名表
 | 
	
		
			
				|  |  |          status: false,
 | 
	
		
			
				|  |  |          gridData: [],
 | 
	
		
			
				|  |  |          limit: 10, // 限制显示条数
 | 
	
	
		
			
				|  | @@ -280,87 +320,119 @@ export default {
 | 
	
		
			
				|  |  |          total: 0, // 总条数
 | 
	
		
			
				|  |  |          page_size: [10, 20, 40, 50] // 选择限制显示条数
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  mounted () {
 | 
	
		
			
				|  |  | -    this.searchForm.studentId = this.$route.query.userId
 | 
	
		
			
				|  |  | -    this.getList()
 | 
	
		
			
				|  |  | -    this.__init()
 | 
	
		
			
				|  |  | +  mounted() {
 | 
	
		
			
				|  |  | +    this.searchForm.studentId = this.$route.query.userId;
 | 
	
		
			
				|  |  | +    this.getList();
 | 
	
		
			
				|  |  | +    this.__init();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    activated() {
 | 
	
		
			
				|  |  | -    this.searchForm.studentId = this.$route.query.userId
 | 
	
		
			
				|  |  | -    this.getList()
 | 
	
		
			
				|  |  | -    this.__init()
 | 
	
		
			
				|  |  | +    this.searchForm.studentId = this.$route.query.userId;
 | 
	
		
			
				|  |  | +    this.getList();
 | 
	
		
			
				|  |  | +    this.__init();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | -    onClear (type) {
 | 
	
		
			
				|  |  | -      if (type == 'paymentType') {
 | 
	
		
			
				|  |  | -        this.searchForm.paymentType = null
 | 
	
		
			
				|  |  | +    onClear(type) {
 | 
	
		
			
				|  |  | +      if (type == "paymentType") {
 | 
	
		
			
				|  |  | +        this.searchForm.paymentType = null;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    __init () {
 | 
	
		
			
				|  |  | -      getUserCashAccountBaseInfo({ userId: this.$route.query.userId }).then(res => {
 | 
	
		
			
				|  |  | -        if (res.code == 200) {
 | 
	
		
			
				|  |  | -          this.dataInfo = {
 | 
	
		
			
				|  |  | -            balance: res.data.balance,
 | 
	
		
			
				|  |  | -            courseBalance: res.data.courseBalance,
 | 
	
		
			
				|  |  | -            wxBalance: 0,
 | 
	
		
			
				|  |  | -            cardNo: res.data.cardNo,
 | 
	
		
			
				|  |  | -            zfb: null
 | 
	
		
			
				|  |  | +    __init() {
 | 
	
		
			
				|  |  | +      getUserCashAccountBaseInfo({ userId: this.$route.query.userId }).then(
 | 
	
		
			
				|  |  | +        res => {
 | 
	
		
			
				|  |  | +          if (res.code == 200) {
 | 
	
		
			
				|  |  | +            this.dataInfo = {
 | 
	
		
			
				|  |  | +              balance: res.data.balance,
 | 
	
		
			
				|  |  | +              courseBalance: res.data.courseBalance,
 | 
	
		
			
				|  |  | +              wxBalance: 0,
 | 
	
		
			
				|  |  | +              cardNo: res.data.cardNo,
 | 
	
		
			
				|  |  | +              zfb: null
 | 
	
		
			
				|  |  | +            };
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onFormClose (formName) { // 关闭弹窗重置验证
 | 
	
		
			
				|  |  | -      this.$refs[formName].resetFields()
 | 
	
		
			
				|  |  | +    onFormClose(formName) {
 | 
	
		
			
				|  |  | +      // 关闭弹窗重置验证
 | 
	
		
			
				|  |  | +      this.$refs[formName].resetFields();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      onMoneyOperation(type) {
 | 
	
		
			
				|  |  | -      let moneyForm = this.moneyForm
 | 
	
		
			
				|  |  | -      if(type == 'recharge') {
 | 
	
		
			
				|  |  | -        moneyForm.title = '账户余额修改'
 | 
	
		
			
				|  |  | -        moneyForm.titleType = 'recharge'
 | 
	
		
			
				|  |  | -      } else if(type == 'account') {
 | 
	
		
			
				|  |  | -        moneyForm.title = '课程余额修改'
 | 
	
		
			
				|  |  | -        moneyForm.titleType = 'account'
 | 
	
		
			
				|  |  | +      let moneyForm = this.moneyForm;
 | 
	
		
			
				|  |  | +      if (type == "recharge") {
 | 
	
		
			
				|  |  | +        moneyForm.title = "账户余额修改";
 | 
	
		
			
				|  |  | +        moneyForm.titleType = "recharge";
 | 
	
		
			
				|  |  | +      } else if (type == "account") {
 | 
	
		
			
				|  |  | +        moneyForm.title = "课程余额修改";
 | 
	
		
			
				|  |  | +        moneyForm.titleType = "account";
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      this.moneyVisible = true
 | 
	
		
			
				|  |  | +      this.moneyVisible = true;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onCashAccount (item) { // 点名表
 | 
	
		
			
				|  |  | -      this.cashAccount.page = 1
 | 
	
		
			
				|  |  | -      this.getCashAccount()
 | 
	
		
			
				|  |  | +    onCashAccount(item) {
 | 
	
		
			
				|  |  | +      // 点名表
 | 
	
		
			
				|  |  | +      this.cashAccount.page = 1;
 | 
	
		
			
				|  |  | +      this.getCashAccount();
 | 
	
		
			
				|  |  | +      this.courseAccount.page = 1;
 | 
	
		
			
				|  |  | +      this.getCourseAccount();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      getCashAccount() {
 | 
	
		
			
				|  |  | -      let cashAccount = this.cashAccount
 | 
	
		
			
				|  |  | +      let cashAccount = this.cashAccount;
 | 
	
		
			
				|  |  |        let params = {
 | 
	
		
			
				|  |  |          page: cashAccount.page,
 | 
	
		
			
				|  |  |          rows: cashAccount.limit,
 | 
	
		
			
				|  |  |          userId: this.searchForm.studentId
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  |        userCashAccountDetail(params).then(res => {
 | 
	
		
			
				|  |  | -        let result = res.data
 | 
	
		
			
				|  |  | -        cashAccount.status = true
 | 
	
		
			
				|  |  | +        let result = res.data;
 | 
	
		
			
				|  |  | +        cashAccount.status = true;
 | 
	
		
			
				|  |  |          if (res.code == 200) {
 | 
	
		
			
				|  |  | -          cashAccount.gridData = result.rows
 | 
	
		
			
				|  |  | -          cashAccount.total = result.total
 | 
	
		
			
				|  |  | +          cashAccount.gridData = result.rows;
 | 
	
		
			
				|  |  | +          cashAccount.total = result.total;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    getCourseAccount() {
 | 
	
		
			
				|  |  | +      let courseAccount = this.courseAccount;
 | 
	
		
			
				|  |  | +      let params = {
 | 
	
		
			
				|  |  | +        page: courseAccount.page,
 | 
	
		
			
				|  |  | +        rows: courseAccount.limit,
 | 
	
		
			
				|  |  | +        userId: this.searchForm.studentId
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      userCoursesAccount(params).then(res => {
 | 
	
		
			
				|  |  | +        let result = res.data;
 | 
	
		
			
				|  |  | +        courseAccount.status = true;
 | 
	
		
			
				|  |  | +        if (res.code == 200) {
 | 
	
		
			
				|  |  | +          courseAccount.gridData = result.rows;
 | 
	
		
			
				|  |  | +          courseAccount.total = result.total;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      submitMoney(formName) {
 | 
	
		
			
				|  |  | -      this.$refs[formName].validate((valid) => {
 | 
	
		
			
				|  |  | +      this.$refs[formName].validate(valid => {
 | 
	
		
			
				|  |  |          if (valid) {
 | 
	
		
			
				|  |  | -          let moneyForm = this.moneyForm
 | 
	
		
			
				|  |  | -          let dataInfo = this.dataInfo
 | 
	
		
			
				|  |  | +          let moneyForm = this.moneyForm;
 | 
	
		
			
				|  |  | +          let dataInfo = this.dataInfo;
 | 
	
		
			
				|  |  |            let courseBalance = 0,
 | 
	
		
			
				|  |  | -              balance = 0
 | 
	
		
			
				|  |  | -          if(moneyForm.titleType == 'account') { // 课程余额
 | 
	
		
			
				|  |  | -            if(moneyForm.type == 1) {
 | 
	
		
			
				|  |  | -              courseBalance = Number((Number(moneyForm.money) + Number(dataInfo.courseBalance)).toFixed(2))
 | 
	
		
			
				|  |  | -            } else if(moneyForm.type == 2) {
 | 
	
		
			
				|  |  | -              if(dataInfo.courseBalance - moneyForm.money  < 0) {
 | 
	
		
			
				|  |  | -                this.$message.error('扣除金额不能大于' + dataInfo.courseBalance)
 | 
	
		
			
				|  |  | -                return
 | 
	
		
			
				|  |  | +            balance = 0;
 | 
	
		
			
				|  |  | +          if (moneyForm.titleType == "account") {
 | 
	
		
			
				|  |  | +            // 课程余额
 | 
	
		
			
				|  |  | +            if (moneyForm.type == 1) {
 | 
	
		
			
				|  |  | +              courseBalance = Number(
 | 
	
		
			
				|  |  | +                (
 | 
	
		
			
				|  |  | +                  Number(moneyForm.money) + Number(dataInfo.courseBalance)
 | 
	
		
			
				|  |  | +                ).toFixed(2)
 | 
	
		
			
				|  |  | +              );
 | 
	
		
			
				|  |  | +            } else if (moneyForm.type == 2) {
 | 
	
		
			
				|  |  | +              if (dataInfo.courseBalance - moneyForm.money < 0) {
 | 
	
		
			
				|  |  | +                this.$message.error(
 | 
	
		
			
				|  |  | +                  "扣除金额不能大于" + dataInfo.courseBalance
 | 
	
		
			
				|  |  | +                );
 | 
	
		
			
				|  |  | +                return;
 | 
	
		
			
				|  |  |                } else {
 | 
	
		
			
				|  |  | -                courseBalance = Number(Number(dataInfo.courseBalance) - (Number(moneyForm.money)).toFixed(2))
 | 
	
		
			
				|  |  | +                courseBalance = Number(
 | 
	
		
			
				|  |  | +                  Number(dataInfo.courseBalance) -
 | 
	
		
			
				|  |  | +                    Number(moneyForm.money).toFixed(2)
 | 
	
		
			
				|  |  | +                );
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              updateCourseBalance({
 | 
	
	
		
			
				|  | @@ -368,24 +440,25 @@ export default {
 | 
	
		
			
				|  |  |                decimal: courseBalance,
 | 
	
		
			
				|  |  |                memo: moneyForm.remark
 | 
	
		
			
				|  |  |              }).then(res => {
 | 
	
		
			
				|  |  | -              let result = res.data
 | 
	
		
			
				|  |  | +              let result = res.data;
 | 
	
		
			
				|  |  |                if (res.code == 200) {
 | 
	
		
			
				|  |  | -                this.$message.success('保存成功')
 | 
	
		
			
				|  |  | -                this.__init()
 | 
	
		
			
				|  |  | -                this.moneyVisible = false
 | 
	
		
			
				|  |  | +                this.$message.success("保存成功");
 | 
	
		
			
				|  |  | +                this.__init();
 | 
	
		
			
				|  |  | +                this.moneyVisible = false;
 | 
	
		
			
				|  |  |                } else {
 | 
	
		
			
				|  |  | -                this.$message.error(res.msg)
 | 
	
		
			
				|  |  | +                this.$message.error(res.msg);
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -          } else if(moneyForm.titleType == 'recharge') { // 账户余额
 | 
	
		
			
				|  |  | -            if(moneyForm.type == 1) {
 | 
	
		
			
				|  |  | -              balance = moneyForm.money
 | 
	
		
			
				|  |  | -            } else if(moneyForm.type == 2) {
 | 
	
		
			
				|  |  | -              if(dataInfo.balance - moneyForm.money  < 0) {
 | 
	
		
			
				|  |  | -                this.$message.error('扣除金额不能大于' + dataInfo.balance)
 | 
	
		
			
				|  |  | -                return
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +          } else if (moneyForm.titleType == "recharge") {
 | 
	
		
			
				|  |  | +            // 账户余额
 | 
	
		
			
				|  |  | +            if (moneyForm.type == 1) {
 | 
	
		
			
				|  |  | +              balance = moneyForm.money;
 | 
	
		
			
				|  |  | +            } else if (moneyForm.type == 2) {
 | 
	
		
			
				|  |  | +              if (dataInfo.balance - moneyForm.money < 0) {
 | 
	
		
			
				|  |  | +                this.$message.error("扣除金额不能大于" + dataInfo.balance);
 | 
	
		
			
				|  |  | +                return;
 | 
	
		
			
				|  |  |                } else {
 | 
	
		
			
				|  |  | -                balance = -moneyForm.money
 | 
	
		
			
				|  |  | +                balance = -moneyForm.money;
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              // console.log(balance)
 | 
	
	
		
			
				|  | @@ -395,107 +468,114 @@ export default {
 | 
	
		
			
				|  |  |                decimal: balance,
 | 
	
		
			
				|  |  |                memo: moneyForm.remark
 | 
	
		
			
				|  |  |              }).then(res => {
 | 
	
		
			
				|  |  | -              let result = res.data
 | 
	
		
			
				|  |  | +              let result = res.data;
 | 
	
		
			
				|  |  |                if (res.code == 200) {
 | 
	
		
			
				|  |  | -                this.$message.success('保存成功')
 | 
	
		
			
				|  |  | -                this.__init()
 | 
	
		
			
				|  |  | -                this.moneyVisible = false
 | 
	
		
			
				|  |  | +                this.$message.success("保存成功");
 | 
	
		
			
				|  |  | +                this.__init();
 | 
	
		
			
				|  |  | +                this.moneyVisible = false;
 | 
	
		
			
				|  |  |                } else {
 | 
	
		
			
				|  |  | -                this.$message.error(res.msg)
 | 
	
		
			
				|  |  | +                this.$message.error(res.msg);
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  | -          return false
 | 
	
		
			
				|  |  | +          return false;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onUpdateCourse () {
 | 
	
		
			
				|  |  | +    onUpdateCourse() {
 | 
	
		
			
				|  |  |        if (!this.dataInfo.courseBalance) {
 | 
	
		
			
				|  |  | -        this.$message.error('请输入课程余额')
 | 
	
		
			
				|  |  | -        return
 | 
	
		
			
				|  |  | +        this.$message.error("请输入课程余额");
 | 
	
		
			
				|  |  | +        return;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      this.$confirm(`确定是否修改该学生课程余额?`, '提示', {
 | 
	
		
			
				|  |  | -        confirmButtonText: '确定',
 | 
	
		
			
				|  |  | -        cancelButtonText: '取消',
 | 
	
		
			
				|  |  | -        type: 'warning'
 | 
	
		
			
				|  |  | -      }).then(() => {
 | 
	
		
			
				|  |  | -        updateCourseBalance({
 | 
	
		
			
				|  |  | -          userId: this.searchForm.studentId,
 | 
	
		
			
				|  |  | -          decimal: this.dataInfo.courseBalance
 | 
	
		
			
				|  |  | -        }).then(res => {
 | 
	
		
			
				|  |  | -          let result = res.data
 | 
	
		
			
				|  |  | -          if (res.code == 200) {
 | 
	
		
			
				|  |  | -            this.$message.success('保存成功')
 | 
	
		
			
				|  |  | -            this.amountStatus = true
 | 
	
		
			
				|  |  | -            this.__init()
 | 
	
		
			
				|  |  | -          } else {
 | 
	
		
			
				|  |  | -            this.$message.error(res.msg)
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | -      }).catch(() => {
 | 
	
		
			
				|  |  | -        this.amountStatus = true
 | 
	
		
			
				|  |  | +      this.$confirm(`确定是否修改该学生课程余额?`, "提示", {
 | 
	
		
			
				|  |  | +        confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +        cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +        type: "warning"
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        .then(() => {
 | 
	
		
			
				|  |  | +          updateCourseBalance({
 | 
	
		
			
				|  |  | +            userId: this.searchForm.studentId,
 | 
	
		
			
				|  |  | +            decimal: this.dataInfo.courseBalance
 | 
	
		
			
				|  |  | +          }).then(res => {
 | 
	
		
			
				|  |  | +            let result = res.data;
 | 
	
		
			
				|  |  | +            if (res.code == 200) {
 | 
	
		
			
				|  |  | +              this.$message.success("保存成功");
 | 
	
		
			
				|  |  | +              this.amountStatus = true;
 | 
	
		
			
				|  |  | +              this.__init();
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +              this.$message.error(res.msg);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        .catch(() => {
 | 
	
		
			
				|  |  | +          this.amountStatus = true;
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    search () {
 | 
	
		
			
				|  |  | +    search() {
 | 
	
		
			
				|  |  |        this.pageInfo.page = 1;
 | 
	
		
			
				|  |  |        this.getList();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    getList () {
 | 
	
		
			
				|  |  | -      let params = this.searchForm
 | 
	
		
			
				|  |  | -      params.rows = this.pageInfo.limit
 | 
	
		
			
				|  |  | -      params.page = this.pageInfo.page
 | 
	
		
			
				|  |  | -      if (params.remark == '' || !params.remark) {
 | 
	
		
			
				|  |  | -        params.remark = null
 | 
	
		
			
				|  |  | +    getList() {
 | 
	
		
			
				|  |  | +      let params = this.searchForm;
 | 
	
		
			
				|  |  | +      params.rows = this.pageInfo.limit;
 | 
	
		
			
				|  |  | +      params.page = this.pageInfo.page;
 | 
	
		
			
				|  |  | +      if (params.remark == "" || !params.remark) {
 | 
	
		
			
				|  |  | +        params.remark = null;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        studentPaymentOrderList(params).then(res => {
 | 
	
		
			
				|  |  |          if (res.code == 200) {
 | 
	
		
			
				|  |  | -          this.tableList = res.data.rows
 | 
	
		
			
				|  |  | -          this.pageInfo.total = res.data.total
 | 
	
		
			
				|  |  | +          this.tableList = res.data.rows;
 | 
	
		
			
				|  |  | +          this.pageInfo.total = res.data.total;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    searchCourseDate (value) {
 | 
	
		
			
				|  |  | +    searchCourseDate(value) {
 | 
	
		
			
				|  |  |        if (value) {
 | 
	
		
			
				|  |  | -        this.searchForm.orderStartDate = value[0]
 | 
	
		
			
				|  |  | -        this.searchForm.orderEndDate = value[1]
 | 
	
		
			
				|  |  | +        this.searchForm.orderStartDate = value[0];
 | 
	
		
			
				|  |  | +        this.searchForm.orderEndDate = value[1];
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  | -        this.searchForm.orderStartDate = null
 | 
	
		
			
				|  |  | -        this.searchForm.orderEndDate = null
 | 
	
		
			
				|  |  | +        this.searchForm.orderStartDate = null;
 | 
	
		
			
				|  |  | +        this.searchForm.orderEndDate = null;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onReSet () { // 重置搜索
 | 
	
		
			
				|  |  | -      this.orderDate = null
 | 
	
		
			
				|  |  | +    onReSet() {
 | 
	
		
			
				|  |  | +      // 重置搜索
 | 
	
		
			
				|  |  | +      this.orderDate = null;
 | 
	
		
			
				|  |  |        this.searchForm = {
 | 
	
		
			
				|  |  |          studentId: this.$route.query.userId,
 | 
	
		
			
				|  |  |          orderStartDate: null,
 | 
	
		
			
				|  |  |          orderEndDate: null,
 | 
	
		
			
				|  |  |          paymentType: null,
 | 
	
		
			
				|  |  |          remark: null
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    submitRecharge(){
 | 
	
		
			
				|  |  | -      let money = parseFloat(this.dataInfo.courseBalance-this.rechargeForm.money).toFixed(2);
 | 
	
		
			
				|  |  | +    submitRecharge() {
 | 
	
		
			
				|  |  | +      let money = parseFloat(
 | 
	
		
			
				|  |  | +        this.dataInfo.courseBalance - this.rechargeForm.money
 | 
	
		
			
				|  |  | +      ).toFixed(2);
 | 
	
		
			
				|  |  |        // if(this.rechargeForm)
 | 
	
		
			
				|  |  | -      if(money<0){
 | 
	
		
			
				|  |  | -        this.$message.error('余额不足')
 | 
	
		
			
				|  |  | -        return
 | 
	
		
			
				|  |  | +      if (money < 0) {
 | 
	
		
			
				|  |  | +        this.$message.error("余额不足");
 | 
	
		
			
				|  |  | +        return;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      if(!this.rechargeForm.money){
 | 
	
		
			
				|  |  | -         this.$message.error('请输入金额')
 | 
	
		
			
				|  |  | -        return
 | 
	
		
			
				|  |  | +      if (!this.rechargeForm.money) {
 | 
	
		
			
				|  |  | +        this.$message.error("请输入金额");
 | 
	
		
			
				|  |  | +        return;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      transferCourseBalanceToBalance({userId:this.searchForm.studentId,money:this.rechargeForm.money}).then(res=>{
 | 
	
		
			
				|  |  | -        if(res.code == 200){
 | 
	
		
			
				|  |  | -          this.$message.success('充值成功')
 | 
	
		
			
				|  |  | +      transferCourseBalanceToBalance({
 | 
	
		
			
				|  |  | +        userId: this.searchForm.studentId,
 | 
	
		
			
				|  |  | +        money: this.rechargeForm.money
 | 
	
		
			
				|  |  | +      }).then(res => {
 | 
	
		
			
				|  |  | +        if (res.code == 200) {
 | 
	
		
			
				|  |  | +          this.$message.success("充值成功");
 | 
	
		
			
				|  |  |            this.rechargeVisible = false;
 | 
	
		
			
				|  |  |            this.__init();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  <style lang="scss" scoped>
 | 
	
		
			
				|  |  |  .headWrap .left .headItem {
 | 
	
	
		
			
				|  | @@ -506,6 +586,13 @@ export default {
 | 
	
		
			
				|  |  |      right: 20px;
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +/deep/.el-table .cell {
 | 
	
		
			
				|  |  | +  display: -webkit-box;
 | 
	
		
			
				|  |  | +  overflow: hidden;
 | 
	
		
			
				|  |  | +  text-overflow: ellipsis;
 | 
	
		
			
				|  |  | +  -webkit-line-clamp: 3;
 | 
	
		
			
				|  |  | +  -webkit-box-orient: vertical;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  // .studentOrder {
 | 
	
		
			
				|  |  |  // }
 |