1、调整版本发布日志功能

2、调整机构加盟信息功能
This commit is contained in:
1378012178@qq.com 2025-07-09 15:50:10 +08:00
parent c43aeb3da3
commit e6dca66625
12 changed files with 1051 additions and 538 deletions

2
.env
View File

@ -1,5 +1,5 @@
# port
VITE_PORT = 3100
VITE_PORT = 3101
# 网站标题
VITE_GLOB_APP_TITLE = 护理单元管理平台

View File

@ -6,16 +6,16 @@ import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '创建日期',
title: '发版日期',
align: "center",
dataIndex: 'createTime',
width: 180,
width: 240,
},
{
title: '发版类型',
align: "center",
dataIndex: 'issueType_dictText',
width: 180,
width: 240,
},
{
title: '发版内容',

View File

@ -1,10 +1,42 @@
<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="createTime">
<template #label><span title="发版日期">发版日期</span></template>
<a-range-picker value-format="YYYY-MM-DD" v-model:value="queryParam.createTime"
class="query-group-cust" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="issueType">
<template #label><span title="发版类型">发版类型</span></template>
<j-select-multiple placeholder="请选择发版类型" v-model:value="queryParam.issueType" dictCode="issue_type"
allow-clear />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" v-auth="'IssueInfo:nu_issue_info:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<!-- <a-button type="primary" v-auth="'IssueInfo:nu_issue_info:add'" @click="handleAdd"
preIcon="ant-design:plus-outlined"> 新增</a-button> -->
</template>
<!--操作栏-->
<template #action="{ record }">
@ -42,6 +74,8 @@
import NuIssueInfoModal from './components/IssueInfoModal.vue'
import IssueInfoDetailModal from './components/IssueInfoDetailModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import { cloneDeep } from "lodash-es";
const formRef = ref();
const queryParam = reactive<any>({});
@ -63,7 +97,8 @@
fixed: 'right',
},
beforeFetch: async (params) => {
return Object.assign(params, queryParam);
let rangerQuery = await setRangeQuery();
return Object.assign(params, rangerQuery);
},
},
exportConfig: {
@ -151,23 +186,24 @@
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'IssueInfo:nu_issue_info:edit'
},
// {
// label: '',
// onClick: handleEdit.bind(null, record),
// auth: 'IssueInfo:nu_issue_info:edit'
// },
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
auth: 'IssueInfo:nu_issue_info:delete'
}
// {
// label: '',
// popConfirm: {
// title: '',
// confirm: handleDelete.bind(null, record),
// placement: 'topLeft',
// },
// auth: 'IssueInfo:nu_issue_info:delete'
// }
];
}
@ -198,40 +234,69 @@
}
let rangeField = 'createTime,'
/**
* 设置范围查询条件
*/
async function setRangeQuery() {
let queryParamClone = cloneDeep(queryParam);
if (rangeField) {
let fieldsValue = rangeField.split(',');
fieldsValue.forEach(item => {
if (queryParamClone[item]) {
let range = queryParamClone[item];
queryParamClone[item + '_begin'] = range[0];
queryParamClone[item + '_end'] = range[1];
delete queryParamClone[item];
} else {
queryParamClone[item + '_begin'] = '';
queryParamClone[item + '_end'] = '';
}
})
}
return queryParamClone;
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust {
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
.view-container {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1; /* 限制文本为1行 */
-webkit-line-clamp: 1;
/* 限制文本为1行 */
overflow: hidden;
height: 25px;
}
</style>

View File

@ -2,13 +2,18 @@
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuIssueInfoForm">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="NuIssueInfoForm">
<a-row style="padding:14px;">
<a-col :span="24" style="text-align: center;">
<p>
<span>发版类型</span>
<span>{{ formData.issueType_dictText }}</span>
</p>
<p>
<span>发版日期</span>
<span>{{ formData.createTime }}</span>
</p>
</a-col>
<a-col :span="24" style="margin-top: 20px;">
<!-- <p>发版内容</p> -->
@ -41,6 +46,7 @@
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
createTime:'',
issueType: '',
issueType_dictText: '',
content: '',

View File

@ -2,11 +2,21 @@
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuIssueInfoForm">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="NuIssueInfoForm">
<a-row>
<a-col :span="24">
<a-form-item label="发版类型" v-bind="validateInfos.issueType" id="NuIssueInfoForm-issueType" name="issueType">
<j-dict-select-tag type='radio' v-model:value="formData.issueType" dictCode="issue_type" placeholder="请选择发版类型" allow-clear />
<a-form-item label="发版类型" v-bind="validateInfos.issueType" id="NuIssueInfoForm-issueType"
name="issueType">
<j-dict-select-tag type='radio' v-model:value="formData.issueType" dictCode="issue_type"
placeholder="请选择发版类型" allow-clear />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="发版日期" v-bind="validateInfos.createTime" id="NuIssueInfoForm-createTime"
name="createTime">
<a-date-picker placeholder="请选择发版日期" v-model:value="formData.createTime" showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
</a-form-item>
</a-col>
<a-col :span="24">

View File

@ -7,6 +7,7 @@ enum Api {
list = '/admin/orgapplyinfo/orgApplyInfo/list',
save='/admin/orgapplyinfo/orgApplyInfo/add',
edit='/admin/orgapplyinfo/orgApplyInfo/edit',
submitContract='/admin/orgapplyinfo/orgApplyInfo/submitContract',
deleteOne = '/admin/orgapplyinfo/orgApplyInfo/delete',
deleteBatch = '/admin/orgapplyinfo/orgApplyInfo/deleteBatch',
importExcel = '/admin/orgapplyinfo/orgApplyInfo/importExcel',
@ -70,3 +71,12 @@ export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}
/**
*
* @param params
* @param isUpdate
*/
export const submitContract = (params) => {
return defHttp.post({ url: Api.submitContract, params });
}

View File

@ -8,13 +8,13 @@
<a-col :lg="6">
<a-form-item name="comName">
<template #label><span title="企业名称">企业名称</span></template>
<JInput v-model:value="queryParam.comName" />
<JInput v-model:value="queryParam.comName" placeholder="请输入企业名称" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="orgLeader">
<template #label><span title="机构负责人">机构负责人</span></template>
<JInput v-model:value="queryParam.orgLeader" />
<JInput v-model:value="queryParam.orgLeader" placeholder="请输入机构负责人" />
</a-form-item>
</a-col>
<a-col :lg="6">
@ -179,6 +179,37 @@ function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 上传合同
*/
function handleUpContract(record) {
registerModal.value.editContract(record);
}
/**
* 通知运维平台搭建业务平台
*/
function handleBuildPlat(record) {
}
/**
* 账户初始化
* @param record
*/
function handleInitAccount(record) {
}
/**
* 信息推送
* @param record
*/
function handlePushInfo(record) {
}
/**
* 操作栏
*/
@ -189,11 +220,37 @@ function getTableAction(record) {
onClick: handleDetail.bind(null, record),
},
{
label: '审批',
label: '加盟审核',
onClick: handleEdit.bind(null, record),
auth: 'orgapplyinfo:nu_org_apply_info:edit',
ifShow: record.status == '1'
},
{
label: '上传合同',
onClick: handleUpContract.bind(null, record),
auth: 'orgapplyinfo:nu_org_apply_info:edit',
ifShow: record.buildStatus == '3'
},
// {
// label: '',
// onClick: handleBuildPlat.bind(null, record),
// auth: 'orgapplyinfo:nu_org_apply_info:edit',
// ifShow: () => {
// return record.buildStatus == '3' && !!record.contract
// }
// },
{
label: '账户初始化',
onClick: handleInitAccount.bind(null, record),
auth: 'orgapplyinfo:nu_org_apply_info:edit',
ifShow: record.buildStatus == '5'
},
{
label: '信息推送',
onClick: handlePushInfo.bind(null, record),
auth: 'orgapplyinfo:nu_org_apply_info:edit',
ifShow: record.buildStatus == '6'
},
];
}

