|
@@ -117,37 +117,37 @@
|
|
|
<div
|
|
<div
|
|
|
class="flexcc"
|
|
class="flexcc"
|
|
|
style="padding-top: 20px;"
|
|
style="padding-top: 20px;"
|
|
|
- v-if="isApprove"
|
|
|
|
|
- v-show="form.creditActionStatus == 'Pending Approval'">
|
|
|
|
|
|
|
+ v-if="!isApprove">
|
|
|
<el-button
|
|
<el-button
|
|
|
- class="cancel-button button-reject"
|
|
|
|
|
- @click="onApprove('Rejected')"
|
|
|
|
|
- :disabled="loadingBtn">
|
|
|
|
|
- REJECT
|
|
|
|
|
|
|
+ class="cancel-button"
|
|
|
|
|
+ @click="hideDialog">
|
|
|
|
|
+ CANCEL
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
- type="accent"
|
|
|
|
|
- @click="onApprove('Approved')"
|
|
|
|
|
- :disabled="loadingBtn">
|
|
|
|
|
- APPROVE
|
|
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="onSubmit"
|
|
|
|
|
+ :loading="loadingBtn">
|
|
|
|
|
+ SUBMIT
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
class="flexcc"
|
|
class="flexcc"
|
|
|
style="padding-top: 20px;"
|
|
style="padding-top: 20px;"
|
|
|
- v-else>
|
|
|
|
|
|
|
+ v-else-if="form.creditActionStatus == 'Pending Approval' && form.permission">
|
|
|
<el-button
|
|
<el-button
|
|
|
- class="cancel-button"
|
|
|
|
|
- @click="hideDialog">
|
|
|
|
|
- CANCEL
|
|
|
|
|
|
|
+ class="cancel-button button-reject"
|
|
|
|
|
+ @click="onApprove('Rejected')"
|
|
|
|
|
+ :disabled="loadingBtn">
|
|
|
|
|
+ REJECT
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
- type="primary"
|
|
|
|
|
- @click="onSubmit"
|
|
|
|
|
- :loading="loadingBtn">
|
|
|
|
|
- SUBMIT
|
|
|
|
|
|
|
+ type="accent"
|
|
|
|
|
+ @click="onApprove('Approved')"
|
|
|
|
|
+ :disabled="loadingBtn">
|
|
|
|
|
+ APPROVE
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</template>
|
|
</template>
|
|
@@ -176,7 +176,8 @@ export default {
|
|
|
creditActionId: "",
|
|
creditActionId: "",
|
|
|
creditActionType: "",
|
|
creditActionType: "",
|
|
|
creditActionAmount: "",
|
|
creditActionAmount: "",
|
|
|
- creditActionRemarks: ""
|
|
|
|
|
|
|
+ creditActionRemarks: "",
|
|
|
|
|
+ permission: false
|
|
|
},
|
|
},
|
|
|
rules: {
|
|
rules: {
|
|
|
userPk: {
|
|
userPk: {
|
|
@@ -230,7 +231,10 @@ export default {
|
|
|
if (this.request) {
|
|
if (this.request) {
|
|
|
this.isApprove = true;
|
|
this.isApprove = true;
|
|
|
this.approve.creditActionId = this.request;
|
|
this.approve.creditActionId = this.request;
|
|
|
- this.getActionInfo();
|
|
|
|
|
|
|
+ this.loading = true;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.getActionInfo();
|
|
|
|
|
+ }, 300);
|
|
|
} else {
|
|
} else {
|
|
|
this.isApprove = false;
|
|
this.isApprove = false;
|
|
|
this.form = {
|
|
this.form = {
|
|
@@ -265,7 +269,7 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
this.options.user = []
|
|
this.options.user = []
|
|
|
}
|
|
}
|
|
|
- }).catch(() => {
|
|
|
|
|
|
|
+ }).catch(err => {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
message: err,
|
|
message: err,
|
|
|
type: 'error',
|
|
type: 'error',
|
|
@@ -283,14 +287,13 @@ export default {
|
|
|
}
|
|
}
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- message: error,
|
|
|
|
|
|
|
+ message: err,
|
|
|
type: 'error'
|
|
type: 'error'
|
|
|
})
|
|
})
|
|
|
this.options.action = []
|
|
this.options.action = []
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
getActionInfo() {
|
|
getActionInfo() {
|
|
|
- this.loading = true;
|
|
|
|
|
financial.viewCreditApply(this.approve.creditActionId).then(res => {
|
|
financial.viewCreditApply(this.approve.creditActionId).then(res => {
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
|
this.form = res.data;
|
|
this.form = res.data;
|
|
@@ -299,7 +302,7 @@ export default {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- message: error,
|
|
|
|
|
|
|
+ message: err,
|
|
|
type: 'error'
|
|
type: 'error'
|
|
|
})
|
|
})
|
|
|
this.loading = false;
|
|
this.loading = false;
|