d1b434bb by lxs Committed by lihua

数据资产登记更新

1 parent d5a6d35c
......@@ -612,7 +612,7 @@ const panelChange = (scope, row) => {
<el-form-item v-if="item.visible ?? true" :key="'form_item_' + index" :prop="item.field"
:validate-status="item.validateStatus ?? ''" :error="item.error" :class="[item.col, { is_block: item.block }]"
:style="item.style ?? {}">
<span class="item-label" slot="label">
<span class="item-label" :class="[item.labelClass]" slot="label">
<span :class="{
required_mark: item.required,
}">{{
......@@ -1119,7 +1119,8 @@ const panelChange = (scope, row) => {
<el-radio v-for="(radio, index) in item.options" :label="radio.value">
<template #default>
<span :style="{ 'line-height': '32px' }">{{ radio.label }}</span>
<span :style="{ display: 'inline-flex', width: (index == (item.inputOptions?.index ?? (item.options.length - 1)) && item.inputOptions) ? (item.inputOptions.width ?? '230px') : '0px' }">
<span
:style="{ display: 'inline-flex', width: (index == (item.inputOptions?.index ?? (item.options.length - 1)) && item.inputOptions) ? (item.inputOptions.width ?? '230px') : '0px' }">
<el-form-item
v-if="index == (item.inputOptions?.index ?? (item.options.length - 1)) && (item.inputOptions?.visible ?? false)"
:prop="item.inputOptions?.field" :class="[item.inputOptions?.col]">
......@@ -1140,7 +1141,7 @@ const panelChange = (scope, row) => {
type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
:placeholder="item.inputOptions?.placeholder"
:disabled-date="item.inputOptions?.disabledDate ?? ((time) => { return false; })" />
<el-input v-else-if="item.inputOptions?.type == 'input'"
<el-input v-else-if="item.inputOptions?.type == 'input'"
v-model.trim="formInline[item.inputOptions?.field]" :placeholder="item.inputOptions?.placeholder"
:disabled="item.inputOptions?.disabled || readonly" :clearable="item.inputOptions?.clearable"
:maxlength="item.inputOptions?.maxlength ?? ''" />
......@@ -1555,6 +1556,10 @@ const panelChange = (scope, row) => {
.item-label {
color: #666666;
&.hide {
opacity: 0;
}
}
>div {
......
......@@ -209,7 +209,7 @@ const getTenantDetail = () => {
});
}
const setBaseFormItemsValue = (info) => {
const setBaseFormItemsValue = (info: any) => {
let attach = info.registerAttachment || {};
baseFormItems.value.forEach(item => {
if (item.field == 'coverageArea') {
......@@ -331,19 +331,12 @@ const setPropertyFormItemsValue = (info) => {
propertyFormItems.value.forEach((item, index) => {
if (item.field == 'propertyType' || item.field == 'rightsContent') {
item.default = info[item.field] || [];
} else if (item.field == 'propertyTerm') {
item.default = info[item.field];
if (info['propertyTerm'] == 'Y') {
item.block = false;
propertyFormItems.value[index + 1].visible = true;
propertyFormItems.value[index + 2].visible = true;
} else {
item.block = true;
propertyFormItems.value[index + 1].visible = false;
propertyFormItems.value[index + 2].visible = false;
}
} else if (item.field == 'propertyTermDate') {
item.visible = info['propertyTerm'] == 'Y';
item.default = info.propertyTermSdate ? [info.propertyTermSdate, info.propertyTermEdate] : (info.field || []);
} else if (item.field == 'address' || item.field == 'socialCreditCode' || item.field == 'registrationDate' || item.field == 'businessLicenseStartDate' || item.field == 'businessLicenseEndDate') {//在会员详情处获取。
item.default = tenantDetail.value[item.field];
item.field == 'businessLicenseEndDate' && (item.col = info['propertyTerm'] == 'Y'?'no-margin-r':'');
} else if (item.field == 'businessLicenseJson') {
item.default = tenantDetail.value[item.field] ? JSON.parse(tenantDetail.value[item.field]) : [];
if (!item.default.length) {
......@@ -352,6 +345,9 @@ const setPropertyFormItemsValue = (info) => {
item.visible = true;
}
} else {
if(item.field == 'officeLocation' || item.field == 'unitNature'){
item.col = info['propertyTerm'] == 'Y'?'no-margin-r':''
}
item.default = info[item.field];
}
});
......@@ -1309,7 +1305,6 @@ const propertyFormItems: any = ref([
type: "radio-group",
placeholder: "",
field: "isPledged",
col: 'mr8',
default: 'N',
options: [
{
......@@ -1355,7 +1350,6 @@ const propertyFormItems: any = ref([
placeholder: "",
field: "isLimitations",
default: 'N',
col: 'no-margin-r',
options: [
{
label: "有限制",
......@@ -1370,54 +1364,45 @@ const propertyFormItems: any = ref([
},
{
label: "产权期限",
type: "radio-group",
placeholder: "",
type: "select",
placeholder: "请选择",
field: "propertyTerm",
default: 'N',
col: 'mr8',
block: true,
default: "N",
options: [
{
label: "",
value: 'Y',
label: "",
value: "Y",
},
{
label: "",
value: 'N',
}
label: "",
value: "N",
},
],
required: true,
style: {
width: '100px'
}
},
{
label: '产权期限开始日期',
type: 'date',
placeholder: '请输入',
field: 'propertyTermSdate',
default: "",
unlink: true,
clearable: true,
required: true,
visible: false,
},
{
label: '产权期限结束日期',
type: 'date',
placeholder: '请输入',
field: 'propertyTermEdate',
default: "",
unlink: true,
label: "期限范围",
type: "date-picker",
field: "propertyTermDate",
default: [],
placeholder: "请选择开始/结束日期",
labelClass: 'hide',
clearable: true,
required: true,
visible: false,
col: 'no-margin-r',
style: {
'margin-right': '0px'
width: 'calc(33.33% - 116px)',
'margin-left': '8px'
}
},
{
label: '公司名称',
type: 'input',
placeholder: '请输入',
col: 'mr8',
field: 'tenantName',
maxlength: 50,
default: userData.tenantName ?? "",
......@@ -1427,10 +1412,10 @@ const propertyFormItems: any = ref([
{
label: '单位注册地址',
type: 'input',
col: 'mr8',
placeholder: '请输入',
field: 'address',
default: tenantDetail.value.address ?? "",
col: 'mr8',
disabled: true,
required: false
},
......@@ -1440,7 +1425,6 @@ const propertyFormItems: any = ref([
placeholder: "请选择",
field: "officeLocation",
default: [],
col: 'no-margin-r',
showAllLevels: true,
props: {
label: 'name',
......@@ -1460,7 +1444,6 @@ const propertyFormItems: any = ref([
type: 'input',
placeholder: '请输入',
field: 'socialCreditCode',
col: 'mr8',
disabled: true,
default: tenantDetail.value.socialCreditCode ?? "",
required: false
......@@ -1471,7 +1454,7 @@ const propertyFormItems: any = ref([
placeholder: "",
field: "isDishonesty",
default: 'N',
// col: 'mr8',
col: 'mr8',
options: [
{
label: "是",
......@@ -1490,7 +1473,6 @@ const propertyFormItems: any = ref([
placeholder: '请选择',
field: 'unitNature',
default: 1,
col: 'no-margin-r',
options: [
{
label: '国企',
......@@ -1508,7 +1490,6 @@ const propertyFormItems: any = ref([
label: "注册日期",
type: "date",
field: "registrationDate",
col: 'mr8',
default: tenantDetail.value.registrationDate ?? "",
placeholder: "请选择",
clearable: true,
......@@ -1520,8 +1501,8 @@ const propertyFormItems: any = ref([
type: 'date',
placeholder: '请输入',
field: 'businessLicenseStartDate',
col: 'mr8',
default: tenantDetail.value.businessLicenseStartDate ?? "",
col: 'mr8',
unlink: true,
disabled: true,
clearable: true,
......@@ -1534,7 +1515,6 @@ const propertyFormItems: any = ref([
field: 'businessLicenseEndDate',
default: tenantDetail.value.businessLicenseEndDate ?? "",
unlink: true,
col: 'no-margin-r',
disabled: true,
clearable: true,
required: false
......@@ -1558,11 +1538,8 @@ const propertyFormRules = ref({
rightsContent: [
{ type: 'array', required: true, trigger: 'change', message: "请填写权利内容" }
],
propertyTermSdate: [
{ required: true, trigger: 'change', message: "请填写产权期限开始时间" }
],
propertyTermEdate: [
{ required: true, trigger: 'change', message: "请填写产权期限结束时间" }
propertyTermDate: [
{ required: true, trigger: 'change', message: "请选择产权期限日期" }
],
officeLocation: [
{ type: 'array', required: true, trigger: 'change', message: "请填写办公所在地" }
......@@ -1570,8 +1547,8 @@ const propertyFormRules = ref({
});
/** 权利信息表单 */
const propertySelectChange = (val, item) => {
console.log(item.field);
const propertySelectChange = (val, item, row) => {
setPropertyFormItemsValue(row);
}
const propertyRadioGroupChange = (val, row, item) => {
......@@ -1724,8 +1701,12 @@ const saveDraft = () => {
params.updateFrequency = [baseFormInline.updateFrequency];
let propertyFormLine = porpertyInfoFormRef.value.formInline;
Object.assign(params, propertyFormLine);
propertyFormLine.propertyTerm == 'Y' && (params.propertyTermSdate = propertyFormLine.propertyTermDate[0], params.propertyTermEdate = propertyFormLine.propertyTermDate[1]);
delete params.qualityEvaluationInstitutionGuid;
delete params.costAssessmentInstitutionGuid;
delete params.rules;
delete params.cost;
delete params.trem;
let uploadFormInline = uploadFormRef.value.formInline;
let registerAttachment: any = {
......@@ -1837,8 +1818,12 @@ const save = () => {
params.updateFrequency = [baseFormInline.updateFrequency];
let propertyFormLine = porpertyInfoFormRef.value.formInline;
Object.assign(params, propertyFormLine);
propertyFormLine.propertyTerm == 'Y' && (params.propertyTermSdate = propertyFormLine.propertyTermDate[0], params.propertyTermEdate = propertyFormLine.propertyTermDate[1]);
delete params.qualityEvaluationInstitutionGuid;
delete params.costAssessmentInstitutionGuid;
delete params.rules;
delete params.cost;
delete params.trem;
let uploadFormInline = uploadFormRef.value.formInline;
let registerAttachment: any = {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!