<!-- 委外例外处理 -->
|
<template>
|
<div>
|
<div class="header-block">
|
<p class="section-title">委外例外处理</p>
|
</div>
|
<div class="form-content">
|
<div v-loading="loading">
|
</div>
|
<el-form
|
:inline="true"
|
:label-width="'180px'"
|
size="small"
|
:model="formValues"
|
:rules="rules"
|
:class="`form-cols-3`"
|
:disabled="!canEdit"
|
>
|
<el-form-item
|
v-for="(item, index) in computedFormList"
|
:prop="item.name"
|
:key="index"
|
:label="item.label"
|
:class="[
|
{
|
'textarea-item': item.type === 'textarea' || item.isLong,
|
},
|
{ 'textarea-grid': item.multiRow },
|
]"
|
>
|
<CommInput
|
:info="item"
|
@updateValue="updateValue"
|
:showList="computedFormList"
|
></CommInput>
|
</el-form-item>
|
</el-form>
|
</div>
|
</div>
|
</template>
|
<script>
|
import CommInput from "../CommInput.vue";
|
import {
|
overdueUpdateLoanEntrustFlag,
|
overdueQueryEntrustFlag,
|
} from "@comprehensive/serve/public";
|
export default {
|
props: {
|
// 申请编号
|
serialNo: {
|
type: String,
|
// required: true,
|
},
|
canEdit: {
|
type: Boolean,
|
},
|
caseId: {
|
type: String,
|
},
|
promissNoteNo: {
|
type: String,
|
},
|
},
|
components: {
|
CommInput,
|
},
|
computed: {},
|
data() {
|
return {
|
formValues: {},
|
computedFormList: [
|
{
|
type: "select",
|
label: "暂不委外标识",
|
value: "0",
|
name: "entrustFlag",
|
options: [
|
{ label: "是", value: "0" },
|
{ label: "否", value: "1" },
|
],
|
},
|
],
|
rules: {},
|
loading: false,
|
};
|
},
|
created() {
|
this.init();
|
},
|
mounted() {},
|
beforeDestroy() {},
|
methods: {
|
init() {
|
this.requestOverdueQueryEntrustFlag();
|
},
|
async requestOverdueQueryEntrustFlag() {
|
const { promissNoteNo } = this;
|
if (promissNoteNo) {
|
const resp = await overdueQueryEntrustFlag({ loanId: promissNoteNo });
|
if (resp.code == "00") {
|
const { computedFormList, formValues } = this;
|
computedFormList.map((item) => {
|
if (item.name == "entrustFlag") {
|
item.value = resp.result;
|
formValues[item.name] = resp.result;
|
}
|
});
|
}
|
}
|
},
|
async requestOverdueUpdateLoanEntrustFlag() {
|
const { computedFormList, formValues, promissNoteNo } = this;
|
if (promissNoteNo) {
|
const resp = await overdueUpdateLoanEntrustFlag({
|
loanId: promissNoteNo,
|
entrustFlag: formValues.entrustFlag,
|
});
|
if (resp.code == "00") {
|
this.$message.success("暂不委外标识设置成功");
|
this.loading = false;
|
}
|
}
|
},
|
updateValue(index, info) {
|
const { computedFormList, formValues } = this;
|
computedFormList.map((item) => {
|
if (item.name == info.name) {
|
item.value = index;
|
formValues[item.name] = index;
|
}
|
});
|
this.loading = true;
|
this.requestOverdueUpdateLoanEntrustFlag()
|
.then(() => {
|
this.loading = false;
|
})
|
.catch(() => {
|
this.loading = false;
|
this.$message.error("操作失败");
|
});
|
},
|
},
|
watch: {
|
promissNoteNo: {
|
handler(newVal) {
|
this.requestOverdueQueryEntrustFlag();
|
},
|
},
|
},
|
};
|
</script>
|
<style lang="postcss" scoped>
|
.form-section {
|
display: flex;
|
align-items: baseline;
|
& .search {
|
margin: 10px 0 0 50px;
|
padding: 0;
|
}
|
}
|
.header-block {
|
margin-bottom: 25px;
|
& .section-title {
|
margin: 30px 0 20px 0;
|
padding: 0 0 0 10px;
|
border-left: solid 2px #0081f0;
|
line-height: 16px;
|
font-size: 14px;
|
color: #222222;
|
}
|
}
|
.form-content {
|
& >>> .el-form {
|
display: grid;
|
padding-bottom: 6px;
|
& .el-form-item {
|
display: flex;
|
align-items: center;
|
padding-right: 40px;
|
margin: 0 0 24px 0;
|
& label {
|
padding: 0;
|
text-align: right;
|
margin-right: 10px;
|
line-height: 16px;
|
}
|
& .el-form-item__content {
|
flex: 1;
|
margin: 0;
|
}
|
&.right-item {
|
justify-content: right;
|
grid-column-start: 3;
|
grid-column-end: 4;
|
}
|
& .el-date-editor {
|
width: 100%;
|
}
|
& .el-input--small {
|
font-size: 14px;
|
}
|
& .el-select {
|
width: 100%;
|
}
|
}
|
& .form-sign {
|
& label::after {
|
content: ":";
|
}
|
}
|
}
|
|
& >>> .el-tag--info {
|
max-width: 94%;
|
overflow: hidden;
|
}
|
& >>> .el-select__tags-text {
|
display: inline-block;
|
max-width: 110px;
|
overflow: hidden;
|
white-space: nowrap;
|
text-overflow: ellipsis;
|
}
|
& .from-buttons {
|
/* padding-left: 82px; */
|
display: flex;
|
justify-content: flex-end;
|
& p {
|
margin: 0;
|
padding: 0;
|
}
|
& >>> .el-button {
|
height: 32px;
|
font-size: 12px;
|
margin-left: 12px;
|
}
|
& .normal-button {
|
height: 32px;
|
font-size: 14px;
|
margin-left: 22px;
|
}
|
& .el-button--primary {
|
background-color: #0081f0;
|
border-color: #0081f0;
|
}
|
}
|
& >>> .el-tag__close {
|
top: -5px;
|
right: -6px;
|
}
|
& >>> .el-form-item__label {
|
color: #888888;
|
}
|
& >>> .el-input__inner {
|
border-color: #eeeeee;
|
color: #222222;
|
}
|
|
& .is-error >>> .el-input__inner {
|
border-color: #f56c6c;
|
}
|
|
& .long-lable >>> .el-form-item__label {
|
line-height: 1.3em;
|
padding-top: 0;
|
}
|
& .textarea {
|
width: 100%;
|
& >>> textarea {
|
height: 100%;
|
}
|
}
|
& .range-separato {
|
width: 10px;
|
display: inline-block;
|
text-align: center;
|
}
|
& .range-input-item {
|
display: inline-block;
|
}
|
|
& .form-cols-1 {
|
grid-template-columns: 1fr;
|
& .textarea-item {
|
grid-column-start: 1;
|
grid-column-end: 1;
|
}
|
& .form-right {
|
grid-column-start: 1;
|
grid-column-end: 1;
|
}
|
}
|
|
& .form-cols-2 {
|
grid-template-columns: repeat(2, 1fr);
|
& .textarea-item {
|
grid-column-start: 1;
|
grid-column-end: 3;
|
}
|
& .form-right {
|
grid-column-start: 2;
|
grid-column-end: 3;
|
}
|
}
|
& .form-cols-3 {
|
grid-template-columns: repeat(3, 1fr);
|
& .textarea-item {
|
grid-column-start: 1;
|
grid-column-end: 4;
|
}
|
& .form-right {
|
grid-column-start: 3;
|
grid-column-end: 4;
|
}
|
}
|
|
& .form-cols-4,
|
& .form-cols-5 {
|
grid-template-columns: repeat(4, 1fr);
|
|
& .textarea-item {
|
grid-column-start: 1;
|
grid-column-end: 5;
|
}
|
& .form-right {
|
grid-column-start: 4;
|
grid-column-end: 5;
|
}
|
& .textarea-grid {
|
grid-column-start: 1;
|
grid-column-end: 1;
|
grid-row-end: span 3;
|
align-self: start;
|
&:nth-child(2) {
|
grid-column-start: 2;
|
grid-column-end: 2;
|
}
|
}
|
& .textarea-grid {
|
& >>> .el-textarea__inner {
|
height: 88px;
|
}
|
}
|
& .textarea-grid1 {
|
& >>> .el-textarea__inner {
|
height: 88px;
|
}
|
}
|
}
|
& .form-cols-5 {
|
grid-template-columns: repeat(5, 1fr);
|
& .form-right {
|
grid-column-start: 5;
|
}
|
|
& >>> .el-range-editor {
|
width: 215px !important;
|
}
|
}
|
}
|
</style>
|