/* * @Author: Pengjiantian * @Date: 2020-02-28 14:50:28 * @Last Modified by: Pengjiantian * @Last Modified time: 2020-03-04 16:31:13 */ /** * 管控额度修改查询 */ import ApiModel from "@/utils/core/apiModel"; // 基本表单信息 const formList = [ { type: "input", label: "额度流水号", value: "", name: "controlSerialNo", attrs: ["readonly"] }, { type: "input", label: "额度对象类型", value: "", name: "quotaObjectTypeDesc", attrs: ["readonly"] }, { type: "input", label: "额度对象编号", value: "", name: "quotaObjectName", attrs: ["readonly"] }, { type: "input", label: "额度对象名称", value: "", name: "quotaProjectName", attrs: ["readonly"] }, { type: "input", label: "额度类型", value: "", name: "quotaControlTypeDesc", attrs: ["readonly"] }, { type: "input", label: "产品", value: "", name: "productName", attrs: ["readonly"] }, { type: "input", label: "城市", value: "", name: "city", name: "cityDesc", attrs: ["readonly"] }, { type: "input", label: "子公司", value: "", name: "subCompany", attrs: ["readonly"] } // { // type: "input", // label: "修改前额度状态", // value: "", // name: "beforeStatusDesc", // attrs: ["readonly"] // }, // { // type: "select", // label: "修改后额度状态", // value: "", // options: [], // name: "updateStatus", // attrs: ["filterable", "clearable", "collapse-tags"], // rules: [{ required: true }] // } ]; // 基础额度 const creditFrom = [ { type: "textarea", label: "修改原因", value: "", name: "modifReasom", rules: [{ required: true }] }, { type: "input", label: "修改前额度状态", value: "", name: "beforeStatusDesc", attrs: ["readonly"] }, { type: "select", label: "修改后额度状态", value: "", options: [], name: "updateStatus", attrs: ["filterable", "clearable", "collapse-tags"], rules: [{ required: true }] }, { type: "input", label: "修改前授信额度", value: "", name: "beforeModifAmt", attrs: ["readonly"], isMoney: true }, { type: "input", label: "修改后授信额度", value: "", name: "updateModifAmt", rules: [{ required: true }], isMoney: true } ]; // 产品额度 const baseFrom = [ { type: "input", label: "额度状态", value: "", name: "beforeStatusDesc", attrs: ["readonly"] }, { type: "textarea", label: "修改原因", value: "", name: "modifReasom", rules: [{ required: true }] }, { type: "input", label: "修改前基础额度杠杆倍数", value: "", name: "beforeLeverMultiple", attrs: ["readonly"] }, { type: "input", label: "修改后基础额度杠杆倍数", value: "", name: "updateLeverMultiple", rules: [{ required: true }] } ]; // 审核阶段 const approveList = [ { type: "select", label: "审批结果", value: "", name: "approveCode", options: [], attrs: ["filterable", "clearable", "collapse-tags"], rules: [{ required: true }] }, { type: "textarea", label: "审批意见", value: "", name: "approveOpinion" // rules: [{required: true}] } ]; // 产品额度 审核 const approveFormList01 = [ { type: "input", label: "额度流水号", value: "", name: "controlSerialNo", attrs: ["readonly"] }, { type: "input", label: "额度对象类型", value: "", name: "quotaObjectTypeDesc", attrs: ["readonly"] }, { type: "input", label: "额度对象编号", value: "", name: "quotaObjectName", attrs: ["readonly"] }, { type: "input", label: "额度对象名称", value: "", name: "quotaProjectName", attrs: ["readonly"] }, { type: "input", label: "额度类型", value: "", name: "quotaControlTypeDesc", attrs: ["readonly"] }, { type: "input", label: "产品", value: "", name: "productName", attrs: ["readonly"] }, { type: "input", label: "城市", value: "", name: "city", name: "cityDesc", attrs: ["readonly"] }, { type: "input", label: "子公司", value: "", name: "subCompany", attrs: ["readonly"] }, { type: "input", label: "额度状态", value: "", name: "beforeStatusDesc", attrs: ["readonly"] }, { type: "textarea", label: "修改原因", value: "", attrs: ["readonly"], name: "modifReasom" }, // { // type: "input", // label: "修改后额度状态", // value: "", // attrs: ["readonly"], // name: "updateStatusDesc" // }, { type: "input", label: "修改前基础额度杠杆倍数", value: "", name: "beforeLeverMultiple", attrs: ["readonly"] }, { type: "input", label: "修改后基础额度杠杆倍数", value: "", name: "updateLeverMultiple", attrs: ["readonly"] } ]; // 基础额度 审核 const approveFormList00 = [ { type: "input", label: "额度流水号", value: "", name: "controlSerialNo", attrs: ["readonly"] }, { type: "input", label: "额度对象类型", value: "", name: "quotaObjectTypeDesc", attrs: ["readonly"] }, { type: "input", label: "额度对象编号", value: "", name: "quotaObjectName", attrs: ["readonly"] }, { type: "input", label: "额度对象名称", value: "", name: "quotaProjectName", attrs: ["readonly"] }, { type: "input", label: "额度类型", value: "", name: "quotaControlTypeDesc", attrs: ["readonly"] }, { type: "input", label: "产品", value: "", name: "productName", attrs: ["readonly"] }, { type: "input", label: "城市", value: "", name: "city", name: "cityDesc", attrs: ["readonly"] }, { type: "input", label: "子公司", value: "", name: "subCompany", attrs: ["readonly"] }, { type: "textarea", label: "修改原因", value: "", name: "modifReasom", attrs: ["readonly"] }, { type: "input", label: "修改前额度状态", value: "", name: "beforeStatusDesc", attrs: ["readonly"] }, { type: "input", label: "修改后额度状态", value: "", name: "updateStatusDesc", attrs: ["readonly"] }, { type: "input", label: "修改前授信额度", value: "", name: "beforeModifAmt", attrs: ["readonly"], isMoney: true }, { type: "input", label: "修改后授信额度", value: "", name: "updateModifAmt", attrs: ["readonly"], isMoney: true } ]; export default (options = {}) => { const { quotaControlType, approve = false } = options; // console.log(quotaControlType, "---", approve); // quotaControlType 01 产品额度 00 基础额度 let tempList = null; if (quotaControlType === "01") { // 产品额度非审核 tempList = [...formList, ...baseFrom]; if (approve) { // 产品额度审核 tempList = [...approveFormList01, ...approveList]; } } if (quotaControlType === "00") { // 基础额度非审核 tempList = [...formList, ...creditFrom]; if (approve) { // 基础额度审核 tempList = [...approveFormList00, ...approveList]; } } // 接口地址,required const api = "server/quotaControlRecordInfo"; return new ApiModel({ api, formList: tempList, request(params) { return this.post(params); } }); };