View File

@ -4,6 +4,18 @@
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="OrgApplyInfoForm">
<a-row v-if="formData.buildStatus == '3'">
<a-col :span="24">
<SectionDivider :title="'加盟合同'" />
</a-col>
</a-row>
<a-row v-if="formData.buildStatus == '3'">
<a-col :span="12">
<a-form-item label="加盟合同" v-bind="validateInfos.contract" id="OrgApplyInfoForm-contract">
<JUpload v-model:value="formData.contract" :maxCount="1"></JUpload>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<SectionDivider :title="'身份证'" />
@ -40,7 +52,7 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="住址(身份证上)" v-bind="validateInfos.idCardAddress" id="OrgApplyInfoForm-idCardAddress"
<a-form-item label="住址" v-bind="validateInfos.idCardAddress" id="OrgApplyInfoForm-idCardAddress"
name="idCardAddress">
<a-input v-model:value="formData.idCardAddress" :readOnly="true"></a-input>
</a-form-item>
@ -118,13 +130,7 @@
</a-col>
<a-col :span="12">
<a-form-item label="机构所在地">
<span>
{{
formData.orgProvince_dictText
+ (!!formData.orgCity_dictText || '')
+ (!!formData.orgDistrict_dictText || '')
}}
</span>
<a-input v-model:value="cityViewValue" placeholder="请输入机构所在地" :readOnly="true"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
@ -173,7 +179,7 @@
</a-col>
<a-col :span="12">
<a-form-item label="审批意见" v-bind="validateInfos.status" id="OrgApplyInfoForm-status" name="status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审批意见">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审批意见" :disabled="formData.status != '1' && formData.status != '3'">
<a-select-option value="2">审核通过</a-select-option>
<a-select-option value="3">审核驳回</a-select-option>
</a-select>
@ -206,7 +212,9 @@ import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import TencentMap from '/@/components/TencentMap/TencentMap.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
const cityViewValue = ref('')
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
@ -221,6 +229,7 @@ const formData = reactive<Record<string, any>>({
wechatName: '',
tel: '',
status: '',
buildStatus: '',
content: '',
createTime: '',
updateTime: '',
@ -256,6 +265,7 @@ const formData = reactive<Record<string, any>>({
orgCity_dictText: '',
orgDistrict_dictText: '',
franchiseTime: null,
contract:null,
});
const tempNullVal = ref('')
const { createMessage } = useMessage();
@ -265,6 +275,7 @@ const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
status: [{ required: true, message: '请选择审批结果!' },],
contract: [{ required: true, message: '请上传加盟合同!' },],
content: [
{
validator: async (_rule, value) => {
@ -313,6 +324,9 @@ function edit(record) {
if (tmpData.status != '2' && tmpData.status != '3') {
tmpData.status = null
}
cityViewValue.value = record.orgProvince_dictText
+ (!!record.orgCity_dictText ? record.orgCity_dictText : '')
+ (!!record.orgDistrict_dictText ? record.orgDistrict_dictText : '')
//
Object.assign(formData, tmpData);
});

View File

@ -1,20 +1,35 @@
<template>
<j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<OrgApplyInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></OrgApplyInfoForm>
<j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk"
:okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<OrgApplyInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
</OrgApplyInfoForm>
</j-modal>
<j-modal title="合同上传" width="70vw" :visible="contractVisible" @cancel="handleContractCancel">
<template #footer>
<a-button @click="handleContractCancel">关闭</a-button>
<a-button @click="saveContract">保存为草稿</a-button>
<a-button type="primary" @click="submitContract">保存并提交</a-button>
</template>
<OrgUpContractForm ref="upContractForm" @ok="submitContractCallback" :formBpm="false"></OrgUpContractForm>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import OrgApplyInfoForm from './OrgApplyInfoForm.vue'
import OrgUpContractForm from './OrgUpContractForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const contractVisible = ref<boolean>(false);
const upContractForm = ref();
const emit = defineEmits(['register', 'success']);
function handleExtraButton(){
}
/**
* 新增
*/
@ -60,10 +75,51 @@
visible.value = false;
}
/**
* 关闭合同上传窗口
*/
function handleContractCancel() {
contractVisible.value = false
}
/**
* 打开上传合同编辑窗口
*/
function editContract(record) {
contractVisible.value = true
nextTick(() => {
upContractForm.value.edit(record);
});
}
/**
* 上传合同提交
*/
function submitContractCallback() {
console.log(99999)
handleContractCancel();
emit('success');
}
/**
* 保存为草稿
*/
function saveContract() {
upContractForm.value.saveForm();
}
/**
* 保存并提交
*/
function submitContract() {
upContractForm.value.submitForm();
}
defineExpose({
add,
edit,
disableSubmit,
editContract,
});
</script>

View File

@ -0,0 +1,296 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="OrgApplyInfoForm">
<a-row>
<a-col :span="24">
<SectionDivider :title="'机构信息'" />
</a-col>
<a-col :span="12">
<a-form-item label="机构名称" v-bind="validateInfos.comName" id="OrgApplyInfoForm-comName" name="comName">
<a-input v-model:value="formData.comName" :readOnly="true"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构所在地">
<a-input v-model:value="cityViewValue" placeholder="请输入机构所在地" :readOnly="true"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构地址" v-bind="validateInfos.orgAddress" id="OrgApplyInfoForm-orgAddress"
name="orgAddress">
<a-textarea v-model:value="formData.orgAddress" :readOnly="true"></a-textarea>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构负责人" v-bind="validateInfos.orgLeader" id="OrgApplyInfoForm-orgLeader"
name="orgLeader">
<a-input v-model:value="formData.orgLeader" :readOnly="true"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构负责人电话" v-bind="validateInfos.orgLeaderPhone" id="OrgApplyInfoForm-orgLeaderPhone"
name="orgLeaderPhone">
<a-input v-model:value="formData.orgLeaderPhone" :readOnly="true"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构房屋性质" v-bind="validateInfos.orgPropertyType" id="OrgApplyInfoForm-orgPropertyType"
name="orgPropertyType">
<a-input v-model:value="formData.orgPropertyType" :readOnly="true"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构建筑面积" v-bind="validateInfos.orgBuildingArea" id="OrgApplyInfoForm-orgBuildingArea"
name="orgBuildingArea">
<a-input v-model:value="formData.orgBuildingArea" addon-after="平方米" style="width: 100%" readOnly />
</a-form-item>
</a-col>
</a-row>
<a-row v-if="formData.buildStatus == '3'">
<a-col :span="24">
<SectionDivider :title="'加盟合同'" />
</a-col>
</a-row>
<a-row v-if="formData.buildStatus == '3'">
<a-col :span="12">
<a-form-item label="加盟合同" v-bind="validateInfos.contract" id="OrgApplyInfoForm-contract">
<JUpload v-model:value="formData.contract" :maxCount="1"></JUpload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="备注信息" v-bind="validateInfos.contractNote" id="OrgApplyInfoForm-contractNote"
name="contractNote">
<a-textarea :autosize="{ minRows: 3 }" maxlength="100" show-count v-model:value="formData.contractNote"
allow-clear placeholder="请填写备注信息"></a-textarea>
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { getValueType } from '/@/utils';
import { saveOrUpdate, submitContract } from '../OrgApplyInfo.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import TencentMap from '/@/components/TencentMap/TencentMap.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
const cityViewValue = ref('')
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
openId: '',
wechatName: '',
tel: '',
status: '',
buildStatus: '',
content: '',
createTime: '',
updateTime: '',
izEntry: '',
name: '',
sex: '',
national: '',
birthDate: '',
idCardAddress: '',
idCard: '',
issuingAuthority: '',
startTime: '',
endTime: '',
cardZmPath: '',
cardFmPath: '',
comBusinessLicense: '',
comName: '',
comRegisterAddress: '',
comCreditCode: '',
comLegalPerson: '',
orgAddress: '',
orgCoordinateLo: '',
orgCoordinateLa: '',
orgLeader: '',
orgLeaderPhone: '',
orgBuildingNumber: '',
orgPropertyType: '',
orgBuildingArea: undefined,
orgProvince: '',
orgCity: '',
orgDistrict: '',
orgProvince_dictText: '',
orgCity_dictText: '',
orgDistrict_dictText: '',
franchiseTime: null,
contract: null,
contractNote: null,
});
const tempNullVal = ref('')
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 17 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
status: [{ required: true, message: '请选择审批结果!' },],
contract: [{ required: true, message: '请上传加盟合同!' },],
contractNote: [{ required: true, message: '请填写备注信息!' },],
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(() => {
if (props.formBpm === true) {
if (props.formData.disabled === false) {
return false;
} else {
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
let tmpData = {};
Object.keys(formData).forEach((key) => {
if (record.hasOwnProperty(key)) {
tmpData[key] = record[key]
}
})
if (tmpData.status != '2' && tmpData.status != '3') {
tmpData.status = null
}
cityViewValue.value = record.orgProvince_dictText
+ (!!record.orgCity_dictText ? record.orgCity_dictText : '')
+ (!!record.orgDistrict_dictText ? record.orgDistrict_dictText : '')
//
Object.assign(formData, tmpData);
});
}
/**
* 保存为草稿
*/
async function saveForm() {
console.log('保存为草稿')
try {
//
await validate();
} catch ({ errorFields }) {
if (errorFields) {
const firstField = errorFields[0];
if (firstField) {
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
}
}
return Promise.reject(errorFields);
}
confirmLoading.value = true;
//
let model = formData;
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await saveOrUpdate(model, true)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
/**
* 保存并提交
*/
async function submitForm() {
try {
//
await validate();
} catch ({ errorFields }) {
if (errorFields) {
const firstField = errorFields[0];
if (firstField) {
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
}
}
return Promise.reject(errorFields);
}
confirmLoading.value = true;
//
let model = formData;
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await submitContract(model)
.then((res) => {
emit('ok');
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
saveForm,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
padding: 14px;
}
</style>

View File

@ -8,13 +8,13 @@
<a-col :lg="6">
<a-form-item name="comName">
<template #label><span title="企业名称">企业名称</span></template>
<JInput v-model:value="queryParam.comName" />
<JInput v-model:value="queryParam.comName" placeholder="请输入企业名称"/>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="orgLeader">
<template #label><span title="机构负责人">机构负责人</span></template>
<JInput v-model:value="queryParam.orgLeader" />
<JInput v-model:value="queryParam.orgLeader" placeholder="请输入机构负责人"/>
</a-form-item>
</a-col>
<a-col :lg="6">

View File

@ -80,9 +80,9 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="住址(身份证上)" v-bind="validateInfos.idCardAddress" id="OrgModifyInfoForm-idCardAddress"
<a-form-item label="住址" v-bind="validateInfos.idCardAddress" id="OrgModifyInfoForm-idCardAddress"
name="idCardAddress">
<a-input v-model:value="formData.idCardAddress" placeholder="请输入住址(身份证上)" allow-clear></a-input>
<a-input v-model:value="formData.idCardAddress" placeholder="请输入住址" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
@ -159,13 +159,7 @@
</a-col>
<a-col :span="12">
<a-form-item label="机构所在地">
<span>
{{
formData.orgProvince_dictText
+ (!!formData.orgCity_dictText || '')
+ (!!formData.orgDistrict_dictText || '')
}}
</span>
<a-input v-model:value="cityViewValue" placeholder="请输入机构所在地"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
@ -227,6 +221,7 @@ import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'
import TencentMap from '/@/components/TencentMap/TencentMap.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
const cityViewValue = ref('')
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
@ -318,6 +313,10 @@ function edit(record) {
tmpData[key] = record[key]
}
})
cityViewValue.value = record.orgProvince_dictText
+ (!!record.orgCity_dictText ? record.orgCity_dictText : '')
+ (!!record.orgDistrict_dictText ? record.orgDistrict_dictText : '')
//
Object.assign(formData, tmpData);
});