| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- <template>
- <div class="card-container">
- <div class="card-content">
- <el-form
- :model="creditLimitInfo"
- v-loading="loading"
- ref="creditLimitInfo"
- label-position="right"
- label-width="180px">
- <div class="section-title">Monthly Credit Limit:</div>
- <el-row :gutter="20">
- <el-col :xs="24" :md="12">
- <el-form-item label="Fleet Company:">
- <el-input
- class="add-text"
- v-model="creditLimit.fleetCompany"
- readonly/>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :md="12">
- <el-form-item label="Status:">
- <el-input
- class="add-text"
- v-model="creditLimit.creditLimitStatus"
- readonly/>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :xs="24" :md="12">
- <el-form-item label="Monthly Credit Limit:">
- <span class="item-unit">(S$)</span>
- <el-input
- class="add-text"
- v-model="creditLimitInfo.creditLimitAmount"
- readonly/>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :md="12">
- <el-form-item label="Effective Start Date:">
- <el-input
- class="add-text"
- v-model="creditLimitInfo.effectiveStartDate"
- readonly/>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :xs="24" :md="12">
- <el-form-item label="Used Credit Limit:">
- <span class="item-unit">(S$)</span>
- <el-input
- class="add-text"
- v-model="creditLimitInfo.usedCreditLimitAmount"
- readonly/>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :md="12">
- <el-form-item label="Effective End Date:">
- <el-input
- class="add-text"
- v-model="creditLimitInfo.effectiveEndDate"
- readonly/>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :xs="24" :md="12">
- <el-form-item
- label="Remaining Credit Limit:"
- prop="chargeBoxId">
- <span class="item-unit">(S$)</span>
- <el-input
- class="add-text"
- v-model="creditLimitInfo.creditLimitRemainingAmount"
- readonly/>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :md="12">
- <el-form-item
- label="Deposit Received:"
- prop="depositReceivedAmount">
- <span class="item-unit">(S$)</span>
- <el-input
- class="add-text"
- v-model="creditLimitInfo.depositReceivedAmount"
- readonly/>
- </el-form-item>
- </el-col>
- </el-row>
- <div class="hr-full"/>
- <div class="buttons">
- <el-button
- type="primary"
- class="cancel-button"
- @click="handleClickCancleButton">
- Back
- </el-button>
- </div>
- </el-form>
- </div>
- </div>
- </template>
- <script>
- import { mapState } from 'vuex'
- import limit from '../../http/api/limit.js'
- import { fetchFleetCompanyPages } from '../../http/api/fleetCompany';
- export default {
- data() {
- return {
- loading: false,
- creditLimitInfo: {
- creditLimitId: 0,
- fleetCompanyId: '',
- creditLimitAmount: '',
- depositReceivedAmount: '',
- effectiveStartDate: "",
- effectiveEndDate: "",
- creditLimitStatus: ""
- }
- }
- },
- computed: {
- ...mapState('provider', ['creditLimit'])
- },
- created() {
- this.loading = true;
- this.getLimitInfo();
- },
- methods: {
- getLimitInfo() {
- var id = this.creditLimit.creditLimitId;
- if (!id) id = this.$route.params.id;
- limit.viewCreditLimit(id).then(res => {
- this.loading = false;
- if (res.data) {
- this.creditLimitInfo = res.data
- }
- }).catch(err => {
- this.loading = false;
- this.$message({
- message: err,
- type: 'error'
- })
- });
- },
- handleClickCancleButton() {
- this.$router.go(-1)
- }
- }
- }
- </script>
- <style scoped="scoped" lang='scss'>
- @import '../../styles/variables.scss';
-
- .card-container {
- width: 100%;
- padding: 20px 60px;
- min-height: $mainAppMinHeight;
- background-color: #F0F5FC;
- }
- .card-content {
- padding: 15px 80px;
- border-radius: 6px;
- background-color: white;
- }
- .section-title {
- color: #333;
- margin-top: 20px;
- margin-bottom: 30px;
- font-size: 16px;
- user-select: none;
- line-height: 24px;
- font-weight: 500;
- font-family: sans-serif;
- text-transform: uppercase;
- }
- .add-text {
- width: 100%;
- max-width: 300px;
- }
- .add-text ::v-deep .el-textarea__inner {
- font-family: sans-serif;
- }
- .hr {
- height: 2px;
- margin: 10px -40px;
- background-color: #F0F5FC;
- }
- .hr-full {
- height: 2px;
- margin: 20px -80px;
- background-color: #F0F5FC;
- }
- .rate-list-view {
- display: flex;
- align-items: center;
- }
- .rate-text {
- max-width: 150px;
- padding-right: 14px;
- }
- .list-item-icon {
- width: 30px;
- height: 30px;
- cursor: pointer;
- margin: 0 10px 22px;
- }
- .buttons {
- padding-top: 15px;
- padding-bottom: 30px;
- }
- @media screen and (max-width: 500px) {
- .card-container {
- padding: 0px;
- }
- .card-content {
- padding: 15px 30px;
- }
- }
- .item-unit {
- top: 12px;
- left: -40px;
- font-size: 12px;
- user-select: none;
- position: absolute;
- }
- </style>
|