parent
c43aeb3da3
commit
e6dca66625
2
.env
2
.env
|
@ -1,5 +1,5 @@
|
||||||
# port
|
# port
|
||||||
VITE_PORT = 3100
|
VITE_PORT = 3101
|
||||||
|
|
||||||
# 网站标题
|
# 网站标题
|
||||||
VITE_GLOB_APP_TITLE = 护理单元管理平台
|
VITE_GLOB_APP_TITLE = 护理单元管理平台
|
||||||
|
|
|
@ -6,16 +6,16 @@ import { getWeekMonthQuarterYear } from '/@/utils';
|
||||||
//列表数据
|
//列表数据
|
||||||
export const columns: BasicColumn[] = [
|
export const columns: BasicColumn[] = [
|
||||||
{
|
{
|
||||||
title: '创建日期',
|
title: '发版日期',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
width: 180,
|
width: 240,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '发版类型',
|
title: '发版类型',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'issueType_dictText',
|
dataIndex: 'issueType_dictText',
|
||||||
width: 180,
|
width: 240,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '发版内容',
|
title: '发版内容',
|
||||||
|
|
|
@ -1,17 +1,49 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<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" >
|
<BasicTable @register="registerTable">
|
||||||
<!--插槽:table标题-->
|
<!--插槽:table标题-->
|
||||||
<template #tableTitle>
|
<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>
|
||||||
<!--操作栏-->
|
<!--操作栏-->
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<TableAction :actions="getTableAction(record)" />
|
<TableAction :actions="getTableAction(record)" />
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||||
<template v-if="column.dataIndex==='content'">
|
<template v-if="column.dataIndex === 'content'">
|
||||||
<!--富文本件字段回显插槽-->
|
<!--富文本件字段回显插槽-->
|
||||||
<a-popover placement="top">
|
<a-popover placement="top">
|
||||||
<template #content>
|
<template #content>
|
||||||
|
@ -22,7 +54,7 @@
|
||||||
</template>
|
</template>
|
||||||
<div v-html="text" class="view-container"></div>
|
<div v-html="text" class="view-container"></div>
|
||||||
</a-popover>
|
</a-popover>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
|
@ -33,205 +65,238 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" name="IssueInfo-nuIssueInfo" setup>
|
<script lang="ts" name="IssueInfo-nuIssueInfo" setup>
|
||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive } from 'vue';
|
||||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
import { columns, superQuerySchema } from './IssueInfo.data';
|
import { columns, superQuerySchema } from './IssueInfo.data';
|
||||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './IssueInfo.api';
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './IssueInfo.api';
|
||||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
import NuIssueInfoModal from './components/IssueInfoModal.vue'
|
import NuIssueInfoModal from './components/IssueInfoModal.vue'
|
||||||
import IssueInfoDetailModal from './components/IssueInfoDetailModal.vue'
|
import IssueInfoDetailModal from './components/IssueInfoDetailModal.vue'
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
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 formRef = ref();
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
const toggleSearchStatus = ref<boolean>(false);
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
const registerModal = ref();
|
const registerModal = ref();
|
||||||
const issueInfoDetailModal = ref();
|
const issueInfoDetailModal = ref();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
//注册table数据
|
//注册table数据
|
||||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
tableProps: {
|
tableProps: {
|
||||||
title: '发版日志',
|
title: '发版日志',
|
||||||
api: list,
|
api: list,
|
||||||
columns,
|
columns,
|
||||||
canResize:false,
|
canResize: false,
|
||||||
useSearchForm: false,
|
useSearchForm: false,
|
||||||
showIndexColumn: true,
|
showIndexColumn: true,
|
||||||
actionColumn: {
|
actionColumn: {
|
||||||
width: 150,
|
width: 150,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
},
|
|
||||||
beforeFetch: async (params) => {
|
|
||||||
return Object.assign(params, queryParam);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
exportConfig: {
|
beforeFetch: async (params) => {
|
||||||
name: "发版日志",
|
let rangerQuery = await setRangeQuery();
|
||||||
url: getExportUrl,
|
return Object.assign(params, rangerQuery);
|
||||||
params: queryParam,
|
|
||||||
},
|
},
|
||||||
importConfig: {
|
},
|
||||||
url: getImportUrl,
|
exportConfig: {
|
||||||
success: handleSuccess
|
name: "发版日志",
|
||||||
},
|
url: getExportUrl,
|
||||||
});
|
params: queryParam,
|
||||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
},
|
||||||
const labelCol = reactive({
|
importConfig: {
|
||||||
xs:24,
|
url: getImportUrl,
|
||||||
sm:4,
|
success: handleSuccess
|
||||||
xl:6,
|
},
|
||||||
xxl:4
|
});
|
||||||
});
|
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||||
const wrapperCol = reactive({
|
const labelCol = reactive({
|
||||||
xs: 24,
|
xs: 24,
|
||||||
sm: 20,
|
sm: 4,
|
||||||
});
|
xl: 6,
|
||||||
|
xxl: 4
|
||||||
|
});
|
||||||
|
const wrapperCol = reactive({
|
||||||
|
xs: 24,
|
||||||
|
sm: 20,
|
||||||
|
});
|
||||||
|
|
||||||
// 高级查询配置
|
// 高级查询配置
|
||||||
const superQueryConfig = reactive(superQuerySchema);
|
const superQueryConfig = reactive(superQuerySchema);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 高级查询事件
|
* 高级查询事件
|
||||||
*/
|
*/
|
||||||
function handleSuperQuery(params) {
|
function handleSuperQuery(params) {
|
||||||
Object.keys(params).map((k) => {
|
Object.keys(params).map((k) => {
|
||||||
queryParam[k] = params[k];
|
queryParam[k] = params[k];
|
||||||
});
|
});
|
||||||
searchQuery();
|
searchQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增事件
|
* 新增事件
|
||||||
*/
|
*/
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
registerModal.value.disableSubmit = false;
|
registerModal.value.disableSubmit = false;
|
||||||
registerModal.value.add();
|
registerModal.value.add();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑事件
|
* 编辑事件
|
||||||
*/
|
*/
|
||||||
function handleEdit(record: Recordable) {
|
function handleEdit(record: Recordable) {
|
||||||
registerModal.value.disableSubmit = false;
|
registerModal.value.disableSubmit = false;
|
||||||
registerModal.value.edit(record);
|
registerModal.value.edit(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 详情
|
* 详情
|
||||||
*/
|
*/
|
||||||
function handleDetail(record: Recordable) {
|
function handleDetail(record: Recordable) {
|
||||||
issueInfoDetailModal.value.disableSubmit = true;
|
issueInfoDetailModal.value.disableSubmit = true;
|
||||||
issueInfoDetailModal.value.edit(record);
|
issueInfoDetailModal.value.edit(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除事件
|
* 删除事件
|
||||||
*/
|
*/
|
||||||
async function handleDelete(record) {
|
async function handleDelete(record) {
|
||||||
await deleteOne({ id: record.id }, handleSuccess);
|
await deleteOne({ id: record.id }, handleSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除事件
|
* 批量删除事件
|
||||||
*/
|
*/
|
||||||
async function batchHandleDelete() {
|
async function batchHandleDelete() {
|
||||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 成功回调
|
* 成功回调
|
||||||
*/
|
*/
|
||||||
function handleSuccess() {
|
function handleSuccess() {
|
||||||
(selectedRowKeys.value = []) && reload();
|
(selectedRowKeys.value = []) && reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作栏
|
* 操作栏
|
||||||
*/
|
*/
|
||||||
function getTableAction(record) {
|
function getTableAction(record) {
|
||||||
return [
|
return [
|
||||||
{
|
// {
|
||||||
label: '编辑',
|
// label: '编辑',
|
||||||
onClick: handleEdit.bind(null, record),
|
// onClick: handleEdit.bind(null, record),
|
||||||
auth: 'IssueInfo:nu_issue_info:edit'
|
// auth: 'IssueInfo:nu_issue_info:edit'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: '详情',
|
label: '详情',
|
||||||
onClick: handleDetail.bind(null, record),
|
onClick: handleDetail.bind(null, record),
|
||||||
}, {
|
},
|
||||||
label: '删除',
|
// {
|
||||||
popConfirm: {
|
// label: '删除',
|
||||||
title: '是否确认删除',
|
// popConfirm: {
|
||||||
confirm: handleDelete.bind(null, record),
|
// title: '是否确认删除',
|
||||||
placement: 'topLeft',
|
// confirm: handleDelete.bind(null, record),
|
||||||
},
|
// placement: 'topLeft',
|
||||||
auth: 'IssueInfo:nu_issue_info:delete'
|
// },
|
||||||
|
// auth: 'IssueInfo:nu_issue_info:delete'
|
||||||
|
// }
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下拉操作栏
|
||||||
|
*/
|
||||||
|
function getDropDownAction(record) {
|
||||||
|
return [
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*/
|
||||||
|
function searchQuery() {
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置
|
||||||
|
*/
|
||||||
|
function searchReset() {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
selectedRowKeys.value = [];
|
||||||
|
//刷新数据
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
/**
|
}
|
||||||
* 下拉操作栏
|
|
||||||
*/
|
|
||||||
function getDropDownAction(record) {
|
|
||||||
return [
|
|
||||||
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询
|
|
||||||
*/
|
|
||||||
function searchQuery() {
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 重置
|
|
||||||
*/
|
|
||||||
function searchReset() {
|
|
||||||
formRef.value.resetFields();
|
|
||||||
selectedRowKeys.value = [];
|
|
||||||
//刷新数据
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.jeecg-basic-table-form-container {
|
.jeecg-basic-table-form-container {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
.table-page-search-submitButtons {
|
|
||||||
display: block;
|
.table-page-search-submitButtons {
|
||||||
margin-bottom: 24px;
|
display: block;
|
||||||
white-space: nowrap;
|
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){
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.view-container{
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-line-clamp: 1; /* 限制文本为1行 */
|
|
||||||
overflow: hidden;
|
|
||||||
height: 25px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-container {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
/* 限制文本为1行 */
|
||||||
|
overflow: hidden;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -2,18 +2,23 @@
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<JFormContainer :disabled="disabled">
|
<JFormContainer :disabled="disabled">
|
||||||
<template #detail>
|
<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-row style="padding:14px;">
|
||||||
<a-col :span="24" style="text-align: center;">
|
<a-col :span="24" style="text-align: center;">
|
||||||
<p>
|
<p>
|
||||||
<span>发版类型:</span>
|
<span>发版类型:</span>
|
||||||
<span>{{formData.issueType_dictText}}</span>
|
<span>{{ formData.issueType_dictText }}</span>
|
||||||
</p>
|
</p>
|
||||||
</a-col>
|
<p>
|
||||||
<a-col :span="24" style="margin-top: 20px;">
|
<span>发版日期:</span>
|
||||||
|
<span>{{ formData.createTime }}</span>
|
||||||
|
</p>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" style="margin-top: 20px;">
|
||||||
<!-- <p>发版内容:</p> -->
|
<!-- <p>发版内容:</p> -->
|
||||||
<div v-html="formData.content"></div>
|
<div v-html="formData.content"></div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</template>
|
</template>
|
||||||
|
@ -22,133 +27,134 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
|
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
|
||||||
import { getValueType } from '/@/utils';
|
import { getValueType } from '/@/utils';
|
||||||
import { saveOrUpdate } from '../IssueInfo.api';
|
import { saveOrUpdate } from '../IssueInfo.api';
|
||||||
import { Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formDisabled: { type: Boolean, default: false },
|
formDisabled: { type: Boolean, default: false },
|
||||||
formData: { type: Object, default: () => ({})},
|
formData: { type: Object, default: () => ({}) },
|
||||||
formBpm: { type: Boolean, default: true }
|
formBpm: { type: Boolean, default: true }
|
||||||
});
|
});
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const useForm = Form.useForm;
|
const useForm = Form.useForm;
|
||||||
const emit = defineEmits(['register', 'ok']);
|
const emit = defineEmits(['register', 'ok']);
|
||||||
const formData = reactive<Record<string, any>>({
|
const formData = reactive<Record<string, any>>({
|
||||||
id: '',
|
id: '',
|
||||||
issueType: '',
|
createTime:'',
|
||||||
issueType_dictText: '',
|
issueType: '',
|
||||||
content: '',
|
issueType_dictText: '',
|
||||||
});
|
content: '',
|
||||||
const { createMessage } = useMessage();
|
});
|
||||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
const { createMessage } = useMessage();
|
||||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||||
const confirmLoading = ref<boolean>(false);
|
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||||
//表单验证
|
const confirmLoading = ref<boolean>(false);
|
||||||
const validatorRules = reactive({
|
//表单验证
|
||||||
});
|
const validatorRules = reactive({
|
||||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
});
|
||||||
|
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||||
|
|
||||||
// 表单禁用
|
// 表单禁用
|
||||||
const disabled = computed(()=>{
|
const disabled = computed(() => {
|
||||||
if(props.formBpm === true){
|
if (props.formBpm === true) {
|
||||||
if(props.formData.disabled === false){
|
if (props.formData.disabled === false) {
|
||||||
return false;
|
return false;
|
||||||
}else{
|
} else {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return props.formDisabled;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
function add() {
|
||||||
|
edit({});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*/
|
||||||
|
function edit(record) {
|
||||||
|
nextTick(() => {
|
||||||
|
resetFields();
|
||||||
|
const tmpData = {};
|
||||||
|
Object.keys(formData).forEach((key) => {
|
||||||
|
if (record.hasOwnProperty(key)) {
|
||||||
|
tmpData[key] = record[key]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
//赋值
|
||||||
|
Object.assign(formData, tmpData);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交数据
|
||||||
|
*/
|
||||||
|
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 props.formDisabled;
|
return Promise.reject(errorFields);
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*/
|
|
||||||
function add() {
|
|
||||||
edit({});
|
|
||||||
}
|
}
|
||||||
|
confirmLoading.value = true;
|
||||||
/**
|
const isUpdate = ref<boolean>(false);
|
||||||
* 编辑
|
//时间格式化
|
||||||
*/
|
let model = formData;
|
||||||
function edit(record) {
|
if (model.id) {
|
||||||
nextTick(() => {
|
isUpdate.value = true;
|
||||||
resetFields();
|
}
|
||||||
const tmpData = {};
|
//循环数据
|
||||||
Object.keys(formData).forEach((key) => {
|
for (let data in model) {
|
||||||
if(record.hasOwnProperty(key)){
|
//如果该数据是数组并且是字符串类型
|
||||||
tmpData[key] = record[key]
|
if (model[data] instanceof Array) {
|
||||||
}
|
let valueType = getValueType(formRef.value.getProps, data);
|
||||||
})
|
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||||
//赋值
|
if (valueType === 'string') {
|
||||||
Object.assign(formData, tmpData);
|
model[data] = model[data].join(',');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await saveOrUpdate(model, isUpdate.value)
|
||||||
|
.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;
|
|
||||||
const isUpdate = ref<boolean>(false);
|
|
||||||
//时间格式化
|
|
||||||
let model = formData;
|
|
||||||
if (model.id) {
|
|
||||||
isUpdate.value = true;
|
|
||||||
}
|
|
||||||
//循环数据
|
|
||||||
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, isUpdate.value)
|
|
||||||
.then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
createMessage.success(res.message);
|
|
||||||
emit('ok');
|
|
||||||
} else {
|
|
||||||
createMessage.warning(res.message);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
confirmLoading.value = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
add,
|
add,
|
||||||
edit,
|
edit,
|
||||||
submitForm,
|
submitForm,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.antd-modal-form {
|
.antd-modal-form {
|
||||||
padding: 14px;
|
padding: 14px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -2,18 +2,28 @@
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<JFormContainer :disabled="disabled">
|
<JFormContainer :disabled="disabled">
|
||||||
<template #detail>
|
<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-row>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="发版类型" v-bind="validateInfos.issueType" id="NuIssueInfoForm-issueType" name="issueType">
|
<a-form-item label="发版类型" v-bind="validateInfos.issueType" id="NuIssueInfoForm-issueType"
|
||||||
<j-dict-select-tag type='radio' v-model:value="formData.issueType" dictCode="issue_type" placeholder="请选择发版类型" allow-clear />
|
name="issueType">
|
||||||
</a-form-item>
|
<j-dict-select-tag type='radio' v-model:value="formData.issueType" dictCode="issue_type"
|
||||||
</a-col>
|
placeholder="请选择发版类型" allow-clear />
|
||||||
<a-col :span="24">
|
</a-form-item>
|
||||||
<a-form-item label="发版内容" v-bind="validateInfos.content" id="NuIssueInfoForm-content" name="content">
|
</a-col>
|
||||||
<j-editor v-model:value="formData.content" :autoFocus="false"/>
|
<a-col :span="24">
|
||||||
</a-form-item>
|
<a-form-item label="发版日期" v-bind="validateInfos.createTime" id="NuIssueInfoForm-createTime"
|
||||||
</a-col>
|
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">
|
||||||
|
<a-form-item label="发版内容" v-bind="validateInfos.content" id="NuIssueInfoForm-content" name="content">
|
||||||
|
<j-editor v-model:value="formData.content" :autoFocus="false" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</template>
|
</template>
|
||||||
|
@ -22,134 +32,134 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
|
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
|
||||||
import { getValueType } from '/@/utils';
|
import { getValueType } from '/@/utils';
|
||||||
import { saveOrUpdate } from '../IssueInfo.api';
|
import { saveOrUpdate } from '../IssueInfo.api';
|
||||||
import { Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formDisabled: { type: Boolean, default: false },
|
formDisabled: { type: Boolean, default: false },
|
||||||
formData: { type: Object, default: () => ({})},
|
formData: { type: Object, default: () => ({}) },
|
||||||
formBpm: { type: Boolean, default: true }
|
formBpm: { type: Boolean, default: true }
|
||||||
});
|
});
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const useForm = Form.useForm;
|
const useForm = Form.useForm;
|
||||||
const emit = defineEmits(['register', 'ok']);
|
const emit = defineEmits(['register', 'ok']);
|
||||||
const formData = reactive<Record<string, any>>({
|
const formData = reactive<Record<string, any>>({
|
||||||
id: '',
|
id: '',
|
||||||
issueType: '',
|
issueType: '',
|
||||||
content: '',
|
content: '',
|
||||||
});
|
});
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||||
const confirmLoading = ref<boolean>(false);
|
const confirmLoading = ref<boolean>(false);
|
||||||
//表单验证
|
//表单验证
|
||||||
const validatorRules = reactive({
|
const validatorRules = reactive({
|
||||||
issueType: [{ required: true, message: '请选择发版类型!'},],
|
issueType: [{ required: true, message: '请选择发版类型!' },],
|
||||||
content: [{ required: true, message: '请输入发版内容!'},],
|
content: [{ required: true, message: '请输入发版内容!' },],
|
||||||
});
|
});
|
||||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||||
|
|
||||||
// 表单禁用
|
// 表单禁用
|
||||||
const disabled = computed(()=>{
|
const disabled = computed(() => {
|
||||||
if(props.formBpm === true){
|
if (props.formBpm === true) {
|
||||||
if(props.formData.disabled === false){
|
if (props.formData.disabled === false) {
|
||||||
return false;
|
return false;
|
||||||
}else{
|
} else {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return props.formDisabled;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
function add() {
|
||||||
|
edit({});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*/
|
||||||
|
function edit(record) {
|
||||||
|
nextTick(() => {
|
||||||
|
resetFields();
|
||||||
|
const tmpData = {};
|
||||||
|
Object.keys(formData).forEach((key) => {
|
||||||
|
if (record.hasOwnProperty(key)) {
|
||||||
|
tmpData[key] = record[key]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
//赋值
|
||||||
|
Object.assign(formData, tmpData);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交数据
|
||||||
|
*/
|
||||||
|
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 props.formDisabled;
|
return Promise.reject(errorFields);
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*/
|
|
||||||
function add() {
|
|
||||||
edit({});
|
|
||||||
}
|
}
|
||||||
|
confirmLoading.value = true;
|
||||||
/**
|
const isUpdate = ref<boolean>(false);
|
||||||
* 编辑
|
//时间格式化
|
||||||
*/
|
let model = formData;
|
||||||
function edit(record) {
|
if (model.id) {
|
||||||
nextTick(() => {
|
isUpdate.value = true;
|
||||||
resetFields();
|
}
|
||||||
const tmpData = {};
|
//循环数据
|
||||||
Object.keys(formData).forEach((key) => {
|
for (let data in model) {
|
||||||
if(record.hasOwnProperty(key)){
|
//如果该数据是数组并且是字符串类型
|
||||||
tmpData[key] = record[key]
|
if (model[data] instanceof Array) {
|
||||||
}
|
let valueType = getValueType(formRef.value.getProps, data);
|
||||||
})
|
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||||
//赋值
|
if (valueType === 'string') {
|
||||||
Object.assign(formData, tmpData);
|
model[data] = model[data].join(',');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await saveOrUpdate(model, isUpdate.value)
|
||||||
|
.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;
|
|
||||||
const isUpdate = ref<boolean>(false);
|
|
||||||
//时间格式化
|
|
||||||
let model = formData;
|
|
||||||
if (model.id) {
|
|
||||||
isUpdate.value = true;
|
|
||||||
}
|
|
||||||
//循环数据
|
|
||||||
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, isUpdate.value)
|
|
||||||
.then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
createMessage.success(res.message);
|
|
||||||
emit('ok');
|
|
||||||
} else {
|
|
||||||
createMessage.warning(res.message);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
confirmLoading.value = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
add,
|
add,
|
||||||
edit,
|
edit,
|
||||||
submitForm,
|
submitForm,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.antd-modal-form {
|
.antd-modal-form {
|
||||||
padding: 14px;
|
padding: 14px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -7,6 +7,7 @@ enum Api {
|
||||||
list = '/admin/orgapplyinfo/orgApplyInfo/list',
|
list = '/admin/orgapplyinfo/orgApplyInfo/list',
|
||||||
save='/admin/orgapplyinfo/orgApplyInfo/add',
|
save='/admin/orgapplyinfo/orgApplyInfo/add',
|
||||||
edit='/admin/orgapplyinfo/orgApplyInfo/edit',
|
edit='/admin/orgapplyinfo/orgApplyInfo/edit',
|
||||||
|
submitContract='/admin/orgapplyinfo/orgApplyInfo/submitContract',
|
||||||
deleteOne = '/admin/orgapplyinfo/orgApplyInfo/delete',
|
deleteOne = '/admin/orgapplyinfo/orgApplyInfo/delete',
|
||||||
deleteBatch = '/admin/orgapplyinfo/orgApplyInfo/deleteBatch',
|
deleteBatch = '/admin/orgapplyinfo/orgApplyInfo/deleteBatch',
|
||||||
importExcel = '/admin/orgapplyinfo/orgApplyInfo/importExcel',
|
importExcel = '/admin/orgapplyinfo/orgApplyInfo/importExcel',
|
||||||
|
@ -70,3 +71,12 @@ export const saveOrUpdate = (params, isUpdate) => {
|
||||||
let url = isUpdate ? Api.edit : Api.save;
|
let url = isUpdate ? Api.edit : Api.save;
|
||||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存并提交
|
||||||
|
* @param params
|
||||||
|
* @param isUpdate
|
||||||
|
*/
|
||||||
|
export const submitContract = (params) => {
|
||||||
|
return defHttp.post({ url: Api.submitContract, params });
|
||||||
|
}
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-form-item name="comName">
|
<a-form-item name="comName">
|
||||||
<template #label><span title="企业名称">企业名称</span></template>
|
<template #label><span title="企业名称">企业名称</span></template>
|
||||||
<JInput v-model:value="queryParam.comName" />
|
<JInput v-model:value="queryParam.comName" placeholder="请输入企业名称" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-form-item name="orgLeader">
|
<a-form-item name="orgLeader">
|
||||||
<template #label><span title="机构负责人">机构负责人</span></template>
|
<template #label><span title="机构负责人">机构负责人</span></template>
|
||||||
<JInput v-model:value="queryParam.orgLeader" />
|
<JInput v-model:value="queryParam.orgLeader" placeholder="请输入机构负责人" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
|
@ -179,6 +179,37 @@ function handleSuccess() {
|
||||||
(selectedRowKeys.value = []) && reload();
|
(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),
|
onClick: handleDetail.bind(null, record),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '审批',
|
label: '加盟审核',
|
||||||
onClick: handleEdit.bind(null, record),
|
onClick: handleEdit.bind(null, record),
|
||||||
auth: 'orgapplyinfo:nu_org_apply_info:edit',
|
auth: 'orgapplyinfo:nu_org_apply_info:edit',
|
||||||
ifShow: record.status == '1'
|
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'
|
||||||
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,18 @@
|
||||||
<template #detail>
|
<template #detail>
|
||||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||||
name="OrgApplyInfoForm">
|
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-row>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<SectionDivider :title="'身份证'" />
|
<SectionDivider :title="'身份证'" />
|
||||||
|
@ -40,7 +52,7 @@
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<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">
|
name="idCardAddress">
|
||||||
<a-input v-model:value="formData.idCardAddress" :readOnly="true"></a-input>
|
<a-input v-model:value="formData.idCardAddress" :readOnly="true"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -118,13 +130,7 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="机构所在地">
|
<a-form-item label="机构所在地">
|
||||||
<span>
|
<a-input v-model:value="cityViewValue" placeholder="请输入机构所在地" :readOnly="true"></a-input>
|
||||||
{{
|
|
||||||
formData.orgProvince_dictText
|
|
||||||
+ (!!formData.orgCity_dictText || '')
|
|
||||||
+ (!!formData.orgDistrict_dictText || '')
|
|
||||||
}}
|
|
||||||
</span>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
|
@ -173,7 +179,7 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="审批意见" v-bind="validateInfos.status" id="OrgApplyInfoForm-status" name="status">
|
<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="2">审核通过</a-select-option>
|
||||||
<a-select-option value="3">审核驳回</a-select-option>
|
<a-select-option value="3">审核驳回</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
|
@ -206,7 +212,9 @@ import { Form } from 'ant-design-vue';
|
||||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||||
import TencentMap from '/@/components/TencentMap/TencentMap.vue';
|
import TencentMap from '/@/components/TencentMap/TencentMap.vue';
|
||||||
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.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({
|
const props = defineProps({
|
||||||
formDisabled: { type: Boolean, default: false },
|
formDisabled: { type: Boolean, default: false },
|
||||||
formData: { type: Object, default: () => ({}) },
|
formData: { type: Object, default: () => ({}) },
|
||||||
|
@ -221,6 +229,7 @@ const formData = reactive<Record<string, any>>({
|
||||||
wechatName: '',
|
wechatName: '',
|
||||||
tel: '',
|
tel: '',
|
||||||
status: '',
|
status: '',
|
||||||
|
buildStatus: '',
|
||||||
content: '',
|
content: '',
|
||||||
createTime: '',
|
createTime: '',
|
||||||
updateTime: '',
|
updateTime: '',
|
||||||
|
@ -255,7 +264,8 @@ const formData = reactive<Record<string, any>>({
|
||||||
orgProvince_dictText: '',
|
orgProvince_dictText: '',
|
||||||
orgCity_dictText: '',
|
orgCity_dictText: '',
|
||||||
orgDistrict_dictText: '',
|
orgDistrict_dictText: '',
|
||||||
franchiseTime:null,
|
franchiseTime: null,
|
||||||
|
contract:null,
|
||||||
});
|
});
|
||||||
const tempNullVal = ref('')
|
const tempNullVal = ref('')
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
|
@ -265,6 +275,7 @@ const confirmLoading = ref<boolean>(false);
|
||||||
//表单验证
|
//表单验证
|
||||||
const validatorRules = reactive({
|
const validatorRules = reactive({
|
||||||
status: [{ required: true, message: '请选择审批结果!' },],
|
status: [{ required: true, message: '请选择审批结果!' },],
|
||||||
|
contract: [{ required: true, message: '请上传加盟合同!' },],
|
||||||
content: [
|
content: [
|
||||||
{
|
{
|
||||||
validator: async (_rule, value) => {
|
validator: async (_rule, value) => {
|
||||||
|
@ -313,6 +324,9 @@ function edit(record) {
|
||||||
if (tmpData.status != '2' && tmpData.status != '3') {
|
if (tmpData.status != '2' && tmpData.status != '3') {
|
||||||
tmpData.status = null
|
tmpData.status = null
|
||||||
}
|
}
|
||||||
|
cityViewValue.value = record.orgProvince_dictText
|
||||||
|
+ (!!record.orgCity_dictText ? record.orgCity_dictText : '')
|
||||||
|
+ (!!record.orgDistrict_dictText ? record.orgDistrict_dictText : '')
|
||||||
//赋值
|
//赋值
|
||||||
Object.assign(formData, tmpData);
|
Object.assign(formData, tmpData);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,76 +1,132 @@
|
||||||
<template>
|
<template>
|
||||||
<j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
<j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk"
|
||||||
<OrgApplyInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></OrgApplyInfoForm>
|
: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>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, nextTick, defineExpose } from 'vue';
|
import { ref, nextTick, defineExpose } from 'vue';
|
||||||
import OrgApplyInfoForm from './OrgApplyInfoForm.vue'
|
import OrgApplyInfoForm from './OrgApplyInfoForm.vue'
|
||||||
import JModal from '/@/components/Modal/src/JModal/JModal.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 emit = defineEmits(['register', 'success']);
|
|
||||||
|
|
||||||
/**
|
const title = ref<string>('');
|
||||||
* 新增
|
const visible = ref<boolean>(false);
|
||||||
*/
|
const disableSubmit = ref<boolean>(false);
|
||||||
function add() {
|
const registerForm = ref();
|
||||||
title.value = '新增';
|
const contractVisible = ref<boolean>(false);
|
||||||
visible.value = true;
|
const upContractForm = ref();
|
||||||
nextTick(() => {
|
const emit = defineEmits(['register', 'success']);
|
||||||
registerForm.value.add();
|
function handleExtraButton(){
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
* @param record
|
|
||||||
*/
|
|
||||||
function edit(record) {
|
|
||||||
title.value = disableSubmit.value ? '详情' : '机构加盟申请审批';
|
|
||||||
visible.value = true;
|
|
||||||
nextTick(() => {
|
|
||||||
registerForm.value.edit(record);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 确定按钮点击事件
|
|
||||||
*/
|
|
||||||
function handleOk() {
|
|
||||||
registerForm.value.submitForm();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
}
|
||||||
* form保存回调事件
|
/**
|
||||||
*/
|
* 新增
|
||||||
function submitCallback() {
|
*/
|
||||||
handleCancel();
|
function add() {
|
||||||
emit('success');
|
title.value = '新增';
|
||||||
}
|
visible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
/**
|
registerForm.value.add();
|
||||||
* 取消按钮回调事件
|
|
||||||
*/
|
|
||||||
function handleCancel() {
|
|
||||||
visible.value = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
add,
|
|
||||||
edit,
|
|
||||||
disableSubmit,
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
function edit(record) {
|
||||||
|
title.value = disableSubmit.value ? '详情' : '机构加盟申请审批';
|
||||||
|
visible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
registerForm.value.edit(record);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确定按钮点击事件
|
||||||
|
*/
|
||||||
|
function handleOk() {
|
||||||
|
registerForm.value.submitForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* form保存回调事件
|
||||||
|
*/
|
||||||
|
function submitCallback() {
|
||||||
|
handleCancel();
|
||||||
|
emit('success');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消按钮回调事件
|
||||||
|
*/
|
||||||
|
function handleCancel() {
|
||||||
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
/**隐藏样式-modal确定按钮 */
|
/**隐藏样式-modal确定按钮 */
|
||||||
.jee-hidden {
|
.jee-hidden {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped></style>
|
||||||
|
|
|
@ -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>
|
|
@ -8,13 +8,13 @@
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-form-item name="comName">
|
<a-form-item name="comName">
|
||||||
<template #label><span title="企业名称">企业名称</span></template>
|
<template #label><span title="企业名称">企业名称</span></template>
|
||||||
<JInput v-model:value="queryParam.comName" />
|
<JInput v-model:value="queryParam.comName" placeholder="请输入企业名称"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-form-item name="orgLeader">
|
<a-form-item name="orgLeader">
|
||||||
<template #label><span title="机构负责人">机构负责人</span></template>
|
<template #label><span title="机构负责人">机构负责人</span></template>
|
||||||
<JInput v-model:value="queryParam.orgLeader" />
|
<JInput v-model:value="queryParam.orgLeader" placeholder="请输入机构负责人"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
|
|
|
@ -80,9 +80,9 @@
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<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">
|
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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
|
@ -159,13 +159,7 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="机构所在地">
|
<a-form-item label="机构所在地">
|
||||||
<span>
|
<a-input v-model:value="cityViewValue" placeholder="请输入机构所在地"></a-input>
|
||||||
{{
|
|
||||||
formData.orgProvince_dictText
|
|
||||||
+ (!!formData.orgCity_dictText || '')
|
|
||||||
+ (!!formData.orgDistrict_dictText || '')
|
|
||||||
}}
|
|
||||||
</span>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<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 TencentMap from '/@/components/TencentMap/TencentMap.vue';
|
||||||
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
|
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
|
||||||
|
|
||||||
|
const cityViewValue = ref('')
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formDisabled: { type: Boolean, default: false },
|
formDisabled: { type: Boolean, default: false },
|
||||||
formData: { type: Object, default: () => ({}) },
|
formData: { type: Object, default: () => ({}) },
|
||||||
|
@ -318,6 +313,10 @@ function edit(record) {
|
||||||
tmpData[key] = record[key]
|
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);
|
Object.assign(formData, tmpData);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue