添加主数据代码
This commit is contained in:
@@ -4,7 +4,7 @@ VITE_PUBLIC_PATH = /
|
|||||||
# 本地开发代理,可以解决跨域及多地址代理
|
# 本地开发代理,可以解决跨域及多地址代理
|
||||||
# 如果接口地址匹配到,则会转发到http://localhost:30000,防止本地出现跨域问题
|
# 如果接口地址匹配到,则会转发到http://localhost:30000,防止本地出现跨域问题
|
||||||
# 可以有多个,注意多个不能换行,否则代理将会失效
|
# 可以有多个,注意多个不能换行,否则代理将会失效
|
||||||
VITE_PROXY = [["/dev","http://localhost:30000"], ["/reportDev","http://localhost:32000"]]
|
VITE_PROXY = [["/dev","http://localhost:40001"], ["/reportDev","http://localhost:32000"]]
|
||||||
|
|
||||||
# 是否删除Console.log
|
# 是否删除Console.log
|
||||||
VITE_DROP_CONSOLE = false
|
VITE_DROP_CONSOLE = false
|
||||||
@@ -17,7 +17,7 @@ VITE_GLOB_API_URL=/dev
|
|||||||
VITE_GLOB_REPORT_API_URL=/reportDev
|
VITE_GLOB_REPORT_API_URL=/reportDev
|
||||||
|
|
||||||
# WebSocket基础地址
|
# WebSocket基础地址
|
||||||
VITE_GLOB_WEBSOCKET_URL='ws://localhost:30000'
|
VITE_GLOB_WEBSOCKET_URL='ws://localhost:40001'
|
||||||
|
|
||||||
# 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换
|
# 接口地址前缀,有些系统所有接口地址都有前缀,可以在这里统一加,方便切换
|
||||||
VITE_GLOB_API_URL_PREFIX=
|
VITE_GLOB_API_URL_PREFIX=
|
||||||
|
|||||||
@@ -79,11 +79,11 @@ pnpm install --registry http://registry.npmmirror.com
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 第7行,后端接口
|
# 第7行,后端接口
|
||||||
VITE_PROXY = [["/dev","http://localhost:30000"]]
|
VITE_PROXY = [["/dev","http://localhost:40001"]]
|
||||||
|
|
||||||
# 第17行,websocket地址
|
# 第17行,websocket地址
|
||||||
# 在本地开发环境,将后端默认接口地址的协议改成 ws 即可
|
# 在本地开发环境,将后端默认接口地址的协议改成 ws 即可
|
||||||
VITE_GLOB_WEBSOCKET_URL='ws://localhost:30000'
|
VITE_GLOB_WEBSOCKET_URL='ws://localhost:40001'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 4.1.4 关联项目配置
|
#### 4.1.4 关联项目配置
|
||||||
|
|||||||
@@ -45,11 +45,11 @@ server {
|
|||||||
|
|
||||||
# 主项目后端接口
|
# 主项目后端接口
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass http://yunzhupaas-gateway-external.java-cloud-v510:30000;
|
proxy_pass http://yunzhupaas-gateway-external.java-cloud-v510:40001;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /websocket {
|
location /websocket {
|
||||||
proxy_pass http://yunzhupaas-gateway-external.java-cloud-v510:30000/api/message/websocket;
|
proxy_pass http://yunzhupaas-gateway-external.java-cloud-v510:40001/api/message/websocket;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
|
|||||||
@@ -1,95 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div :class="prefixCls" :style="getWrapStyle">
|
|
||||||
<Spin :spinning="loading" size="large" :style="getWrapStyle">
|
|
||||||
<!-- <iframe :src="frameSrc" :class="`${prefixCls}__main`" ref="frameRef" @load="hideLoading"></iframe> -->
|
|
||||||
</Spin>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import type { CSSProperties } from 'vue';
|
|
||||||
import { ref, unref, computed } from 'vue';
|
|
||||||
import { Spin } from 'ant-design-vue';
|
|
||||||
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn';
|
|
||||||
import { propTypes } from '@/utils/propTypes';
|
|
||||||
import { useDesign } from '@/hooks/web/useDesign';
|
|
||||||
import { useLayoutHeight } from '@/layouts/default/content/useContentViewHeight';
|
|
||||||
|
|
||||||
defineProps({
|
|
||||||
frameSrc: propTypes.string.def(''),
|
|
||||||
});
|
|
||||||
|
|
||||||
const loading = ref(true);
|
|
||||||
const topRef = ref(50);
|
|
||||||
const pagePaddingRef = ref(20);
|
|
||||||
const heightRef = ref(window.innerHeight);
|
|
||||||
const frameRef = ref<HTMLFrameElement>();
|
|
||||||
const { headerHeightRef } = useLayoutHeight();
|
|
||||||
|
|
||||||
const { prefixCls } = useDesign('iframe-page');
|
|
||||||
useWindowSizeFn(calcHeight, 150, { immediate: true });
|
|
||||||
// 自动登录账号
|
|
||||||
const AUTO_LOGIN = {
|
|
||||||
username: 'admin',
|
|
||||||
password: 'Szlc@2025'
|
|
||||||
};
|
|
||||||
|
|
||||||
const getWrapStyle = computed((): CSSProperties => {
|
|
||||||
return {
|
|
||||||
height: `${unref(heightRef)}px`,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
function calcHeight() {
|
|
||||||
const iframe = unref(frameRef);
|
|
||||||
if (!iframe) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const top = headerHeightRef.value;
|
|
||||||
const pagePadding = pagePaddingRef.value;
|
|
||||||
const remainHeight = top + pagePadding;
|
|
||||||
topRef.value = remainHeight;
|
|
||||||
heightRef.value = window.innerHeight - remainHeight;
|
|
||||||
const clientHeight = document.documentElement.clientHeight - remainHeight;
|
|
||||||
iframe.style.height = `${clientHeight}px`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideLoading() {
|
|
||||||
loading.value = false;
|
|
||||||
calcHeight();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
@prefix-cls: ~'@{namespace}-iframe-page';
|
|
||||||
|
|
||||||
.@{prefix-cls} {
|
|
||||||
border-radius: 8px;
|
|
||||||
overflow: hidden;
|
|
||||||
.ant-spin-nested-loading {
|
|
||||||
position: relative;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.ant-spin-container {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&__mask {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__main {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
background-color: @component-background;
|
|
||||||
border: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,102 +1,95 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="prefixCls" :style="getWrapStyle">
|
<div :class="prefixCls" :style="getWrapStyle">
|
||||||
<Spin :spinning="loading" size="large" :style="getWrapStyle">
|
<Spin :spinning="loading" size="large" :style="getWrapStyle">
|
||||||
<iframe
|
<iframe :src="frameSrc" :class="`${prefixCls}__main`" ref="frameRef" @load="hideLoading"></iframe>
|
||||||
:src="finalFrameSrc"
|
|
||||||
:class="`${prefixCls}__main`"
|
|
||||||
ref="frameRef"
|
|
||||||
@load="handleIframeLoad"
|
|
||||||
allow="popups"
|
|
||||||
sandbox="allow-scripts allow-same-origin allow-popups allow-top-navigation"
|
|
||||||
></iframe>
|
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { CSSProperties } from 'vue';
|
import type { CSSProperties } from 'vue';
|
||||||
import { ref, unref, computed, onMounted } from 'vue';
|
import { ref, unref, computed } from 'vue';
|
||||||
import { Spin } from 'ant-design-vue';
|
import { Spin } from 'ant-design-vue';
|
||||||
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn';
|
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn';
|
||||||
import { propTypes } from '@/utils/propTypes';
|
import { propTypes } from '@/utils/propTypes';
|
||||||
import { useDesign } from '@/hooks/web/useDesign';
|
import { useDesign } from '@/hooks/web/useDesign';
|
||||||
import { useLayoutHeight } from '@/layouts/default/content/useContentViewHeight';
|
import { useLayoutHeight } from '@/layouts/default/content/useContentViewHeight';
|
||||||
|
|
||||||
const props = defineProps({
|
defineProps({
|
||||||
frameSrc: propTypes.string.def(''),
|
frameSrc: propTypes.string.def(''),
|
||||||
});
|
});
|
||||||
|
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const pagePaddingRef = ref(20);
|
const topRef = ref(50);
|
||||||
const heightRef = ref(window.innerHeight);
|
const pagePaddingRef = ref(20);
|
||||||
const frameRef = ref<HTMLIFrameElement | null>(null);
|
const heightRef = ref(window.innerHeight);
|
||||||
const { headerHeightRef } = useLayoutHeight();
|
const frameRef = ref<HTMLFrameElement>();
|
||||||
const { prefixCls } = useDesign('iframe-page');
|
const { headerHeightRef } = useLayoutHeight();
|
||||||
|
|
||||||
useWindowSizeFn(calcHeight, 150, { immediate: true });
|
const { prefixCls } = useDesign('iframe-page');
|
||||||
|
useWindowSizeFn(calcHeight, 150, { immediate: true });
|
||||||
|
// 自动登录账号
|
||||||
|
const AUTO_LOGIN = {
|
||||||
|
username: 'admin',
|
||||||
|
password: 'Szlc@2025'
|
||||||
|
};
|
||||||
|
|
||||||
// ===================== 最终 iframe 地址(只加载一次,修复重复请求) =====================
|
const getWrapStyle = computed((): CSSProperties => {
|
||||||
const finalFrameSrc = computed(() => {
|
return {
|
||||||
const src = props.frameSrc;
|
height: `${unref(heightRef)}px`,
|
||||||
if (!src) return '';
|
};
|
||||||
|
});
|
||||||
|
|
||||||
const username = localStorage.getItem('loginAccount') || '';
|
function calcHeight() {
|
||||||
const password = 'yunzhupass6.0';
|
const iframe = unref(frameRef);
|
||||||
|
if (!iframe) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const top = headerHeightRef.value;
|
||||||
|
const pagePadding = pagePaddingRef.value;
|
||||||
|
const remainHeight = top + pagePadding;
|
||||||
|
topRef.value = remainHeight;
|
||||||
|
heightRef.value = window.innerHeight - remainHeight;
|
||||||
|
const clientHeight = document.documentElement.clientHeight - remainHeight;
|
||||||
|
iframe.style.height = `${clientHeight}px`;
|
||||||
|
}
|
||||||
|
|
||||||
// 拼接自动登录参数 + 时间戳防缓存(只计算一次)
|
function hideLoading() {
|
||||||
return `${src}?autoLogin=1&username=${username}&password=${password}&t=${new Date().getTime()}`;
|
loading.value = false;
|
||||||
});
|
calcHeight();
|
||||||
// ====================================================================================
|
}
|
||||||
|
|
||||||
const getWrapStyle = computed((): CSSProperties => {
|
|
||||||
return { height: `${unref(heightRef)}px` };
|
|
||||||
});
|
|
||||||
|
|
||||||
function calcHeight() {
|
|
||||||
const iframe = unref(frameRef);
|
|
||||||
if (!iframe) return;
|
|
||||||
const top = headerHeightRef.value;
|
|
||||||
const pagePadding = pagePaddingRef.value;
|
|
||||||
const remainHeight = top + pagePadding;
|
|
||||||
heightRef.value = window.innerHeight - remainHeight;
|
|
||||||
const clientHeight = document.documentElement.clientHeight - remainHeight;
|
|
||||||
iframe.style.height = `${clientHeight}px`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleIframeLoad() {
|
|
||||||
loading.value = false;
|
|
||||||
calcHeight();
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
calcHeight();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@prefix-cls: ~'@{namespace}-iframe-page';
|
@prefix-cls: ~'@{namespace}-iframe-page';
|
||||||
|
|
||||||
.@{prefix-cls} {
|
.@{prefix-cls} {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
.ant-spin-nested-loading {
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
.ant-spin-nested-loading {
|
.ant-spin-container {
|
||||||
position: relative;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.ant-spin-container {
|
padding: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__mask {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 10px;
|
}
|
||||||
|
|
||||||
|
&__main {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: @component-background;
|
||||||
|
border: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__main {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
background-color: @component-background;
|
|
||||||
border: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -1,225 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicDrawer v-bind="$attrs" @register="registerDrawer" :title="title" width="800px" showFooter :showOkBtn="false">
|
|
||||||
<template #insertFooter> </template>
|
|
||||||
<a-row class="p-10px dynamic-form">
|
|
||||||
<!-- 表单 -->
|
|
||||||
<a-form :colon="false" size="middle" layout="horizontal" labelAlign="right" :labelCol="{ style: { width: '100px' } }" :model="dataForm" ref="formRef">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<!-- 具体表单 -->
|
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('lead_name')">
|
|
||||||
<a-form-item name="lead_name">
|
|
||||||
<template #label>线索名称: </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.lead_name"
|
|
||||||
placeholder="请输入线索名称"
|
|
||||||
:maxlength="50"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.lead_name">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('mobile')">
|
|
||||||
<a-form-item name="mobile">
|
|
||||||
<template #label>手机号: </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.mobile"
|
|
||||||
placeholder="请输入手机号"
|
|
||||||
:maxlength="11"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.mobile">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('email')">
|
|
||||||
<a-form-item name="email">
|
|
||||||
<template #label>邮箱: </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.email"
|
|
||||||
placeholder="请输入邮箱"
|
|
||||||
:maxlength="50"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.email">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('lead_status')">
|
|
||||||
<a-form-item name="lead_status">
|
|
||||||
<template #label>状态: </template> <p>{{ dataForm.lead_status }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('sales_id')">
|
|
||||||
<a-form-item name="sales_id">
|
|
||||||
<template #label>销售人员: </template> <p>{{ dataForm.sales_id }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('customer_source')">
|
|
||||||
<a-form-item name="customer_source">
|
|
||||||
<template #label>来源: </template> <p>{{ dataForm.customer_source }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('remark')">
|
|
||||||
<a-form-item name="remark">
|
|
||||||
<template #label>备注: </template> <p>{{ dataForm.remark }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<!-- 表单结束 -->
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</a-row>
|
|
||||||
</BasicDrawer>
|
|
||||||
<!-- 有关联表单详情:开始 -->
|
|
||||||
<RelationDetail ref="relationDetailRef" />
|
|
||||||
<!-- 有关联表单详情:结束 -->
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { getDetailInfo } from './helper/api';
|
|
||||||
import { getConfigData } from '@/api/onlineDev/visualDev';
|
|
||||||
import { reactive, toRefs, nextTick, ref, computed, unref, toRaw } from 'vue';
|
|
||||||
import { BasicModal, useModal } from '@/components/Modal';
|
|
||||||
import { BasicDrawer, useDrawer } from '@/components/Drawer';
|
|
||||||
// 有关联表单详情
|
|
||||||
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
|
||||||
// 表单权限
|
|
||||||
import { usePermission } from '@/hooks/web/usePermission';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { buildUUID } from '@/utils/uuid';
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
|
||||||
import { getDataChange } from '@/api/onlineDev/visualDev';
|
|
||||||
import { getDataInterfaceDataInfoByIds } from '@/api/systemData/dataInterface';
|
|
||||||
import ExtraRelationInfo from '@/components/yunzhupaas/RelationForm/src/ExtraRelationInfo.vue';
|
|
||||||
|
|
||||||
interface State {
|
|
||||||
dataForm: any;
|
|
||||||
title: string;
|
|
||||||
maskConfig: any;
|
|
||||||
interfaceRes: any;
|
|
||||||
locationScope: any;
|
|
||||||
extraOptions: any;
|
|
||||||
extraData: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
defineOptions({ name: 'Detail' });
|
|
||||||
const { createMessage, createConfirm } = useMessage();
|
|
||||||
const [registerDrawer, { openDrawer, setDrawerProps, closeDrawer }] = useDrawer();
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
|
||||||
const relationDetailRef = ref<any>(null);
|
|
||||||
const state = reactive<State>({
|
|
||||||
dataForm: {},
|
|
||||||
title: t('common.detailText', '详情'),
|
|
||||||
maskConfig: {
|
|
||||||
lead_name: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
mobile: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
email: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
interfaceRes: { lead_status: [], mobile: [], lead_name: [], customer_source: [], remark: [], sales_id: [], email: [] },
|
|
||||||
locationScope: {},
|
|
||||||
extraOptions: {},
|
|
||||||
extraData: {},
|
|
||||||
});
|
|
||||||
const { title, dataForm, maskConfig } = toRefs(state);
|
|
||||||
// 表单权限
|
|
||||||
const { hasFormP } = usePermission();
|
|
||||||
|
|
||||||
defineExpose({ init });
|
|
||||||
|
|
||||||
function init(data) {
|
|
||||||
state.dataForm.id = data.id;
|
|
||||||
openDrawer();
|
|
||||||
nextTick(() => {
|
|
||||||
setTimeout(initData, 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function initData() {
|
|
||||||
changeLoading(true);
|
|
||||||
if (state.dataForm.id) {
|
|
||||||
getData(state.dataForm.id);
|
|
||||||
} else {
|
|
||||||
closeDrawer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getData(id) {
|
|
||||||
getDetailInfo(id).then(res => {
|
|
||||||
state.dataForm = res.data || {};
|
|
||||||
nextTick(() => {
|
|
||||||
changeLoading(false);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function toDetail(modelId, id, propsValue) {
|
|
||||||
if (!id) return;
|
|
||||||
getConfigData(modelId).then(res => {
|
|
||||||
if (!res.data || !res.data.formData) return;
|
|
||||||
const formConf = JSON.parse(res.data.formData);
|
|
||||||
formConf.popupType = 'general';
|
|
||||||
formConf.hasPrintBtn = false;
|
|
||||||
formConf.customBtns = [];
|
|
||||||
const data = { id, formConf, modelId, propsValue };
|
|
||||||
relationDetailRef.value?.init(data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function setFormProps(data) {
|
|
||||||
setDrawerProps(data);
|
|
||||||
}
|
|
||||||
function changeLoading(loading) {
|
|
||||||
setFormProps({ loading });
|
|
||||||
}
|
|
||||||
|
|
||||||
function getParamList(key) {
|
|
||||||
let templateJson: any[] = state.interfaceRes[key];
|
|
||||||
if (!templateJson || !templateJson.length || !state.dataForm) return templateJson;
|
|
||||||
for (let i = 0; i < templateJson.length; i++) {
|
|
||||||
if (templateJson[i].relationField && templateJson[i].sourceType == 1) {
|
|
||||||
templateJson[i].defaultValue = state.dataForm[templateJson[i].relationField + '_id'] || '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return templateJson;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { defHttp } from '@/utils/http/axios';
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
export function getList(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/CrmLead/getList', data });
|
|
||||||
}
|
|
||||||
// 新建
|
|
||||||
export function create(data) {
|
|
||||||
return defHttp.post({ url:'/api/bcm/CrmLead', data });
|
|
||||||
}
|
|
||||||
// 修改
|
|
||||||
export function update(data) {
|
|
||||||
return defHttp.put({ url: '/api/bcm/CrmLead/'+ data.id, data });
|
|
||||||
}
|
|
||||||
// 详情(无转换数据)
|
|
||||||
export function getInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/CrmLead/' + id });
|
|
||||||
}
|
|
||||||
// 获取(转换数据)
|
|
||||||
export function getDetailInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/CrmLead/detail/' + id });
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
export function del(id) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/CrmLead/' + id });
|
|
||||||
}
|
|
||||||
// 批量删除数据
|
|
||||||
export function batchDelete(data) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/CrmLead/batchRemove', data });
|
|
||||||
}
|
|
||||||
// 导出
|
|
||||||
export function exportData(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/CrmLead/Actions/Export', data });
|
|
||||||
}
|
|
||||||
@@ -1,503 +0,0 @@
|
|||||||
const columnList = [
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItemcd2c2e",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"线索名称",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774574864579,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"lead_name",
|
|
||||||
"__vModel__":"lead_name",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"lead_name",
|
|
||||||
"placeholder":"请输入线索名称",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":50,
|
|
||||||
"fullName":"线索名称",
|
|
||||||
"label":"线索名称",
|
|
||||||
"sortable":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"width":null,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem35dee5",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"手机号",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774574898493,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[
|
|
||||||
{
|
|
||||||
"pattern":"/^1[3456789]\\d{9}$/",
|
|
||||||
"message":"请输入正确的手机号码",
|
|
||||||
"messageI18nCode":"sys.validate.mobilePhone"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"mobile",
|
|
||||||
"__vModel__":"mobile",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"mobile",
|
|
||||||
"placeholder":"请输入手机号",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":11,
|
|
||||||
"fullName":"手机号",
|
|
||||||
"label":"手机号",
|
|
||||||
"sortable":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"width":null,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem4e5a2c",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"邮箱",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774574938265,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[
|
|
||||||
{
|
|
||||||
"pattern":"/^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/",
|
|
||||||
"message":"请输入正确的邮箱",
|
|
||||||
"messageI18nCode":"sys.validate.email"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"email",
|
|
||||||
"__vModel__":"email",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"email",
|
|
||||||
"placeholder":"请输入邮箱",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":50,
|
|
||||||
"fullName":"邮箱",
|
|
||||||
"label":"邮箱",
|
|
||||||
"sortable":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"width":null,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"状态",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"状态",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"id"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"Unassigned",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774574965631,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItem199e0c",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"static",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"状态",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"prop":"lead_status",
|
|
||||||
"width":null,
|
|
||||||
"options":[
|
|
||||||
{
|
|
||||||
"fullName":"待分配",
|
|
||||||
"id":"Unassigned"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fullName":"跟进中",
|
|
||||||
"id":"InProgress"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fullName":"已转换",
|
|
||||||
"id":"Converted"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fullName":"无效",
|
|
||||||
"id":"Invalid"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"__vModel__":"lead_status",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"lead_status",
|
|
||||||
"placeholder":"请选择状态",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"usersSelect",
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"ableIds":[],
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"销售人员",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"销售人员",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem20008f",
|
|
||||||
"yunzhupaasKey":"usersSelect",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":null,
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"销售人员",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774575084782,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-founder",
|
|
||||||
"defaultCurrent":false,
|
|
||||||
"tag":"YunzhupaasUsersSelect",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"prop":"sales_id",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"sales_id",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"selectType":"all",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"sales_id",
|
|
||||||
"placeholder":"请选择销售人员",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"来源",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"来源",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"enCode"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774575125146,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItem0800c0",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dictionary",
|
|
||||||
"dictionaryType":"797256993944371205",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"来源",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"prop":"customer_source",
|
|
||||||
"width":null,
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"customer_source",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"customer_source",
|
|
||||||
"placeholder":"请选择来源",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"textarea",
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":200,
|
|
||||||
"fullName":"备注",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"备注",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"autoSize":{
|
|
||||||
"minRows":4,
|
|
||||||
"maxRows":4
|
|
||||||
},
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem292367",
|
|
||||||
"yunzhupaasKey":"textarea",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"备注",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774575155402,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-textarea",
|
|
||||||
"tag":"YunzhupaasTextarea",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"remark",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"remark",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"remark",
|
|
||||||
"placeholder":"请输入备注",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default columnList
|
|
||||||
@@ -1,440 +0,0 @@
|
|||||||
const superQueryJson = [
|
|
||||||
{
|
|
||||||
"clearable":true,
|
|
||||||
"maxlength":50,
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullName":"线索名称",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"addonAfter":"",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItemcd2c2e",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"线索名称",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774574864579,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"__vModel__":"lead_name",
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"lead_name",
|
|
||||||
"placeholder":"请输入线索名称",
|
|
||||||
"prefixIcon":"",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"clearable":true,
|
|
||||||
"maxlength":11,
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullName":"手机号",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"addonAfter":"",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem35dee5",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"手机号",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774574898493,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[
|
|
||||||
{
|
|
||||||
"pattern":"/^1[3456789]\\d{9}$/",
|
|
||||||
"message":"请输入正确的手机号码",
|
|
||||||
"messageI18nCode":"sys.validate.mobilePhone"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"__vModel__":"mobile",
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"mobile",
|
|
||||||
"placeholder":"请输入手机号",
|
|
||||||
"prefixIcon":"",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"clearable":true,
|
|
||||||
"maxlength":50,
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullName":"邮箱",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"addonAfter":"",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem4e5a2c",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"邮箱",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774574938265,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[
|
|
||||||
{
|
|
||||||
"pattern":"/^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/",
|
|
||||||
"message":"请输入正确的邮箱",
|
|
||||||
"messageI18nCode":"sys.validate.email"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"__vModel__":"email",
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"email",
|
|
||||||
"placeholder":"请输入邮箱",
|
|
||||||
"prefixIcon":"",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"状态",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"id"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"Unassigned",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774574965631,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItem199e0c",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"static",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"状态",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"options":[
|
|
||||||
{
|
|
||||||
"fullName":"待分配",
|
|
||||||
"id":"Unassigned"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fullName":"跟进中",
|
|
||||||
"id":"InProgress"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fullName":"已转换",
|
|
||||||
"id":"Converted"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fullName":"无效",
|
|
||||||
"id":"Invalid"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"__vModel__":"lead_status",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"lead_status",
|
|
||||||
"placeholder":"请选择状态",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"clearable":true,
|
|
||||||
"ableIds":[],
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"销售人员",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem20008f",
|
|
||||||
"yunzhupaasKey":"usersSelect",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":null,
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"销售人员",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774575084782,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-founder",
|
|
||||||
"defaultCurrent":false,
|
|
||||||
"tag":"YunzhupaasUsersSelect",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"__vModel__":"sales_id",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"selectType":"all",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"sales_id",
|
|
||||||
"placeholder":"请选择销售人员",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"来源",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"enCode"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774575125146,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItem0800c0",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dictionary",
|
|
||||||
"dictionaryType":"797256993944371205",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"来源",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"customer_source",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"customer_source",
|
|
||||||
"placeholder":"请选择来源",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"clearable":true,
|
|
||||||
"maxlength":200,
|
|
||||||
"fullName":"备注",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"autoSize":{
|
|
||||||
"minRows":4,
|
|
||||||
"maxRows":4
|
|
||||||
},
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem292367",
|
|
||||||
"yunzhupaasKey":"textarea",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"备注",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774575155402,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-textarea",
|
|
||||||
"tag":"YunzhupaasTextarea",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"__vModel__":"remark",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"remark",
|
|
||||||
"placeholder":"请输入备注",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default superQueryJson
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { defHttp } from '@/utils/http/axios';
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
export function getList(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/CrmOpportunity/getList', data });
|
|
||||||
}
|
|
||||||
// 新建
|
|
||||||
export function create(data) {
|
|
||||||
return defHttp.post({ url:'/api/bcm/CrmOpportunity', data });
|
|
||||||
}
|
|
||||||
// 修改
|
|
||||||
export function update(data) {
|
|
||||||
return defHttp.put({ url: '/api/bcm/CrmOpportunity/'+ data.id, data });
|
|
||||||
}
|
|
||||||
// 详情(无转换数据)
|
|
||||||
export function getInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/CrmOpportunity/' + id });
|
|
||||||
}
|
|
||||||
// 获取(转换数据)
|
|
||||||
export function getDetailInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/CrmOpportunity/detail/' + id });
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
export function del(id) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/CrmOpportunity/' + id });
|
|
||||||
}
|
|
||||||
// 批量删除数据
|
|
||||||
export function batchDelete(data) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/CrmOpportunity/batchRemove', data });
|
|
||||||
}
|
|
||||||
// 导出
|
|
||||||
export function exportData(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/CrmOpportunity/Actions/Export', data });
|
|
||||||
}
|
|
||||||
@@ -1,205 +0,0 @@
|
|||||||
const searchList = [
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItemd62246",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"商机名称",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"crm_opportunity",
|
|
||||||
"renderKey":1774575491289,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"opportunity_name",
|
|
||||||
"__vModel__":"opportunity_name",
|
|
||||||
"searchMultiple":false,
|
|
||||||
"disabled":false,
|
|
||||||
"id":"opportunity_name",
|
|
||||||
"placeholder":"请输入商机名称",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"searchType":2,
|
|
||||||
"maxlength":50,
|
|
||||||
"fullName":"商机名称",
|
|
||||||
"label":"商机名称",
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"isKeyword":true,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"searchType":1,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"商机阶段",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"商机阶段",
|
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"enCode"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"crm_opportunity",
|
|
||||||
"renderKey":1774576009744,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItem97b95a",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dictionary",
|
|
||||||
"dictionaryType":"797444616478523397",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"商机阶段",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"prop":"opportunity_stage",
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"opportunity_stage",
|
|
||||||
"searchMultiple":true,
|
|
||||||
"isKeyword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"opportunity_stage",
|
|
||||||
"placeholder":"请选择商机阶段",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"datePicker",
|
|
||||||
"clearable":true,
|
|
||||||
"searchType":3,
|
|
||||||
"format":"yyyy-MM-dd",
|
|
||||||
"fullName":"预计成交日期",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"预计成交日期",
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"datePicker",
|
|
||||||
"endRelationField":"",
|
|
||||||
"defaultValue":null,
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"crm_opportunity",
|
|
||||||
"renderKey":1774576099226,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-date",
|
|
||||||
"startRelationField":"",
|
|
||||||
"defaultCurrent":false,
|
|
||||||
"tag":"YunzhupaasDatePicker",
|
|
||||||
"formId":"formItemc8fcbf",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"endTimeTarget":1,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"startTimeType":1,
|
|
||||||
"endTimeRule":false,
|
|
||||||
"label":"预计成交日期",
|
|
||||||
"trigger":"change",
|
|
||||||
"startTimeRule":false,
|
|
||||||
"startTimeValue":null,
|
|
||||||
"endTimeValue":null,
|
|
||||||
"endTimeType":1,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"startTimeTarget":1,
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"prop":"close_date",
|
|
||||||
"__vModel__":"close_date",
|
|
||||||
"searchMultiple":false,
|
|
||||||
"isKeyword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"startTime":null,
|
|
||||||
"disabled":false,
|
|
||||||
"id":"close_date",
|
|
||||||
"placeholder":"请选择预计成交日期",
|
|
||||||
"endTime":null,
|
|
||||||
"value":[],
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default searchList
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { defHttp } from '@/utils/http/axios';
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
export function getList(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/MdmCompany/getList', data });
|
|
||||||
}
|
|
||||||
// 新建
|
|
||||||
export function create(data) {
|
|
||||||
return defHttp.post({ url:'/api/bcm/MdmCompany', data });
|
|
||||||
}
|
|
||||||
// 修改
|
|
||||||
export function update(data) {
|
|
||||||
return defHttp.put({ url: '/api/bcm/MdmCompany/'+ data.id, data });
|
|
||||||
}
|
|
||||||
// 详情(无转换数据)
|
|
||||||
export function getInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/MdmCompany/' + id });
|
|
||||||
}
|
|
||||||
// 获取(转换数据)
|
|
||||||
export function getDetailInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/MdmCompany/detail/' + id });
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
export function del(id) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/MdmCompany/' + id });
|
|
||||||
}
|
|
||||||
// 批量删除数据
|
|
||||||
export function batchDelete(data) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/MdmCompany/batchRemove', data });
|
|
||||||
}
|
|
||||||
// 导出
|
|
||||||
export function exportData(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/MdmCompany/Actions/Export', data });
|
|
||||||
}
|
|
||||||
@@ -1,652 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="yunzhupaas-content-wrapper">
|
|
||||||
<div class="yunzhupaas-content-wrapper-center">
|
|
||||||
<div class="yunzhupaas-content-wrapper-search-box" v-if="getSearchList.length">
|
|
||||||
<BasicForm @register="registerSearchForm" :schemas="getSearchList"
|
|
||||||
@advanced-change="redoHeight" @submit="handleSearchSubmit" @reset="handleSearchReset"
|
|
||||||
class="search-form">
|
|
||||||
</BasicForm>
|
|
||||||
</div>
|
|
||||||
<div class="yunzhupaas-content-wrapper-content bg-white">
|
|
||||||
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
|
||||||
@columns-change="handleColumnChange">
|
|
||||||
<template #tableTitle>
|
|
||||||
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add"
|
|
||||||
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
|
||||||
</template>
|
|
||||||
<template #toolbar>
|
|
||||||
<a-tooltip placement="top">
|
|
||||||
<template #title>
|
|
||||||
<span>{{ t('common.superQuery') }}</span>
|
|
||||||
</template>
|
|
||||||
<filter-outlined @click="openSuperQuery(true, { columnOptions: superQueryJson })" />
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
<template #toolbarAfter>
|
|
||||||
<ViewList :menuId="route.meta.modelId" :viewList="viewList" @itemClick="handleViewClick" @reload="initViewList" />
|
|
||||||
<ViewSetting :menuId="route.meta.modelId" :viewList="viewList" :currentView="currentView" @reload="initViewList" />
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record, index }">
|
|
||||||
<template v-for="(item, index) in childColumnList" v-if="childColumnList.length">
|
|
||||||
<template
|
|
||||||
v-if="column?.id?.includes('-') && item.children && item.children[0] && column.key === item.children[0]?.dataIndex">
|
|
||||||
<ChildTableColumn :data="record[item.prop]" :head="item.children"
|
|
||||||
@toggleExpand="toggleExpand(record, item.prop+`Expand`)" @toDetail="toDetail"
|
|
||||||
:expand="record[item.prop+`Expand`]" :key="index" :showOverflow="true "/>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template v-if="!(record.top || column.id?.includes('-'))">
|
|
||||||
<template v-if="column.yunzhupaasKey === 'relationForm'">
|
|
||||||
<p class="link-text"
|
|
||||||
@click="toDetail(column.modelId, record[column.dataIndex+`_id`], column.propsValue)">
|
|
||||||
{{ record[column.dataIndex] }}</p>
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'inputNumber'">
|
|
||||||
<yunzhupaas-input-number v-model:value="record[column.prop]" :precision="column.precision" :thousands="column.thousands" disabled detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'calculate'">
|
|
||||||
<yunzhupaas-calculate
|
|
||||||
v-model:value="record[column.prop]"
|
|
||||||
:isStorage="column.isStorage"
|
|
||||||
:precision="column.precision"
|
|
||||||
:thousands="column.thousands"
|
|
||||||
detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'sign'">
|
|
||||||
<yunzhupaas-sign v-model:value="record[column.prop]" detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'signature'">
|
|
||||||
<yunzhupaas-signature v-model:value="record[column.prop]" detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'rate'">
|
|
||||||
<yunzhupaas-rate v-model:value="record[column.prop]" :count="column.count" :allowHalf="column.allowHalf" disabled />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'slider'">
|
|
||||||
<yunzhupaas-slider v-model:value="record[column.prop]" :min="column.min" :max="column.max" :step="column.step" disabled />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'uploadImg'">
|
|
||||||
<yunzhupaas-upload-img v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'uploadFile'">
|
|
||||||
<yunzhupaas-upload-file v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'input'">
|
|
||||||
<yunzhupaas-input
|
|
||||||
v-model:value="record[column.prop]"
|
|
||||||
:useMask="column.useMask"
|
|
||||||
:maskConfig="column.maskConfig"
|
|
||||||
:showOverflow="true"
|
|
||||||
detailed />
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template v-if="column.key === 'action' && !record.top">
|
|
||||||
<TableAction :actions="getTableActions(record)" />
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Form ref="formRef" @reload="reload" />
|
|
||||||
<Detail ref="detailRef" />
|
|
||||||
<ExportModal @register="registerExportModal" @download="handleDownload" />
|
|
||||||
<ImportModal @register="registerImportModal" @reload="reload" />
|
|
||||||
<PrintSelect @register="registerPrintSelect" @change="handleShowBrowse" />
|
|
||||||
<PrintBrowse @register="registerPrintBrowse" />
|
|
||||||
<RelationDetail ref="relationDetailRef" />
|
|
||||||
<SuperQueryModal @register="registerSuperQueryModal" @superQuery="handleSuperQuery" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
|
|
||||||
import { getList, del, exportData, batchDelete } from './helper/api';
|
|
||||||
import { getConfigData,getViewList } from '@/api/onlineDev/visualDev';
|
|
||||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary';
|
|
||||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
|
||||||
import { getOrgByOrganizeCondition,getDepartmentSelectAsyncList } from '@/api/permission/organize';
|
|
||||||
import { ref, reactive, onMounted, toRefs, computed, unref, nextTick, toRaw, provide } from 'vue';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
|
||||||
import { useOrganizeStore } from '@/store/modules/organize';
|
|
||||||
import { useUserStore } from '@/store/modules/user';
|
|
||||||
import { BasicModal, useModal } from '@/components/Modal';
|
|
||||||
import { usePopup } from '@/components/Popup';
|
|
||||||
import { ScrollContainer } from '@/components/Container';
|
|
||||||
import { BasicLeftTree, TreeActionType } from '@/components/Tree';
|
|
||||||
import { BasicForm, useForm } from '@/components/Form';
|
|
||||||
import { BasicTable, useTable, TableAction, ActionItem, TableActionType, SorterResult } from '@/components/Table';
|
|
||||||
import { SuperQueryModal } from '@/components/CommonModal';
|
|
||||||
import Form from './Form.vue';
|
|
||||||
import Detail from './Detail.vue';
|
|
||||||
// 有关联表单详情:开始
|
|
||||||
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
|
||||||
// 有关联表单详情:结束
|
|
||||||
import ChildTableColumn from '@/views/common/dynamicModel/list/ChildTableColumn.vue';
|
|
||||||
import { ExportModal } from '@/components/CommonModal';
|
|
||||||
import { downloadByUrl } from '@/utils/file/download';
|
|
||||||
import { ImportModal} from '@/components/CommonModal';
|
|
||||||
// 打印模板多条生成PrintSelect
|
|
||||||
import PrintSelect from '@/components/PrintDesign/printSelect/index.vue';
|
|
||||||
import PrintBrowse from '@/components/PrintDesign/printBrowse/index.vue';
|
|
||||||
import { useRoute,useRouter } from 'vue-router';
|
|
||||||
import { FilterOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { getSearchFormSchemas } from '@/components/FormGenerator/src/helper/transform';
|
|
||||||
import { cloneDeep } from 'lodash-es';
|
|
||||||
import columnList from './helper/columnList';
|
|
||||||
import searchList from './helper/searchList';
|
|
||||||
import superQueryJson from './helper/superQueryJson';
|
|
||||||
import { dyOptionsList, systemComponentsList } from '@/components/FormGenerator/src/helper/config';
|
|
||||||
import { thousandsFormat, getParamList} from '@/utils/yunzhupaas';
|
|
||||||
import { usePermission } from '@/hooks/web/usePermission';
|
|
||||||
|
|
||||||
import ViewSetting from '@/views/common/dynamicModel/list/components/ViewSetting.vue';
|
|
||||||
import ViewList from '@/views/common/dynamicModel/list/components/ViewList.vue';
|
|
||||||
|
|
||||||
interface State {
|
|
||||||
config: any;
|
|
||||||
columnList: any[];
|
|
||||||
printListOptions: any[];
|
|
||||||
columnBtnsList: any[];
|
|
||||||
customBtnsList: any[];
|
|
||||||
treeFieldNames: any;
|
|
||||||
leftTreeData: any[];
|
|
||||||
leftTreeLoading: boolean;
|
|
||||||
treeActiveId: string;
|
|
||||||
treeActiveNodePath: any;
|
|
||||||
columns: any[];
|
|
||||||
complexColumns: any[];
|
|
||||||
childColumnList: any[];
|
|
||||||
exportList: any[];
|
|
||||||
cacheList: any[];
|
|
||||||
currFlow: any;
|
|
||||||
isCustomCopy: boolean;
|
|
||||||
candidateType: number;
|
|
||||||
currRow: any;
|
|
||||||
workFlowFormData: any;
|
|
||||||
expandObj: any;
|
|
||||||
columnSettingList: any[];
|
|
||||||
searchSchemas: any[];
|
|
||||||
treeRelationObj: any;
|
|
||||||
treeQueryJson: any;
|
|
||||||
leftTreeActiveInfo: any;
|
|
||||||
keyword: string;
|
|
||||||
viewList: any[];
|
|
||||||
currentView: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
const { hasBtnP } = usePermission();
|
|
||||||
const { createMessage, createConfirm } = useMessage();
|
|
||||||
const { t } = useI18n();
|
|
||||||
const organizeStore = useOrganizeStore();
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const userInfo = userStore.getUserInfo;
|
|
||||||
|
|
||||||
const [registerExportModal, { openModal: openExportModal, closeModal: closeExportModal, setModalProps: setExportModalProps }] = useModal();
|
|
||||||
const [registerImportModal, { openModal: openImportModal }] = useModal();
|
|
||||||
const [registerSuperQueryModal, { openModal: openSuperQuery }] = useModal();
|
|
||||||
const formRef = ref<any>(null);
|
|
||||||
const tableRef = ref<Nullable<TableActionType>>(null);
|
|
||||||
const detailRef = ref<any>(null);
|
|
||||||
const relationDetailRef = ref<any>(null);
|
|
||||||
|
|
||||||
const state = reactive<State>({
|
|
||||||
config: {},
|
|
||||||
columnList: [],
|
|
||||||
printListOptions: [],
|
|
||||||
columnBtnsList: [],
|
|
||||||
customBtnsList: [],
|
|
||||||
treeFieldNames: {
|
|
||||||
children: 'children' ,
|
|
||||||
title: 'fullName' ,
|
|
||||||
key: 'id' ,
|
|
||||||
isLeaf: 'isLeaf',
|
|
||||||
},
|
|
||||||
leftTreeData: [],
|
|
||||||
leftTreeLoading: false,
|
|
||||||
treeActiveId: '',
|
|
||||||
treeActiveNodePath: [],
|
|
||||||
columns: [],
|
|
||||||
complexColumns: [], // 复杂表头
|
|
||||||
childColumnList: [],
|
|
||||||
exportList: [],
|
|
||||||
cacheList: [],
|
|
||||||
currFlow: {},
|
|
||||||
isCustomCopy: false,
|
|
||||||
candidateType: 1,
|
|
||||||
currRow: {},
|
|
||||||
workFlowFormData: {},
|
|
||||||
expandObj: {},
|
|
||||||
columnSettingList: [],
|
|
||||||
searchSchemas: [],
|
|
||||||
treeRelationObj: null,
|
|
||||||
treeQueryJson: {},
|
|
||||||
leftTreeActiveInfo: {},
|
|
||||||
keyword: '',
|
|
||||||
viewList: [],
|
|
||||||
currentView: {},
|
|
||||||
});
|
|
||||||
const defaultSearchInfo = {
|
|
||||||
menuId: route.meta.modelId as string,
|
|
||||||
moduleId:'806858527036409349',
|
|
||||||
superQueryJson: '',
|
|
||||||
dataType:0,
|
|
||||||
};
|
|
||||||
const searchInfo = reactive({
|
|
||||||
...cloneDeep(defaultSearchInfo),
|
|
||||||
});
|
|
||||||
const { childColumnList, searchSchemas, viewList, currentView} = toRefs(state);
|
|
||||||
const [registerSearchForm, { updateSchema, resetFields, submit: searchFormSubmit, setFieldsValue}] = useForm({
|
|
||||||
baseColProps: { span: 6 },
|
|
||||||
showActionButtonGroup: true,
|
|
||||||
showAdvancedButton: true,
|
|
||||||
compact: true,
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, setLoading, getFetchParams, getSelectRows, getSelectRowKeys, redoHeight,clearSelectedRowKeys }] = useTable({
|
|
||||||
api: getList,
|
|
||||||
immediate: false,
|
|
||||||
clickToRowSelect: false,
|
|
||||||
tableSetting: { setting: false },
|
|
||||||
afterFetch: (data) => {
|
|
||||||
const list = data.map((o) => ({
|
|
||||||
...o,
|
|
||||||
...state.expandObj,
|
|
||||||
}));
|
|
||||||
state.cacheList = cloneDeep(list);
|
|
||||||
return list;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerChildTable] = useTable({
|
|
||||||
pagination: false,
|
|
||||||
canResize: false,
|
|
||||||
showTableSetting: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
provide('getLeftTreeActiveInfo', () => state.leftTreeActiveInfo);
|
|
||||||
|
|
||||||
const getHasBatchBtn = computed(() => {
|
|
||||||
let btnsList =[]
|
|
||||||
return !!btnsList.length
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
const getColumns = computed(() => {
|
|
||||||
const columns = state.complexColumns;
|
|
||||||
return setListValue(state.currentView?.columnList, columns, 'prop');
|
|
||||||
});
|
|
||||||
const getSearchList = computed(() => {
|
|
||||||
const searchSchemas = cloneDeep(state.searchSchemas).map(o => ({ ...o, show: true }));
|
|
||||||
return setListValue(state.currentView?.searchList, searchSchemas, 'field');
|
|
||||||
});
|
|
||||||
const getTableBindValue = computed(() => {
|
|
||||||
let columns = unref(getColumns);
|
|
||||||
const defaultSortConfig= [];
|
|
||||||
const sortField = defaultSortConfig.map(o => (o.sort === 'desc' ? '-' : '') + o.field);
|
|
||||||
const data: any = {
|
|
||||||
pagination: { pageSize: 20 }, //有分页
|
|
||||||
searchInfo: unref(searchInfo),
|
|
||||||
defSort: { sidx: sortField.join(',') },
|
|
||||||
sortFn: (sortInfo: SorterResult | SorterResult[]) => {
|
|
||||||
if (Array.isArray(sortInfo)) {
|
|
||||||
const sortList = sortInfo.map(o => (o.order === 'descend' ? '-' : '') + o.field);
|
|
||||||
return { sidx: sortList.join(',') };
|
|
||||||
} else {
|
|
||||||
const { field, order } = sortInfo;
|
|
||||||
if (field && order) {
|
|
||||||
// 排序字段
|
|
||||||
return { sidx: (order === 'descend' ? '-' : '') + field };
|
|
||||||
} else {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
ellipsis:true ,
|
|
||||||
columns,
|
|
||||||
bordered: true,
|
|
||||||
actionColumn: {
|
|
||||||
width: 150,
|
|
||||||
title: t('component.table.action'),
|
|
||||||
dataIndex: 'action',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
if (unref(getHasBatchBtn)) {
|
|
||||||
const rowSelection: any = { type: 'checkbox' };
|
|
||||||
data.rowSelection = rowSelection;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
});
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
state.config = {};
|
|
||||||
searchInfo.menuId = route.meta.modelId as string;
|
|
||||||
state.columnList = columnList;
|
|
||||||
setLoading(true);
|
|
||||||
getSearchSchemas();
|
|
||||||
getColumnList();
|
|
||||||
initViewList();
|
|
||||||
nextTick(() => {
|
|
||||||
unref(getSearchList)?.length ? searchFormSubmit() : reload({ page: 1 });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function getSearchSchemas() {
|
|
||||||
|
|
||||||
const schemas = getSearchFormSchemas(searchList);
|
|
||||||
state.searchSchemas = schemas;
|
|
||||||
schemas.forEach((cur) => {
|
|
||||||
const config = cur.__config__;
|
|
||||||
if (dyOptionsList.includes(config.yunzhupaasKey)) {
|
|
||||||
if (config.dataType === 'dictionary') {
|
|
||||||
if (!config.dictionaryType) return;
|
|
||||||
getDictionaryDataSelector(config.dictionaryType).then((res) => {
|
|
||||||
updateSchema([{ field: cur.field, componentProps: { options: res.data.list } }]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (config.dataType === 'dynamic') {
|
|
||||||
if (!config.propsUrl) return;
|
|
||||||
const query = { paramList: getParamList(config.templateJson) };
|
|
||||||
getDataInterfaceRes(config.propsUrl, query).then((res) => {
|
|
||||||
const data = Array.isArray(res.data) ? res.data : [];
|
|
||||||
updateSchema([{ field: cur.field, componentProps: { options: data } }]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cur.defaultValue = cur.value;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function getColumnList() {
|
|
||||||
// 没有开启列表权限
|
|
||||||
let columnList = state.columnList;
|
|
||||||
state.exportList = columnList;
|
|
||||||
let columns = columnList.map((o) => ({
|
|
||||||
...o,
|
|
||||||
title: o.labelI18nCode ? t(o.labelI18nCode, o.label) : o.label,
|
|
||||||
dataIndex: o.prop,
|
|
||||||
align: o.align,
|
|
||||||
fixed: o.fixed == 'none' ? false : o.fixed,
|
|
||||||
sorter: o.sortable ? { multiple: 1 } : o.sortable,
|
|
||||||
width: o.width || 100,
|
|
||||||
}));
|
|
||||||
//添加复杂表头
|
|
||||||
columns = getComplexColumns(columns);
|
|
||||||
state.columns = columns.filter((o) => o.prop.indexOf('-') < 0);
|
|
||||||
//子表表头
|
|
||||||
getChildComplexColumns(columns);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//复杂表头
|
|
||||||
function getComplexColumns(columns) {
|
|
||||||
//这里生成复杂表头的配置
|
|
||||||
let complexHeaderList: any[] = [];
|
|
||||||
if (!complexHeaderList.length) return columns;
|
|
||||||
let childColumns: any[] = [];
|
|
||||||
let firstChildColumns: string[] = [];
|
|
||||||
for (let i = 0; i < complexHeaderList.length; i++) {
|
|
||||||
const e = complexHeaderList[i];
|
|
||||||
e.label = e.fullName;
|
|
||||||
e.labelI18nCode = e.fullNameI18nCode;
|
|
||||||
e.title = e.fullNameI18nCode ? t(e.fullNameI18nCode, e.fullName) : e.fullName;
|
|
||||||
e.align = e.align;
|
|
||||||
e.dataIndex = e.id;
|
|
||||||
e.prop = e.id;
|
|
||||||
e.children = [];
|
|
||||||
e.yunzhupaasKey = 'complexHeader';
|
|
||||||
if (e.childColumns?.length) {
|
|
||||||
childColumns.push(...e.childColumns);
|
|
||||||
for (let k = 0; k < e.childColumns.length; k++) {
|
|
||||||
const item = e.childColumns[k];
|
|
||||||
for (let j = 0; j < columns.length; j++) {
|
|
||||||
const o = columns[j];
|
|
||||||
if (o.prop == item && o.fixed !== 'left' && o.fixed !== 'right') e.children.push({ ...o });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (e.children.length) firstChildColumns.push(e.children[0].prop);
|
|
||||||
}
|
|
||||||
complexHeaderList = complexHeaderList.filter(o => o.children.length);
|
|
||||||
let list: any[] = [];
|
|
||||||
for (let i = 0; i < columns.length; i++) {
|
|
||||||
const e = columns[i];
|
|
||||||
if (!childColumns.includes(e.prop)) {
|
|
||||||
list.push(e);
|
|
||||||
} else {
|
|
||||||
if (firstChildColumns.includes(e.prop)) {
|
|
||||||
const item = complexHeaderList.find(o => o.childColumns.includes(e.prop));
|
|
||||||
list.push(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
//子表表头
|
|
||||||
function getChildComplexColumns(columnList) {
|
|
||||||
let list: any[] = [];
|
|
||||||
for (let i = 0; i < columnList.length; i++) {
|
|
||||||
const e = columnList[i];
|
|
||||||
if (!e.prop.includes('-')) {
|
|
||||||
list.push(e);
|
|
||||||
} else {
|
|
||||||
let prop = e.prop.split('-')[0];
|
|
||||||
let vModel = e.prop.split('-')[1];
|
|
||||||
let label = e.label.split('-')[0];
|
|
||||||
let childLabel = e.label.replace(label + '-', '');
|
|
||||||
if (e.fullNameI18nCode && Array.isArray(e.fullNameI18nCode) && e.fullNameI18nCode[0]) label = t(e.fullNameI18nCode[0], label);
|
|
||||||
let newItem = {
|
|
||||||
align: 'center',
|
|
||||||
yunzhupaasKey: 'table',
|
|
||||||
prop,
|
|
||||||
label,
|
|
||||||
title: label,
|
|
||||||
dataIndex: prop,
|
|
||||||
children: [],
|
|
||||||
};
|
|
||||||
e.dataIndex = vModel;
|
|
||||||
e.title = e.labelI18nCode ? t(e.labelI18nCode, childLabel) : childLabel;
|
|
||||||
if (!state.expandObj.hasOwnProperty(prop+`Expand`)) state.expandObj[prop+`Expand`] = false;
|
|
||||||
if (!list.some((o) => o.prop === prop)) list.push(newItem);
|
|
||||||
for (let i = 0; i < list.length; i++) {
|
|
||||||
if (list[i].prop === prop) {
|
|
||||||
list[i].children.push(e);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 行内分组展示
|
|
||||||
getMergeList(list);
|
|
||||||
|
|
||||||
state.complexColumns = list;
|
|
||||||
state.childColumnList = list.filter((o) => o.yunzhupaasKey === 'table');
|
|
||||||
|
|
||||||
// 子表分组展示宽度取100
|
|
||||||
for (let i = 0; i < state.childColumnList.length; i++) {
|
|
||||||
const e = state.childColumnList[i];
|
|
||||||
if (e.children?.length) e.children = e.children.map(o => ({ ...o, width: 100 }));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getMergeList(list) {
|
|
||||||
list.forEach((item) => {
|
|
||||||
if (item.yunzhupaasKey === 'table' && item.children && item.children.length) {
|
|
||||||
item.children.forEach((child, index) => {
|
|
||||||
if (index == 0) {
|
|
||||||
child.customCell = () => ({
|
|
||||||
rowspan: 1,
|
|
||||||
colspan: item.children.length,
|
|
||||||
class: 'child-table-box',
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
child.customCell = () => ({
|
|
||||||
rowspan: 0,
|
|
||||||
colspan: 0,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function toggleExpand(row, field) {
|
|
||||||
row[field] = !row[field];
|
|
||||||
}
|
|
||||||
// 关联表单查看详情
|
|
||||||
function toDetail(modelId, id, propsValue) {
|
|
||||||
if (!id) return;
|
|
||||||
getConfigData(modelId).then((res) => {
|
|
||||||
if (!res.data || !res.data.formData) return;
|
|
||||||
const formConf = JSON.parse(res.data.formData);
|
|
||||||
formConf.popupType = 'general';
|
|
||||||
formConf.hasPrintBtn = false;
|
|
||||||
formConf.customBtns = [];
|
|
||||||
const data = { id, formConf, modelId, propsValue};
|
|
||||||
relationDetailRef.value?.init(data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function handleColumnChange(data) {
|
|
||||||
state.columnSettingList = data;
|
|
||||||
}
|
|
||||||
function getTableActions(record): ActionItem[] {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: t('common.editText','编辑') ,
|
|
||||||
onClick: updateHandle.bind(null, record),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('common.delText','删除') ,
|
|
||||||
color: 'error',
|
|
||||||
modelConfirm: {
|
|
||||||
onOk: handleDelete.bind(null, record.id),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// label: t('common.detailText','详情') ,
|
|
||||||
// onClick: goDetail.bind(null, record),
|
|
||||||
// },
|
|
||||||
];
|
|
||||||
}
|
|
||||||
// 编辑
|
|
||||||
function updateHandle(record) {
|
|
||||||
// 不带工作流
|
|
||||||
const data = {
|
|
||||||
id: record.id,
|
|
||||||
menuId: searchInfo.menuId,
|
|
||||||
allList: state.cacheList,
|
|
||||||
};
|
|
||||||
formRef.value?.init(data);
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
function handleDelete(id) {
|
|
||||||
const query={ids:[id] }
|
|
||||||
batchDelete(query).then((res) => {
|
|
||||||
createMessage.success(res.msg);
|
|
||||||
clearSelectedRowKeys();
|
|
||||||
reload();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 查看详情
|
|
||||||
function goDetail(record) {
|
|
||||||
// 不带流程
|
|
||||||
const data = {
|
|
||||||
id: record.id,
|
|
||||||
};
|
|
||||||
detailRef.value?.init(data);
|
|
||||||
}
|
|
||||||
// 新增
|
|
||||||
function addHandle() {
|
|
||||||
// 不带流程新增
|
|
||||||
const data = {
|
|
||||||
id: '',
|
|
||||||
menuId: searchInfo.menuId,
|
|
||||||
allList: state.cacheList,
|
|
||||||
};
|
|
||||||
formRef.value?.init(data);
|
|
||||||
}
|
|
||||||
// 高级查询
|
|
||||||
function handleSuperQuery(superQueryJson) {
|
|
||||||
searchInfo.superQueryJson = superQueryJson;
|
|
||||||
reload({ page: 1 });
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSearchReset() {
|
|
||||||
clearSelectedRowKeys();
|
|
||||||
if (!state.resetFromTree) updateSearchFormValue();
|
|
||||||
if (state.resetFromTree) state.resetFromTree = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSearchSubmit(data) {
|
|
||||||
clearSelectedRowKeys();
|
|
||||||
let obj = {
|
|
||||||
...defaultSearchInfo,
|
|
||||||
superQueryJson: searchInfo.superQueryJson,
|
|
||||||
...data,
|
|
||||||
};
|
|
||||||
Object.keys(searchInfo).map(key => {
|
|
||||||
delete searchInfo[key];
|
|
||||||
});
|
|
||||||
for (let [key, value] of Object.entries(obj)) {
|
|
||||||
searchInfo[key.replaceAll('-', '_')] = value;
|
|
||||||
}
|
|
||||||
console.log(searchInfo);
|
|
||||||
reload({ page: 1 });
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateSearchFormValue() {
|
|
||||||
if (!state.treeActiveId) return searchFormSubmit();
|
|
||||||
let queryJson: any = {};
|
|
||||||
let leftTreeActiveInfo: any = {};
|
|
||||||
const isMultiple = !state.treeRelationObj ? false : state.treeRelationObj.searchMultiple;
|
|
||||||
//多级左侧树,需要拼父级->转为查询参数
|
|
||||||
if (state.treeRelationObj && state.treeRelationObj.yunzhupaasKey && ['organizeSelect', 'cascader', 'areaSelect'].includes(state.treeRelationObj.yunzhupaasKey)) {
|
|
||||||
let currValue = [];
|
|
||||||
currValue = state.treeActiveNodePath.map(o => o[state.treeFieldNames.key]);
|
|
||||||
queryJson = { '': isMultiple ? [currValue] : currValue };
|
|
||||||
leftTreeActiveInfo = { '': state.treeRelationObj.multiple ? [currValue] : currValue };
|
|
||||||
} else {
|
|
||||||
queryJson = { '': isMultiple ? [state.treeActiveId] : state.treeActiveId };
|
|
||||||
leftTreeActiveInfo = { '': state.treeRelationObj.multiple ? [state.treeActiveId] : state.treeActiveId };
|
|
||||||
}
|
|
||||||
state.leftTreeActiveInfo = leftTreeActiveInfo;
|
|
||||||
if(unref(getSearchList)?.length){
|
|
||||||
// 有搜索列表
|
|
||||||
setFieldsValue(queryJson);
|
|
||||||
searchFormSubmit();
|
|
||||||
}else{
|
|
||||||
// 无搜索列表
|
|
||||||
handleSearchSubmit(queryJson);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function initViewList(currentId = '') {
|
|
||||||
const query = {
|
|
||||||
menuId: route.meta.modelId,
|
|
||||||
};
|
|
||||||
getViewList(query).then(res => {
|
|
||||||
const columns : any[]= state.complexColumns;
|
|
||||||
const searchList: any[] = state.searchSchemas.map(o => ({ label: o.label, id: o.field, show: o.show, labelI18nCode: o.labelI18nCode }));
|
|
||||||
const columnList: any[] = columns.map(o => ({ label: o.label, id: o.prop, show: true, fixed: o.fixed || 'none', labelI18nCode: o.labelI18nCode }));
|
|
||||||
state.viewList = (res.data || []).map(o => {
|
|
||||||
if (o.type == 0) return { ...o, searchList, columnList };
|
|
||||||
return { ...o, searchList: o.searchList ? JSON.parse(o.searchList) : [], columnList: o.columnList ? JSON.parse(o.columnList) : [] };
|
|
||||||
});
|
|
||||||
if (currentId) {
|
|
||||||
state.currentView = state.viewList.filter(o => o.id === currentId)[0] || state.viewList[0];
|
|
||||||
} else {
|
|
||||||
state.currentView = state.viewList.filter(o => o.status === 1)[0] || state.viewList[0];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function handleViewClick(item) {
|
|
||||||
state.currentView = item;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setListValue(data: any[] = [], defaultData: any[] = [], key) {
|
|
||||||
let list: any[] = [];
|
|
||||||
for (let i = 0; i < data.length; i++) {
|
|
||||||
for (let j = 0; j < defaultData.length; j++) {
|
|
||||||
if (data[i].show && data[i].id == defaultData[j][key]) list.push(defaultData[j]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
init();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -7,117 +7,129 @@
|
|||||||
<a-row :gutter="15">
|
<a-row :gutter="15">
|
||||||
<!-- 具体表单 -->
|
<!-- 具体表单 -->
|
||||||
<a-col :span="12" class="ant-col-item">
|
<a-col :span="12" class="ant-col-item">
|
||||||
<a-form-item name="opportunity_code">
|
<a-form-item name="asset_code">
|
||||||
<template #label>商机编码: </template>
|
<template #label>资产编码 </template> <p>{{ dataForm.asset_code }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="asset_name">
|
||||||
|
<template #label>资产名称 </template>
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="dataForm.opportunity_code"
|
v-model:value="dataForm.asset_name"
|
||||||
placeholder="请输入商机编码"
|
placeholder="请输入"
|
||||||
:maxlength="50"
|
:maxlength="20"
|
||||||
disabled
|
disabled
|
||||||
detailed
|
detailed
|
||||||
allowClear
|
allowClear
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.opportunity_code">
|
:maskConfig="maskConfig.asset_name">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12" class="ant-col-item">
|
<a-col :span="12" class="ant-col-item">
|
||||||
<a-form-item name="opportunity_name">
|
<a-form-item name="asset_type">
|
||||||
<template #label>商机名称: </template>
|
<template #label>资产类型 </template> <p>{{ dataForm.asset_type }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="asset_category">
|
||||||
|
<template #label>资产分类 </template> <p>{{ dataForm.asset_category }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="asset_status">
|
||||||
|
<template #label>资产状态 </template> <p>{{ dataForm.asset_status }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="asset_location">
|
||||||
|
<template #label>资产位置 </template> <p>{{ dataForm.asset_location }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="current_org_id">
|
||||||
|
<template #label>使用组织 </template> <p>{{ dataForm.current_org_id }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="current_user_id">
|
||||||
|
<template #label>保管用户 </template> <p>{{ dataForm.current_user_id }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="asset_ownership">
|
||||||
|
<template #label>资产权属 </template> <p>{{ dataForm.asset_ownership }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="measurement_unit">
|
||||||
|
<template #label>单位 </template>
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="dataForm.opportunity_name"
|
v-model:value="dataForm.measurement_unit"
|
||||||
placeholder="请输入商机名称"
|
placeholder="请输入"
|
||||||
:maxlength="50"
|
:maxlength="20"
|
||||||
disabled
|
disabled
|
||||||
detailed
|
detailed
|
||||||
allowClear
|
allowClear
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.opportunity_name">
|
:maskConfig="maskConfig.measurement_unit">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="quantity">
|
||||||
|
<template #label>数量 </template>
|
||||||
|
<YunzhupaasInputNumber
|
||||||
|
v-model:value="dataForm.quantity"
|
||||||
|
placeholder="请输入"
|
||||||
|
disabled
|
||||||
|
detailed
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
:step="1"
|
||||||
|
:precision="2"
|
||||||
|
:controls="false">
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="purchase_date">
|
||||||
|
<template #label>购置日期 </template> <p>{{ dataForm.purchase_date }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="commissioning_date">
|
||||||
|
<template #label>启用日期 </template> <p>{{ dataForm.commissioning_date }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="expected_life">
|
||||||
|
<template #label>预计使用年限 </template>
|
||||||
|
<YunzhupaasInputNumber
|
||||||
|
v-model:value="dataForm.expected_life"
|
||||||
|
placeholder="请输入"
|
||||||
|
disabled
|
||||||
|
detailed
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
:step="1"
|
||||||
|
:precision="2"
|
||||||
|
:controls="false"
|
||||||
|
addonAfter="月">
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item">
|
<a-col :span="24" class="ant-col-item">
|
||||||
<a-form-item name="customer_id">
|
<a-form-item name="supplier_id">
|
||||||
<template #label>客户: </template>
|
<template #label>供应商 </template>
|
||||||
<p class="link-text leading-32px" @click="toDetail('806858527036409349', dataForm.customer_id_id, 'company_id')">{{ dataForm.customer_id }}</p>
|
<p class="link-text leading-32px" @click="toDetail('817082533433836293', dataForm.supplier_id_yunzhupaasId, 'company_id')">{{ dataForm.supplier_id }}</p>
|
||||||
<ExtraRelationInfo
|
<ExtraRelationInfo
|
||||||
:extraOptions="state.extraOptions.customer_id"
|
:extraOptions="state.extraOptions.supplier_id"
|
||||||
:data="state.extraData.customer_id"
|
:data="state.extraData.supplier_id"
|
||||||
v-if="state.extraOptions.customer_id?.length && state.extraData.customer_id && JSON.stringify(state.extraData.customer_id) !== '{}'" />
|
v-if="state.extraOptions.supplier_id?.length && state.extraData.supplier_id && JSON.stringify(state.extraData.supplier_id) !== '{}'" />
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="owner_id">
|
|
||||||
<template #label>商机负责人: </template> <p>{{ dataForm.owner_id }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="opportunity_stage">
|
|
||||||
<template #label>商机阶段: </template> <p>{{ dataForm.opportunity_stage }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="amount">
|
|
||||||
<template #label>预计金额: </template>
|
|
||||||
<YunzhupaasInputNumber
|
|
||||||
v-model:value="dataForm.amount"
|
|
||||||
placeholder="请输入预计金额"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:max="9999999"
|
|
||||||
:step="1"
|
|
||||||
:precision="2"
|
|
||||||
:controls="false"
|
|
||||||
addonAfter="元">
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="close_date">
|
|
||||||
<template #label>预计成交日期: </template> <p>{{ dataForm.close_date }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="desciption">
|
|
||||||
<template #label>商机简介: </template> <p>{{ dataForm.desciption }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="probability">
|
|
||||||
<template #label>赢单概率: </template>
|
|
||||||
<YunzhupaasInputNumber
|
|
||||||
v-model:value="dataForm.probability"
|
|
||||||
placeholder="请输入赢单概率"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:max="100"
|
|
||||||
:step="1"
|
|
||||||
:precision="2"
|
|
||||||
:controls="false"
|
|
||||||
addonAfter="%">
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="last_followup_date">
|
|
||||||
<template #label>最后跟进日期: </template> <p>{{ dataForm.last_followup_date }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="competitor">
|
|
||||||
<template #label>竞争对手信息: </template> <p>{{ dataForm.competitor }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="analysis">
|
|
||||||
<template #label>决策分析: </template> <p>{{ dataForm.analysis }}</p>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item">
|
<a-col :span="24" class="ant-col-item">
|
||||||
<a-form-item name="remark">
|
<a-form-item name="remark">
|
||||||
<template #label>备注: </template> <p>{{ dataForm.remark }}</p>
|
<template #label>备注 </template> <p>{{ dataForm.remark }}</p>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- 表单结束 -->
|
<!-- 表单结束 -->
|
||||||
@@ -127,9 +139,12 @@
|
|||||||
</BasicPopup>
|
</BasicPopup>
|
||||||
<!-- 有关联表单详情:开始 -->
|
<!-- 有关联表单详情:开始 -->
|
||||||
<RelationDetail ref="relationDetailRef" />
|
<RelationDetail ref="relationDetailRef" />
|
||||||
|
<SuppinfoDetailDrawer ref="SuppinfoDetailRef" />
|
||||||
<!-- 有关联表单详情:结束 -->
|
<!-- 有关联表单详情:结束 -->
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import SuppinfoDetailDrawer from '@/views/mdm/suppinfo/Detail.vue'; // 根据实际路径调整
|
||||||
|
|
||||||
import { getDetailInfo } from './helper/api';
|
import { getDetailInfo } from './helper/api';
|
||||||
import { getConfigData } from '@/api/onlineDev/visualDev';
|
import { getConfigData } from '@/api/onlineDev/visualDev';
|
||||||
import { reactive, toRefs, nextTick, ref, computed, unref, toRaw } from 'vue';
|
import { reactive, toRefs, nextTick, ref, computed, unref, toRaw } from 'vue';
|
||||||
@@ -167,7 +182,7 @@
|
|||||||
dataForm: {},
|
dataForm: {},
|
||||||
title: t('common.detailText', '详情'),
|
title: t('common.detailText', '详情'),
|
||||||
maskConfig: {
|
maskConfig: {
|
||||||
opportunity_code: {
|
asset_name: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -180,7 +195,7 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
opportunity_name: {
|
measurement_unit: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -195,26 +210,29 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
interfaceRes: {
|
interfaceRes: {
|
||||||
desciption: [],
|
quantity: [],
|
||||||
amount: [],
|
expected_life: [],
|
||||||
close_date: [],
|
current_org_id: [],
|
||||||
opportunity_code: [],
|
current_user_id: [],
|
||||||
owner_id: [],
|
|
||||||
probability: [],
|
|
||||||
remark: [],
|
remark: [],
|
||||||
analysis: [],
|
commissioning_date: [],
|
||||||
last_followup_date: [],
|
asset_location: [],
|
||||||
opportunity_stage: [],
|
asset_status: [],
|
||||||
opportunity_name: [],
|
asset_category: [],
|
||||||
competitor: [],
|
asset_name: [],
|
||||||
customer_id: [],
|
asset_ownership: [],
|
||||||
|
asset_code: [],
|
||||||
|
asset_type: [],
|
||||||
|
measurement_unit: [],
|
||||||
|
purchase_date: [],
|
||||||
|
supplier_id: [],
|
||||||
},
|
},
|
||||||
locationScope: {},
|
locationScope: {},
|
||||||
extraOptions: {
|
extraOptions: {
|
||||||
customer_id: [],
|
supplier_id: [],
|
||||||
},
|
},
|
||||||
extraData: {
|
extraData: {
|
||||||
customer_id: {},
|
supplier_id: {},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const { title, dataForm, maskConfig } = toRefs(state);
|
const { title, dataForm, maskConfig } = toRefs(state);
|
||||||
@@ -242,7 +260,7 @@
|
|||||||
getDetailInfo(id).then(res => {
|
getDetailInfo(id).then(res => {
|
||||||
state.dataForm = res.data || {};
|
state.dataForm = res.data || {};
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
getcustomer_idExtraInfo();
|
getsupplier_idExtraInfo();
|
||||||
changeLoading(false);
|
changeLoading(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -250,6 +268,10 @@
|
|||||||
|
|
||||||
function toDetail(modelId, id, propsValue) {
|
function toDetail(modelId, id, propsValue) {
|
||||||
if (!id) return;
|
if (!id) return;
|
||||||
|
|
||||||
|
if (toDetail_add(modelId, id, propsValue)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
getConfigData(modelId).then(res => {
|
getConfigData(modelId).then(res => {
|
||||||
if (!res.data || !res.data.formData) return;
|
if (!res.data || !res.data.formData) return;
|
||||||
const formConf = JSON.parse(res.data.formData);
|
const formConf = JSON.parse(res.data.formData);
|
||||||
@@ -258,7 +280,6 @@
|
|||||||
formConf.customBtns = [];
|
formConf.customBtns = [];
|
||||||
const data = { id, formConf, modelId, propsValue };
|
const data = { id, formConf, modelId, propsValue };
|
||||||
relationDetailRef.value?.init(data);
|
relationDetailRef.value?.init(data);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function setFormProps(data) {
|
function setFormProps(data) {
|
||||||
@@ -278,18 +299,24 @@
|
|||||||
}
|
}
|
||||||
return templateJson;
|
return templateJson;
|
||||||
}
|
}
|
||||||
function getcustomer_idExtraInfo() {
|
function getsupplier_idExtraInfo() {
|
||||||
if (!state.dataForm.customer_id) return;
|
if (!state.dataForm.supplier_id_id) return;
|
||||||
console.log(state.dataForm.customer_id_id);
|
|
||||||
|
|
||||||
let query: any = {
|
let query: any = {
|
||||||
id: state.dataForm.customer_id_id,
|
id: state.dataForm.supplier_id_id,
|
||||||
propsValue: 'company_id',
|
propsValue: 'company_id',
|
||||||
};
|
};
|
||||||
getDataChange('806858527036409349', query).then(res => {
|
getDataChange('817082533433836293', query).then(res => {
|
||||||
if (!res.data || !res.data.data) return;
|
if (!res.data || !res.data.data) return;
|
||||||
const data = JSON.parse(res.data.data);
|
const data = JSON.parse(res.data.data);
|
||||||
state.extraData.customer_id = data;
|
state.extraData.supplier_id = data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 新增方法 */
|
||||||
|
// 修改 toDetail 方法,区分不同类型的详情
|
||||||
|
const SuppinfoDetailRef = ref<any>(null); // 新增 ref
|
||||||
|
function toDetail_add(modelId, id, propsValue) {
|
||||||
|
// 直接打开企业详情 Drawer
|
||||||
|
SuppinfoDetailRef.value?.init({ id });
|
||||||
|
return true; // 返回 true 表示已处理
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -41,110 +41,176 @@
|
|||||||
<a-row :gutter="15">
|
<a-row :gutter="15">
|
||||||
<!-- 具体表单 -->
|
<!-- 具体表单 -->
|
||||||
<a-col :span="12" class="ant-col-item">
|
<a-col :span="12" class="ant-col-item">
|
||||||
<a-form-item name="opportunity_code">
|
<a-form-item name="asset_code">
|
||||||
<template #label>商机编码:</template>
|
<template #label>资产编码 </template>
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="dataForm.opportunity_code"
|
v-model:value="dataForm.asset_code"
|
||||||
@change="changeData('opportunity_code', -1)"
|
@change="changeData('asset_code', -1)"
|
||||||
placeholder="请输入商机编码"
|
placeholder="系统自动生成"
|
||||||
:maxlength="50"
|
readonly
|
||||||
|
:style="{ width: '100%' }">
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="asset_name">
|
||||||
|
<template #label>资产名称 </template>
|
||||||
|
<YunzhupaasInput
|
||||||
|
v-model:value="dataForm.asset_name"
|
||||||
|
@change="changeData('asset_name', -1)"
|
||||||
|
placeholder="请输入"
|
||||||
|
:maxlength="20"
|
||||||
:allowClear="true"
|
:allowClear="true"
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.opportunity_code"
|
:maskConfig="maskConfig.asset_name"
|
||||||
:showCount="false">
|
:showCount="false">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12" class="ant-col-item">
|
<a-col :span="12" class="ant-col-item">
|
||||||
<a-form-item name="opportunity_name">
|
<a-form-item name="asset_type">
|
||||||
<template #label>商机名称: </template>
|
<template #label>资产类型 </template>
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.opportunity_name"
|
|
||||||
@change="changeData('opportunity_name', -1)"
|
|
||||||
placeholder="请输入商机名称"
|
|
||||||
:maxlength="50"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.opportunity_name"
|
|
||||||
:showCount="false">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="customer_id">
|
|
||||||
<template #label>客户: </template>
|
|
||||||
<YunzhupaasRelationForm
|
|
||||||
v-model:value="dataForm.customer_id"
|
|
||||||
@change="changeData('customer_id', -1)"
|
|
||||||
placeholder="请选择客户"
|
|
||||||
:templateJson="state.interfaceRes.customer_id"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:showSearch="false"
|
|
||||||
:field="'customer_id'"
|
|
||||||
modelId="806858527036409349"
|
|
||||||
:columnOptions="optionsObj.customer_idcolumnOptions"
|
|
||||||
relationField="company_name"
|
|
||||||
popupWidth="70%"
|
|
||||||
propsValue="company_id"
|
|
||||||
:queryType="0"
|
|
||||||
:extraOptions="state.extraOptions.customer_id">
|
|
||||||
</YunzhupaasRelationForm>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="owner_id">
|
|
||||||
<template #label>商机负责人: </template>
|
|
||||||
<YunzhupaasUsersSelect
|
|
||||||
v-model:value="dataForm.owner_id"
|
|
||||||
@change="changeData('owner_id', -1)"
|
|
||||||
placeholder="请选择商机负责人"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
selectType="all">
|
|
||||||
</YunzhupaasUsersSelect>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="opportunity_stage">
|
|
||||||
<template #label>商机阶段: </template>
|
|
||||||
<YunzhupaasSelect
|
<YunzhupaasSelect
|
||||||
v-model:value="dataForm.opportunity_stage"
|
v-model:value="dataForm.asset_type"
|
||||||
@change="changeData('opportunity_stage', -1)"
|
@change="changeData('asset_type', -1)"
|
||||||
placeholder="请选择商机阶段"
|
placeholder="请选择"
|
||||||
:templateJson="state.interfaceRes.opportunity_stage"
|
:templateJson="state.interfaceRes.asset_type"
|
||||||
:allowClear="true"
|
:allowClear="true"
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:showSearch="false"
|
:showSearch="false"
|
||||||
:options="optionsObj.opportunity_stageOptions"
|
:options="optionsObj.asset_typeOptions"
|
||||||
:fieldNames="optionsObj.opportunity_stageProps">
|
:fieldNames="optionsObj.asset_typeProps">
|
||||||
</YunzhupaasSelect>
|
</YunzhupaasSelect>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12" class="ant-col-item">
|
<a-col :span="12" class="ant-col-item">
|
||||||
<a-form-item name="amount">
|
<a-form-item name="asset_category">
|
||||||
<template #label>预计金额: </template>
|
<template #label>资产分类 </template>
|
||||||
<YunzhupaasInputNumber
|
<YunzhupaasSelect
|
||||||
v-model:value="dataForm.amount"
|
v-model:value="dataForm.asset_category"
|
||||||
@change="changeData('amount', -1)"
|
@change="changeData('asset_category', -1)"
|
||||||
placeholder="请输入预计金额"
|
placeholder="请选择"
|
||||||
|
:templateJson="state.interfaceRes.asset_category"
|
||||||
|
:allowClear="true"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
:showSearch="false"
|
||||||
|
:options="optionsObj.asset_categoryOptions"
|
||||||
|
:fieldNames="optionsObj.asset_categoryProps">
|
||||||
|
</YunzhupaasSelect>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="asset_status">
|
||||||
|
<template #label>资产状态 </template>
|
||||||
|
<YunzhupaasSelect
|
||||||
|
v-model:value="dataForm.asset_status"
|
||||||
|
@change="changeData('asset_status', -1)"
|
||||||
|
placeholder="请选择"
|
||||||
|
:templateJson="state.interfaceRes.asset_status"
|
||||||
|
:allowClear="true"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
:showSearch="false"
|
||||||
|
:options="optionsObj.asset_statusOptions"
|
||||||
|
:fieldNames="optionsObj.asset_statusProps">
|
||||||
|
</YunzhupaasSelect>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="asset_location">
|
||||||
|
<template #label>资产位置 </template>
|
||||||
|
<YunzhupaasCascader
|
||||||
|
v-model:value="dataForm.asset_location"
|
||||||
|
@change="changeData('asset_location', -1)"
|
||||||
|
placeholder="请选择"
|
||||||
|
:templateJson="state.interfaceRes.asset_location"
|
||||||
|
:allowClear="true"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
:showSearch="false"
|
||||||
|
:options="optionsObj.asset_locationOptions"
|
||||||
|
:fieldNames="optionsObj.asset_locationProps">
|
||||||
|
</YunzhupaasCascader>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="current_org_id">
|
||||||
|
<template #label>使用组织 </template>
|
||||||
|
<YunzhupaasOrganizeSelect
|
||||||
|
v-model:value="dataForm.current_org_id"
|
||||||
|
@change="changeData('current_org_id', -1)"
|
||||||
|
placeholder="请选择"
|
||||||
|
:allowClear="true"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
:showSearch="false"
|
||||||
|
selectType="all">
|
||||||
|
</YunzhupaasOrganizeSelect>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="current_user_id">
|
||||||
|
<template #label>保管用户 </template>
|
||||||
|
<YunzhupaasUserSelect
|
||||||
|
v-model:value="dataForm.current_user_id"
|
||||||
|
@change="changeData('current_user_id', -1)"
|
||||||
|
placeholder="请选择"
|
||||||
|
:allowClear="true"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
selectType="all">
|
||||||
|
</YunzhupaasUserSelect>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="asset_ownership">
|
||||||
|
<template #label>资产权属 </template>
|
||||||
|
<YunzhupaasSelect
|
||||||
|
v-model:value="dataForm.asset_ownership"
|
||||||
|
@change="changeData('asset_ownership', -1)"
|
||||||
|
placeholder="请选择"
|
||||||
|
:templateJson="state.interfaceRes.asset_ownership"
|
||||||
|
:allowClear="true"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
:showSearch="false"
|
||||||
|
:options="optionsObj.asset_ownershipOptions"
|
||||||
|
:fieldNames="optionsObj.asset_ownershipProps">
|
||||||
|
</YunzhupaasSelect>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="measurement_unit">
|
||||||
|
<template #label>单位 </template>
|
||||||
|
<YunzhupaasInput
|
||||||
|
v-model:value="dataForm.measurement_unit"
|
||||||
|
@change="changeData('measurement_unit', -1)"
|
||||||
|
placeholder="请输入"
|
||||||
|
:maxlength="20"
|
||||||
|
:allowClear="true"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
:maskConfig="maskConfig.measurement_unit"
|
||||||
|
:showCount="false">
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item">
|
||||||
|
<a-form-item name="quantity">
|
||||||
|
<template #label>数量 </template>
|
||||||
|
<YunzhupaasInputNumber
|
||||||
|
v-model:value="dataForm.quantity"
|
||||||
|
@change="changeData('quantity', -1)"
|
||||||
|
placeholder="请输入"
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:max="9999999"
|
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
addonAfter="元"
|
|
||||||
:controls="false">
|
:controls="false">
|
||||||
</YunzhupaasInputNumber>
|
</YunzhupaasInputNumber>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
<a-col :span="12" class="ant-col-item">
|
||||||
<a-form-item name="close_date">
|
<a-form-item name="purchase_date">
|
||||||
<template #label>预计成交日期: </template>
|
<template #label>购置日期 </template>
|
||||||
<YunzhupaasDatePicker
|
<YunzhupaasDatePicker
|
||||||
v-model:value="dataForm.close_date"
|
v-model:value="dataForm.purchase_date"
|
||||||
@change="changeData('close_date', -1)"
|
@change="changeData('purchase_date', -1)"
|
||||||
placeholder="请选择预计成交日期"
|
placeholder="请选择"
|
||||||
:allowClear="true"
|
:allowClear="true"
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
@@ -153,46 +219,14 @@
|
|||||||
</YunzhupaasDatePicker>
|
</YunzhupaasDatePicker>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="desciption">
|
|
||||||
<template #label>商机简介: </template>
|
|
||||||
<YunzhupaasTextarea
|
|
||||||
v-model:value="dataForm.desciption"
|
|
||||||
@change="changeData('desciption', -1)"
|
|
||||||
placeholder="请输入商机简介"
|
|
||||||
:maxlength="200"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:autoSize="{ minRows: 3, maxRows: 3 }"
|
|
||||||
:showCount="false">
|
|
||||||
</YunzhupaasTextarea>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="probability">
|
|
||||||
<template #label>赢单概率: </template>
|
|
||||||
<YunzhupaasInputNumber
|
|
||||||
v-model:value="dataForm.probability"
|
|
||||||
@change="changeData('probability', -1)"
|
|
||||||
placeholder="请输入赢单概率"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:max="100"
|
|
||||||
:step="1"
|
|
||||||
:precision="2"
|
|
||||||
addonAfter="%"
|
|
||||||
:controls="false">
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
<a-col :span="12" class="ant-col-item">
|
||||||
<a-form-item name="last_followup_date">
|
<a-form-item name="commissioning_date">
|
||||||
<template #label>最后跟进日期: </template>
|
<template #label>启用日期 </template>
|
||||||
<YunzhupaasDatePicker
|
<YunzhupaasDatePicker
|
||||||
v-model:value="dataForm.last_followup_date"
|
v-model:value="dataForm.commissioning_date"
|
||||||
@change="changeData('last_followup_date', -1)"
|
@change="changeData('commissioning_date', -1)"
|
||||||
placeholder="请选择最后跟进日期"
|
placeholder="请选择"
|
||||||
:disabled="true"
|
|
||||||
:allowClear="true"
|
:allowClear="true"
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
@@ -201,47 +235,56 @@
|
|||||||
</YunzhupaasDatePicker>
|
</YunzhupaasDatePicker>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item">
|
<a-col :span="12" class="ant-col-item">
|
||||||
<a-form-item name="competitor">
|
<a-form-item name="expected_life">
|
||||||
<template #label>竞争对手信息: </template>
|
<template #label>预计使用年限 </template>
|
||||||
<YunzhupaasTextarea
|
<YunzhupaasInputNumber
|
||||||
v-model:value="dataForm.competitor"
|
v-model:value="dataForm.expected_life"
|
||||||
@change="changeData('competitor', -1)"
|
@change="changeData('expected_life', -1)"
|
||||||
placeholder="请输入竞争对手信息"
|
placeholder="请输入"
|
||||||
:maxlength="200"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:autoSize="{ minRows: 3, maxRows: 3 }"
|
:step="1"
|
||||||
:showCount="false">
|
:precision="2"
|
||||||
</YunzhupaasTextarea>
|
addonAfter="月"
|
||||||
|
:controls="false">
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item">
|
<a-col :span="24" class="ant-col-item">
|
||||||
<a-form-item name="analysis">
|
<a-form-item name="supplier_id">
|
||||||
<template #label>决策分析: </template>
|
<template #label>供应商 </template>
|
||||||
<YunzhupaasTextarea
|
<YunzhupaasRelationFormByUrl
|
||||||
v-model:value="dataForm.analysis"
|
v-model:value="dataForm.supplier_id"
|
||||||
@change="changeData('analysis', -1)"
|
@change="changeData('supplier_id', -1)"
|
||||||
placeholder="请输入决策分析"
|
placeholder="请选择"
|
||||||
:maxlength="200"
|
:templateJson="state.interfaceRes.supplier_id"
|
||||||
:allowClear="true"
|
:allowClear="true"
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:autoSize="{ minRows: 3, maxRows: 3 }"
|
:showSearch="false"
|
||||||
:showCount="false">
|
:field="'supplier_id'"
|
||||||
</YunzhupaasTextarea>
|
modelId="/api/bcm/Suppinfo/getList"
|
||||||
|
:columnOptions="optionsObj.supplier_idcolumnOptions"
|
||||||
|
relationField="company_name"
|
||||||
|
popupWidth="1000px"
|
||||||
|
propsValue="company_id"
|
||||||
|
hasPage
|
||||||
|
:pageSize="20"
|
||||||
|
:queryType="0"
|
||||||
|
:extraOptions="state.extraOptions.supplier_id">
|
||||||
|
</YunzhupaasRelationFormByUrl>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item">
|
<a-col :span="24" class="ant-col-item">
|
||||||
<a-form-item name="remark">
|
<a-form-item name="remark">
|
||||||
<template #label>备注: </template>
|
<template #label>备注 </template>
|
||||||
<YunzhupaasTextarea
|
<YunzhupaasTextarea
|
||||||
v-model:value="dataForm.remark"
|
v-model:value="dataForm.remark"
|
||||||
@change="changeData('remark', -1)"
|
@change="changeData('remark', -1)"
|
||||||
placeholder="请输入备注"
|
placeholder="请输入"
|
||||||
:maxlength="200"
|
:maxlength="255"
|
||||||
:allowClear="true"
|
:allowClear="true"
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:autoSize="{ minRows: 3, maxRows: 3 }"
|
:autoSize="{ minRows: 2, maxRows: 2 }"
|
||||||
:showCount="false">
|
:showCount="false">
|
||||||
</YunzhupaasTextarea>
|
</YunzhupaasTextarea>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -256,7 +299,7 @@
|
|||||||
import { create, update, getInfo } from './helper/api';
|
import { create, update, getInfo } from './helper/api';
|
||||||
import { reactive, toRefs, nextTick, ref, unref, computed, toRaw, inject } from 'vue';
|
import { reactive, toRefs, nextTick, ref, unref, computed, toRaw, inject } from 'vue';
|
||||||
import { BasicPopup, usePopup } from '@/components/Popup';
|
import { BasicPopup, usePopup } from '@/components/Popup';
|
||||||
import { YunzhupaasRelationForm } from '@/components/yunzhupaas';
|
import { YunzhupaasRelationFormByUrl } from '@/components/yunzhupaas';
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
import { useI18n } from '@/hooks/web/useI18n';
|
||||||
import { useUserStore } from '@/store/modules/user';
|
import { useUserStore } from '@/store/modules/user';
|
||||||
@@ -305,97 +348,128 @@
|
|||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
const state = reactive<State>({
|
const state = reactive<State>({
|
||||||
dataForm: {
|
dataForm: {
|
||||||
opportunity_code: undefined,
|
asset_code: undefined,
|
||||||
opportunity_name: undefined,
|
asset_name: '',
|
||||||
customer_id: '',
|
asset_type: '10',
|
||||||
owner_id: userInfo.userId ? userInfo.userId : '',
|
asset_category: '10.40',
|
||||||
opportunity_stage: '',
|
asset_status: 'InUse',
|
||||||
amount: undefined,
|
asset_location: [],
|
||||||
close_date: undefined,
|
current_org_id: [],
|
||||||
desciption: undefined,
|
current_user_id: undefined,
|
||||||
probability: undefined,
|
asset_ownership: 'Owned',
|
||||||
last_followup_date: dayjs().startOf(getDateTimeUnit('yyyy-MM-dd')).valueOf(),
|
measurement_unit: undefined,
|
||||||
competitor: undefined,
|
quantity: undefined,
|
||||||
analysis: undefined,
|
purchase_date: undefined,
|
||||||
|
commissioning_date: undefined,
|
||||||
|
expected_life: undefined,
|
||||||
|
supplier_id: '',
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
version: 0,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
tableRows: {},
|
tableRows: {},
|
||||||
|
|
||||||
dataRule: {
|
dataRule: {
|
||||||
customer_id: [
|
asset_name: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: t('sys.validate.textRequiredSuffix', '不能为空'),
|
message: t('sys.validate.textRequiredSuffix', '不能为空'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
opportunity_code: [
|
asset_type: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: t('sys.validate.textRequiredSuffix', '不能为空'),
|
message: t('sys.validate.arrayRequiredPrefix ', '请至少选择一个'),
|
||||||
trigger: 'blur',
|
trigger: 'change',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
opportunity_name: [
|
asset_category: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: t('sys.validate.textRequiredSuffix', '不能为空'),
|
message: t('sys.validate.arrayRequiredPrefix ', '请至少选择一个'),
|
||||||
trigger: 'blur',
|
trigger: 'change',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
owner_id: [
|
asset_status: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: t('sys.validate.textRequiredSuffix', '不能为空'),
|
message: t('sys.validate.arrayRequiredPrefix ', '请至少选择一个'),
|
||||||
trigger: 'blur',
|
trigger: 'change',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
opportunity_stage: [
|
asset_ownership: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: t('sys.validate.textRequiredSuffix', '不能为空'),
|
message: t('sys.validate.arrayRequiredPrefix ', '请至少选择一个'),
|
||||||
trigger: 'blur',
|
trigger: 'change',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
optionsObj: {
|
optionsObj: {
|
||||||
customer_idcolumnOptions: [
|
asset_typeOptions: [],
|
||||||
{ label: '企业名称', value: 'company_name' },
|
asset_typeProps: { label: 'fullName', value: 'enCode' },
|
||||||
{ label: '类型', value: 'entity_type' },
|
asset_categoryOptions: [],
|
||||||
{ label: '归属组织', value: 'org_id' },
|
asset_categoryProps: { label: 'fullName', value: 'enCode' },
|
||||||
{ label: '客户负责人', value: 'owner_id' },
|
asset_statusOptions: [
|
||||||
{ label: '客户等级', value: 'customer_level' },
|
{ fullName: '在用', id: 'InUse' },
|
||||||
|
{ fullName: '闲置', id: 'Idle' },
|
||||||
|
{ fullName: '故障', id: 'Fault' },
|
||||||
|
{ fullName: '维修中', id: 'FIX' },
|
||||||
|
{ fullName: '借用中', id: 'OnLoan' },
|
||||||
|
{ fullName: '已报废', id: 'Scrapped' },
|
||||||
|
{ fullName: '已处置', id: 'Disposed' },
|
||||||
|
],
|
||||||
|
asset_statusProps: { label: 'fullName', value: 'id' },
|
||||||
|
asset_locationOptions: [],
|
||||||
|
asset_locationProps: { label: 'fullName', value: 'enCode', children: 'children' },
|
||||||
|
asset_ownershipOptions: [
|
||||||
|
{ fullName: '自有', id: 'Owned' },
|
||||||
|
{ fullName: '租赁', id: 'Leased' },
|
||||||
|
{ fullName: '融资租赁', id: 'FinLeased' },
|
||||||
|
{ fullName: '借用', id: 'Borrowed' },
|
||||||
|
{ fullName: '托管', id: 'Trusteeship' },
|
||||||
|
],
|
||||||
|
asset_ownershipProps: { label: 'fullName', value: 'id' },
|
||||||
|
supplier_idcolumnOptions: [
|
||||||
|
{ label: '企业编码', value: 'company_code' },
|
||||||
|
{ label: '企业名称', value: 'company_name' },
|
||||||
|
{ label: '简称/昵称', value: 'short_name' },
|
||||||
|
{ label: '类型', value: 'entity_type' },
|
||||||
|
{ label: '社会信用代码', value: 'credit_code' },
|
||||||
|
{ label: '归属组织', value: 'org_id' },
|
||||||
|
{ label: '所属地区', value: 'province_id' },
|
||||||
|
{ label: '法定代表人', value: 'legal_representative' },
|
||||||
|
{ label: '责任人', value: 'yunzhupaas_mdm_supplier_yunzhupaas_major_person_id' },
|
||||||
],
|
],
|
||||||
opportunity_stageOptions: [],
|
|
||||||
opportunity_stageProps: { label: 'fullName', value: 'enCode' },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
childIndex: -1,
|
childIndex: -1,
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
interfaceRes: {
|
interfaceRes: {
|
||||||
desciption: [],
|
quantity: [],
|
||||||
amount: [],
|
expected_life: [],
|
||||||
close_date: [],
|
current_org_id: [],
|
||||||
opportunity_code: [],
|
current_user_id: [],
|
||||||
owner_id: [],
|
|
||||||
probability: [],
|
|
||||||
remark: [],
|
remark: [],
|
||||||
analysis: [],
|
commissioning_date: [],
|
||||||
last_followup_date: [],
|
asset_location: [],
|
||||||
opportunity_stage: [],
|
asset_status: [],
|
||||||
opportunity_name: [],
|
asset_category: [],
|
||||||
competitor: [],
|
asset_name: [],
|
||||||
customer_id: [],
|
asset_ownership: [],
|
||||||
|
asset_code: [],
|
||||||
|
asset_type: [],
|
||||||
|
measurement_unit: [],
|
||||||
|
purchase_date: [],
|
||||||
|
supplier_id: [],
|
||||||
},
|
},
|
||||||
//可选范围默认值
|
//可选范围默认值
|
||||||
ableAll: {},
|
ableAll: {},
|
||||||
|
|
||||||
//掩码配置
|
//掩码配置
|
||||||
maskConfig: {
|
maskConfig: {
|
||||||
opportunity_code: {
|
asset_name: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -408,7 +482,7 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
opportunity_name: {
|
measurement_unit: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -427,7 +501,7 @@
|
|||||||
locationScope: {},
|
locationScope: {},
|
||||||
|
|
||||||
extraOptions: {
|
extraOptions: {
|
||||||
customer_id: [],
|
supplier_id: [],
|
||||||
},
|
},
|
||||||
|
|
||||||
title: '',
|
title: '',
|
||||||
@@ -468,24 +542,28 @@
|
|||||||
getData(state.dataForm.id);
|
getData(state.dataForm.id);
|
||||||
} else {
|
} else {
|
||||||
//初始化options
|
//初始化options
|
||||||
getopportunity_stageOptions();
|
getasset_typeOptions();
|
||||||
|
getasset_categoryOptions();
|
||||||
|
getasset_locationOptions();
|
||||||
|
|
||||||
// 设置默认值
|
// 设置默认值
|
||||||
state.dataForm = {
|
state.dataForm = {
|
||||||
opportunity_code: undefined,
|
asset_code: undefined,
|
||||||
opportunity_name: undefined,
|
asset_name: '',
|
||||||
customer_id: '',
|
asset_type: '10',
|
||||||
owner_id: userInfo.userId ? userInfo.userId : '',
|
asset_category: '10.40',
|
||||||
opportunity_stage: '',
|
asset_status: 'InUse',
|
||||||
amount: undefined,
|
asset_location: [],
|
||||||
close_date: undefined,
|
current_org_id: [],
|
||||||
desciption: undefined,
|
current_user_id: undefined,
|
||||||
probability: undefined,
|
asset_ownership: 'Owned',
|
||||||
last_followup_date: dayjs().startOf(getDateTimeUnit('yyyy-MM-dd')).valueOf(),
|
measurement_unit: undefined,
|
||||||
competitor: undefined,
|
quantity: undefined,
|
||||||
analysis: undefined,
|
purchase_date: undefined,
|
||||||
|
commissioning_date: undefined,
|
||||||
|
expected_life: undefined,
|
||||||
|
supplier_id: '',
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
version: 0,
|
|
||||||
};
|
};
|
||||||
if (getLeftTreeActiveInfo) state.dataForm = { ...state.dataForm, ...(getLeftTreeActiveInfo() || {}) };
|
if (getLeftTreeActiveInfo) state.dataForm = { ...state.dataForm, ...(getLeftTreeActiveInfo() || {}) };
|
||||||
state.childIndex = -1;
|
state.childIndex = -1;
|
||||||
@@ -502,7 +580,9 @@
|
|||||||
function getData(id) {
|
function getData(id) {
|
||||||
getInfo(id).then(res => {
|
getInfo(id).then(res => {
|
||||||
state.dataForm = res.data || {};
|
state.dataForm = res.data || {};
|
||||||
getopportunity_stageOptions();
|
getasset_typeOptions();
|
||||||
|
getasset_categoryOptions();
|
||||||
|
getasset_locationOptions();
|
||||||
|
|
||||||
state.childIndex = -1;
|
state.childIndex = -1;
|
||||||
changeLoading(false);
|
changeLoading(false);
|
||||||
@@ -598,9 +678,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//数据选项--数据字典初始化方法
|
//数据选项--数据字典初始化方法
|
||||||
function getopportunity_stageOptions() {
|
function getasset_typeOptions() {
|
||||||
getDictionaryDataSelector('797444616478523397').then(res => {
|
getDictionaryDataSelector('assetType').then(res => {
|
||||||
state.optionsObj.opportunity_stageOptions = res.data.list;
|
state.optionsObj.asset_typeOptions = res.data.list;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//数据选项--数据字典初始化方法
|
||||||
|
function getasset_categoryOptions() {
|
||||||
|
getDictionaryDataSelector('assetCategory').then(res => {
|
||||||
|
state.optionsObj.asset_categoryOptions = res.data.list;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//数据选项--数据字典初始化方法
|
||||||
|
function getasset_locationOptions() {
|
||||||
|
getDictionaryDataSelector('assetLocation').then(res => {
|
||||||
|
state.optionsObj.asset_locationOptions = res.data.list;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getRelationDate(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
function getRelationDate(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
||||||
34
src/views/mdm/asset/helper/api.ts
Normal file
34
src/views/mdm/asset/helper/api.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import { defHttp } from '@/utils/http/axios';
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
export function getList(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Asset/getList', data });
|
||||||
|
}
|
||||||
|
// 新建
|
||||||
|
export function create(data) {
|
||||||
|
return defHttp.post({ url:'/api/bcm/Asset', data });
|
||||||
|
}
|
||||||
|
// 修改
|
||||||
|
export function update(data) {
|
||||||
|
return defHttp.put({ url: '/api/bcm/Asset/'+ data.id, data });
|
||||||
|
}
|
||||||
|
// 详情(无转换数据)
|
||||||
|
export function getInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Asset/' + id });
|
||||||
|
}
|
||||||
|
// 获取(转换数据)
|
||||||
|
export function getDetailInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Asset/detail/' + id });
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export function del(id) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Asset/' + id });
|
||||||
|
}
|
||||||
|
// 批量删除数据
|
||||||
|
export function batchDelete(data) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Asset/batchRemove', data });
|
||||||
|
}
|
||||||
|
// 导出
|
||||||
|
export function exportData(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Asset/Actions/Export', data });
|
||||||
|
}
|
||||||
1091
src/views/mdm/asset/helper/columnList.ts
Normal file
1091
src/views/mdm/asset/helper/columnList.ts
Normal file
File diff suppressed because it is too large
Load Diff
362
src/views/mdm/asset/helper/searchList.ts
Normal file
362
src/views/mdm/asset/helper/searchList.ts
Normal file
@@ -0,0 +1,362 @@
|
|||||||
|
const searchList = [
|
||||||
|
{
|
||||||
|
"yunzhupaasKey":"billRule",
|
||||||
|
"searchType":2,
|
||||||
|
"fullName":"资产编码",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label":"资产编码",
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItemec5a15",
|
||||||
|
"yunzhupaasKey":"billRule",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"defaultValue":null,
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"rule":"assetCode",
|
||||||
|
"className":[],
|
||||||
|
"label":"资产编码",
|
||||||
|
"trigger":"change",
|
||||||
|
"ruleConfig":{
|
||||||
|
"startNumber":"",
|
||||||
|
"dateFormat":"YYYY",
|
||||||
|
"randomDigit":16,
|
||||||
|
"prefixList":[],
|
||||||
|
"randomType":1,
|
||||||
|
"suffixList":[],
|
||||||
|
"type":1,
|
||||||
|
"digit":null
|
||||||
|
},
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777345780019,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-documents",
|
||||||
|
"ruleType":1,
|
||||||
|
"ruleName":"资产编码",
|
||||||
|
"tag":"YunzhupaasInput",
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"readonly":true,
|
||||||
|
"prop":"asset_code",
|
||||||
|
"__vModel__":"asset_code",
|
||||||
|
"searchMultiple":false,
|
||||||
|
"isKeyword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"id":"asset_code",
|
||||||
|
"placeholder":"系统自动生成",
|
||||||
|
"labelI18nCode":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"yunzhupaasKey":"input",
|
||||||
|
"useScan":false,
|
||||||
|
"suffixIcon":"",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"showCount":false,
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItem120e88",
|
||||||
|
"yunzhupaasKey":"input",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"defaultValue":"",
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"资产名称",
|
||||||
|
"trigger":"blur",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777345895532,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||||
|
"unique":false,
|
||||||
|
"tag":"YunzhupaasInput",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"readonly":false,
|
||||||
|
"prop":"asset_name",
|
||||||
|
"__vModel__":"asset_name",
|
||||||
|
"searchMultiple":false,
|
||||||
|
"disabled":false,
|
||||||
|
"id":"asset_name",
|
||||||
|
"placeholder":"请输入",
|
||||||
|
"addonBefore":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
},
|
||||||
|
"clearable":true,
|
||||||
|
"searchType":2,
|
||||||
|
"maxlength":20,
|
||||||
|
"fullName":"资产名称",
|
||||||
|
"label":"资产名称",
|
||||||
|
"addonAfter":"",
|
||||||
|
"maskConfig":{
|
||||||
|
"prefixType":1,
|
||||||
|
"useUnrealMask":false,
|
||||||
|
"maskType":1,
|
||||||
|
"unrealMaskLength":1,
|
||||||
|
"prefixLimit":0,
|
||||||
|
"suffixLimit":0,
|
||||||
|
"filler":"*",
|
||||||
|
"prefixSpecifyChar":"",
|
||||||
|
"suffixType":1,
|
||||||
|
"ignoreChar":"",
|
||||||
|
"suffixSpecifyChar":""
|
||||||
|
},
|
||||||
|
"isKeyword":false,
|
||||||
|
"useMask":false,
|
||||||
|
"showPassword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"prefixIcon":"",
|
||||||
|
"labelI18nCode":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"yunzhupaasKey":"select",
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
|
"searchType":1,
|
||||||
|
"multiple":false,
|
||||||
|
"fullName":"资产状态",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label":"资产状态",
|
||||||
|
"props":{
|
||||||
|
"label":"fullName",
|
||||||
|
"value":"id"
|
||||||
|
},
|
||||||
|
"__config__":{
|
||||||
|
"yunzhupaasKey":"select",
|
||||||
|
"defaultValue":"InUse",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"propsUrl":"",
|
||||||
|
"templateJson":[],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347177897,
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-select",
|
||||||
|
"tag":"YunzhupaasSelect",
|
||||||
|
"formId":"formItemc6c516",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"dataType":"static",
|
||||||
|
"dictionaryType":"",
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"label":"资产状态",
|
||||||
|
"trigger":"change",
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"useCache":true,
|
||||||
|
"propsName":"",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"prop":"asset_status",
|
||||||
|
"options":[
|
||||||
|
{
|
||||||
|
"fullName":"在用",
|
||||||
|
"id":"InUse"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"闲置",
|
||||||
|
"id":"Idle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"故障",
|
||||||
|
"id":"Fault"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"维修中",
|
||||||
|
"id":"FIX"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"借用中",
|
||||||
|
"id":"OnLoan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"已报废",
|
||||||
|
"id":"Scrapped"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"已处置",
|
||||||
|
"id":"Disposed"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"__vModel__":"asset_status",
|
||||||
|
"searchMultiple":true,
|
||||||
|
"isKeyword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"disabled":false,
|
||||||
|
"id":"asset_status",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"labelI18nCode":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"yunzhupaasKey":"datePicker",
|
||||||
|
"clearable":true,
|
||||||
|
"searchType":3,
|
||||||
|
"noShow":false,
|
||||||
|
"format":"yyyy-MM-dd",
|
||||||
|
"fullName":"购置日期",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label":"购置日期",
|
||||||
|
"__config__":{
|
||||||
|
"yunzhupaasKey":"datePicker",
|
||||||
|
"endRelationField":"",
|
||||||
|
"defaultValue":null,
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347731278,
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-date",
|
||||||
|
"startRelationField":"",
|
||||||
|
"defaultCurrent":false,
|
||||||
|
"tag":"YunzhupaasDatePicker",
|
||||||
|
"formId":"formItem375d5b",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"endTimeTarget":1,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"startTimeType":1,
|
||||||
|
"endTimeRule":false,
|
||||||
|
"label":"购置日期",
|
||||||
|
"trigger":"change",
|
||||||
|
"startTimeRule":false,
|
||||||
|
"startTimeValue":null,
|
||||||
|
"endTimeValue":null,
|
||||||
|
"endTimeType":1,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"startTimeTarget":1,
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"prop":"purchase_date",
|
||||||
|
"__vModel__":"purchase_date",
|
||||||
|
"searchMultiple":false,
|
||||||
|
"isKeyword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"startTime":null,
|
||||||
|
"disabled":false,
|
||||||
|
"id":"purchase_date",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"endTime":null,
|
||||||
|
"value":[],
|
||||||
|
"labelI18nCode":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"yunzhupaasKey":"datePicker",
|
||||||
|
"clearable":true,
|
||||||
|
"searchType":3,
|
||||||
|
"noShow":false,
|
||||||
|
"format":"yyyy-MM-dd",
|
||||||
|
"fullName":"启用日期",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label":"启用日期",
|
||||||
|
"__config__":{
|
||||||
|
"yunzhupaasKey":"datePicker",
|
||||||
|
"endRelationField":"",
|
||||||
|
"defaultValue":null,
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347763029,
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-date",
|
||||||
|
"startRelationField":"",
|
||||||
|
"defaultCurrent":false,
|
||||||
|
"tag":"YunzhupaasDatePicker",
|
||||||
|
"formId":"formItem99411c",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"endTimeTarget":1,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"startTimeType":1,
|
||||||
|
"endTimeRule":false,
|
||||||
|
"label":"启用日期",
|
||||||
|
"trigger":"change",
|
||||||
|
"startTimeRule":false,
|
||||||
|
"startTimeValue":null,
|
||||||
|
"endTimeValue":null,
|
||||||
|
"endTimeType":1,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"startTimeTarget":1,
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"prop":"commissioning_date",
|
||||||
|
"__vModel__":"commissioning_date",
|
||||||
|
"searchMultiple":false,
|
||||||
|
"isKeyword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"startTime":null,
|
||||||
|
"disabled":false,
|
||||||
|
"id":"commissioning_date",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"endTime":null,
|
||||||
|
"value":[],
|
||||||
|
"labelI18nCode":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
export default searchList
|
||||||
947
src/views/mdm/asset/helper/superQueryJson.ts
Normal file
947
src/views/mdm/asset/helper/superQueryJson.ts
Normal file
@@ -0,0 +1,947 @@
|
|||||||
|
const superQueryJson = [
|
||||||
|
{
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItemec5a15",
|
||||||
|
"yunzhupaasKey":"billRule",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"defaultValue":null,
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"rule":"assetCode",
|
||||||
|
"className":[],
|
||||||
|
"label":"资产编码",
|
||||||
|
"trigger":"change",
|
||||||
|
"ruleConfig":{
|
||||||
|
"startNumber":"",
|
||||||
|
"dateFormat":"YYYY",
|
||||||
|
"randomDigit":16,
|
||||||
|
"prefixList":[],
|
||||||
|
"randomType":1,
|
||||||
|
"suffixList":[],
|
||||||
|
"type":1,
|
||||||
|
"digit":null
|
||||||
|
},
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777345780019,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-documents",
|
||||||
|
"ruleType":1,
|
||||||
|
"ruleName":"资产编码",
|
||||||
|
"tag":"YunzhupaasInput",
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"readonly":true,
|
||||||
|
"__vModel__":"asset_code",
|
||||||
|
"fullName":"资产编码",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"id":"asset_code",
|
||||||
|
"placeholder":"系统自动生成"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clearable":true,
|
||||||
|
"maxlength":20,
|
||||||
|
"useScan":false,
|
||||||
|
"suffixIcon":"",
|
||||||
|
"fullName":"资产名称",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"addonAfter":"",
|
||||||
|
"showCount":false,
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItem120e88",
|
||||||
|
"yunzhupaasKey":"input",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"defaultValue":"",
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"资产名称",
|
||||||
|
"trigger":"blur",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777345895532,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||||
|
"unique":false,
|
||||||
|
"tag":"YunzhupaasInput",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"readonly":false,
|
||||||
|
"maskConfig":{
|
||||||
|
"prefixType":1,
|
||||||
|
"useUnrealMask":false,
|
||||||
|
"maskType":1,
|
||||||
|
"unrealMaskLength":1,
|
||||||
|
"prefixLimit":0,
|
||||||
|
"suffixLimit":0,
|
||||||
|
"filler":"*",
|
||||||
|
"prefixSpecifyChar":"",
|
||||||
|
"suffixType":1,
|
||||||
|
"ignoreChar":"",
|
||||||
|
"suffixSpecifyChar":""
|
||||||
|
},
|
||||||
|
"__vModel__":"asset_name",
|
||||||
|
"useMask":false,
|
||||||
|
"showPassword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"disabled":false,
|
||||||
|
"id":"asset_name",
|
||||||
|
"placeholder":"请输入",
|
||||||
|
"prefixIcon":"",
|
||||||
|
"addonBefore":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
|
"multiple":false,
|
||||||
|
"fullName":"资产类型",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"props":{
|
||||||
|
"label":"fullName",
|
||||||
|
"value":"enCode"
|
||||||
|
},
|
||||||
|
"__config__":{
|
||||||
|
"yunzhupaasKey":"select",
|
||||||
|
"defaultValue":"10",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"propsUrl":"",
|
||||||
|
"templateJson":[],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777346352365,
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-select",
|
||||||
|
"tag":"YunzhupaasSelect",
|
||||||
|
"formId":"formItema4f72a",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"dataType":"dictionary",
|
||||||
|
"dictionaryType":"assetType",
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"label":"资产类型",
|
||||||
|
"trigger":"change",
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"useCache":true,
|
||||||
|
"propsName":"",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"options":[],
|
||||||
|
"__vModel__":"asset_type",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"disabled":false,
|
||||||
|
"id":"asset_type",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
|
"multiple":false,
|
||||||
|
"fullName":"资产分类",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"props":{
|
||||||
|
"label":"fullName",
|
||||||
|
"value":"enCode"
|
||||||
|
},
|
||||||
|
"__config__":{
|
||||||
|
"yunzhupaasKey":"select",
|
||||||
|
"defaultValue":"40",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"propsUrl":"",
|
||||||
|
"templateJson":[],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347095610,
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-select",
|
||||||
|
"tag":"YunzhupaasSelect",
|
||||||
|
"formId":"formItem03ef8d",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"dataType":"dictionary",
|
||||||
|
"dictionaryType":"assetCategory",
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"label":"资产分类",
|
||||||
|
"trigger":"change",
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"useCache":true,
|
||||||
|
"propsName":"",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"options":[],
|
||||||
|
"__vModel__":"asset_category",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"disabled":false,
|
||||||
|
"id":"asset_category",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
|
"multiple":false,
|
||||||
|
"fullName":"资产状态",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"props":{
|
||||||
|
"label":"fullName",
|
||||||
|
"value":"id"
|
||||||
|
},
|
||||||
|
"__config__":{
|
||||||
|
"yunzhupaasKey":"select",
|
||||||
|
"defaultValue":"InUse",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"propsUrl":"",
|
||||||
|
"templateJson":[],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347177897,
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-select",
|
||||||
|
"tag":"YunzhupaasSelect",
|
||||||
|
"formId":"formItemc6c516",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"dataType":"static",
|
||||||
|
"dictionaryType":"",
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"label":"资产状态",
|
||||||
|
"trigger":"change",
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"useCache":true,
|
||||||
|
"propsName":"",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"options":[
|
||||||
|
{
|
||||||
|
"fullName":"在用",
|
||||||
|
"id":"InUse"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"闲置",
|
||||||
|
"id":"Idle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"故障",
|
||||||
|
"id":"Fault"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"维修中",
|
||||||
|
"id":"FIX"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"借用中",
|
||||||
|
"id":"OnLoan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"已报废",
|
||||||
|
"id":"Scrapped"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"已处置",
|
||||||
|
"id":"Disposed"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"__vModel__":"asset_status",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"disabled":false,
|
||||||
|
"id":"asset_status",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
|
"multiple":false,
|
||||||
|
"fullName":"资产位置",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"props":{
|
||||||
|
"children":"children",
|
||||||
|
"label":"fullName",
|
||||||
|
"value":"enCode"
|
||||||
|
},
|
||||||
|
"__config__":{
|
||||||
|
"yunzhupaasKey":"cascader",
|
||||||
|
"defaultValue":[],
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"propsUrl":"",
|
||||||
|
"templateJson":[],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347474179,
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-cascader",
|
||||||
|
"tag":"YunzhupaasCascader",
|
||||||
|
"formId":"formItem2ea454",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"dataType":"dictionary",
|
||||||
|
"dictionaryType":"assetLocation",
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"label":"资产位置",
|
||||||
|
"trigger":"change",
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"useCache":true,
|
||||||
|
"propsName":"",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"options":[],
|
||||||
|
"__vModel__":"asset_location",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"disabled":false,
|
||||||
|
"id":"asset_location",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
|
"ableIds":[],
|
||||||
|
"multiple":false,
|
||||||
|
"fullName":"使用组织",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItem60e2d0",
|
||||||
|
"yunzhupaasKey":"organizeSelect",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"defaultValue":[],
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"使用组织",
|
||||||
|
"trigger":"change",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347508873,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-company",
|
||||||
|
"defaultCurrent":false,
|
||||||
|
"tag":"YunzhupaasOrganizeSelect",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"__vModel__":"current_org_id",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"selectType":"all",
|
||||||
|
"disabled":false,
|
||||||
|
"id":"current_org_id",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ableRelationIds":[],
|
||||||
|
"clearable":true,
|
||||||
|
"ableIds":[],
|
||||||
|
"multiple":false,
|
||||||
|
"fullName":"保管用户",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"relationField":"",
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItem8d2078",
|
||||||
|
"yunzhupaasKey":"userSelect",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"defaultValue":null,
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"保管用户",
|
||||||
|
"trigger":"change",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347525827,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-user",
|
||||||
|
"defaultCurrent":false,
|
||||||
|
"tag":"YunzhupaasUserSelect",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"__vModel__":"current_user_id",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"selectType":"all",
|
||||||
|
"disabled":false,
|
||||||
|
"id":"current_user_id",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
|
"multiple":false,
|
||||||
|
"fullName":"资产权属",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"props":{
|
||||||
|
"label":"fullName",
|
||||||
|
"value":"id"
|
||||||
|
},
|
||||||
|
"__config__":{
|
||||||
|
"yunzhupaasKey":"select",
|
||||||
|
"defaultValue":"Owned",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"propsUrl":"",
|
||||||
|
"templateJson":[],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347571406,
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-select",
|
||||||
|
"tag":"YunzhupaasSelect",
|
||||||
|
"formId":"formItem4eae10",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"dataType":"static",
|
||||||
|
"dictionaryType":"",
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"label":"资产权属",
|
||||||
|
"trigger":"change",
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"useCache":true,
|
||||||
|
"propsName":"",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"options":[
|
||||||
|
{
|
||||||
|
"fullName":"自有",
|
||||||
|
"id":"Owned"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"租赁",
|
||||||
|
"id":"Leased"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"融资租赁",
|
||||||
|
"id":"FinLeased"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"借用",
|
||||||
|
"id":"Borrowed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullName":"托管",
|
||||||
|
"id":"Trusteeship"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"__vModel__":"asset_ownership",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"disabled":false,
|
||||||
|
"id":"asset_ownership",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clearable":true,
|
||||||
|
"maxlength":20,
|
||||||
|
"useScan":false,
|
||||||
|
"suffixIcon":"",
|
||||||
|
"fullName":"单位",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"addonAfter":"",
|
||||||
|
"showCount":false,
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItemec96d9",
|
||||||
|
"yunzhupaasKey":"input",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"单位",
|
||||||
|
"trigger":"blur",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347663137,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||||
|
"tag":"YunzhupaasInput",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"readonly":false,
|
||||||
|
"maskConfig":{
|
||||||
|
"prefixType":1,
|
||||||
|
"useUnrealMask":false,
|
||||||
|
"maskType":1,
|
||||||
|
"unrealMaskLength":1,
|
||||||
|
"prefixLimit":0,
|
||||||
|
"suffixLimit":0,
|
||||||
|
"filler":"*",
|
||||||
|
"prefixSpecifyChar":"",
|
||||||
|
"suffixType":1,
|
||||||
|
"ignoreChar":"",
|
||||||
|
"suffixSpecifyChar":""
|
||||||
|
},
|
||||||
|
"__vModel__":"measurement_unit",
|
||||||
|
"useMask":false,
|
||||||
|
"showPassword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"disabled":false,
|
||||||
|
"id":"measurement_unit",
|
||||||
|
"placeholder":"请输入",
|
||||||
|
"prefixIcon":"",
|
||||||
|
"addonBefore":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"controls":false,
|
||||||
|
"max":null,
|
||||||
|
"precision":2,
|
||||||
|
"fullName":"数量",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"thousands":false,
|
||||||
|
"isAmountChinese":false,
|
||||||
|
"addonAfter":"",
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItem21ecc7",
|
||||||
|
"yunzhupaasKey":"inputNumber",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"defaultValue":null,
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"数量",
|
||||||
|
"trigger":[
|
||||||
|
"blur",
|
||||||
|
"change"
|
||||||
|
],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347687893,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-number",
|
||||||
|
"tag":"YunzhupaasInputNumber",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"min":0,
|
||||||
|
"__vModel__":"quantity",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"step":1,
|
||||||
|
"disabled":false,
|
||||||
|
"id":"quantity",
|
||||||
|
"placeholder":"请输入",
|
||||||
|
"addonBefore":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clearable":true,
|
||||||
|
"format":"yyyy-MM-dd",
|
||||||
|
"fullName":"购置日期",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"__config__":{
|
||||||
|
"yunzhupaasKey":"datePicker",
|
||||||
|
"endRelationField":"",
|
||||||
|
"defaultValue":null,
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347731278,
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-date",
|
||||||
|
"startRelationField":"",
|
||||||
|
"defaultCurrent":false,
|
||||||
|
"tag":"YunzhupaasDatePicker",
|
||||||
|
"formId":"formItem375d5b",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"endTimeTarget":1,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"startTimeType":1,
|
||||||
|
"endTimeRule":false,
|
||||||
|
"label":"购置日期",
|
||||||
|
"trigger":"change",
|
||||||
|
"startTimeRule":false,
|
||||||
|
"startTimeValue":null,
|
||||||
|
"endTimeValue":null,
|
||||||
|
"endTimeType":1,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"startTimeTarget":1,
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"__vModel__":"purchase_date",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"startTime":null,
|
||||||
|
"disabled":false,
|
||||||
|
"id":"purchase_date",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"endTime":null,
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clearable":true,
|
||||||
|
"format":"yyyy-MM-dd",
|
||||||
|
"fullName":"启用日期",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"__config__":{
|
||||||
|
"yunzhupaasKey":"datePicker",
|
||||||
|
"endRelationField":"",
|
||||||
|
"defaultValue":null,
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347763029,
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-date",
|
||||||
|
"startRelationField":"",
|
||||||
|
"defaultCurrent":false,
|
||||||
|
"tag":"YunzhupaasDatePicker",
|
||||||
|
"formId":"formItem99411c",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"endTimeTarget":1,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"startTimeType":1,
|
||||||
|
"endTimeRule":false,
|
||||||
|
"label":"启用日期",
|
||||||
|
"trigger":"change",
|
||||||
|
"startTimeRule":false,
|
||||||
|
"startTimeValue":null,
|
||||||
|
"endTimeValue":null,
|
||||||
|
"endTimeType":1,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"startTimeTarget":1,
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"__vModel__":"commissioning_date",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"startTime":null,
|
||||||
|
"disabled":false,
|
||||||
|
"id":"commissioning_date",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"endTime":null,
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"controls":false,
|
||||||
|
"precision":2,
|
||||||
|
"fullName":"预计使用年限",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"thousands":false,
|
||||||
|
"isAmountChinese":false,
|
||||||
|
"addonAfter":"月",
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItembba5e3",
|
||||||
|
"yunzhupaasKey":"inputNumber",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"预计使用年限",
|
||||||
|
"trigger":[
|
||||||
|
"blur",
|
||||||
|
"change"
|
||||||
|
],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347785655,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-number",
|
||||||
|
"tag":"YunzhupaasInputNumber",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"min":0,
|
||||||
|
"__vModel__":"expected_life",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"step":1,
|
||||||
|
"disabled":false,
|
||||||
|
"id":"expected_life",
|
||||||
|
"placeholder":"请输入",
|
||||||
|
"addonBefore":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"popupType":"dialog",
|
||||||
|
"hasPage":false,
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
|
"modelId":"817082533433836293",
|
||||||
|
"fullName":"供应商",
|
||||||
|
"pageSize":20,
|
||||||
|
"columnOptions":[],
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"relationField":"company_name",
|
||||||
|
"queryType":0,
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItem218e23",
|
||||||
|
"yunzhupaasKey":"relationForm",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"defaultValue":"",
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"供应商",
|
||||||
|
"trigger":"change",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347854600,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"transferList":[],
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-menu",
|
||||||
|
"tag":"YunzhupaasRelationForm",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"extraOptions":[],
|
||||||
|
"popupTitle":"选择数据",
|
||||||
|
"__vModel__":"supplier_id",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"disabled":false,
|
||||||
|
"id":"supplier_id",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"popupWidth":"1000px",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
},
|
||||||
|
"propsValue":"company_id"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clearable":true,
|
||||||
|
"maxlength":255,
|
||||||
|
"fullName":"备注",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"autoSize":{
|
||||||
|
"minRows":2,
|
||||||
|
"maxRows":2
|
||||||
|
},
|
||||||
|
"showCount":false,
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItema2c991",
|
||||||
|
"yunzhupaasKey":"textarea",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"备注",
|
||||||
|
"trigger":"blur",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_asset",
|
||||||
|
"renderKey":1777347940332,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-textarea",
|
||||||
|
"tag":"YunzhupaasTextarea",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":24
|
||||||
|
},
|
||||||
|
"readonly":false,
|
||||||
|
"__vModel__":"remark",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"disabled":false,
|
||||||
|
"id":"remark",
|
||||||
|
"placeholder":"请输入",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
export default superQueryJson
|
||||||
719
src/views/mdm/asset/index.vue
Normal file
719
src/views/mdm/asset/index.vue
Normal file
@@ -0,0 +1,719 @@
|
|||||||
|
<template>
|
||||||
|
<div class="yunzhupaas-content-wrapper">
|
||||||
|
<div class="yunzhupaas-content-wrapper-center">
|
||||||
|
<div class="yunzhupaas-content-wrapper-search-box" v-if="getSearchList.length">
|
||||||
|
<BasicForm @register="registerSearchForm" :schemas="getSearchList"
|
||||||
|
@advanced-change="redoHeight" @submit="handleSearchSubmit" @reset="handleSearchReset"
|
||||||
|
class="search-form">
|
||||||
|
</BasicForm>
|
||||||
|
</div>
|
||||||
|
<div class="yunzhupaas-content-wrapper-content bg-white">
|
||||||
|
<a-tabs v-model:activeKey="state.tabActiveKey" class="yunzhupaas-content-wrapper-tabs yunzhupaas-content-wrapper-tabs-header"
|
||||||
|
destroyInactiveTabPane @change="onTabChange">
|
||||||
|
<a-tab-pane v-for="item in state.tabList" :key="item.id" :tab="item.fullName"></a-tab-pane>
|
||||||
|
</a-tabs>
|
||||||
|
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
||||||
|
@columns-change="handleColumnChange">
|
||||||
|
<template #tableTitle>
|
||||||
|
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add" v-auth="'btn_add'"
|
||||||
|
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
||||||
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-download" v-auth="'btn_download'"
|
||||||
|
@click="openExportModal(true, { columnList: state.exportList, selectIds: getSelectRowKeys(), showExportSelected: true })"> {{t('common.exportText','导出')}}</a-button>
|
||||||
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-upload" v-auth="'btn_upload'"
|
||||||
|
@click="openImportModal(true, { url: 'bcm/Asset', menuId: searchInfo.menuId })"> {{t('common.importText','导入')}}</a-button>
|
||||||
|
</template>
|
||||||
|
<template #toolbar>
|
||||||
|
<a-tooltip placement="top">
|
||||||
|
<template #title>
|
||||||
|
<span>{{ t('common.superQuery') }}</span>
|
||||||
|
</template>
|
||||||
|
<filter-outlined @click="openSuperQuery(true, { columnOptions: superQueryJson })" />
|
||||||
|
</a-tooltip>
|
||||||
|
</template>
|
||||||
|
<template #toolbarAfter>
|
||||||
|
<ViewList :menuId="route.meta.modelId" :viewList="viewList" @itemClick="handleViewClick" @reload="initViewList" />
|
||||||
|
<ViewSetting :menuId="route.meta.modelId" :viewList="viewList" :currentView="currentView" @reload="initViewList" />
|
||||||
|
</template>
|
||||||
|
<template #bodyCell="{ column, record, index }">
|
||||||
|
<template v-for="(item, index) in childColumnList" v-if="childColumnList.length">
|
||||||
|
<template
|
||||||
|
v-if="column?.id?.includes('-') && item.children && item.children[0] && column.key === item.children[0]?.dataIndex">
|
||||||
|
<ChildTableColumn :data="record[item.prop]" :head="item.children"
|
||||||
|
@toggleExpand="toggleExpand(record, item.prop+`Expand`)" @toDetail="toDetail"
|
||||||
|
:expand="record[item.prop+`Expand`]" :key="index" :showOverflow="true "/>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-if="!(record.top || column.id?.includes('-'))">
|
||||||
|
<template v-if="column.yunzhupaasKey === 'relationForm'">
|
||||||
|
<p class="link-text"
|
||||||
|
@click="toDetail(column.modelId, record[column.dataIndex+`_yunzhupaasId`], column.propsValue)">
|
||||||
|
{{ record[column.dataIndex] }}</p>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'inputNumber'">
|
||||||
|
<yunzhupaas-input-number v-model:value="record[column.prop]" :precision="column.precision" :thousands="column.thousands" disabled detailed />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'calculate'">
|
||||||
|
<yunzhupaas-calculate
|
||||||
|
v-model:value="record[column.prop]"
|
||||||
|
:isStorage="column.isStorage"
|
||||||
|
:precision="column.precision"
|
||||||
|
:thousands="column.thousands"
|
||||||
|
detailed />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'sign'">
|
||||||
|
<yunzhupaas-sign v-model:value="record[column.prop]" detailed />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'signature'">
|
||||||
|
<yunzhupaas-signature v-model:value="record[column.prop]" detailed />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'rate'">
|
||||||
|
<yunzhupaas-rate v-model:value="record[column.prop]" :count="column.count" :allowHalf="column.allowHalf" disabled />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'slider'">
|
||||||
|
<yunzhupaas-slider v-model:value="record[column.prop]" :min="column.min" :max="column.max" :step="column.step" disabled />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'uploadImg'">
|
||||||
|
<yunzhupaas-upload-img v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'uploadFile'">
|
||||||
|
<yunzhupaas-upload-file v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'input'">
|
||||||
|
<yunzhupaas-input
|
||||||
|
v-model:value="record[column.prop]"
|
||||||
|
:useMask="column.useMask"
|
||||||
|
:maskConfig="column.maskConfig"
|
||||||
|
:showOverflow="true"
|
||||||
|
detailed />
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.key === 'action' && !record.top">
|
||||||
|
<TableAction :actions="getTableActions(record)" />
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Form ref="formRef" @reload="reload" />
|
||||||
|
<Detail ref="detailRef" />
|
||||||
|
<ExportModal @register="registerExportModal" @download="handleDownload" />
|
||||||
|
<ImportModal @register="registerImportModal" @reload="reload" />
|
||||||
|
<PrintSelect @register="registerPrintSelect" @change="handleShowBrowse" />
|
||||||
|
<PrintBrowse @register="registerPrintBrowse" />
|
||||||
|
<RelationDetail ref="relationDetailRef" />
|
||||||
|
<SuperQueryModal @register="registerSuperQueryModal" @superQuery="handleSuperQuery" />
|
||||||
|
<SuppinfoDetailDrawer ref="SuppinfoDetailRef" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import SuppinfoDetailDrawer from '@/views/mdm/suppinfo/Detail.vue'; // 根据实际路径调整
|
||||||
|
import { getList, del, exportData, batchDelete } from './helper/api';
|
||||||
|
import { getConfigData,getViewList } from '@/api/onlineDev/visualDev';
|
||||||
|
import { getDictionaryDataSelector } from '@/api/systemData/dictionary';
|
||||||
|
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
||||||
|
import { getOrgByOrganizeCondition,getDepartmentSelectAsyncList } from '@/api/permission/organize';
|
||||||
|
import { ref, reactive, onMounted, toRefs, computed, unref, nextTick, toRaw, provide } from 'vue';
|
||||||
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n';
|
||||||
|
import { useOrganizeStore } from '@/store/modules/organize';
|
||||||
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
import { BasicModal, useModal } from '@/components/Modal';
|
||||||
|
import { usePopup } from '@/components/Popup';
|
||||||
|
import { ScrollContainer } from '@/components/Container';
|
||||||
|
import { BasicLeftTree, TreeActionType } from '@/components/Tree';
|
||||||
|
import { BasicForm, useForm } from '@/components/Form';
|
||||||
|
import { BasicTable, useTable, TableAction, ActionItem, TableActionType, SorterResult } from '@/components/Table';
|
||||||
|
import { SuperQueryModal } from '@/components/CommonModal';
|
||||||
|
import Form from './Form.vue';
|
||||||
|
import Detail from './Detail.vue';
|
||||||
|
// 有关联表单详情:开始
|
||||||
|
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
||||||
|
// 有关联表单详情:结束
|
||||||
|
import ChildTableColumn from '@/views/common/dynamicModel/list/ChildTableColumn.vue';
|
||||||
|
import { ExportModal } from '@/components/CommonModal';
|
||||||
|
import { downloadByUrl } from '@/utils/file/download';
|
||||||
|
import { ImportModal} from '@/components/CommonModal';
|
||||||
|
// 打印模板多条生成PrintSelect
|
||||||
|
import PrintSelect from '@/components/PrintDesign/printSelect/index.vue';
|
||||||
|
import PrintBrowse from '@/components/PrintDesign/printBrowse/index.vue';
|
||||||
|
import { useBaseStore } from '@/store/modules/base';
|
||||||
|
import { useRoute,useRouter } from 'vue-router';
|
||||||
|
import { FilterOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { getSearchFormSchemas } from '@/components/FormGenerator/src/helper/transform';
|
||||||
|
import { cloneDeep } from 'lodash-es';
|
||||||
|
import columnList from './helper/columnList';
|
||||||
|
import searchList from './helper/searchList';
|
||||||
|
import superQueryJson from './helper/superQueryJson';
|
||||||
|
import { dyOptionsList, systemComponentsList } from '@/components/FormGenerator/src/helper/config';
|
||||||
|
import { thousandsFormat, getParamList} from '@/utils/yunzhupaas';
|
||||||
|
import { usePermission } from '@/hooks/web/usePermission';
|
||||||
|
|
||||||
|
import ViewSetting from '@/views/common/dynamicModel/list/components/ViewSetting.vue';
|
||||||
|
import ViewList from '@/views/common/dynamicModel/list/components/ViewList.vue';
|
||||||
|
|
||||||
|
interface State {
|
||||||
|
config: any;
|
||||||
|
columnList: any[];
|
||||||
|
printListOptions: any[];
|
||||||
|
columnBtnsList: any[];
|
||||||
|
customBtnsList: any[];
|
||||||
|
treeFieldNames: any;
|
||||||
|
leftTreeData: any[];
|
||||||
|
leftTreeLoading: boolean;
|
||||||
|
treeActiveId: string;
|
||||||
|
treeActiveNodePath: any;
|
||||||
|
columns: any[];
|
||||||
|
complexColumns: any[];
|
||||||
|
childColumnList: any[];
|
||||||
|
exportList: any[];
|
||||||
|
cacheList: any[];
|
||||||
|
currFlow: any;
|
||||||
|
isCustomCopy: boolean;
|
||||||
|
candidateType: number;
|
||||||
|
currRow: any;
|
||||||
|
workFlowFormData: any;
|
||||||
|
expandObj: any;
|
||||||
|
columnSettingList: any[];
|
||||||
|
searchSchemas: any[];
|
||||||
|
treeRelationObj: any;
|
||||||
|
treeQueryJson: any;
|
||||||
|
leftTreeActiveInfo: any;
|
||||||
|
keyword: string;
|
||||||
|
tabActiveKey: any;
|
||||||
|
tabList: any[];
|
||||||
|
tabQueryJson: any;
|
||||||
|
viewList: any[];
|
||||||
|
currentView: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const { hasBtnP } = usePermission();
|
||||||
|
const { createMessage, createConfirm } = useMessage();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const organizeStore = useOrganizeStore();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const userInfo = userStore.getUserInfo;
|
||||||
|
const baseStore = useBaseStore();
|
||||||
|
|
||||||
|
const [registerExportModal, { openModal: openExportModal, closeModal: closeExportModal, setModalProps: setExportModalProps }] = useModal();
|
||||||
|
const [registerImportModal, { openModal: openImportModal }] = useModal();
|
||||||
|
const [registerSuperQueryModal, { openModal: openSuperQuery }] = useModal();
|
||||||
|
const formRef = ref<any>(null);
|
||||||
|
const tableRef = ref<Nullable<TableActionType>>(null);
|
||||||
|
const detailRef = ref<any>(null);
|
||||||
|
const relationDetailRef = ref<any>(null);
|
||||||
|
|
||||||
|
const state = reactive<State>({
|
||||||
|
config: {},
|
||||||
|
columnList: [],
|
||||||
|
printListOptions: [],
|
||||||
|
columnBtnsList: [],
|
||||||
|
customBtnsList: [],
|
||||||
|
treeFieldNames: {
|
||||||
|
children: 'children' ,
|
||||||
|
title: 'fullName' ,
|
||||||
|
key: 'enCode' ,
|
||||||
|
isLeaf: 'isLeaf',
|
||||||
|
},
|
||||||
|
leftTreeData: [],
|
||||||
|
leftTreeLoading: false,
|
||||||
|
treeActiveId: '',
|
||||||
|
treeActiveNodePath: [],
|
||||||
|
columns: [],
|
||||||
|
complexColumns: [], // 复杂表头
|
||||||
|
childColumnList: [],
|
||||||
|
exportList: [],
|
||||||
|
cacheList: [],
|
||||||
|
currFlow: {},
|
||||||
|
isCustomCopy: false,
|
||||||
|
candidateType: 1,
|
||||||
|
currRow: {},
|
||||||
|
workFlowFormData: {},
|
||||||
|
expandObj: {},
|
||||||
|
columnSettingList: [],
|
||||||
|
searchSchemas: [],
|
||||||
|
treeRelationObj: null,
|
||||||
|
treeQueryJson: {},
|
||||||
|
leftTreeActiveInfo: {},
|
||||||
|
keyword: '',
|
||||||
|
tabActiveKey: '',
|
||||||
|
tabList: [],
|
||||||
|
tabQueryJson: {},
|
||||||
|
viewList: [],
|
||||||
|
currentView: {},
|
||||||
|
});
|
||||||
|
const defaultSearchInfo = {
|
||||||
|
menuId: route.meta.modelId as string,
|
||||||
|
moduleId:'818770027560829701',
|
||||||
|
superQueryJson: '',
|
||||||
|
dataType:0,
|
||||||
|
};
|
||||||
|
const searchInfo = reactive({
|
||||||
|
...cloneDeep(defaultSearchInfo),
|
||||||
|
});
|
||||||
|
const { childColumnList, searchSchemas, viewList, currentView} = toRefs(state);
|
||||||
|
const [registerSearchForm, { updateSchema, resetFields, submit: searchFormSubmit, setFieldsValue}] = useForm({
|
||||||
|
baseColProps: { span: 6 },
|
||||||
|
showActionButtonGroup: true,
|
||||||
|
showAdvancedButton: true,
|
||||||
|
compact: true,
|
||||||
|
});
|
||||||
|
const [registerTable, { reload, setLoading, getFetchParams, getSelectRows, getSelectRowKeys, redoHeight,clearSelectedRowKeys }] = useTable({
|
||||||
|
api: getList,
|
||||||
|
immediate: false,
|
||||||
|
clickToRowSelect: false,
|
||||||
|
tableSetting: { setting: false },
|
||||||
|
afterFetch: (data) => {
|
||||||
|
const list = data.map((o) => ({
|
||||||
|
...o,
|
||||||
|
...state.expandObj,
|
||||||
|
}));
|
||||||
|
state.cacheList = cloneDeep(list);
|
||||||
|
return list;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const [registerChildTable] = useTable({
|
||||||
|
pagination: false,
|
||||||
|
canResize: false,
|
||||||
|
showTableSetting: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
provide('getLeftTreeActiveInfo', () => state.leftTreeActiveInfo);
|
||||||
|
|
||||||
|
const getHasBatchBtn = computed(() => {
|
||||||
|
let btnsList =[]
|
||||||
|
btnsList.push('download')
|
||||||
|
btnsList=btnsList.filter(o => hasBtnP('btn_' + o))
|
||||||
|
return !!btnsList.length
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
const getColumns = computed(() => {
|
||||||
|
const columns = state.complexColumns;
|
||||||
|
return setListValue(state.currentView?.columnList, columns, 'prop');
|
||||||
|
});
|
||||||
|
const getSearchList = computed(() => {
|
||||||
|
const searchSchemas = cloneDeep(state.searchSchemas).map(o => ({ ...o, show: true }));
|
||||||
|
return setListValue(state.currentView?.searchList, searchSchemas, 'field');
|
||||||
|
});
|
||||||
|
const getTableBindValue = computed(() => {
|
||||||
|
let columns = unref(getColumns);
|
||||||
|
const defaultSortConfig= [];
|
||||||
|
const sortField = defaultSortConfig.map(o => (o.sort === 'desc' ? '-' : '') + o.field);
|
||||||
|
const data: any = {
|
||||||
|
pagination: { pageSize: 20 }, //有分页
|
||||||
|
searchInfo: unref(searchInfo),
|
||||||
|
defSort: { sidx: sortField.join(',') },
|
||||||
|
sortFn: (sortInfo: SorterResult | SorterResult[]) => {
|
||||||
|
if (Array.isArray(sortInfo)) {
|
||||||
|
const sortList = sortInfo.map(o => (o.order === 'descend' ? '-' : '') + o.field);
|
||||||
|
return { sidx: sortList.join(',') };
|
||||||
|
} else {
|
||||||
|
const { field, order } = sortInfo;
|
||||||
|
if (field && order) {
|
||||||
|
// 排序字段
|
||||||
|
return { sidx: (order === 'descend' ? '-' : '') + field };
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ellipsis:true ,
|
||||||
|
columns,
|
||||||
|
bordered: true,
|
||||||
|
actionColumn: {
|
||||||
|
width: 150,
|
||||||
|
title: t('component.table.action'),
|
||||||
|
dataIndex: 'action',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
if (unref(getHasBatchBtn)) {
|
||||||
|
const rowSelection: any = { type: 'checkbox' };
|
||||||
|
data.rowSelection = rowSelection;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
});
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
state.config = {};
|
||||||
|
searchInfo.menuId = route.meta.modelId as string;
|
||||||
|
state.columnList = columnList;
|
||||||
|
setLoading(true);
|
||||||
|
getSearchSchemas();
|
||||||
|
getColumnList();
|
||||||
|
initViewList();
|
||||||
|
getTabList();
|
||||||
|
}
|
||||||
|
function getSearchSchemas() {
|
||||||
|
|
||||||
|
const schemas = getSearchFormSchemas(searchList);
|
||||||
|
state.searchSchemas = schemas;
|
||||||
|
schemas.forEach((cur) => {
|
||||||
|
const config = cur.__config__;
|
||||||
|
if (dyOptionsList.includes(config.yunzhupaasKey)) {
|
||||||
|
if (config.dataType === 'dictionary') {
|
||||||
|
if (!config.dictionaryType) return;
|
||||||
|
getDictionaryDataSelector(config.dictionaryType).then((res) => {
|
||||||
|
updateSchema([{ field: cur.field, componentProps: { options: res.data.list } }]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (config.dataType === 'dynamic') {
|
||||||
|
if (!config.propsUrl) return;
|
||||||
|
const query = { paramList: getParamList(config.templateJson) };
|
||||||
|
getDataInterfaceRes(config.propsUrl, query).then((res) => {
|
||||||
|
const data = Array.isArray(res.data) ? res.data : [];
|
||||||
|
updateSchema([{ field: cur.field, componentProps: { options: data } }]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cur.defaultValue = cur.value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function getColumnList() {
|
||||||
|
// 没有开启列表权限
|
||||||
|
let columnList = state.columnList;
|
||||||
|
state.exportList = columnList;
|
||||||
|
let columns = columnList.map((o) => ({
|
||||||
|
...o,
|
||||||
|
title: o.labelI18nCode ? t(o.labelI18nCode, o.label) : o.label,
|
||||||
|
dataIndex: o.prop,
|
||||||
|
align: o.align,
|
||||||
|
fixed: o.fixed == 'none' ? false : o.fixed,
|
||||||
|
sorter: o.sortable ? { multiple: 1 } : o.sortable,
|
||||||
|
width: o.width || 100,
|
||||||
|
}));
|
||||||
|
//添加复杂表头
|
||||||
|
columns = getComplexColumns(columns);
|
||||||
|
state.columns = columns.filter((o) => o.prop.indexOf('-') < 0);
|
||||||
|
//子表表头
|
||||||
|
getChildComplexColumns(columns);
|
||||||
|
}
|
||||||
|
|
||||||
|
//标签初始化
|
||||||
|
async function getTabList() {
|
||||||
|
// 字典
|
||||||
|
const data = (await baseStore.getDicDataSelector('assetType'))
|
||||||
|
const options = data.map(o => ({ ...o, id: o.enCode }));
|
||||||
|
state.tabList = [...state.tabList,...options]
|
||||||
|
state.tabList.unshift({ fullName: '全部', id: '' });
|
||||||
|
state.tabActiveKey = state.tabList[0].id || '';
|
||||||
|
state.tabQueryJson = { asset_type : state.tabList[0].id };
|
||||||
|
nextTick(() => {
|
||||||
|
unref(getSearchList)?.length? searchFormSubmit() : reload({ page: 1 });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//复杂表头
|
||||||
|
function getComplexColumns(columns) {
|
||||||
|
//这里生成复杂表头的配置
|
||||||
|
let complexHeaderList: any[] = [];
|
||||||
|
if (!complexHeaderList.length) return columns;
|
||||||
|
let childColumns: any[] = [];
|
||||||
|
let firstChildColumns: string[] = [];
|
||||||
|
for (let i = 0; i < complexHeaderList.length; i++) {
|
||||||
|
const e = complexHeaderList[i];
|
||||||
|
e.label = e.fullName;
|
||||||
|
e.labelI18nCode = e.fullNameI18nCode;
|
||||||
|
e.title = e.fullNameI18nCode ? t(e.fullNameI18nCode, e.fullName) : e.fullName;
|
||||||
|
e.align = e.align;
|
||||||
|
e.dataIndex = e.id;
|
||||||
|
e.prop = e.id;
|
||||||
|
e.children = [];
|
||||||
|
e.yunzhupaasKey = 'complexHeader';
|
||||||
|
if (e.childColumns?.length) {
|
||||||
|
childColumns.push(...e.childColumns);
|
||||||
|
for (let k = 0; k < e.childColumns.length; k++) {
|
||||||
|
const item = e.childColumns[k];
|
||||||
|
for (let j = 0; j < columns.length; j++) {
|
||||||
|
const o = columns[j];
|
||||||
|
if (o.prop == item && o.fixed !== 'left' && o.fixed !== 'right') e.children.push({ ...o });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.children.length) firstChildColumns.push(e.children[0].prop);
|
||||||
|
}
|
||||||
|
complexHeaderList = complexHeaderList.filter(o => o.children.length);
|
||||||
|
let list: any[] = [];
|
||||||
|
for (let i = 0; i < columns.length; i++) {
|
||||||
|
const e = columns[i];
|
||||||
|
if (!childColumns.includes(e.prop)) {
|
||||||
|
list.push(e);
|
||||||
|
} else {
|
||||||
|
if (firstChildColumns.includes(e.prop)) {
|
||||||
|
const item = complexHeaderList.find(o => o.childColumns.includes(e.prop));
|
||||||
|
list.push(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
//子表表头
|
||||||
|
function getChildComplexColumns(columnList) {
|
||||||
|
let list: any[] = [];
|
||||||
|
for (let i = 0; i < columnList.length; i++) {
|
||||||
|
const e = columnList[i];
|
||||||
|
if (!e.prop.includes('-')) {
|
||||||
|
list.push(e);
|
||||||
|
} else {
|
||||||
|
let prop = e.prop.split('-')[0];
|
||||||
|
let vModel = e.prop.split('-')[1];
|
||||||
|
let label = e.label.split('-')[0];
|
||||||
|
let childLabel = e.label.replace(label + '-', '');
|
||||||
|
if (e.fullNameI18nCode && Array.isArray(e.fullNameI18nCode) && e.fullNameI18nCode[0]) label = t(e.fullNameI18nCode[0], label);
|
||||||
|
let newItem = {
|
||||||
|
align: 'center',
|
||||||
|
yunzhupaasKey: 'table',
|
||||||
|
prop,
|
||||||
|
label,
|
||||||
|
title: label,
|
||||||
|
dataIndex: prop,
|
||||||
|
children: [],
|
||||||
|
};
|
||||||
|
e.dataIndex = vModel;
|
||||||
|
e.title = e.labelI18nCode ? t(e.labelI18nCode, childLabel) : childLabel;
|
||||||
|
if (!state.expandObj.hasOwnProperty(prop+`Expand`)) state.expandObj[prop+`Expand`] = false;
|
||||||
|
if (!list.some((o) => o.prop === prop)) list.push(newItem);
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
if (list[i].prop === prop) {
|
||||||
|
list[i].children.push(e);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 行内分组展示
|
||||||
|
getMergeList(list);
|
||||||
|
|
||||||
|
state.complexColumns = list;
|
||||||
|
state.childColumnList = list.filter((o) => o.yunzhupaasKey === 'table');
|
||||||
|
|
||||||
|
// 子表分组展示宽度取100
|
||||||
|
for (let i = 0; i < state.childColumnList.length; i++) {
|
||||||
|
const e = state.childColumnList[i];
|
||||||
|
if (e.children?.length) e.children = e.children.map(o => ({ ...o, width: 100 }));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getMergeList(list) {
|
||||||
|
list.forEach((item) => {
|
||||||
|
if (item.yunzhupaasKey === 'table' && item.children && item.children.length) {
|
||||||
|
item.children.forEach((child, index) => {
|
||||||
|
if (index == 0) {
|
||||||
|
child.customCell = () => ({
|
||||||
|
rowspan: 1,
|
||||||
|
colspan: item.children.length,
|
||||||
|
class: 'child-table-box',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
child.customCell = () => ({
|
||||||
|
rowspan: 0,
|
||||||
|
colspan: 0,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function toggleExpand(row, field) {
|
||||||
|
row[field] = !row[field];
|
||||||
|
}
|
||||||
|
// 关联表单查看详情
|
||||||
|
function toDetail(modelId, id, propsValue) {
|
||||||
|
if (!id) return;
|
||||||
|
// 先调用 toDetail_add,如果返回 true 表示已处理,直接 return
|
||||||
|
|
||||||
|
|
||||||
|
if (toDetail_add(modelId, id, propsValue)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getConfigData(modelId).then((res) => {
|
||||||
|
if (!res.data || !res.data.formData) return;
|
||||||
|
const formConf = JSON.parse(res.data.formData);
|
||||||
|
formConf.popupType = 'general';
|
||||||
|
formConf.hasPrintBtn = false;
|
||||||
|
formConf.customBtns = [];
|
||||||
|
const data = { id, formConf, modelId, propsValue};
|
||||||
|
relationDetailRef.value?.init(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function handleColumnChange(data) {
|
||||||
|
state.columnSettingList = data;
|
||||||
|
}
|
||||||
|
function getTableActions(record): ActionItem[] {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: t('common.editText','编辑') ,
|
||||||
|
onClick: updateHandle.bind(null, record),
|
||||||
|
auth: 'btn_edit', //有按钮权限
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('common.delText','删除') ,
|
||||||
|
color: 'error',
|
||||||
|
modelConfirm: {
|
||||||
|
onOk: handleDelete.bind(null, record.id),
|
||||||
|
},
|
||||||
|
auth: 'btn_remove', //有按钮权限
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('common.detailText','详情') ,
|
||||||
|
onClick: goDetail.bind(null, record),
|
||||||
|
auth: 'btn_detail', //有按钮权限
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
// 编辑
|
||||||
|
function updateHandle(record) {
|
||||||
|
// 不带工作流
|
||||||
|
const data = {
|
||||||
|
id: record.id,
|
||||||
|
menuId: searchInfo.menuId,
|
||||||
|
allList: state.cacheList,
|
||||||
|
};
|
||||||
|
formRef.value?.init(data);
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
function handleDelete(id) {
|
||||||
|
const query={ids:[id] }
|
||||||
|
batchDelete(query).then((res) => {
|
||||||
|
createMessage.success(res.msg);
|
||||||
|
clearSelectedRowKeys();
|
||||||
|
reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 查看详情
|
||||||
|
function goDetail(record) {
|
||||||
|
// 不带流程
|
||||||
|
const data = {
|
||||||
|
id: record.id,
|
||||||
|
};
|
||||||
|
detailRef.value?.init(data);
|
||||||
|
}
|
||||||
|
// 新增
|
||||||
|
function addHandle() {
|
||||||
|
// 不带流程新增
|
||||||
|
const data = {
|
||||||
|
id: '',
|
||||||
|
menuId: searchInfo.menuId,
|
||||||
|
allList: state.cacheList,
|
||||||
|
};
|
||||||
|
formRef.value?.init(data);
|
||||||
|
}
|
||||||
|
// 导出
|
||||||
|
function handleDownload(data) {
|
||||||
|
let query = { ...getFetchParams(), ...data };
|
||||||
|
exportData(query)
|
||||||
|
.then((res) => {
|
||||||
|
setExportModalProps({ confirmLoading: false });
|
||||||
|
if (!res.data.url) return;
|
||||||
|
downloadByUrl({ url: res.data.url });
|
||||||
|
closeExportModal();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
setExportModalProps({ confirmLoading: false });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 高级查询
|
||||||
|
function handleSuperQuery(superQueryJson) {
|
||||||
|
searchInfo.superQueryJson = superQueryJson;
|
||||||
|
reload({ page: 1 });
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSearchReset() {
|
||||||
|
clearSelectedRowKeys();
|
||||||
|
if (!state.resetFromTree) updateSearchFormValue();
|
||||||
|
if (state.resetFromTree) state.resetFromTree = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSearchSubmit(data) {
|
||||||
|
clearSelectedRowKeys();
|
||||||
|
let obj = {
|
||||||
|
...defaultSearchInfo,
|
||||||
|
superQueryJson: searchInfo.superQueryJson,
|
||||||
|
...data,
|
||||||
|
...state.tabQueryJson,
|
||||||
|
};
|
||||||
|
Object.keys(searchInfo).map(key => {
|
||||||
|
delete searchInfo[key];
|
||||||
|
});
|
||||||
|
for (let [key, value] of Object.entries(obj)) {
|
||||||
|
searchInfo[key.replaceAll('-', '_')] = value;
|
||||||
|
}
|
||||||
|
console.log(searchInfo);
|
||||||
|
reload({ page: 1 });
|
||||||
|
}
|
||||||
|
function onTabChange(val) {
|
||||||
|
state.tabQueryJson = { asset_type : val }; //这个key是取json中的tabConfig.relationFiled
|
||||||
|
unref(getSearchList).length?searchFormSubmit():resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateSearchFormValue() {
|
||||||
|
if (!state.treeActiveId) return searchFormSubmit();
|
||||||
|
let queryJson: any = {};
|
||||||
|
let leftTreeActiveInfo: any = {};
|
||||||
|
const isMultiple = !state.treeRelationObj ? false : state.treeRelationObj.searchMultiple;
|
||||||
|
//多级左侧树,需要拼父级->转为查询参数
|
||||||
|
if (state.treeRelationObj && state.treeRelationObj.yunzhupaasKey && ['organizeSelect', 'cascader', 'areaSelect'].includes(state.treeRelationObj.yunzhupaasKey)) {
|
||||||
|
let currValue = [];
|
||||||
|
currValue = state.treeActiveNodePath.map(o => o[state.treeFieldNames.key]);
|
||||||
|
queryJson = { 'asset_type': isMultiple ? [currValue] : currValue };
|
||||||
|
leftTreeActiveInfo = { 'asset_type': state.treeRelationObj.multiple ? [currValue] : currValue };
|
||||||
|
} else {
|
||||||
|
queryJson = { 'asset_type': isMultiple ? [state.treeActiveId] : state.treeActiveId };
|
||||||
|
leftTreeActiveInfo = { 'asset_type': state.treeRelationObj.multiple ? [state.treeActiveId] : state.treeActiveId };
|
||||||
|
}
|
||||||
|
state.leftTreeActiveInfo = leftTreeActiveInfo;
|
||||||
|
if(unref(getSearchList)?.length){
|
||||||
|
// 有搜索列表
|
||||||
|
setFieldsValue(queryJson);
|
||||||
|
searchFormSubmit();
|
||||||
|
}else{
|
||||||
|
// 无搜索列表
|
||||||
|
handleSearchSubmit(queryJson);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function initViewList(currentId = '') {
|
||||||
|
const query = {
|
||||||
|
menuId: route.meta.modelId,
|
||||||
|
};
|
||||||
|
getViewList(query).then(res => {
|
||||||
|
const columns : any[]= state.complexColumns;
|
||||||
|
const searchList: any[] = state.searchSchemas.map(o => ({ label: o.label, id: o.field, show: o.show, labelI18nCode: o.labelI18nCode }));
|
||||||
|
const columnList: any[] = columns.map(o => ({ label: o.label, id: o.prop, show: true, fixed: o.fixed || 'none', labelI18nCode: o.labelI18nCode }));
|
||||||
|
state.viewList = (res.data || []).map(o => {
|
||||||
|
if (o.type == 0) return { ...o, searchList, columnList };
|
||||||
|
return { ...o, searchList: o.searchList ? JSON.parse(o.searchList) : [], columnList: o.columnList ? JSON.parse(o.columnList) : [] };
|
||||||
|
});
|
||||||
|
if (currentId) {
|
||||||
|
state.currentView = state.viewList.filter(o => o.id === currentId)[0] || state.viewList[0];
|
||||||
|
} else {
|
||||||
|
state.currentView = state.viewList.filter(o => o.status === 1)[0] || state.viewList[0];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function handleViewClick(item) {
|
||||||
|
state.currentView = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setListValue(data: any[] = [], defaultData: any[] = [], key) {
|
||||||
|
let list: any[] = [];
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
for (let j = 0; j < defaultData.length; j++) {
|
||||||
|
if (data[i].show && data[i].id == defaultData[j][key]) list.push(defaultData[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 新增方法 */
|
||||||
|
// 修改 toDetail 方法,区分不同类型的详情
|
||||||
|
const SuppinfoDetailRef = ref<any>(null); // 新增 ref
|
||||||
|
function toDetail_add(modelId, id, propsValue) {
|
||||||
|
// 直接打开企业详情 Drawer
|
||||||
|
SuppinfoDetailRef.value?.init({ id });
|
||||||
|
return true; // 返回 true 表示已处理
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1,182 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicPopup v-bind="$attrs" @register="registerPopup" :title="title" destroyOnClose>
|
|
||||||
<template #insertToolbar> </template>
|
|
||||||
<a-row class="p-10px dynamic-form" :style="{ margin: '0 auto', width: '100%' }">
|
|
||||||
<!-- 表单 -->
|
|
||||||
<a-form :colon="false" size="middle" layout="horizontal" labelAlign="right" :labelCol="{ style: { width: '100px' } }" :model="dataForm" ref="formRef">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<!-- 具体表单 -->
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="project_type_code">
|
|
||||||
<template #label>项目类型编码: </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.project_type_code"
|
|
||||||
placeholder="请输入项目类型编码"
|
|
||||||
:maxlength="50"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.project_type_code">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="project_type_name">
|
|
||||||
<template #label>项目类型名称: </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.project_type_name"
|
|
||||||
placeholder="请输入项目类型名称"
|
|
||||||
:maxlength="50"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.project_type_name">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="remark">
|
|
||||||
<template #label>备注: </template> <p>{{ dataForm.remark }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<!-- 表单结束 -->
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</a-row>
|
|
||||||
</BasicPopup>
|
|
||||||
<!-- 有关联表单详情:开始 -->
|
|
||||||
<RelationDetail ref="relationDetailRef" />
|
|
||||||
<!-- 有关联表单详情:结束 -->
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { getDetailInfo } from './helper/api';
|
|
||||||
import { getConfigData } from '@/api/onlineDev/visualDev';
|
|
||||||
import { reactive, toRefs, nextTick, ref, computed, unref, toRaw } from 'vue';
|
|
||||||
import { BasicPopup, usePopup } from '@/components/Popup';
|
|
||||||
import { BasicModal, useModal } from '@/components/Modal';
|
|
||||||
// 有关联表单详情
|
|
||||||
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
|
||||||
// 表单权限
|
|
||||||
import { usePermission } from '@/hooks/web/usePermission';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { buildUUID } from '@/utils/uuid';
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
|
||||||
import { getDataChange } from '@/api/onlineDev/visualDev';
|
|
||||||
import { getDataInterfaceDataInfoByIds } from '@/api/systemData/dataInterface';
|
|
||||||
import ExtraRelationInfo from '@/components/yunzhupaas/RelationForm/src/ExtraRelationInfo.vue';
|
|
||||||
|
|
||||||
interface State {
|
|
||||||
dataForm: any;
|
|
||||||
title: string;
|
|
||||||
maskConfig: any;
|
|
||||||
interfaceRes: any;
|
|
||||||
locationScope: any;
|
|
||||||
extraOptions: any;
|
|
||||||
extraData: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
defineOptions({ name: 'Detail' });
|
|
||||||
const { createMessage, createConfirm } = useMessage();
|
|
||||||
const [registerPopup, { openPopup, setPopupProps, closePopup }] = usePopup();
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
|
||||||
const relationDetailRef = ref<any>(null);
|
|
||||||
const state = reactive<State>({
|
|
||||||
dataForm: {},
|
|
||||||
title: t('common.detailText', '详情'),
|
|
||||||
maskConfig: {
|
|
||||||
project_type_code: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
project_type_name: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
interfaceRes: { remark: [], project_type_name: [], project_type_code: [] },
|
|
||||||
locationScope: {},
|
|
||||||
extraOptions: {},
|
|
||||||
extraData: {},
|
|
||||||
});
|
|
||||||
const { title, dataForm, maskConfig } = toRefs(state);
|
|
||||||
// 表单权限
|
|
||||||
const { hasFormP } = usePermission();
|
|
||||||
|
|
||||||
defineExpose({ init });
|
|
||||||
|
|
||||||
function init(data) {
|
|
||||||
state.dataForm.id = data.id;
|
|
||||||
openPopup();
|
|
||||||
nextTick(() => {
|
|
||||||
setTimeout(initData, 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function initData() {
|
|
||||||
changeLoading(true);
|
|
||||||
if (state.dataForm.id) {
|
|
||||||
getData(state.dataForm.id);
|
|
||||||
} else {
|
|
||||||
closePopup();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getData(id) {
|
|
||||||
getDetailInfo(id).then(res => {
|
|
||||||
state.dataForm = res.data || {};
|
|
||||||
nextTick(() => {
|
|
||||||
changeLoading(false);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function toDetail(modelId, id, propsValue) {
|
|
||||||
if (!id) return;
|
|
||||||
getConfigData(modelId).then(res => {
|
|
||||||
if (!res.data || !res.data.formData) return;
|
|
||||||
const formConf = JSON.parse(res.data.formData);
|
|
||||||
formConf.popupType = 'general';
|
|
||||||
formConf.hasPrintBtn = false;
|
|
||||||
formConf.customBtns = [];
|
|
||||||
const data = { id, formConf, modelId, propsValue };
|
|
||||||
relationDetailRef.value?.init(data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function setFormProps(data) {
|
|
||||||
setPopupProps(data);
|
|
||||||
}
|
|
||||||
function changeLoading(loading) {
|
|
||||||
setFormProps({ loading });
|
|
||||||
}
|
|
||||||
|
|
||||||
function getParamList(key) {
|
|
||||||
let templateJson: any[] = state.interfaceRes[key];
|
|
||||||
if (!templateJson || !templateJson.length || !state.dataForm) return templateJson;
|
|
||||||
for (let i = 0; i < templateJson.length; i++) {
|
|
||||||
if (templateJson[i].relationField && templateJson[i].sourceType == 1) {
|
|
||||||
templateJson[i].defaultValue = state.dataForm[templateJson[i].relationField + '_id'] || '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return templateJson;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,362 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicPopup v-bind="$attrs" @register="registerPopup" showOkBtn destroyOnClose
|
|
||||||
:cancelText="t('common.cancelText','取消')"
|
|
||||||
:okText="t('common.okText','确定')"
|
|
||||||
@ok="handleSubmit" :closeFunc="onClose">
|
|
||||||
<template #title>
|
|
||||||
<a-space :size="10">
|
|
||||||
<div class="text-16px font-medium">{{ title }}</div>
|
|
||||||
<a-space-compact size="small" block v-if="dataForm.id">
|
|
||||||
<a-tooltip :title="t('common.prevRecord')">
|
|
||||||
<a-button size="small" :disabled="getPrevDisabled" @click="handlePrev">
|
|
||||||
<i class="icon-ym icon-ym-caret-left text-10px"></i>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
<a-tooltip :title="t('common.nextRecord')">
|
|
||||||
<a-button size="small" :disabled="getNextDisabled" @click="handleNext">
|
|
||||||
<i class="icon-ym icon-ym-caret-right text-10px"></i>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
</a-space-compact>
|
|
||||||
</a-space>
|
|
||||||
</template>
|
|
||||||
<template #insertToolbar>
|
|
||||||
<yunzhupaasCheckboxSingle v-model:value="submitType" :label="continueText" v-if="showContinueBtn" />
|
|
||||||
</template>
|
|
||||||
<a-row class="p-10px dynamic-form " :style="{ margin: '0 auto', width: '100%' }">
|
|
||||||
<a-form :colon="false" size="middle" layout= "horizontal"
|
|
||||||
labelAlign= "right"
|
|
||||||
:labelCol="{ style: { width: '100px' } }" :model="dataForm" :rules="dataRule" ref="formRef" >
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<!-- 具体表单 -->
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="project_type_code" >
|
|
||||||
<template #label>项目类型编码
|
|
||||||
</template> <YunzhupaasInput v-model:value="dataForm.project_type_code" @change="changeData('project_type_code',-1)"
|
|
||||||
placeholder="请输入项目类型编码" :maxlength="50" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.project_type_code" :showCount = "false" >
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="project_type_name" >
|
|
||||||
<template #label>项目类型名称
|
|
||||||
</template> <YunzhupaasInput v-model:value="dataForm.project_type_name" @change="changeData('project_type_name',-1)"
|
|
||||||
placeholder="请输入项目类型名称" :maxlength="50" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.project_type_name" :showCount = "false" >
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="remark" >
|
|
||||||
<template #label>备注
|
|
||||||
</template> <YunzhupaasTextarea v-model:value="dataForm.remark" @change="changeData('remark',-1)"
|
|
||||||
placeholder="请输入" :maxlength="100" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":3,"maxRows":4}' :showCount = "false" >
|
|
||||||
</YunzhupaasTextarea>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<!-- 表单结束 -->
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</a-row>
|
|
||||||
</BasicPopup>
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { create, update, getInfo } from './helper/api';
|
|
||||||
import { reactive, toRefs, nextTick, ref, unref, computed,toRaw, inject } from 'vue';
|
|
||||||
import { BasicPopup, usePopup } from '@/components/Popup';
|
|
||||||
import { yunzhupaasRelationForm } from '@/components/yunzhupaas';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
|
||||||
import { useUserStore } from '@/store/modules/user';
|
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
|
||||||
import { thousandsFormat , getDateTimeUnit, getTimeUnit} from '@/utils/yunzhupaas';
|
|
||||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary';
|
|
||||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
// 表单权限
|
|
||||||
import { usePermission } from '@/hooks/web/usePermission';
|
|
||||||
import { cloneDeep } from 'lodash-es';
|
|
||||||
import { buildUUID } from '@/utils/uuid';
|
|
||||||
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
|
||||||
|
|
||||||
|
|
||||||
interface State {
|
|
||||||
dataForm: any;
|
|
||||||
tableRows: any;
|
|
||||||
dataRule: any;
|
|
||||||
optionsObj: any;
|
|
||||||
childIndex: any;
|
|
||||||
isEdit: any;
|
|
||||||
interfaceRes: any;
|
|
||||||
//可选范围默认值
|
|
||||||
ableAll: any;
|
|
||||||
//掩码配置
|
|
||||||
maskConfig:any;
|
|
||||||
//定位属性
|
|
||||||
locationScope:any;
|
|
||||||
extraOptions: any;
|
|
||||||
title: string;
|
|
||||||
continueText: string; allList: any[];
|
|
||||||
currIndex: number;
|
|
||||||
isContinue: boolean;
|
|
||||||
submitType: number;
|
|
||||||
showContinueBtn: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
const emit = defineEmits(['reload']);
|
|
||||||
const getLeftTreeActiveInfo: (() => any) | null = inject('getLeftTreeActiveInfo', null);
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const userInfo = userStore.getUserInfo;
|
|
||||||
const { createMessage, createConfirm } = useMessage();
|
|
||||||
const { t } = useI18n();
|
|
||||||
const [registerPopup, { openPopup, setPopupProps }] = usePopup();
|
|
||||||
const formRef = ref<FormInstance>();
|
|
||||||
const state = reactive<State>({
|
|
||||||
dataForm: {
|
|
||||||
project_type_code:undefined,
|
|
||||||
project_type_name:undefined,
|
|
||||||
remark:undefined,
|
|
||||||
version: 0,
|
|
||||||
},
|
|
||||||
|
|
||||||
tableRows:{
|
|
||||||
},
|
|
||||||
|
|
||||||
dataRule: {
|
|
||||||
project_type_code: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('sys.validate.textRequiredSuffix','不能为空'),
|
|
||||||
trigger: 'blur'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
project_type_name: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('sys.validate.textRequiredSuffix','不能为空'),
|
|
||||||
trigger: 'blur'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
optionsObj:{
|
|
||||||
},
|
|
||||||
|
|
||||||
childIndex: -1,
|
|
||||||
isEdit: false,
|
|
||||||
interfaceRes: {"remark":[],"project_type_name":[],"project_type_code":[]},
|
|
||||||
//可选范围默认值
|
|
||||||
ableAll:{
|
|
||||||
},
|
|
||||||
|
|
||||||
//掩码配置
|
|
||||||
maskConfig:{
|
|
||||||
project_type_code: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
|
||||||
project_type_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
|
||||||
},
|
|
||||||
|
|
||||||
//定位属性
|
|
||||||
locationScope:{
|
|
||||||
},
|
|
||||||
|
|
||||||
extraOptions:{
|
|
||||||
},
|
|
||||||
|
|
||||||
title: "",
|
|
||||||
continueText: "", allList: [],
|
|
||||||
currIndex: 0,
|
|
||||||
isContinue: false,
|
|
||||||
submitType: 0,
|
|
||||||
showContinueBtn: true ,
|
|
||||||
});
|
|
||||||
const { title, continueText, showContinueBtn, dataRule, dataForm, optionsObj, ableAll, maskConfig,submitType } = toRefs(state);
|
|
||||||
|
|
||||||
const getPrevDisabled = computed(() => state.currIndex === 0);
|
|
||||||
const getNextDisabled = computed(() => state.currIndex === state.allList.length - 1);
|
|
||||||
// 表单权限
|
|
||||||
const { hasFormP } = usePermission();
|
|
||||||
|
|
||||||
defineExpose({ init });
|
|
||||||
|
|
||||||
function init(data) {
|
|
||||||
state.submitType = 0;
|
|
||||||
state.isContinue = false;
|
|
||||||
state.title = !data.id ? t('common.add2Text','新增') : t('common.editText','编辑');
|
|
||||||
state.continueText = !data.id ? t('common.continueAndAddText','确定并新增') : t('common.continueText','确定并继续'); setFormProps({ continueLoading: false });
|
|
||||||
state.dataForm.id = data.id;
|
|
||||||
openPopup();
|
|
||||||
state.allList = data.allList;
|
|
||||||
state.currIndex = state.allList.length && data.id ? state.allList.findIndex((item) => item.id === data.id) : 0;
|
|
||||||
nextTick(() => {
|
|
||||||
getForm().resetFields();
|
|
||||||
setTimeout(initData, 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function initData() {
|
|
||||||
changeLoading(true);
|
|
||||||
if (state.dataForm.id) {
|
|
||||||
getData(state.dataForm.id);
|
|
||||||
} else {
|
|
||||||
//初始化options
|
|
||||||
|
|
||||||
// 设置默认值
|
|
||||||
state.dataForm={
|
|
||||||
project_type_code:undefined,
|
|
||||||
project_type_name:undefined,
|
|
||||||
remark:undefined,
|
|
||||||
version: 0,
|
|
||||||
};
|
|
||||||
if (getLeftTreeActiveInfo) state.dataForm = {...state.dataForm, ...(getLeftTreeActiveInfo() || {}) };
|
|
||||||
state.childIndex = -1;
|
|
||||||
changeLoading(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getForm() {
|
|
||||||
const form = unref(formRef);
|
|
||||||
if (!form) {
|
|
||||||
throw new Error('form is null!');
|
|
||||||
}
|
|
||||||
return form;
|
|
||||||
}
|
|
||||||
function getData(id) {
|
|
||||||
getInfo(id).then((res) => {
|
|
||||||
state.dataForm = res.data || {};
|
|
||||||
|
|
||||||
state.childIndex = -1;
|
|
||||||
changeLoading(false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
async function handleSubmit(type) {
|
|
||||||
try {
|
|
||||||
const values = await getForm()?.validate();
|
|
||||||
if (!values) return;
|
|
||||||
|
|
||||||
|
|
||||||
setFormProps({ confirmLoading: true });
|
|
||||||
const formMethod = state.dataForm.id ? update : create;
|
|
||||||
formMethod(state.dataForm)
|
|
||||||
.then((res) => {
|
|
||||||
createMessage.success(res.msg);
|
|
||||||
setFormProps({ confirmLoading: false });
|
|
||||||
if (state.submitType == 1) {
|
|
||||||
initData();
|
|
||||||
state.isContinue = true;
|
|
||||||
} else {
|
|
||||||
setFormProps({ open: false });
|
|
||||||
emit('reload');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
setFormProps({ confirmLoading: false });
|
|
||||||
});
|
|
||||||
} catch (_) {}
|
|
||||||
}
|
|
||||||
function handlePrev() {
|
|
||||||
state.currIndex--;
|
|
||||||
handleGetNewInfo();
|
|
||||||
}
|
|
||||||
function handleNext() {
|
|
||||||
state.currIndex++;
|
|
||||||
handleGetNewInfo();
|
|
||||||
}
|
|
||||||
function handleGetNewInfo() {
|
|
||||||
changeLoading(true);
|
|
||||||
getForm().resetFields();
|
|
||||||
const id = state.allList[state.currIndex].id;
|
|
||||||
getData(id);
|
|
||||||
}
|
|
||||||
function setFormProps(data) {
|
|
||||||
setPopupProps(data);
|
|
||||||
}
|
|
||||||
function changeLoading(loading) {
|
|
||||||
setPopupProps({ loading });
|
|
||||||
}
|
|
||||||
async function onClose() {
|
|
||||||
if (state.isContinue) emit('reload');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeData(model, index) {
|
|
||||||
state.isEdit = false
|
|
||||||
state.childIndex = index
|
|
||||||
for (let key in state.interfaceRes) {
|
|
||||||
if (key != model) {
|
|
||||||
let faceReList = state.interfaceRes[key]
|
|
||||||
for (let i = 0; i < faceReList.length; i++) {
|
|
||||||
let relationField = faceReList[i].relationField;
|
|
||||||
if(relationField){
|
|
||||||
let modelAll = relationField.split('-');
|
|
||||||
let faceMode = '';
|
|
||||||
let faceMode2 = modelAll.length == 2?modelAll[0].substring(0, modelAll[0].length-4) +modelAll[1]:""
|
|
||||||
for (let i = 0; i < modelAll.length; i++) {
|
|
||||||
faceMode += modelAll[i];
|
|
||||||
}
|
|
||||||
if (faceMode == model || faceMode2 == model ) {
|
|
||||||
let options = 'get' + key + 'Options';
|
|
||||||
eval(options)(true);
|
|
||||||
changeData(key, index)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function changeDataFormData(type, data, model,index,defaultValue) {
|
|
||||||
if(!state.isEdit) {
|
|
||||||
if (type == 2) {
|
|
||||||
for (let i = 0; i < state.dataForm[data].length; i++) {
|
|
||||||
if (index == -1) {
|
|
||||||
state.dataForm[data][i][model] = defaultValue
|
|
||||||
} else if (index == i) {
|
|
||||||
state.dataForm[data][i][model] = defaultValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
state.dataForm[data] = defaultValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getRelationDate(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
|
||||||
let timeDataValue: any = null;
|
|
||||||
let timeValue = Number(timeValueData);
|
|
||||||
if (timeRule) {
|
|
||||||
if (timeType == 1) {
|
|
||||||
timeDataValue = timeValue;
|
|
||||||
} else if (timeType == 2) {
|
|
||||||
timeDataValue = dataValue;
|
|
||||||
} else if (timeType == 3) {
|
|
||||||
timeDataValue = new Date().getTime();
|
|
||||||
} else if (timeType == 4 || timeType == 5) {
|
|
||||||
const type = getTimeUnit(timeTarget);
|
|
||||||
const method = timeType == 4 ? 'subtract' : 'add';
|
|
||||||
timeDataValue = dayjs()[method](timeValue, type).valueOf();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return timeDataValue;
|
|
||||||
}
|
|
||||||
function getRelationTime(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
|
||||||
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType;
|
|
||||||
let timeDataValue: any = null;
|
|
||||||
if (timeRule) {
|
|
||||||
if (timeType == 1) {
|
|
||||||
timeDataValue = timeValue || '00:00:00';
|
|
||||||
if (timeDataValue.split(':').length == 3) {
|
|
||||||
timeDataValue = timeDataValue;
|
|
||||||
} else {
|
|
||||||
timeDataValue = timeDataValue + ':00';
|
|
||||||
}
|
|
||||||
} else if (timeType == 2) {
|
|
||||||
timeDataValue = dataValue;
|
|
||||||
} else if (timeType == 3) {
|
|
||||||
timeDataValue = dayjs().format(format);
|
|
||||||
} else if (timeType == 4 || timeType == 5) {
|
|
||||||
const type = getTimeUnit(timeTarget + 3);
|
|
||||||
const method = timeType == 4 ? 'subtract' : 'add';
|
|
||||||
timeDataValue = dayjs()[method](timeValue, type).format(format);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return timeDataValue;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { defHttp } from '@/utils/http/axios';
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
export function getList(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/BcmProjectType/getList', data });
|
|
||||||
}
|
|
||||||
// 新建
|
|
||||||
export function create(data) {
|
|
||||||
return defHttp.post({ url:'/api/bcm/BcmProjectType', data });
|
|
||||||
}
|
|
||||||
// 修改
|
|
||||||
export function update(data) {
|
|
||||||
return defHttp.put({ url: '/api/bcm/BcmProjectType/'+ data.id, data });
|
|
||||||
}
|
|
||||||
// 详情(无转换数据)
|
|
||||||
export function getInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/BcmProjectType/' + id });
|
|
||||||
}
|
|
||||||
// 获取(转换数据)
|
|
||||||
export function getDetailInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/BcmProjectType/detail/' + id });
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
export function del(id) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/BcmProjectType/' + id });
|
|
||||||
}
|
|
||||||
// 批量删除数据
|
|
||||||
export function batchDelete(data) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/BcmProjectType/batchRemove', data });
|
|
||||||
}
|
|
||||||
// 导出
|
|
||||||
export function exportData(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/BcmProjectType/Actions/Export', data });
|
|
||||||
}
|
|
||||||
@@ -1,214 +0,0 @@
|
|||||||
const columnList = [
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem69cbe2",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"项目类型编码",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"bcm_project_type",
|
|
||||||
"renderKey":1774504684544,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"project_type_code",
|
|
||||||
"__vModel__":"project_type_code",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_type_code",
|
|
||||||
"placeholder":"请输入项目类型编码",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":50,
|
|
||||||
"fullName":"项目类型编码",
|
|
||||||
"label":"项目类型编码",
|
|
||||||
"sortable":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"width":null,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItembf3850",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"项目类型名称",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"bcm_project_type",
|
|
||||||
"renderKey":1774504743202,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"project_type_name",
|
|
||||||
"__vModel__":"project_type_name",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_type_name",
|
|
||||||
"placeholder":"请输入项目类型名称",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":50,
|
|
||||||
"fullName":"项目类型名称",
|
|
||||||
"label":"项目类型名称",
|
|
||||||
"sortable":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"width":null,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"textarea",
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":100,
|
|
||||||
"fullName":"备注",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"备注",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"autoSize":{
|
|
||||||
"minRows":3,
|
|
||||||
"maxRows":4
|
|
||||||
},
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formIteme2bc88",
|
|
||||||
"yunzhupaasKey":"textarea",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"备注",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"bcm_project_type",
|
|
||||||
"renderKey":1774504772430,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-textarea",
|
|
||||||
"tag":"YunzhupaasTextarea",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"remark",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"remark",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"remark",
|
|
||||||
"placeholder":"请输入",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default columnList
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
const searchList = []
|
|
||||||
export default searchList
|
|
||||||
@@ -1,640 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="yunzhupaas-content-wrapper">
|
|
||||||
<div class="yunzhupaas-content-wrapper-center">
|
|
||||||
<div class="yunzhupaas-content-wrapper-search-box" v-if="getSearchList.length">
|
|
||||||
<BasicForm @register="registerSearchForm" :schemas="getSearchList"
|
|
||||||
@advanced-change="redoHeight" @submit="handleSearchSubmit" @reset="handleSearchReset"
|
|
||||||
class="search-form">
|
|
||||||
</BasicForm>
|
|
||||||
</div>
|
|
||||||
<div class="yunzhupaas-content-wrapper-content bg-white">
|
|
||||||
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
|
||||||
@columns-change="handleColumnChange">
|
|
||||||
<template #tableTitle>
|
|
||||||
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add"
|
|
||||||
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
|
||||||
</template>
|
|
||||||
<template #toolbar>
|
|
||||||
<a-tooltip placement="top">
|
|
||||||
<template #title>
|
|
||||||
<span>{{ t('common.superQuery') }}</span>
|
|
||||||
</template>
|
|
||||||
<filter-outlined @click="openSuperQuery(true, { columnOptions: superQueryJson })" />
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
<template #toolbarAfter>
|
|
||||||
<ViewList :menuId="route.meta.modelId" :viewList="viewList" @itemClick="handleViewClick" @reload="initViewList" />
|
|
||||||
<ViewSetting :menuId="route.meta.modelId" :viewList="viewList" :currentView="currentView" @reload="initViewList" />
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record, index }">
|
|
||||||
<template v-for="(item, index) in childColumnList" v-if="childColumnList.length">
|
|
||||||
<template
|
|
||||||
v-if="column?.id?.includes('-') && item.children && item.children[0] && column.key === item.children[0]?.dataIndex">
|
|
||||||
<ChildTableColumn :data="record[item.prop]" :head="item.children"
|
|
||||||
@toggleExpand="toggleExpand(record, item.prop+`Expand`)" @toDetail="toDetail"
|
|
||||||
:expand="record[item.prop+`Expand`]" :key="index" :showOverflow="true "/>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template v-if="!(record.top || column.id?.includes('-'))">
|
|
||||||
<template v-if="column.yunzhupaasKey === 'relationForm'">
|
|
||||||
<p class="link-text"
|
|
||||||
@click="toDetail(column.modelId, record[column.dataIndex+`_id`], column.propsValue)">
|
|
||||||
{{ record[column.dataIndex] }}</p>
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'inputNumber'">
|
|
||||||
<yunzhupaas-input-number v-model:value="record[column.prop]" :precision="column.precision" :thousands="column.thousands" disabled detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'calculate'">
|
|
||||||
<yunzhupaas-calculate
|
|
||||||
v-model:value="record[column.prop]"
|
|
||||||
:isStorage="column.isStorage"
|
|
||||||
:precision="column.precision"
|
|
||||||
:thousands="column.thousands"
|
|
||||||
detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'sign'">
|
|
||||||
<yunzhupaas-sign v-model:value="record[column.prop]" detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'signature'">
|
|
||||||
<yunzhupaas-signature v-model:value="record[column.prop]" detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'rate'">
|
|
||||||
<yunzhupaas-rate v-model:value="record[column.prop]" :count="column.count" :allowHalf="column.allowHalf" disabled />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'slider'">
|
|
||||||
<yunzhupaas-slider v-model:value="record[column.prop]" :min="column.min" :max="column.max" :step="column.step" disabled />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'uploadImg'">
|
|
||||||
<yunzhupaas-upload-img v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'uploadFile'">
|
|
||||||
<yunzhupaas-upload-file v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'input'">
|
|
||||||
<yunzhupaas-input
|
|
||||||
v-model:value="record[column.prop]"
|
|
||||||
:useMask="column.useMask"
|
|
||||||
:maskConfig="column.maskConfig"
|
|
||||||
:showOverflow="true"
|
|
||||||
detailed />
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template v-if="column.key === 'action' && !record.top">
|
|
||||||
<TableAction :actions="getTableActions(record)" />
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Form ref="formRef" @reload="reload" />
|
|
||||||
<Detail ref="detailRef" />
|
|
||||||
<ExportModal @register="registerExportModal" @download="handleDownload" />
|
|
||||||
<ImportModal @register="registerImportModal" @reload="reload" />
|
|
||||||
<PrintSelect @register="registerPrintSelect" @change="handleShowBrowse" />
|
|
||||||
<PrintBrowse @register="registerPrintBrowse" />
|
|
||||||
<RelationDetail ref="relationDetailRef" />
|
|
||||||
<SuperQueryModal @register="registerSuperQueryModal" @superQuery="handleSuperQuery" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
|
|
||||||
import { getList, del, exportData, batchDelete } from './helper/api';
|
|
||||||
import { getConfigData,getViewList } from '@/api/onlineDev/visualDev';
|
|
||||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary';
|
|
||||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
|
||||||
import { getOrgByOrganizeCondition,getDepartmentSelectAsyncList } from '@/api/permission/organize';
|
|
||||||
import { ref, reactive, onMounted, toRefs, computed, unref, nextTick, toRaw, provide } from 'vue';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
|
||||||
import { useOrganizeStore } from '@/store/modules/organize';
|
|
||||||
import { useUserStore } from '@/store/modules/user';
|
|
||||||
import { BasicModal, useModal } from '@/components/Modal';
|
|
||||||
import { usePopup } from '@/components/Popup';
|
|
||||||
import { ScrollContainer } from '@/components/Container';
|
|
||||||
import { BasicLeftTree, TreeActionType } from '@/components/Tree';
|
|
||||||
import { BasicForm, useForm } from '@/components/Form';
|
|
||||||
import { BasicTable, useTable, TableAction, ActionItem, TableActionType, SorterResult } from '@/components/Table';
|
|
||||||
import { SuperQueryModal } from '@/components/CommonModal';
|
|
||||||
import Form from './Form.vue';
|
|
||||||
import Detail from './Detail.vue';
|
|
||||||
// 有关联表单详情:开始
|
|
||||||
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
|
||||||
// 有关联表单详情:结束
|
|
||||||
import ChildTableColumn from '@/views/common/dynamicModel/list/ChildTableColumn.vue';
|
|
||||||
import { ExportModal } from '@/components/CommonModal';
|
|
||||||
import { downloadByUrl } from '@/utils/file/download';
|
|
||||||
import { ImportModal} from '@/components/CommonModal';
|
|
||||||
// 打印模板多条生成PrintSelect
|
|
||||||
import PrintSelect from '@/components/PrintDesign/printSelect/index.vue';
|
|
||||||
import PrintBrowse from '@/components/PrintDesign/printBrowse/index.vue';
|
|
||||||
import { useRoute,useRouter } from 'vue-router';
|
|
||||||
import { FilterOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { getSearchFormSchemas } from '@/components/FormGenerator/src/helper/transform';
|
|
||||||
import { cloneDeep } from 'lodash-es';
|
|
||||||
import columnList from './helper/columnList';
|
|
||||||
import searchList from './helper/searchList';
|
|
||||||
import superQueryJson from './helper/superQueryJson';
|
|
||||||
import { dyOptionsList, systemComponentsList } from '@/components/FormGenerator/src/helper/config';
|
|
||||||
import { thousandsFormat, getParamList} from '@/utils/yunzhupaas';
|
|
||||||
import { usePermission } from '@/hooks/web/usePermission';
|
|
||||||
|
|
||||||
import ViewSetting from '@/views/common/dynamicModel/list/components/ViewSetting.vue';
|
|
||||||
import ViewList from '@/views/common/dynamicModel/list/components/ViewList.vue';
|
|
||||||
|
|
||||||
interface State {
|
|
||||||
config: any;
|
|
||||||
columnList: any[];
|
|
||||||
printListOptions: any[];
|
|
||||||
columnBtnsList: any[];
|
|
||||||
customBtnsList: any[];
|
|
||||||
treeFieldNames: any;
|
|
||||||
leftTreeData: any[];
|
|
||||||
leftTreeLoading: boolean;
|
|
||||||
treeActiveId: string;
|
|
||||||
treeActiveNodePath: any;
|
|
||||||
columns: any[];
|
|
||||||
complexColumns: any[];
|
|
||||||
childColumnList: any[];
|
|
||||||
exportList: any[];
|
|
||||||
cacheList: any[];
|
|
||||||
currFlow: any;
|
|
||||||
isCustomCopy: boolean;
|
|
||||||
candidateType: number;
|
|
||||||
currRow: any;
|
|
||||||
workFlowFormData: any;
|
|
||||||
expandObj: any;
|
|
||||||
columnSettingList: any[];
|
|
||||||
searchSchemas: any[];
|
|
||||||
treeRelationObj: any;
|
|
||||||
treeQueryJson: any;
|
|
||||||
leftTreeActiveInfo: any;
|
|
||||||
keyword: string;
|
|
||||||
viewList: any[];
|
|
||||||
currentView: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
const { hasBtnP } = usePermission();
|
|
||||||
const { createMessage, createConfirm } = useMessage();
|
|
||||||
const { t } = useI18n();
|
|
||||||
const organizeStore = useOrganizeStore();
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const userInfo = userStore.getUserInfo;
|
|
||||||
|
|
||||||
const [registerExportModal, { openModal: openExportModal, closeModal: closeExportModal, setModalProps: setExportModalProps }] = useModal();
|
|
||||||
const [registerImportModal, { openModal: openImportModal }] = useModal();
|
|
||||||
const [registerSuperQueryModal, { openModal: openSuperQuery }] = useModal();
|
|
||||||
const formRef = ref<any>(null);
|
|
||||||
const tableRef = ref<Nullable<TableActionType>>(null);
|
|
||||||
const detailRef = ref<any>(null);
|
|
||||||
const relationDetailRef = ref<any>(null);
|
|
||||||
|
|
||||||
const state = reactive<State>({
|
|
||||||
config: {},
|
|
||||||
columnList: [],
|
|
||||||
printListOptions: [],
|
|
||||||
columnBtnsList: [],
|
|
||||||
customBtnsList: [],
|
|
||||||
treeFieldNames: {
|
|
||||||
children: 'children' ,
|
|
||||||
title: 'fullName' ,
|
|
||||||
key: 'id' ,
|
|
||||||
isLeaf: 'isLeaf',
|
|
||||||
},
|
|
||||||
leftTreeData: [],
|
|
||||||
leftTreeLoading: false,
|
|
||||||
treeActiveId: '',
|
|
||||||
treeActiveNodePath: [],
|
|
||||||
columns: [],
|
|
||||||
complexColumns: [], // 复杂表头
|
|
||||||
childColumnList: [],
|
|
||||||
exportList: [],
|
|
||||||
cacheList: [],
|
|
||||||
currFlow: {},
|
|
||||||
isCustomCopy: false,
|
|
||||||
candidateType: 1,
|
|
||||||
currRow: {},
|
|
||||||
workFlowFormData: {},
|
|
||||||
expandObj: {},
|
|
||||||
columnSettingList: [],
|
|
||||||
searchSchemas: [],
|
|
||||||
treeRelationObj: null,
|
|
||||||
treeQueryJson: {},
|
|
||||||
leftTreeActiveInfo: {},
|
|
||||||
keyword: '',
|
|
||||||
viewList: [],
|
|
||||||
currentView: {},
|
|
||||||
});
|
|
||||||
const defaultSearchInfo = {
|
|
||||||
menuId: route.meta.modelId as string,
|
|
||||||
moduleId:'806852213774222853',
|
|
||||||
superQueryJson: '',
|
|
||||||
dataType:0,
|
|
||||||
};
|
|
||||||
const searchInfo = reactive({
|
|
||||||
...cloneDeep(defaultSearchInfo),
|
|
||||||
});
|
|
||||||
const { childColumnList, searchSchemas, viewList, currentView} = toRefs(state);
|
|
||||||
const [registerSearchForm, { updateSchema, resetFields, submit: searchFormSubmit, setFieldsValue}] = useForm({
|
|
||||||
baseColProps: { span: 6 },
|
|
||||||
showActionButtonGroup: true,
|
|
||||||
showAdvancedButton: true,
|
|
||||||
compact: true,
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, setLoading, getFetchParams, getSelectRows, getSelectRowKeys, redoHeight,clearSelectedRowKeys }] = useTable({
|
|
||||||
api: getList,
|
|
||||||
immediate: false,
|
|
||||||
clickToRowSelect: false,
|
|
||||||
tableSetting: { setting: false },
|
|
||||||
afterFetch: (data) => {
|
|
||||||
const list = data.map((o) => ({
|
|
||||||
...o,
|
|
||||||
...state.expandObj,
|
|
||||||
}));
|
|
||||||
state.cacheList = cloneDeep(list);
|
|
||||||
return list;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerChildTable] = useTable({
|
|
||||||
pagination: false,
|
|
||||||
canResize: false,
|
|
||||||
showTableSetting: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
provide('getLeftTreeActiveInfo', () => state.leftTreeActiveInfo);
|
|
||||||
|
|
||||||
const getHasBatchBtn = computed(() => {
|
|
||||||
let btnsList =[]
|
|
||||||
return !!btnsList.length
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
const getColumns = computed(() => {
|
|
||||||
const columns = state.complexColumns;
|
|
||||||
return setListValue(state.currentView?.columnList, columns, 'prop');
|
|
||||||
});
|
|
||||||
const getSearchList = computed(() => {
|
|
||||||
const searchSchemas = cloneDeep(state.searchSchemas).map(o => ({ ...o, show: true }));
|
|
||||||
return setListValue(state.currentView?.searchList, searchSchemas, 'field');
|
|
||||||
});
|
|
||||||
const getTableBindValue = computed(() => {
|
|
||||||
let columns = unref(getColumns);
|
|
||||||
const defaultSortConfig= [];
|
|
||||||
const sortField = defaultSortConfig.map(o => (o.sort === 'desc' ? '-' : '') + o.field);
|
|
||||||
const data: any = {
|
|
||||||
pagination: { pageSize: 20 }, //有分页
|
|
||||||
searchInfo: unref(searchInfo),
|
|
||||||
defSort: { sidx: sortField.join(',') },
|
|
||||||
sortFn: (sortInfo: SorterResult | SorterResult[]) => {
|
|
||||||
if (Array.isArray(sortInfo)) {
|
|
||||||
const sortList = sortInfo.map(o => (o.order === 'descend' ? '-' : '') + o.field);
|
|
||||||
return { sidx: sortList.join(',') };
|
|
||||||
} else {
|
|
||||||
const { field, order } = sortInfo;
|
|
||||||
if (field && order) {
|
|
||||||
// 排序字段
|
|
||||||
return { sidx: (order === 'descend' ? '-' : '') + field };
|
|
||||||
} else {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
ellipsis:true ,
|
|
||||||
columns,
|
|
||||||
bordered: true,
|
|
||||||
actionColumn: {
|
|
||||||
width: 150,
|
|
||||||
title: t('component.table.action'),
|
|
||||||
dataIndex: 'action',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
if (unref(getHasBatchBtn)) {
|
|
||||||
const rowSelection: any = { type: 'checkbox' };
|
|
||||||
data.rowSelection = rowSelection;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
});
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
state.config = {};
|
|
||||||
searchInfo.menuId = route.meta.modelId as string;
|
|
||||||
state.columnList = columnList;
|
|
||||||
setLoading(true);
|
|
||||||
getSearchSchemas();
|
|
||||||
getColumnList();
|
|
||||||
initViewList();
|
|
||||||
nextTick(() => {
|
|
||||||
unref(getSearchList)?.length ? searchFormSubmit() : reload({ page: 1 });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function getSearchSchemas() {
|
|
||||||
|
|
||||||
const schemas = getSearchFormSchemas(searchList);
|
|
||||||
state.searchSchemas = schemas;
|
|
||||||
schemas.forEach((cur) => {
|
|
||||||
const config = cur.__config__;
|
|
||||||
if (dyOptionsList.includes(config.yunzhupaasKey)) {
|
|
||||||
if (config.dataType === 'dictionary') {
|
|
||||||
if (!config.dictionaryType) return;
|
|
||||||
getDictionaryDataSelector(config.dictionaryType).then((res) => {
|
|
||||||
updateSchema([{ field: cur.field, componentProps: { options: res.data.list } }]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (config.dataType === 'dynamic') {
|
|
||||||
if (!config.propsUrl) return;
|
|
||||||
const query = { paramList: getParamList(config.templateJson) };
|
|
||||||
getDataInterfaceRes(config.propsUrl, query).then((res) => {
|
|
||||||
const data = Array.isArray(res.data) ? res.data : [];
|
|
||||||
updateSchema([{ field: cur.field, componentProps: { options: data } }]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cur.defaultValue = cur.value;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function getColumnList() {
|
|
||||||
// 没有开启列表权限
|
|
||||||
let columnList = state.columnList;
|
|
||||||
state.exportList = columnList;
|
|
||||||
let columns = columnList.map((o) => ({
|
|
||||||
...o,
|
|
||||||
title: o.labelI18nCode ? t(o.labelI18nCode, o.label) : o.label,
|
|
||||||
dataIndex: o.prop,
|
|
||||||
align: o.align,
|
|
||||||
fixed: o.fixed == 'none' ? false : o.fixed,
|
|
||||||
sorter: o.sortable ? { multiple: 1 } : o.sortable,
|
|
||||||
width: o.width || 100,
|
|
||||||
}));
|
|
||||||
//添加复杂表头
|
|
||||||
columns = getComplexColumns(columns);
|
|
||||||
state.columns = columns.filter((o) => o.prop.indexOf('-') < 0);
|
|
||||||
//子表表头
|
|
||||||
getChildComplexColumns(columns);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//复杂表头
|
|
||||||
function getComplexColumns(columns) {
|
|
||||||
//这里生成复杂表头的配置
|
|
||||||
let complexHeaderList: any[] = [];
|
|
||||||
if (!complexHeaderList.length) return columns;
|
|
||||||
let childColumns: any[] = [];
|
|
||||||
let firstChildColumns: string[] = [];
|
|
||||||
for (let i = 0; i < complexHeaderList.length; i++) {
|
|
||||||
const e = complexHeaderList[i];
|
|
||||||
e.label = e.fullName;
|
|
||||||
e.labelI18nCode = e.fullNameI18nCode;
|
|
||||||
e.title = e.fullNameI18nCode ? t(e.fullNameI18nCode, e.fullName) : e.fullName;
|
|
||||||
e.align = e.align;
|
|
||||||
e.dataIndex = e.id;
|
|
||||||
e.prop = e.id;
|
|
||||||
e.children = [];
|
|
||||||
e.yunzhupaasKey = 'complexHeader';
|
|
||||||
if (e.childColumns?.length) {
|
|
||||||
childColumns.push(...e.childColumns);
|
|
||||||
for (let k = 0; k < e.childColumns.length; k++) {
|
|
||||||
const item = e.childColumns[k];
|
|
||||||
for (let j = 0; j < columns.length; j++) {
|
|
||||||
const o = columns[j];
|
|
||||||
if (o.prop == item && o.fixed !== 'left' && o.fixed !== 'right') e.children.push({ ...o });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (e.children.length) firstChildColumns.push(e.children[0].prop);
|
|
||||||
}
|
|
||||||
complexHeaderList = complexHeaderList.filter(o => o.children.length);
|
|
||||||
let list: any[] = [];
|
|
||||||
for (let i = 0; i < columns.length; i++) {
|
|
||||||
const e = columns[i];
|
|
||||||
if (!childColumns.includes(e.prop)) {
|
|
||||||
list.push(e);
|
|
||||||
} else {
|
|
||||||
if (firstChildColumns.includes(e.prop)) {
|
|
||||||
const item = complexHeaderList.find(o => o.childColumns.includes(e.prop));
|
|
||||||
list.push(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
//子表表头
|
|
||||||
function getChildComplexColumns(columnList) {
|
|
||||||
let list: any[] = [];
|
|
||||||
for (let i = 0; i < columnList.length; i++) {
|
|
||||||
const e = columnList[i];
|
|
||||||
if (!e.prop.includes('-')) {
|
|
||||||
list.push(e);
|
|
||||||
} else {
|
|
||||||
let prop = e.prop.split('-')[0];
|
|
||||||
let vModel = e.prop.split('-')[1];
|
|
||||||
let label = e.label.split('-')[0];
|
|
||||||
let childLabel = e.label.replace(label + '-', '');
|
|
||||||
if (e.fullNameI18nCode && Array.isArray(e.fullNameI18nCode) && e.fullNameI18nCode[0]) label = t(e.fullNameI18nCode[0], label);
|
|
||||||
let newItem = {
|
|
||||||
align: 'center',
|
|
||||||
yunzhupaasKey: 'table',
|
|
||||||
prop,
|
|
||||||
label,
|
|
||||||
title: label,
|
|
||||||
dataIndex: prop,
|
|
||||||
children: [],
|
|
||||||
};
|
|
||||||
e.dataIndex = vModel;
|
|
||||||
e.title = e.labelI18nCode ? t(e.labelI18nCode, childLabel) : childLabel;
|
|
||||||
if (!state.expandObj.hasOwnProperty(prop+`Expand`)) state.expandObj[prop+`Expand`] = false;
|
|
||||||
if (!list.some((o) => o.prop === prop)) list.push(newItem);
|
|
||||||
for (let i = 0; i < list.length; i++) {
|
|
||||||
if (list[i].prop === prop) {
|
|
||||||
list[i].children.push(e);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 行内分组展示
|
|
||||||
getMergeList(list);
|
|
||||||
|
|
||||||
state.complexColumns = list;
|
|
||||||
state.childColumnList = list.filter((o) => o.yunzhupaasKey === 'table');
|
|
||||||
|
|
||||||
// 子表分组展示宽度取100
|
|
||||||
for (let i = 0; i < state.childColumnList.length; i++) {
|
|
||||||
const e = state.childColumnList[i];
|
|
||||||
if (e.children?.length) e.children = e.children.map(o => ({ ...o, width: 100 }));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getMergeList(list) {
|
|
||||||
list.forEach((item) => {
|
|
||||||
if (item.yunzhupaasKey === 'table' && item.children && item.children.length) {
|
|
||||||
item.children.forEach((child, index) => {
|
|
||||||
if (index == 0) {
|
|
||||||
child.customCell = () => ({
|
|
||||||
rowspan: 1,
|
|
||||||
colspan: item.children.length,
|
|
||||||
class: 'child-table-box',
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
child.customCell = () => ({
|
|
||||||
rowspan: 0,
|
|
||||||
colspan: 0,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function toggleExpand(row, field) {
|
|
||||||
row[field] = !row[field];
|
|
||||||
}
|
|
||||||
// 关联表单查看详情
|
|
||||||
function toDetail(modelId, id, propsValue) {
|
|
||||||
if (!id) return;
|
|
||||||
getConfigData(modelId).then((res) => {
|
|
||||||
if (!res.data || !res.data.formData) return;
|
|
||||||
const formConf = JSON.parse(res.data.formData);
|
|
||||||
formConf.popupType = 'general';
|
|
||||||
formConf.hasPrintBtn = false;
|
|
||||||
formConf.customBtns = [];
|
|
||||||
const data = { id, formConf, modelId, propsValue};
|
|
||||||
relationDetailRef.value?.init(data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function handleColumnChange(data) {
|
|
||||||
state.columnSettingList = data;
|
|
||||||
}
|
|
||||||
function getTableActions(record): ActionItem[] {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: t('common.editText','编辑') ,
|
|
||||||
onClick: updateHandle.bind(null, record),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('common.delText','删除') ,
|
|
||||||
color: 'error',
|
|
||||||
modelConfirm: {
|
|
||||||
onOk: handleDelete.bind(null, record.id),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
// 编辑
|
|
||||||
function updateHandle(record) {
|
|
||||||
// 不带工作流
|
|
||||||
const data = {
|
|
||||||
id: record.id,
|
|
||||||
menuId: searchInfo.menuId,
|
|
||||||
allList: state.cacheList,
|
|
||||||
};
|
|
||||||
formRef.value?.init(data);
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
function handleDelete(id) {
|
|
||||||
const query={ids:[id] }
|
|
||||||
batchDelete(query).then((res) => {
|
|
||||||
createMessage.success(res.msg);
|
|
||||||
clearSelectedRowKeys();
|
|
||||||
reload();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 新增
|
|
||||||
function addHandle() {
|
|
||||||
// 不带流程新增
|
|
||||||
const data = {
|
|
||||||
id: '',
|
|
||||||
menuId: searchInfo.menuId,
|
|
||||||
allList: state.cacheList,
|
|
||||||
};
|
|
||||||
formRef.value?.init(data);
|
|
||||||
}
|
|
||||||
// 高级查询
|
|
||||||
function handleSuperQuery(superQueryJson) {
|
|
||||||
searchInfo.superQueryJson = superQueryJson;
|
|
||||||
reload({ page: 1 });
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSearchReset() {
|
|
||||||
clearSelectedRowKeys();
|
|
||||||
if (!state.resetFromTree) updateSearchFormValue();
|
|
||||||
if (state.resetFromTree) state.resetFromTree = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSearchSubmit(data) {
|
|
||||||
clearSelectedRowKeys();
|
|
||||||
let obj = {
|
|
||||||
...defaultSearchInfo,
|
|
||||||
superQueryJson: searchInfo.superQueryJson,
|
|
||||||
...data,
|
|
||||||
};
|
|
||||||
Object.keys(searchInfo).map(key => {
|
|
||||||
delete searchInfo[key];
|
|
||||||
});
|
|
||||||
for (let [key, value] of Object.entries(obj)) {
|
|
||||||
searchInfo[key.replaceAll('-', '_')] = value;
|
|
||||||
}
|
|
||||||
console.log(searchInfo);
|
|
||||||
reload({ page: 1 });
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateSearchFormValue() {
|
|
||||||
if (!state.treeActiveId) return searchFormSubmit();
|
|
||||||
let queryJson: any = {};
|
|
||||||
let leftTreeActiveInfo: any = {};
|
|
||||||
const isMultiple = !state.treeRelationObj ? false : state.treeRelationObj.searchMultiple;
|
|
||||||
//多级左侧树,需要拼父级->转为查询参数
|
|
||||||
if (state.treeRelationObj && state.treeRelationObj.yunzhupaasKey && ['organizeSelect', 'cascader', 'areaSelect'].includes(state.treeRelationObj.yunzhupaasKey)) {
|
|
||||||
let currValue = [];
|
|
||||||
currValue = state.treeActiveNodePath.map(o => o[state.treeFieldNames.key]);
|
|
||||||
queryJson = { '': isMultiple ? [currValue] : currValue };
|
|
||||||
leftTreeActiveInfo = { '': state.treeRelationObj.multiple ? [currValue] : currValue };
|
|
||||||
} else {
|
|
||||||
queryJson = { '': isMultiple ? [state.treeActiveId] : state.treeActiveId };
|
|
||||||
leftTreeActiveInfo = { '': state.treeRelationObj.multiple ? [state.treeActiveId] : state.treeActiveId };
|
|
||||||
}
|
|
||||||
state.leftTreeActiveInfo = leftTreeActiveInfo;
|
|
||||||
if(unref(getSearchList)?.length){
|
|
||||||
// 有搜索列表
|
|
||||||
setFieldsValue(queryJson);
|
|
||||||
searchFormSubmit();
|
|
||||||
}else{
|
|
||||||
// 无搜索列表
|
|
||||||
handleSearchSubmit(queryJson);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function initViewList(currentId = '') {
|
|
||||||
const query = {
|
|
||||||
menuId: route.meta.modelId,
|
|
||||||
};
|
|
||||||
getViewList(query).then(res => {
|
|
||||||
const columns : any[]= state.complexColumns;
|
|
||||||
const searchList: any[] = state.searchSchemas.map(o => ({ label: o.label, id: o.field, show: o.show, labelI18nCode: o.labelI18nCode }));
|
|
||||||
const columnList: any[] = columns.map(o => ({ label: o.label, id: o.prop, show: true, fixed: o.fixed || 'none', labelI18nCode: o.labelI18nCode }));
|
|
||||||
state.viewList = (res.data || []).map(o => {
|
|
||||||
if (o.type == 0) return { ...o, searchList, columnList };
|
|
||||||
return { ...o, searchList: o.searchList ? JSON.parse(o.searchList) : [], columnList: o.columnList ? JSON.parse(o.columnList) : [] };
|
|
||||||
});
|
|
||||||
if (currentId) {
|
|
||||||
state.currentView = state.viewList.filter(o => o.id === currentId)[0] || state.viewList[0];
|
|
||||||
} else {
|
|
||||||
state.currentView = state.viewList.filter(o => o.status === 1)[0] || state.viewList[0];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function handleViewClick(item) {
|
|
||||||
state.currentView = item;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setListValue(data: any[] = [], defaultData: any[] = [], key) {
|
|
||||||
let list: any[] = [];
|
|
||||||
for (let i = 0; i < data.length; i++) {
|
|
||||||
for (let j = 0; j < defaultData.length; j++) {
|
|
||||||
if (data[i].show && data[i].id == defaultData[j][key]) list.push(defaultData[j]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
init();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
34
src/views/mdm/company/helper/api.ts
Normal file
34
src/views/mdm/company/helper/api.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import { defHttp } from '@/utils/http/axios';
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
export function getList(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Company/getList', data });
|
||||||
|
}
|
||||||
|
// 新建
|
||||||
|
export function create(data) {
|
||||||
|
return defHttp.post({ url:'/api/bcm/Company', data });
|
||||||
|
}
|
||||||
|
// 修改
|
||||||
|
export function update(data) {
|
||||||
|
return defHttp.put({ url: '/api/bcm/Company/'+ data.id, data });
|
||||||
|
}
|
||||||
|
// 详情(无转换数据)
|
||||||
|
export function getInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Company/' + id });
|
||||||
|
}
|
||||||
|
// 获取(转换数据)
|
||||||
|
export function getDetailInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Company/detail/' + id });
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export function del(id) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Company/' + id });
|
||||||
|
}
|
||||||
|
// 批量删除数据
|
||||||
|
export function batchDelete(data) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Company/batchRemove', data });
|
||||||
|
}
|
||||||
|
// 导出
|
||||||
|
export function exportData(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Company/Actions/Export', data });
|
||||||
|
}
|
||||||
@@ -1,77 +1,53 @@
|
|||||||
const columnList = [
|
const columnList = [
|
||||||
{
|
{
|
||||||
"yunzhupaasKey":"input",
|
"yunzhupaasKey":"billRule",
|
||||||
"useScan":false,
|
"resizable":true,
|
||||||
"suffixIcon":"",
|
"fullName":"企业编码",
|
||||||
"fullNameI18nCode":[
|
"fullNameI18nCode":[
|
||||||
""
|
""
|
||||||
],
|
],
|
||||||
|
"label":"企业编码",
|
||||||
|
"sortable":true,
|
||||||
"align":"left",
|
"align":"left",
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
"__config__":{
|
||||||
"formId":"formItemd18905",
|
"formId":"formItem7a91b8",
|
||||||
"yunzhupaasKey":"input",
|
"yunzhupaasKey":"billRule",
|
||||||
"visibility":[
|
"visibility":[
|
||||||
"pc",
|
"pc",
|
||||||
"app"
|
"app"
|
||||||
],
|
],
|
||||||
|
"defaultValue":null,
|
||||||
"noShow":false,
|
"noShow":false,
|
||||||
"tipLabel":"",
|
"tipLabel":"",
|
||||||
"tableFixed":"none",
|
"tableFixed":"none",
|
||||||
"dragDisabled":false,
|
"dragDisabled":false,
|
||||||
|
"rule":"companyCode",
|
||||||
"className":[],
|
"className":[],
|
||||||
"label":"企业编码",
|
"label":"企业编码",
|
||||||
"trigger":"blur",
|
"trigger":"change",
|
||||||
|
"ruleConfig":{},
|
||||||
"showLabel":true,
|
"showLabel":true,
|
||||||
"required":false,
|
"required":false,
|
||||||
"tableName":"mdm_company",
|
"tableName":"mdm_company",
|
||||||
"renderKey":1774506476411,
|
"renderKey":1776916036468,
|
||||||
"layout":"colFormItem",
|
"layout":"colFormItem",
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
"tagIcon":"icon-ym icon-ym-generator-documents",
|
||||||
|
"ruleType":1,
|
||||||
|
"ruleName":"企业编码",
|
||||||
"tag":"YunzhupaasInput",
|
"tag":"YunzhupaasInput",
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
"tableAlign":"left",
|
||||||
"span":8
|
"span":8
|
||||||
},
|
},
|
||||||
"readonly":false,
|
"readonly":true,
|
||||||
"prop":"company_code",
|
"prop":"company_code",
|
||||||
"__vModel__":"company_code",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"company_code",
|
|
||||||
"placeholder":"请输入企业编码",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":50,
|
|
||||||
"fullName":"企业编码",
|
|
||||||
"label":"企业编码",
|
|
||||||
"sortable":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"width":null,
|
"width":null,
|
||||||
"useMask":false,
|
"__vModel__":"company_code",
|
||||||
"showPassword":false,
|
|
||||||
"fixed":"none",
|
"fixed":"none",
|
||||||
"style":{
|
"style":{
|
||||||
"width":"100%"
|
"width":"100%"
|
||||||
},
|
},
|
||||||
"prefixIcon":"",
|
"id":"company_code",
|
||||||
|
"placeholder":"系统自动生成",
|
||||||
"labelI18nCode":""
|
"labelI18nCode":""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -225,6 +201,63 @@ const columnList = [
|
|||||||
"prefixIcon":"",
|
"prefixIcon":"",
|
||||||
"labelI18nCode":""
|
"labelI18nCode":""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"yunzhupaasKey":"organizeSelect",
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
|
"resizable":true,
|
||||||
|
"ableIds":[],
|
||||||
|
"multiple":false,
|
||||||
|
"fullName":"归属组织",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label":"归属组织",
|
||||||
|
"sortable":true,
|
||||||
|
"align":"left",
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItemfc6848",
|
||||||
|
"yunzhupaasKey":"organizeSelect",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"defaultValue":[],
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"归属组织",
|
||||||
|
"trigger":"change",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_company",
|
||||||
|
"renderKey":1776912270086,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-company",
|
||||||
|
"defaultCurrent":true,
|
||||||
|
"tag":"YunzhupaasOrganizeSelect",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":8
|
||||||
|
},
|
||||||
|
"prop":"org_id",
|
||||||
|
"width":null,
|
||||||
|
"__vModel__":"org_id",
|
||||||
|
"fixed":"none",
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"selectType":"all",
|
||||||
|
"disabled":false,
|
||||||
|
"id":"org_id",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"labelI18nCode":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"yunzhupaasKey":"radio",
|
"yunzhupaasKey":"radio",
|
||||||
"resizable":true,
|
"resizable":true,
|
||||||
@@ -375,80 +408,6 @@ const columnList = [
|
|||||||
"prefixIcon":"",
|
"prefixIcon":"",
|
||||||
"labelI18nCode":""
|
"labelI18nCode":""
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"企业范围",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"企业范围",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"id"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"EXT",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_company",
|
|
||||||
"renderKey":1774506498092,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItem13797c",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"static",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"企业范围",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":8
|
|
||||||
},
|
|
||||||
"prop":"company_scope",
|
|
||||||
"width":null,
|
|
||||||
"options":[
|
|
||||||
{
|
|
||||||
"fullName":"内部公司",
|
|
||||||
"id":"INT"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fullName":"客商企业",
|
|
||||||
"id":"EXT"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"__vModel__":"company_scope",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"company_scope",
|
|
||||||
"placeholder":"请选择企业范围",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"yunzhupaasKey":"select",
|
"yunzhupaasKey":"select",
|
||||||
"filterable":false,
|
"filterable":false,
|
||||||
@@ -8,7 +8,7 @@ const searchList = [
|
|||||||
],
|
],
|
||||||
"showCount":false,
|
"showCount":false,
|
||||||
"__config__":{
|
"__config__":{
|
||||||
"formId":"formItemd2b645",
|
"formId":"formItem478e5c",
|
||||||
"yunzhupaasKey":"input",
|
"yunzhupaasKey":"input",
|
||||||
"visibility":[
|
"visibility":[
|
||||||
"pc",
|
"pc",
|
||||||
@@ -19,27 +19,27 @@ const searchList = [
|
|||||||
"tableFixed":"none",
|
"tableFixed":"none",
|
||||||
"dragDisabled":false,
|
"dragDisabled":false,
|
||||||
"className":[],
|
"className":[],
|
||||||
"label":"项目名称",
|
"label":"企业名称",
|
||||||
"trigger":"blur",
|
"trigger":"blur",
|
||||||
"showLabel":true,
|
"showLabel":true,
|
||||||
"required":true,
|
"required":true,
|
||||||
"tableName":"mdm_project",
|
"tableName":"mdm_company",
|
||||||
"renderKey":1774508651244,
|
"renderKey":1774506482470,
|
||||||
"layout":"colFormItem",
|
"layout":"colFormItem",
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||||
"unique":true,
|
"unique":true,
|
||||||
"tag":"YunzhupaasInput",
|
"tag":"YunzhupaasInput",
|
||||||
"regList":[],
|
"regList":[],
|
||||||
"tableAlign":"left",
|
"tableAlign":"left",
|
||||||
"span":24
|
"span":8
|
||||||
},
|
},
|
||||||
"readonly":false,
|
"readonly":false,
|
||||||
"prop":"project_name",
|
"prop":"company_name",
|
||||||
"__vModel__":"project_name",
|
"__vModel__":"company_name",
|
||||||
"searchMultiple":false,
|
"searchMultiple":false,
|
||||||
"disabled":false,
|
"disabled":false,
|
||||||
"id":"project_name",
|
"id":"company_name",
|
||||||
"placeholder":"请输入项目名称",
|
"placeholder":"请输入企业名称",
|
||||||
"addonBefore":"",
|
"addonBefore":"",
|
||||||
"on":{
|
"on":{
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
@@ -47,9 +47,9 @@ const searchList = [
|
|||||||
},
|
},
|
||||||
"clearable":true,
|
"clearable":true,
|
||||||
"searchType":2,
|
"searchType":2,
|
||||||
"maxlength":50,
|
"maxlength":200,
|
||||||
"fullName":"项目名称",
|
"fullName":"企业名称",
|
||||||
"label":"项目名称",
|
"label":"企业名称",
|
||||||
"addonAfter":"",
|
"addonAfter":"",
|
||||||
"maskConfig":{
|
"maskConfig":{
|
||||||
"prefixType":1,
|
"prefixType":1,
|
||||||
@@ -64,7 +64,7 @@ const searchList = [
|
|||||||
"ignoreChar":"",
|
"ignoreChar":"",
|
||||||
"suffixSpecifyChar":""
|
"suffixSpecifyChar":""
|
||||||
},
|
},
|
||||||
"isKeyword":true,
|
"isKeyword":false,
|
||||||
"useMask":false,
|
"useMask":false,
|
||||||
"showPassword":false,
|
"showPassword":false,
|
||||||
"style":{
|
"style":{
|
||||||
@@ -86,7 +86,7 @@ const searchList = [
|
|||||||
],
|
],
|
||||||
"label":"归属组织",
|
"label":"归属组织",
|
||||||
"__config__":{
|
"__config__":{
|
||||||
"formId":"formItem0f5baf",
|
"formId":"formItemfc6848",
|
||||||
"yunzhupaasKey":"organizeSelect",
|
"yunzhupaasKey":"organizeSelect",
|
||||||
"visibility":[
|
"visibility":[
|
||||||
"pc",
|
"pc",
|
||||||
@@ -101,16 +101,16 @@ const searchList = [
|
|||||||
"label":"归属组织",
|
"label":"归属组织",
|
||||||
"trigger":"change",
|
"trigger":"change",
|
||||||
"showLabel":true,
|
"showLabel":true,
|
||||||
"required":false,
|
"required":true,
|
||||||
"tableName":"mdm_project",
|
"tableName":"mdm_company",
|
||||||
"renderKey":1774509431105,
|
"renderKey":1776912270086,
|
||||||
"layout":"colFormItem",
|
"layout":"colFormItem",
|
||||||
"tagIcon":"icon-ym icon-ym-generator-company",
|
"tagIcon":"icon-ym icon-ym-generator-company",
|
||||||
"defaultCurrent":true,
|
"defaultCurrent":true,
|
||||||
"tag":"YunzhupaasOrganizeSelect",
|
"tag":"YunzhupaasOrganizeSelect",
|
||||||
"regList":[],
|
"regList":[],
|
||||||
"tableAlign":"left",
|
"tableAlign":"left",
|
||||||
"span":24
|
"span":8
|
||||||
},
|
},
|
||||||
"prop":"org_id",
|
"prop":"org_id",
|
||||||
"__vModel__":"org_id",
|
"__vModel__":"org_id",
|
||||||
@@ -122,7 +122,7 @@ const searchList = [
|
|||||||
"selectType":"all",
|
"selectType":"all",
|
||||||
"disabled":false,
|
"disabled":false,
|
||||||
"id":"org_id",
|
"id":"org_id",
|
||||||
"placeholder":"请选择归属组织",
|
"placeholder":"请选择",
|
||||||
"value":[],
|
"value":[],
|
||||||
"labelI18nCode":"",
|
"labelI18nCode":"",
|
||||||
"on":{
|
"on":{
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -11,10 +11,12 @@
|
|||||||
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
||||||
@columns-change="handleColumnChange">
|
@columns-change="handleColumnChange">
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add"
|
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add" v-auth="'btn_add'"
|
||||||
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
||||||
<a-button type="link" preIcon="icon-ym icon-ym-btn-download"
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-download" v-auth="'btn_download'"
|
||||||
@click="openExportModal(true, { columnList: state.exportList, selectIds: getSelectRowKeys(), showExportSelected: true })"> {{t('common.exportText','导出')}}</a-button>
|
@click="openExportModal(true, { columnList: state.exportList, selectIds: getSelectRowKeys(), showExportSelected: true })"> {{t('common.exportText','导出')}}</a-button>
|
||||||
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-upload" v-auth="'btn_upload'"
|
||||||
|
@click="openImportModal(true, { url: 'bcm/Company', menuId: searchInfo.menuId })"> {{t('common.importText','导入')}}</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-tooltip placement="top">
|
<a-tooltip placement="top">
|
||||||
@@ -269,6 +271,7 @@
|
|||||||
const getHasBatchBtn = computed(() => {
|
const getHasBatchBtn = computed(() => {
|
||||||
let btnsList =[]
|
let btnsList =[]
|
||||||
btnsList.push('download')
|
btnsList.push('download')
|
||||||
|
btnsList=btnsList.filter(o => hasBtnP('btn_' + o))
|
||||||
return !!btnsList.length
|
return !!btnsList.length
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -511,17 +514,20 @@
|
|||||||
{
|
{
|
||||||
label: t('common.editText','编辑') ,
|
label: t('common.editText','编辑') ,
|
||||||
onClick: updateHandle.bind(null, record),
|
onClick: updateHandle.bind(null, record),
|
||||||
|
auth: 'btn_edit', //有按钮权限
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('common.delText','删除') ,
|
label: t('common.delText','删除') ,
|
||||||
color: 'error',
|
color: 'error',
|
||||||
modelConfirm: {
|
modelConfirm: {
|
||||||
onOk: handleDelete.bind(null, record.id),
|
onOk: handleDelete.bind(null, record.id),
|
||||||
},
|
},
|
||||||
|
auth: 'btn_remove', //有按钮权限
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('common.detailText','详情') ,
|
label: t('common.detailText','详情') ,
|
||||||
onClick: goDetail.bind(null, record),
|
onClick: goDetail.bind(null, record),
|
||||||
|
auth: 'btn_detail', //有按钮权限
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -535,7 +541,7 @@
|
|||||||
};
|
};
|
||||||
formRef.value?.init(data);
|
formRef.value?.init(data);
|
||||||
}
|
}
|
||||||
// 删除
|
// 删除
|
||||||
function handleDelete(id) {
|
function handleDelete(id) {
|
||||||
const query={ids:[id] }
|
const query={ids:[id] }
|
||||||
batchDelete(query).then((res) => {
|
batchDelete(query).then((res) => {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<BasicDrawer v-bind="$attrs" @register="registerDrawer" :title="title" width="1200px" showFooter :showOkBtn="false">
|
<BasicDrawer v-bind="$attrs" @register="registerDrawer" :title="title" width="1000px" showFooter :showOkBtn="false">
|
||||||
<template #insertFooter> </template>
|
<template #insertFooter> </template>
|
||||||
<a-row class="p-10px dynamic-form">
|
<a-row class="p-10px dynamic-form">
|
||||||
<!-- 表单 -->
|
<!-- 表单 -->
|
||||||
@@ -8,22 +8,12 @@
|
|||||||
<!-- 具体表单 -->
|
<!-- 具体表单 -->
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item">
|
||||||
<a-form-item name="company_code">
|
<a-form-item name="company_code">
|
||||||
<template #label>企业编码: </template>
|
<template #label>客户编码 </template> <p>{{ dataForm.company_code }}</p>
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.company_code"
|
|
||||||
placeholder="请输入企业编码"
|
|
||||||
:maxlength="50"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.company_code">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" >
|
||||||
<a-form-item name="company_name">
|
<a-form-item name="company_name">
|
||||||
<template #label>企业名称: </template>
|
<template #label>客户名称 </template>
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="dataForm.company_name"
|
v-model:value="dataForm.company_name"
|
||||||
placeholder="请输入企业名称"
|
placeholder="请输入企业名称"
|
||||||
@@ -36,9 +26,9 @@
|
|||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" >
|
||||||
<a-form-item name="short_name">
|
<a-form-item name="short_name">
|
||||||
<template #label>简称/昵称: </template>
|
<template #label>简称/昵称 </template>
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="dataForm.short_name"
|
v-model:value="dataForm.short_name"
|
||||||
placeholder="请输入简称/昵称"
|
placeholder="请输入简称/昵称"
|
||||||
@@ -51,14 +41,14 @@
|
|||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" >
|
||||||
<a-form-item name="entity_type">
|
<a-form-item name="entity_type">
|
||||||
<template #label>类型: </template> <p>{{ dataForm.entity_type }}</p>
|
<template #label>类型 </template> <p>{{ dataForm.entity_type }}</p>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" >
|
||||||
<a-form-item name="credit_code">
|
<a-form-item name="credit_code">
|
||||||
<template #label>社会信用代码: </template>
|
<template #label>{{ dataForm.entity_type_yunzhupaasId === 'IND' ? '身份证' : '社会信用代码' }} </template>
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="dataForm.credit_code"
|
v-model:value="dataForm.credit_code"
|
||||||
placeholder="请输入社会信用代码"
|
placeholder="请输入社会信用代码"
|
||||||
@@ -71,39 +61,44 @@
|
|||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" v-if="dataForm.entity_type_yunzhupaasId=='ORG'">
|
||||||
<a-form-item name="company_scope">
|
<a-form-item name="org_id">
|
||||||
<template #label>企业范围: </template> <p>{{ dataForm.company_scope }}</p>
|
<template #label>归属组织 </template> <p>{{ dataForm.org_id }}</p>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" v-if="dataForm.entity_type_yunzhupaasId=='ORG'">
|
||||||
|
<a-form-item name="province_id">
|
||||||
|
<template #label>所属地区 </template> <p>{{ dataForm.province_id }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8" class="ant-col-item" v-if="dataForm.entity_type_yunzhupaasId=='ORG'">
|
||||||
<a-form-item name="tax_type">
|
<a-form-item name="tax_type">
|
||||||
<template #label>纳税人类别: </template> <p>{{ dataForm.tax_type }}</p>
|
<template #label>纳税人类别 </template> <p>{{ dataForm.tax_type }}</p>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" v-if="dataForm.entity_type_yunzhupaasId=='ORG'">
|
||||||
<a-form-item name="enterprise_scale">
|
<a-form-item name="enterprise_scale">
|
||||||
<template #label>企业规模: </template> <p>{{ dataForm.enterprise_scale }}</p>
|
<template #label>企业规模 </template> <p>{{ dataForm.enterprise_scale }}</p>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" v-if="dataForm.entity_type_yunzhupaasId=='ORG'">
|
||||||
<a-form-item name="enterprise_nature">
|
<a-form-item name="enterprise_nature">
|
||||||
<template #label>企业类型: </template> <p>{{ dataForm.enterprise_nature }}</p>
|
<template #label>企业类型 </template> <p>{{ dataForm.enterprise_nature }}</p>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" v-if="dataForm.entity_type_yunzhupaasId=='ORG'">
|
||||||
<a-form-item name="industry_code">
|
<a-form-item name="industry_code">
|
||||||
<template #label>行业代码: </template> <p>{{ dataForm.industry_code }}</p>
|
<template #label>行业代码 </template> <p>{{ dataForm.industry_code }}</p>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" v-if="dataForm.entity_type_yunzhupaasId=='ORG'">
|
||||||
<a-form-item name="registration_date">
|
<a-form-item name="registration_date">
|
||||||
<template #label>成立日期: </template> <p>{{ dataForm.registration_date }}</p>
|
<template #label>成立日期 </template> <p>{{ dataForm.registration_date }}</p>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" >
|
||||||
<a-form-item name="registered_capital">
|
<a-form-item name="registered_capital">
|
||||||
<template #label>注册资本: </template>
|
<template #label>注册资本 </template>
|
||||||
<YunzhupaasInputNumber
|
<YunzhupaasInputNumber
|
||||||
v-model:value="dataForm.registered_capital"
|
v-model:value="dataForm.registered_capital"
|
||||||
placeholder="请输入注册资本"
|
placeholder="请输入注册资本"
|
||||||
@@ -118,9 +113,9 @@
|
|||||||
</YunzhupaasInputNumber>
|
</YunzhupaasInputNumber>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" >
|
||||||
<a-form-item name="legal_representative">
|
<a-form-item name="legal_representative">
|
||||||
<template #label>法定代表人: </template>
|
<template #label>法定代表人 </template>
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="dataForm.legal_representative"
|
v-model:value="dataForm.legal_representative"
|
||||||
placeholder="请输入法定代表人"
|
placeholder="请输入法定代表人"
|
||||||
@@ -133,9 +128,9 @@
|
|||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" >
|
||||||
<a-form-item name="phone">
|
<a-form-item name="phone">
|
||||||
<template #label>联系电话: </template>
|
<template #label>联系电话 </template>
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="dataForm.phone"
|
v-model:value="dataForm.phone"
|
||||||
placeholder="请输入联系电话"
|
placeholder="请输入联系电话"
|
||||||
@@ -148,9 +143,9 @@
|
|||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" >
|
||||||
<a-form-item name="email">
|
<a-form-item name="email">
|
||||||
<template #label>邮箱: </template>
|
<template #label>邮箱 </template>
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="dataForm.email"
|
v-model:value="dataForm.email"
|
||||||
placeholder="请输入邮箱"
|
placeholder="请输入邮箱"
|
||||||
@@ -163,9 +158,9 @@
|
|||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" >
|
||||||
<a-form-item name="website">
|
<a-form-item name="website">
|
||||||
<template #label>网站: </template>
|
<template #label>网站 </template>
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="dataForm.website"
|
v-model:value="dataForm.website"
|
||||||
placeholder="请输入网站"
|
placeholder="请输入网站"
|
||||||
@@ -178,9 +173,9 @@
|
|||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item" >
|
||||||
<a-form-item name="address">
|
<a-form-item name="address">
|
||||||
<template #label>地址: </template>
|
<template #label>地址 </template>
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="dataForm.address"
|
v-model:value="dataForm.address"
|
||||||
placeholder="请输入地址"
|
placeholder="请输入地址"
|
||||||
@@ -193,31 +188,40 @@
|
|||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="8" class="ant-col-item" >
|
||||||
|
<a-form-item name="yunzhupaas_mdm_customer_yunzhupaas_major_person_id">
|
||||||
|
<template #label>销售责任人 </template> <p>{{ dataForm.yunzhupaas_mdm_customer_yunzhupaas_major_person_id }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8" class="ant-col-item" >
|
||||||
|
<a-form-item name="yunzhupaas_mdm_customer_yunzhupaas_customer_level">
|
||||||
|
<template #label>客户级别 </template> <p>{{ dataForm.yunzhupaas_mdm_customer_yunzhupaas_customer_level }}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<a-col :span="8" class="ant-col-item">
|
<a-col :span="8" class="ant-col-item">
|
||||||
<a-form-item name="province_id">
|
<a-form-item name="yunzhupaas_mdm_customer_yunzhupaas_customer_source">
|
||||||
<template #label>所属地区: </template> <p>{{ dataForm.province_id }}</p>
|
<template #label>客户来源 </template> <p>{{ dataForm.yunzhupaas_mdm_customer_yunzhupaas_customer_source }}</p>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item">
|
<a-col :span="24" class="ant-col-item" >
|
||||||
<a-form-item name="business_scope">
|
<a-form-item name="business_scope">
|
||||||
<template #label>经营范围: </template> <p>{{ dataForm.business_scope }}</p>
|
<template #label>经营范围 </template> <p>{{ dataForm.business_scope }}</p>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item">
|
<a-col :span="24" class="ant-col-item" >
|
||||||
<a-form-item name="remark">
|
<a-form-item name="remark">
|
||||||
<template #label>备注: </template> <p>{{ dataForm.remark }}</p>
|
<template #label>备注 </template> <p>{{ dataForm.remark }}</p>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item">
|
<a-col :span="24" class="ant-col-item">
|
||||||
<a-tabs v-model:activeKey="state.activetabformItemfe79ef" tabPosition="top" class="mb-20">
|
<a-tabs v-model:activeKey="state.activetabformItemfe79ef" tabPosition="top" class="mb-20">
|
||||||
<a-tab-pane tab="联系人信息" key="1" forceRender>
|
<a-tab-pane tab="发票抬头" key="1" forceRender>
|
||||||
<a-row :gutter="15">
|
<a-row :gutter="15">
|
||||||
<a-col :span="24" class="ant-col-item mb-20px">
|
<a-col :span="24" class="ant-col-item mb-20px" >
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<!-- <yunzhupaasGroupTitle content="设计子表" :bordered="false" helpMessage="" /> -->
|
|
||||||
<a-table
|
<a-table
|
||||||
:data-source="dataForm.tableField46dc53"
|
:data-source="dataForm.tableField46dc53"
|
||||||
:columns="mdmCompanyContactColumns"
|
:columns="companyInvoiceColumns"
|
||||||
size="small"
|
size="small"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{ x: 'max-content' }">
|
:scroll="{ x: 'max-content' }">
|
||||||
@@ -228,54 +232,90 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #bodyCell="{ column, index, record }">
|
<template #bodyCell="{ column, index, record }">
|
||||||
<template v-if="column.key === 'index'">{{ index + 1 }}</template>
|
<template v-if="column.key === 'index'">{{ index + 1 }}</template>
|
||||||
<template v-if="column.key === 'contact_name'">
|
<template v-if="column.key === 'title_code'">
|
||||||
|
<p>{{ record.title_code }}</p>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.key === 'title_name'">
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="record.contact_name"
|
v-model:value="record.title_name"
|
||||||
placeholder="请输入联系人"
|
placeholder="请输入联系人"
|
||||||
:maxlength="10"
|
:maxlength="10"
|
||||||
disabled
|
disabled
|
||||||
detailed
|
detailed
|
||||||
allowClear
|
allowClear
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.mdmCompanyContactcontact_name">
|
:maskConfig="maskConfig.companyInvoicetitle_name">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'contact_title'">
|
<template v-if="column.key === 'credit_code'">
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="record.contact_title"
|
v-model:value="record.credit_code"
|
||||||
placeholder="请输入联系人职务"
|
placeholder="请输入联系人职务"
|
||||||
:maxlength="20"
|
:maxlength="20"
|
||||||
disabled
|
disabled
|
||||||
detailed
|
detailed
|
||||||
allowClear
|
allowClear
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.mdmCompanyContactcontact_title">
|
:maskConfig="maskConfig.companyInvoicecredit_code">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'contact_phone'">
|
<template v-if="column.key === 'tax_type'">
|
||||||
<YunzhupaasInput
|
<p>{{ record.tax_type }}</p>
|
||||||
v-model:value="record.contact_phone"
|
|
||||||
placeholder="请输入联系人电话"
|
|
||||||
:maxlength="11"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.mdmCompanyContactcontact_phone">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'contact_email'">
|
<template v-if="column.key === 'address'">
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="record.contact_email"
|
v-model:value="record.address"
|
||||||
placeholder="请输入联系人邮箱"
|
placeholder="请输入联系人邮箱"
|
||||||
:maxlength="50"
|
:maxlength="50"
|
||||||
disabled
|
disabled
|
||||||
detailed
|
detailed
|
||||||
allowClear
|
allowClear
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.mdmCompanyContactcontact_email">
|
:maskConfig="maskConfig.companyInvoiceaddress">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="column.key === 'phone'">
|
||||||
|
<YunzhupaasInput
|
||||||
|
v-model:value="record.phone"
|
||||||
|
placeholder="请输入联系人邮箱"
|
||||||
|
:maxlength="50"
|
||||||
|
disabled
|
||||||
|
detailed
|
||||||
|
allowClear
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
:maskConfig="maskConfig.companyInvoicephone">
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.key === 'bank_name'">
|
||||||
|
<YunzhupaasInput
|
||||||
|
v-model:value="record.bank_name"
|
||||||
|
placeholder="请输入联系人邮箱"
|
||||||
|
:maxlength="50"
|
||||||
|
disabled
|
||||||
|
detailed
|
||||||
|
allowClear
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
:maskConfig="maskConfig.companyInvoicebank_name">
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.key === 'bank_account'">
|
||||||
|
<YunzhupaasInput
|
||||||
|
v-model:value="record.bank_account"
|
||||||
|
placeholder="请输入联系人邮箱"
|
||||||
|
:maxlength="50"
|
||||||
|
disabled
|
||||||
|
detailed
|
||||||
|
allowClear
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
:maskConfig="maskConfig.companyInvoicebank_account">
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.key === 'is_defalut'">
|
||||||
|
<p>{{ record.is_defalut }}</p>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.key === 'is_valid'">
|
||||||
|
<p>{{ record.is_valid }}</p>
|
||||||
|
</template>
|
||||||
<template v-if="column.key === 'remark'">
|
<template v-if="column.key === 'remark'">
|
||||||
<YunzhupaasInput
|
<YunzhupaasInput
|
||||||
v-model:value="record.remark"
|
v-model:value="record.remark"
|
||||||
@@ -285,7 +325,7 @@
|
|||||||
detailed
|
detailed
|
||||||
allowClear
|
allowClear
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.mdmCompanyContactremark">
|
:maskConfig="maskConfig.companyInvoiceremark">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@@ -296,12 +336,11 @@
|
|||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane tab="银行卡信息" key="2" forceRender>
|
<a-tab-pane tab="银行卡信息" key="2" forceRender>
|
||||||
<a-row :gutter="15">
|
<a-row :gutter="15">
|
||||||
<a-col :span="24" class="ant-col-item mb-20px">
|
<a-col :span="24" class="ant-col-item mb-20px" >
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<!-- <yunzhupaasGroupTitle content="设计子表" :bordered="false" helpMessage="" /> -->
|
|
||||||
<a-table
|
<a-table
|
||||||
:data-source="dataForm.tableFieldad9d92"
|
:data-source="dataForm.tableFieldad9d92"
|
||||||
:columns="mdmCompanyBankColumns"
|
:columns="companyBankColumns"
|
||||||
size="small"
|
size="small"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{ x: 'max-content' }">
|
:scroll="{ x: 'max-content' }">
|
||||||
@@ -321,7 +360,7 @@
|
|||||||
detailed
|
detailed
|
||||||
allowClear
|
allowClear
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.mdmCompanyBankbank_name">
|
:maskConfig="maskConfig.companyBankbank_name">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'bank_account_name'">
|
<template v-if="column.key === 'bank_account_name'">
|
||||||
@@ -333,7 +372,7 @@
|
|||||||
detailed
|
detailed
|
||||||
allowClear
|
allowClear
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.mdmCompanyBankbank_account_name">
|
:maskConfig="maskConfig.companyBankbank_account_name">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'bank_account_number'">
|
<template v-if="column.key === 'bank_account_number'">
|
||||||
@@ -345,7 +384,7 @@
|
|||||||
detailed
|
detailed
|
||||||
allowClear
|
allowClear
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.mdmCompanyBankbank_account_number">
|
:maskConfig="maskConfig.companyBankbank_account_number">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'bank_province'">
|
<template v-if="column.key === 'bank_province'">
|
||||||
@@ -357,7 +396,7 @@
|
|||||||
detailed
|
detailed
|
||||||
allowClear
|
allowClear
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.mdmCompanyBankbank_province">
|
:maskConfig="maskConfig.companyBankbank_province">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'remark'">
|
<template v-if="column.key === 'remark'">
|
||||||
@@ -369,7 +408,7 @@
|
|||||||
detailed
|
detailed
|
||||||
allowClear
|
allowClear
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
:maskConfig="maskConfig.mdmCompanyBankremark">
|
:maskConfig="maskConfig.companyBankremark">
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@@ -422,12 +461,12 @@
|
|||||||
defineOptions({ name: 'Detail' });
|
defineOptions({ name: 'Detail' });
|
||||||
const { createMessage, createConfirm } = useMessage();
|
const { createMessage, createConfirm } = useMessage();
|
||||||
const [registerDrawer, { openDrawer, setDrawerProps, closeDrawer }] = useDrawer();
|
const [registerDrawer, { openDrawer, setDrawerProps, closeDrawer }] = useDrawer();
|
||||||
const mdmCompanyContactColumns: any[] = computed(() => {
|
const companyInvoiceColumns: any[] = computed(() => {
|
||||||
let list = [
|
let list = [
|
||||||
{
|
{
|
||||||
title: '联系人',
|
title: '发票抬头编码',
|
||||||
dataIndex: 'contact_name',
|
dataIndex: 'title_code',
|
||||||
key: 'contact_name',
|
key: 'title_code',
|
||||||
labelWidth: '',
|
labelWidth: '',
|
||||||
span: '24',
|
span: '24',
|
||||||
tipLabel: '',
|
tipLabel: '',
|
||||||
@@ -435,12 +474,12 @@
|
|||||||
style: { width: '100%' },
|
style: { width: '100%' },
|
||||||
align: 'left',
|
align: 'left',
|
||||||
fixed: false,
|
fixed: false,
|
||||||
formP: 'contact_name',
|
formP: 'title_code',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '联系人职务',
|
title: '发票抬头名称',
|
||||||
dataIndex: 'contact_title',
|
dataIndex: 'title_name',
|
||||||
key: 'contact_title',
|
key: 'title_name',
|
||||||
labelWidth: '',
|
labelWidth: '',
|
||||||
span: '24',
|
span: '24',
|
||||||
tipLabel: '',
|
tipLabel: '',
|
||||||
@@ -448,12 +487,12 @@
|
|||||||
style: { width: '100%' },
|
style: { width: '100%' },
|
||||||
align: 'left',
|
align: 'left',
|
||||||
fixed: false,
|
fixed: false,
|
||||||
formP: 'contact_title',
|
formP: 'title_name',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '联系人电话',
|
title: '纳税人识别号',
|
||||||
dataIndex: 'contact_phone',
|
dataIndex: 'credit_code',
|
||||||
key: 'contact_phone',
|
key: 'credit_code',
|
||||||
labelWidth: '',
|
labelWidth: '',
|
||||||
span: '24',
|
span: '24',
|
||||||
tipLabel: '',
|
tipLabel: '',
|
||||||
@@ -461,12 +500,25 @@
|
|||||||
style: { width: '100%' },
|
style: { width: '100%' },
|
||||||
align: 'left',
|
align: 'left',
|
||||||
fixed: false,
|
fixed: false,
|
||||||
formP: 'contact_phone',
|
formP: 'credit_code',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '联系人邮箱',
|
title: '纳税人类别',
|
||||||
dataIndex: 'contact_email',
|
dataIndex: 'tax_type',
|
||||||
key: 'contact_email',
|
key: 'tax_type',
|
||||||
|
labelWidth: '',
|
||||||
|
span: '8',
|
||||||
|
tipLabel: '',
|
||||||
|
required: false,
|
||||||
|
style: { width: '100%' },
|
||||||
|
align: 'left',
|
||||||
|
fixed: false,
|
||||||
|
formP: 'tax_type',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '地址',
|
||||||
|
dataIndex: 'address',
|
||||||
|
key: 'address',
|
||||||
labelWidth: '',
|
labelWidth: '',
|
||||||
span: '24',
|
span: '24',
|
||||||
tipLabel: '',
|
tipLabel: '',
|
||||||
@@ -474,7 +526,72 @@
|
|||||||
style: { width: '100%' },
|
style: { width: '100%' },
|
||||||
align: 'left',
|
align: 'left',
|
||||||
fixed: false,
|
fixed: false,
|
||||||
formP: 'contact_email',
|
formP: 'address',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '电话',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
key: 'phone',
|
||||||
|
labelWidth: '',
|
||||||
|
span: '24',
|
||||||
|
tipLabel: '',
|
||||||
|
required: false,
|
||||||
|
style: { width: '100%' },
|
||||||
|
align: 'left',
|
||||||
|
fixed: false,
|
||||||
|
formP: 'phone',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '开户银行',
|
||||||
|
dataIndex: 'bank_name',
|
||||||
|
key: 'bank_name',
|
||||||
|
labelWidth: '',
|
||||||
|
span: '24',
|
||||||
|
tipLabel: '',
|
||||||
|
required: false,
|
||||||
|
style: { width: '100%' },
|
||||||
|
align: 'left',
|
||||||
|
fixed: false,
|
||||||
|
formP: 'bank_name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '银行账户',
|
||||||
|
dataIndex: 'bank_account',
|
||||||
|
key: 'bank_account',
|
||||||
|
labelWidth: '',
|
||||||
|
span: '24',
|
||||||
|
tipLabel: '',
|
||||||
|
required: false,
|
||||||
|
style: { width: '100%' },
|
||||||
|
align: 'left',
|
||||||
|
fixed: false,
|
||||||
|
formP: 'bank_account',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '是否默认',
|
||||||
|
dataIndex: 'is_defalut',
|
||||||
|
key: 'is_defalut',
|
||||||
|
labelWidth: '',
|
||||||
|
span: '24',
|
||||||
|
tipLabel: '',
|
||||||
|
required: false,
|
||||||
|
style: '',
|
||||||
|
align: 'left',
|
||||||
|
fixed: false,
|
||||||
|
formP: 'is_defalut',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '是否有效',
|
||||||
|
dataIndex: 'is_valid',
|
||||||
|
key: 'is_valid',
|
||||||
|
labelWidth: '',
|
||||||
|
span: '24',
|
||||||
|
tipLabel: '',
|
||||||
|
required: false,
|
||||||
|
style: '',
|
||||||
|
align: 'left',
|
||||||
|
fixed: false,
|
||||||
|
formP: 'is_valid',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '备注',
|
title: '备注',
|
||||||
@@ -490,6 +607,7 @@
|
|||||||
formP: 'remark',
|
formP: 'remark',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
// list = list.filter(o => hasFormP('tableField46dc53-' + o.formP));
|
||||||
const indexColumn = { title: '序号', showLabel: true, dataIndex: 'index', key: 'index', align: 'center', fixed: 'left', width: 50 };
|
const indexColumn = { title: '序号', showLabel: true, dataIndex: 'index', key: 'index', align: 'center', fixed: 'left', width: 50 };
|
||||||
//子表复杂表头-处理
|
//子表复杂表头-处理
|
||||||
let columnList = list;
|
let columnList = list;
|
||||||
@@ -536,7 +654,7 @@
|
|||||||
const noFixedList = columns.filter(o => o.fixed !== 'left' && o.fixed !== 'right');
|
const noFixedList = columns.filter(o => o.fixed !== 'left' && o.fixed !== 'right');
|
||||||
return [...leftFixedList, ...noFixedList, ...rightFixedList];
|
return [...leftFixedList, ...noFixedList, ...rightFixedList];
|
||||||
});
|
});
|
||||||
const mdmCompanyBankColumns: any[] = computed(() => {
|
const companyBankColumns: any[] = computed(() => {
|
||||||
let list = [
|
let list = [
|
||||||
{
|
{
|
||||||
title: '开户行',
|
title: '开户行',
|
||||||
@@ -604,6 +722,7 @@
|
|||||||
formP: 'remark',
|
formP: 'remark',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
// list = list.filter(o => hasFormP('tableFieldad9d92-' + o.formP));
|
||||||
const indexColumn = { title: '序号', showLabel: true, dataIndex: 'index', key: 'index', align: 'center', fixed: 'left', width: 50 };
|
const indexColumn = { title: '序号', showLabel: true, dataIndex: 'index', key: 'index', align: 'center', fixed: 'left', width: 50 };
|
||||||
//子表复杂表头-处理
|
//子表复杂表头-处理
|
||||||
let columnList = list;
|
let columnList = list;
|
||||||
@@ -657,19 +776,6 @@
|
|||||||
dataForm: {},
|
dataForm: {},
|
||||||
title: t('common.detailText', '详情'),
|
title: t('common.detailText', '详情'),
|
||||||
maskConfig: {
|
maskConfig: {
|
||||||
company_code: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
company_name: {
|
company_name: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
@@ -774,7 +880,7 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
mdmCompanyContactcontact_name: {
|
companyInvoicetitle_name: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -787,7 +893,7 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
mdmCompanyContactcontact_title: {
|
companyInvoicecredit_code: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -800,7 +906,7 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
mdmCompanyContactcontact_phone: {
|
companyInvoiceaddress: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -813,7 +919,7 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
mdmCompanyContactcontact_email: {
|
companyInvoicephone: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -826,7 +932,7 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
mdmCompanyContactremark: {
|
companyInvoicebank_name: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -839,7 +945,7 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
mdmCompanyBankbank_name: {
|
companyInvoicebank_account: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -852,7 +958,7 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
mdmCompanyBankbank_account_name: {
|
companyInvoiceremark: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -865,7 +971,7 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
mdmCompanyBankbank_account_number: {
|
companyBankbank_name: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -878,7 +984,7 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
mdmCompanyBankbank_province: {
|
companyBankbank_account_name: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -891,7 +997,33 @@
|
|||||||
ignoreChar: '',
|
ignoreChar: '',
|
||||||
suffixSpecifyChar: '',
|
suffixSpecifyChar: '',
|
||||||
},
|
},
|
||||||
mdmCompanyBankremark: {
|
companyBankbank_account_number: {
|
||||||
|
prefixType: 1,
|
||||||
|
useUnrealMask: false,
|
||||||
|
maskType: 1,
|
||||||
|
unrealMaskLength: 1,
|
||||||
|
prefixLimit: 0,
|
||||||
|
suffixLimit: 0,
|
||||||
|
filler: '*',
|
||||||
|
prefixSpecifyChar: '',
|
||||||
|
suffixType: 1,
|
||||||
|
ignoreChar: '',
|
||||||
|
suffixSpecifyChar: '',
|
||||||
|
},
|
||||||
|
companyBankbank_province: {
|
||||||
|
prefixType: 1,
|
||||||
|
useUnrealMask: false,
|
||||||
|
maskType: 1,
|
||||||
|
unrealMaskLength: 1,
|
||||||
|
prefixLimit: 0,
|
||||||
|
suffixLimit: 0,
|
||||||
|
filler: '*',
|
||||||
|
prefixSpecifyChar: '',
|
||||||
|
suffixType: 1,
|
||||||
|
ignoreChar: '',
|
||||||
|
suffixSpecifyChar: '',
|
||||||
|
},
|
||||||
|
companyBankremark: {
|
||||||
prefixType: 1,
|
prefixType: 1,
|
||||||
useUnrealMask: false,
|
useUnrealMask: false,
|
||||||
maskType: 1,
|
maskType: 1,
|
||||||
@@ -906,36 +1038,45 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
interfaceRes: {
|
interfaceRes: {
|
||||||
mdmCompanyBankbank_name: [],
|
companyBankbank_account_number: [],
|
||||||
mdmCompanyBankbank_account_name: [],
|
companyBankremark: [],
|
||||||
company_scope: [],
|
|
||||||
industry_code: [],
|
industry_code: [],
|
||||||
mdmCompanyContactcontact_email: [],
|
companyInvoiceaddress: [],
|
||||||
remark: [],
|
remark: [],
|
||||||
mdmCompanyBankbank_province: [],
|
companyInvoicephone: [],
|
||||||
|
companyInvoicetitle_name: [],
|
||||||
|
yunzhupaas_mdm_customer_yunzhupaas_major_person_id: [],
|
||||||
|
companyInvoicecredit_code: [],
|
||||||
|
companyInvoicetax_type: [],
|
||||||
|
companyInvoiceis_valid: [],
|
||||||
credit_code: [],
|
credit_code: [],
|
||||||
mdmCompanyBankbank_account_number: [],
|
yunzhupaas_mdm_customer_yunzhupaas_customer_source: [],
|
||||||
company_code: [],
|
company_code: [],
|
||||||
|
yunzhupaas_mdm_customer_yunzhupaas_customer_level: [],
|
||||||
email: [],
|
email: [],
|
||||||
mdmCompanyContactcontact_title: [],
|
companyInvoiceis_defalut: [],
|
||||||
website: [],
|
website: [],
|
||||||
address: [],
|
address: [],
|
||||||
mdmCompanyContactcontact_name: [],
|
companyBankbank_account_name: [],
|
||||||
legal_representative: [],
|
legal_representative: [],
|
||||||
enterprise_nature: [],
|
enterprise_nature: [],
|
||||||
|
companyInvoicetitle_code: [],
|
||||||
registered_capital: [],
|
registered_capital: [],
|
||||||
|
companyInvoicebank_account: [],
|
||||||
|
companyBankbank_province: [],
|
||||||
business_scope: [],
|
business_scope: [],
|
||||||
mdmCompanyContactcontact_phone: [],
|
companyInvoiceremark: [],
|
||||||
mdmCompanyBankremark: [],
|
|
||||||
entity_type: [],
|
entity_type: [],
|
||||||
registration_date: [],
|
registration_date: [],
|
||||||
|
province_id: [],
|
||||||
tax_type: [],
|
tax_type: [],
|
||||||
phone: [],
|
phone: [],
|
||||||
province_id: [],
|
org_id: [],
|
||||||
company_name: [],
|
company_name: [],
|
||||||
|
companyInvoicebank_name: [],
|
||||||
short_name: [],
|
short_name: [],
|
||||||
enterprise_scale: [],
|
enterprise_scale: [],
|
||||||
mdmCompanyContactremark: [],
|
companyBankbank_name: [],
|
||||||
},
|
},
|
||||||
locationScope: {},
|
locationScope: {},
|
||||||
extraOptions: {},
|
extraOptions: {},
|
||||||
File diff suppressed because it is too large
Load Diff
34
src/views/mdm/custinfo/helper/api.ts
Normal file
34
src/views/mdm/custinfo/helper/api.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import { defHttp } from '@/utils/http/axios';
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
export function getList(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Custinfo/getList', data });
|
||||||
|
}
|
||||||
|
// 新建
|
||||||
|
export function create(data) {
|
||||||
|
return defHttp.post({ url:'/api/bcm/Custinfo', data });
|
||||||
|
}
|
||||||
|
// 修改
|
||||||
|
export function update(data) {
|
||||||
|
return defHttp.put({ url: '/api/bcm/Custinfo/'+ data.id, data });
|
||||||
|
}
|
||||||
|
// 详情(无转换数据)
|
||||||
|
export function getInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Custinfo/' + id });
|
||||||
|
}
|
||||||
|
// 获取(转换数据)
|
||||||
|
export function getDetailInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Custinfo/detail/' + id });
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export function del(id) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Custinfo/' + id });
|
||||||
|
}
|
||||||
|
// 批量删除数据
|
||||||
|
export function batchDelete(data) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Custinfo/batchRemove', data });
|
||||||
|
}
|
||||||
|
// 导出
|
||||||
|
export function exportData(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Custinfo/Actions/Export', data });
|
||||||
|
}
|
||||||
1444
src/views/mdm/custinfo/helper/columnList.ts
Normal file
1444
src/views/mdm/custinfo/helper/columnList.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -64,7 +64,7 @@ const searchList = [
|
|||||||
"ignoreChar":"",
|
"ignoreChar":"",
|
||||||
"suffixSpecifyChar":""
|
"suffixSpecifyChar":""
|
||||||
},
|
},
|
||||||
"isKeyword":true,
|
"isKeyword":false,
|
||||||
"useMask":false,
|
"useMask":false,
|
||||||
"showPassword":false,
|
"showPassword":false,
|
||||||
"style":{
|
"style":{
|
||||||
@@ -74,76 +74,60 @@ const searchList = [
|
|||||||
"labelI18nCode":""
|
"labelI18nCode":""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"yunzhupaasKey":"radio",
|
"yunzhupaasKey":"organizeSelect",
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
"searchType":1,
|
"searchType":1,
|
||||||
"buttonStyle":"solid",
|
"ableIds":[],
|
||||||
"fullName":"类型",
|
"multiple":false,
|
||||||
|
"fullName":"归属组织",
|
||||||
"fullNameI18nCode":[
|
"fullNameI18nCode":[
|
||||||
""
|
""
|
||||||
],
|
],
|
||||||
"label":"类型",
|
"label":"归属组织",
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"id"
|
|
||||||
},
|
|
||||||
"optionType":"default",
|
|
||||||
"__config__":{
|
"__config__":{
|
||||||
"yunzhupaasKey":"radio",
|
"formId":"formItemfc6848",
|
||||||
"defaultValue":"ORG",
|
"yunzhupaasKey":"organizeSelect",
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_company",
|
|
||||||
"renderKey":1774506487223,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-radio",
|
|
||||||
"tag":"YunzhupaasRadio",
|
|
||||||
"formId":"formItemb3f6cd",
|
|
||||||
"visibility":[
|
"visibility":[
|
||||||
"pc",
|
"pc",
|
||||||
"app"
|
"app"
|
||||||
],
|
],
|
||||||
|
"defaultValue":[],
|
||||||
"noShow":false,
|
"noShow":false,
|
||||||
"dataType":"static",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
"tipLabel":"",
|
||||||
"tableFixed":"none",
|
"tableFixed":"none",
|
||||||
"label":"类型",
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"归属组织",
|
||||||
"trigger":"change",
|
"trigger":"change",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_company",
|
||||||
|
"renderKey":1776912270086,
|
||||||
"layout":"colFormItem",
|
"layout":"colFormItem",
|
||||||
"useCache":true,
|
"tagIcon":"icon-ym icon-ym-generator-company",
|
||||||
"propsName":"",
|
"defaultCurrent":true,
|
||||||
|
"tag":"YunzhupaasOrganizeSelect",
|
||||||
"regList":[],
|
"regList":[],
|
||||||
"tableAlign":"left",
|
"tableAlign":"left",
|
||||||
"span":8
|
"span":8
|
||||||
},
|
},
|
||||||
"size":"default",
|
"prop":"org_id",
|
||||||
"prop":"entity_type",
|
"__vModel__":"org_id",
|
||||||
"options":[
|
"searchMultiple":true,
|
||||||
{
|
|
||||||
"fullName":"企业",
|
|
||||||
"id":"ORG"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fullName":"个人",
|
|
||||||
"id":"IND"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"__vModel__":"entity_type",
|
|
||||||
"searchMultiple":false,
|
|
||||||
"isKeyword":false,
|
"isKeyword":false,
|
||||||
"style":{
|
"style":{
|
||||||
"width":"100%"
|
"width":"100%"
|
||||||
},
|
},
|
||||||
|
"selectType":"all",
|
||||||
"disabled":false,
|
"disabled":false,
|
||||||
"id":"entity_type",
|
"id":"org_id",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"value":[],
|
||||||
"labelI18nCode":"",
|
"labelI18nCode":"",
|
||||||
"on":{
|
"on":{
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
},
|
}
|
||||||
"direction":"horizontal"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default searchList
|
export default searchList
|
||||||
3502
src/views/mdm/custinfo/helper/superQueryJson.ts
Normal file
3502
src/views/mdm/custinfo/helper/superQueryJson.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@
|
|||||||
<a-button type="link" preIcon="icon-ym icon-ym-btn-download" v-auth="'btn_download'"
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-download" v-auth="'btn_download'"
|
||||||
@click="openExportModal(true, { columnList: state.exportList, selectIds: getSelectRowKeys(), showExportSelected: true })"> {{t('common.exportText','导出')}}</a-button>
|
@click="openExportModal(true, { columnList: state.exportList, selectIds: getSelectRowKeys(), showExportSelected: true })"> {{t('common.exportText','导出')}}</a-button>
|
||||||
<a-button type="link" preIcon="icon-ym icon-ym-btn-upload" v-auth="'btn_upload'"
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-upload" v-auth="'btn_upload'"
|
||||||
@click="openImportModal(true, { url: 'bcm/CrmLead', menuId: searchInfo.menuId })"> {{t('common.importText','导入')}}</a-button>
|
@click="openImportModal(true, { url: 'bcm/Custinfo', menuId: searchInfo.menuId })"> {{t('common.importText','导入')}}</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-tooltip placement="top">
|
<a-tooltip placement="top">
|
||||||
@@ -232,7 +232,7 @@
|
|||||||
});
|
});
|
||||||
const defaultSearchInfo = {
|
const defaultSearchInfo = {
|
||||||
menuId: route.meta.modelId as string,
|
menuId: route.meta.modelId as string,
|
||||||
moduleId:'807145376418105157',
|
moduleId:'816972827587510981',
|
||||||
superQueryJson: '',
|
superQueryJson: '',
|
||||||
dataType:0,
|
dataType:0,
|
||||||
};
|
};
|
||||||
@@ -360,19 +360,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getColumnList() {
|
function getColumnList() {
|
||||||
// 开启列表过滤权限
|
// 没有开启列表权限
|
||||||
let columnList: any[] = [];
|
let columnList = state.columnList;
|
||||||
const permissionList = userStore.getPermissionList;
|
|
||||||
const list = permissionList.filter(o => o.modelId === searchInfo.menuId);
|
|
||||||
const perColumnList = list[0] && list[0].column ? list[0].column : [];
|
|
||||||
for (let i = 0; i < state.columnList.length; i++) {
|
|
||||||
inner: for (let j = 0; j < perColumnList.length; j++) {
|
|
||||||
if (state.columnList[i].prop === perColumnList[j].enCode) {
|
|
||||||
columnList.push(state.columnList[i]);
|
|
||||||
break inner;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
state.exportList = columnList;
|
state.exportList = columnList;
|
||||||
let columns = columnList.map((o) => ({
|
let columns = columnList.map((o) => ({
|
||||||
...o,
|
...o,
|
||||||
1105
src/views/mdm/lpc/Detail.vue
Normal file
1105
src/views/mdm/lpc/Detail.vue
Normal file
File diff suppressed because it is too large
Load Diff
1888
src/views/mdm/lpc/Form.vue
Normal file
1888
src/views/mdm/lpc/Form.vue
Normal file
File diff suppressed because it is too large
Load Diff
34
src/views/mdm/lpc/helper/api.ts
Normal file
34
src/views/mdm/lpc/helper/api.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import { defHttp } from '@/utils/http/axios';
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
export function getList(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Lpc/getList', data });
|
||||||
|
}
|
||||||
|
// 新建
|
||||||
|
export function create(data) {
|
||||||
|
return defHttp.post({ url:'/api/bcm/Lpc', data });
|
||||||
|
}
|
||||||
|
// 修改
|
||||||
|
export function update(data) {
|
||||||
|
return defHttp.put({ url: '/api/bcm/Lpc/'+ data.id, data });
|
||||||
|
}
|
||||||
|
// 详情(无转换数据)
|
||||||
|
export function getInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Lpc/' + id });
|
||||||
|
}
|
||||||
|
// 获取(转换数据)
|
||||||
|
export function getDetailInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Lpc/detail/' + id });
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export function del(id) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Lpc/' + id });
|
||||||
|
}
|
||||||
|
// 批量删除数据
|
||||||
|
export function batchDelete(data) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Lpc/batchRemove', data });
|
||||||
|
}
|
||||||
|
// 导出
|
||||||
|
export function exportData(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Lpc/Actions/Export', data });
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,60 @@
|
|||||||
const searchList = [
|
const searchList = [
|
||||||
|
{
|
||||||
|
"yunzhupaasKey":"organizeSelect",
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
|
"searchType":1,
|
||||||
|
"ableIds":[],
|
||||||
|
"multiple":false,
|
||||||
|
"fullName":"归属组织",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label":"归属组织",
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItem3e0d06",
|
||||||
|
"yunzhupaasKey":"organizeSelect",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"defaultValue":[],
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"归属组织",
|
||||||
|
"trigger":"change",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_company",
|
||||||
|
"renderKey":1776756606740,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-company",
|
||||||
|
"defaultCurrent":true,
|
||||||
|
"tag":"YunzhupaasOrganizeSelect",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":8
|
||||||
|
},
|
||||||
|
"prop":"org_id",
|
||||||
|
"__vModel__":"org_id",
|
||||||
|
"searchMultiple":true,
|
||||||
|
"isKeyword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"selectType":"all",
|
||||||
|
"disabled":false,
|
||||||
|
"id":"org_id",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"value":[],
|
||||||
|
"labelI18nCode":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"yunzhupaasKey":"input",
|
"yunzhupaasKey":"input",
|
||||||
"useScan":false,
|
"useScan":false,
|
||||||
@@ -8,7 +64,7 @@ const searchList = [
|
|||||||
],
|
],
|
||||||
"showCount":false,
|
"showCount":false,
|
||||||
"__config__":{
|
"__config__":{
|
||||||
"formId":"formItem35dee5",
|
"formId":"formItemac3814",
|
||||||
"yunzhupaasKey":"input",
|
"yunzhupaasKey":"input",
|
||||||
"visibility":[
|
"visibility":[
|
||||||
"pc",
|
"pc",
|
||||||
@@ -19,33 +75,26 @@ const searchList = [
|
|||||||
"tableFixed":"none",
|
"tableFixed":"none",
|
||||||
"dragDisabled":false,
|
"dragDisabled":false,
|
||||||
"className":[],
|
"className":[],
|
||||||
"label":"手机号",
|
"label":"企业名称",
|
||||||
"trigger":"blur",
|
"trigger":"blur",
|
||||||
"showLabel":true,
|
"showLabel":true,
|
||||||
"required":true,
|
"required":true,
|
||||||
"tableName":"crm_lead",
|
"tableName":"mdm_company",
|
||||||
"renderKey":1774574898493,
|
"renderKey":1776756270027,
|
||||||
"layout":"colFormItem",
|
"layout":"colFormItem",
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
"tag":"YunzhupaasInput",
|
||||||
"regList":[
|
"regList":[],
|
||||||
{
|
|
||||||
"pattern":"/^1[3456789]\\d{9}$/",
|
|
||||||
"message":"请输入正确的手机号码",
|
|
||||||
"messageI18nCode":"sys.validate.mobilePhone"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tableAlign":"left",
|
"tableAlign":"left",
|
||||||
"span":24
|
"span":8
|
||||||
},
|
},
|
||||||
"readonly":false,
|
"readonly":false,
|
||||||
"prop":"mobile",
|
"prop":"company_name",
|
||||||
"__vModel__":"mobile",
|
"__vModel__":"company_name",
|
||||||
"searchMultiple":false,
|
"searchMultiple":false,
|
||||||
"disabled":false,
|
"disabled":false,
|
||||||
"id":"mobile",
|
"id":"company_name",
|
||||||
"placeholder":"请输入手机号",
|
"placeholder":"请输入",
|
||||||
"addonBefore":"",
|
"addonBefore":"",
|
||||||
"on":{
|
"on":{
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
@@ -53,9 +102,10 @@ const searchList = [
|
|||||||
},
|
},
|
||||||
"clearable":true,
|
"clearable":true,
|
||||||
"searchType":2,
|
"searchType":2,
|
||||||
"maxlength":11,
|
"maxlength":null,
|
||||||
"fullName":"手机号",
|
"noShow":false,
|
||||||
"label":"手机号",
|
"fullName":"企业名称",
|
||||||
|
"label":"企业名称",
|
||||||
"addonAfter":"",
|
"addonAfter":"",
|
||||||
"maskConfig":{
|
"maskConfig":{
|
||||||
"prefixType":1,
|
"prefixType":1,
|
||||||
@@ -70,7 +120,7 @@ const searchList = [
|
|||||||
"ignoreChar":"",
|
"ignoreChar":"",
|
||||||
"suffixSpecifyChar":""
|
"suffixSpecifyChar":""
|
||||||
},
|
},
|
||||||
"isKeyword":true,
|
"isKeyword":false,
|
||||||
"useMask":false,
|
"useMask":false,
|
||||||
"showPassword":false,
|
"showPassword":false,
|
||||||
"style":{
|
"style":{
|
||||||
@@ -78,69 +128,6 @@ const searchList = [
|
|||||||
},
|
},
|
||||||
"prefixIcon":"",
|
"prefixIcon":"",
|
||||||
"labelI18nCode":""
|
"labelI18nCode":""
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"searchType":1,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"来源",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"来源",
|
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"enCode"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"crm_lead",
|
|
||||||
"renderKey":1774575125146,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItem0800c0",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dictionary",
|
|
||||||
"dictionaryType":"797256993944371205",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"来源",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"prop":"customer_source",
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"customer_source",
|
|
||||||
"searchMultiple":true,
|
|
||||||
"isKeyword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"customer_source",
|
|
||||||
"placeholder":"请选择来源",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default searchList
|
export default searchList
|
||||||
File diff suppressed because it is too large
Load Diff
675
src/views/mdm/lpc/index.vue
Normal file
675
src/views/mdm/lpc/index.vue
Normal file
@@ -0,0 +1,675 @@
|
|||||||
|
<template>
|
||||||
|
<div class="yunzhupaas-content-wrapper">
|
||||||
|
<div class="yunzhupaas-content-wrapper-center">
|
||||||
|
<div class="yunzhupaas-content-wrapper-search-box" v-if="getSearchList.length">
|
||||||
|
<BasicForm @register="registerSearchForm" :schemas="getSearchList"
|
||||||
|
@advanced-change="redoHeight" @submit="handleSearchSubmit" @reset="handleSearchReset"
|
||||||
|
class="search-form">
|
||||||
|
</BasicForm>
|
||||||
|
</div>
|
||||||
|
<div class="yunzhupaas-content-wrapper-content bg-white">
|
||||||
|
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
||||||
|
@columns-change="handleColumnChange">
|
||||||
|
<template #tableTitle>
|
||||||
|
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add" v-auth="'btn_add'"
|
||||||
|
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
||||||
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-download" v-auth="'btn_download'"
|
||||||
|
@click="openExportModal(true, { columnList: state.exportList, selectIds: getSelectRowKeys(), showExportSelected: true })"> {{t('common.exportText','导出')}}</a-button>
|
||||||
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-upload" v-auth="'btn_upload'"
|
||||||
|
@click="openImportModal(true, { url: 'bcm/Company', menuId: searchInfo.menuId })"> {{t('common.importText','导入')}}</a-button>
|
||||||
|
</template>
|
||||||
|
<template #toolbar>
|
||||||
|
<a-tooltip placement="top">
|
||||||
|
<template #title>
|
||||||
|
<span>{{ t('common.superQuery') }}</span>
|
||||||
|
</template>
|
||||||
|
<filter-outlined @click="openSuperQuery(true, { columnOptions: superQueryJson })" />
|
||||||
|
</a-tooltip>
|
||||||
|
</template>
|
||||||
|
<template #toolbarAfter>
|
||||||
|
<ViewList :menuId="route.meta.modelId" :viewList="viewList" @itemClick="handleViewClick" @reload="initViewList" />
|
||||||
|
<ViewSetting :menuId="route.meta.modelId" :viewList="viewList" :currentView="currentView" @reload="initViewList" />
|
||||||
|
</template>
|
||||||
|
<template #bodyCell="{ column, record, index }">
|
||||||
|
<template v-for="(item, index) in childColumnList" v-if="childColumnList.length">
|
||||||
|
<template
|
||||||
|
v-if="column?.id?.includes('-') && item.children && item.children[0] && column.key === item.children[0]?.dataIndex">
|
||||||
|
<ChildTableColumn :data="record[item.prop]" :head="item.children"
|
||||||
|
@toggleExpand="toggleExpand(record, item.prop+`Expand`)" @toDetail="toDetail"
|
||||||
|
:expand="record[item.prop+`Expand`]" :key="index" :showOverflow="true "/>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-if="!(record.top || column.id?.includes('-'))">
|
||||||
|
<template v-if="column.yunzhupaasKey === 'relationForm'">
|
||||||
|
<p class="link-text"
|
||||||
|
@click="toDetail(column.modelId, record[column.dataIndex+`_id`], column.propsValue)">
|
||||||
|
{{ record[column.dataIndex] }}</p>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'inputNumber'">
|
||||||
|
<yunzhupaas-input-number v-model:value="record[column.prop]" :precision="column.precision" :thousands="column.thousands" disabled detailed />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'calculate'">
|
||||||
|
<yunzhupaas-calculate
|
||||||
|
v-model:value="record[column.prop]"
|
||||||
|
:isStorage="column.isStorage"
|
||||||
|
:precision="column.precision"
|
||||||
|
:thousands="column.thousands"
|
||||||
|
detailed />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'sign'">
|
||||||
|
<yunzhupaas-sign v-model:value="record[column.prop]" detailed />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'signature'">
|
||||||
|
<yunzhupaas-signature v-model:value="record[column.prop]" detailed />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'rate'">
|
||||||
|
<yunzhupaas-rate v-model:value="record[column.prop]" :count="column.count" :allowHalf="column.allowHalf" disabled />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'slider'">
|
||||||
|
<yunzhupaas-slider v-model:value="record[column.prop]" :min="column.min" :max="column.max" :step="column.step" disabled />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'uploadImg'">
|
||||||
|
<yunzhupaas-upload-img v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'uploadFile'">
|
||||||
|
<yunzhupaas-upload-file v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
||||||
|
</template>
|
||||||
|
<template v-if="column.yunzhupaasKey === 'input'">
|
||||||
|
<yunzhupaas-input
|
||||||
|
v-model:value="record[column.prop]"
|
||||||
|
:useMask="column.useMask"
|
||||||
|
:maskConfig="column.maskConfig"
|
||||||
|
:showOverflow="true"
|
||||||
|
detailed />
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.key === 'action' && !record.top">
|
||||||
|
<TableAction :actions="getTableActions(record)" />
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Form ref="formRef" @reload="reload" />
|
||||||
|
<Detail ref="detailRef" />
|
||||||
|
<ExportModal @register="registerExportModal" @download="handleDownload" />
|
||||||
|
<ImportModal @register="registerImportModal" @reload="reload" />
|
||||||
|
<PrintSelect @register="registerPrintSelect" @change="handleShowBrowse" />
|
||||||
|
<PrintBrowse @register="registerPrintBrowse" />
|
||||||
|
<RelationDetail ref="relationDetailRef" />
|
||||||
|
<SuperQueryModal @register="registerSuperQueryModal" @superQuery="handleSuperQuery" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
|
||||||
|
import { getList, del, exportData, batchDelete } from './helper/api';
|
||||||
|
import { getConfigData,getViewList } from '@/api/onlineDev/visualDev';
|
||||||
|
import { getDictionaryDataSelector } from '@/api/systemData/dictionary';
|
||||||
|
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
||||||
|
import { getOrgByOrganizeCondition,getDepartmentSelectAsyncList } from '@/api/permission/organize';
|
||||||
|
import { ref, reactive, onMounted, toRefs, computed, unref, nextTick, toRaw, provide } from 'vue';
|
||||||
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n';
|
||||||
|
import { useOrganizeStore } from '@/store/modules/organize';
|
||||||
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
import { BasicModal, useModal } from '@/components/Modal';
|
||||||
|
import { usePopup } from '@/components/Popup';
|
||||||
|
import { ScrollContainer } from '@/components/Container';
|
||||||
|
import { BasicLeftTree, TreeActionType } from '@/components/Tree';
|
||||||
|
import { BasicForm, useForm } from '@/components/Form';
|
||||||
|
import { BasicTable, useTable, TableAction, ActionItem, TableActionType, SorterResult } from '@/components/Table';
|
||||||
|
import { SuperQueryModal } from '@/components/CommonModal';
|
||||||
|
import Form from './Form.vue';
|
||||||
|
import Detail from './Detail.vue';
|
||||||
|
// 有关联表单详情:开始
|
||||||
|
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
||||||
|
// 有关联表单详情:结束
|
||||||
|
import ChildTableColumn from '@/views/common/dynamicModel/list/ChildTableColumn.vue';
|
||||||
|
import { ExportModal } from '@/components/CommonModal';
|
||||||
|
import { downloadByUrl } from '@/utils/file/download';
|
||||||
|
import { ImportModal} from '@/components/CommonModal';
|
||||||
|
// 打印模板多条生成PrintSelect
|
||||||
|
import PrintSelect from '@/components/PrintDesign/printSelect/index.vue';
|
||||||
|
import PrintBrowse from '@/components/PrintDesign/printBrowse/index.vue';
|
||||||
|
import { useRoute,useRouter } from 'vue-router';
|
||||||
|
import { FilterOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { getSearchFormSchemas } from '@/components/FormGenerator/src/helper/transform';
|
||||||
|
import { cloneDeep } from 'lodash-es';
|
||||||
|
import columnList from './helper/columnList';
|
||||||
|
import searchList from './helper/searchList';
|
||||||
|
import superQueryJson from './helper/superQueryJson';
|
||||||
|
import { dyOptionsList, systemComponentsList } from '@/components/FormGenerator/src/helper/config';
|
||||||
|
import { thousandsFormat, getParamList} from '@/utils/yunzhupaas';
|
||||||
|
import { usePermission } from '@/hooks/web/usePermission';
|
||||||
|
|
||||||
|
import ViewSetting from '@/views/common/dynamicModel/list/components/ViewSetting.vue';
|
||||||
|
import ViewList from '@/views/common/dynamicModel/list/components/ViewList.vue';
|
||||||
|
|
||||||
|
interface State {
|
||||||
|
config: any;
|
||||||
|
columnList: any[];
|
||||||
|
printListOptions: any[];
|
||||||
|
columnBtnsList: any[];
|
||||||
|
customBtnsList: any[];
|
||||||
|
treeFieldNames: any;
|
||||||
|
leftTreeData: any[];
|
||||||
|
leftTreeLoading: boolean;
|
||||||
|
treeActiveId: string;
|
||||||
|
treeActiveNodePath: any;
|
||||||
|
columns: any[];
|
||||||
|
complexColumns: any[];
|
||||||
|
childColumnList: any[];
|
||||||
|
exportList: any[];
|
||||||
|
cacheList: any[];
|
||||||
|
currFlow: any;
|
||||||
|
isCustomCopy: boolean;
|
||||||
|
candidateType: number;
|
||||||
|
currRow: any;
|
||||||
|
workFlowFormData: any;
|
||||||
|
expandObj: any;
|
||||||
|
columnSettingList: any[];
|
||||||
|
searchSchemas: any[];
|
||||||
|
treeRelationObj: any;
|
||||||
|
treeQueryJson: any;
|
||||||
|
leftTreeActiveInfo: any;
|
||||||
|
keyword: string;
|
||||||
|
viewList: any[];
|
||||||
|
currentView: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const { hasBtnP } = usePermission();
|
||||||
|
const { createMessage, createConfirm } = useMessage();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const organizeStore = useOrganizeStore();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const userInfo = userStore.getUserInfo;
|
||||||
|
|
||||||
|
const [registerExportModal, { openModal: openExportModal, closeModal: closeExportModal, setModalProps: setExportModalProps }] = useModal();
|
||||||
|
const [registerImportModal, { openModal: openImportModal }] = useModal();
|
||||||
|
const [registerSuperQueryModal, { openModal: openSuperQuery }] = useModal();
|
||||||
|
const formRef = ref<any>(null);
|
||||||
|
const tableRef = ref<Nullable<TableActionType>>(null);
|
||||||
|
const detailRef = ref<any>(null);
|
||||||
|
const relationDetailRef = ref<any>(null);
|
||||||
|
|
||||||
|
const state = reactive<State>({
|
||||||
|
config: {},
|
||||||
|
columnList: [],
|
||||||
|
printListOptions: [],
|
||||||
|
columnBtnsList: [],
|
||||||
|
customBtnsList: [],
|
||||||
|
treeFieldNames: {
|
||||||
|
children: 'children' ,
|
||||||
|
title: 'fullName' ,
|
||||||
|
key: 'id' ,
|
||||||
|
isLeaf: 'isLeaf',
|
||||||
|
},
|
||||||
|
leftTreeData: [],
|
||||||
|
leftTreeLoading: false,
|
||||||
|
treeActiveId: '',
|
||||||
|
treeActiveNodePath: [],
|
||||||
|
columns: [],
|
||||||
|
complexColumns: [], // 复杂表头
|
||||||
|
childColumnList: [],
|
||||||
|
exportList: [],
|
||||||
|
cacheList: [],
|
||||||
|
currFlow: {},
|
||||||
|
isCustomCopy: false,
|
||||||
|
candidateType: 1,
|
||||||
|
currRow: {},
|
||||||
|
workFlowFormData: {},
|
||||||
|
expandObj: {},
|
||||||
|
columnSettingList: [],
|
||||||
|
searchSchemas: [],
|
||||||
|
treeRelationObj: null,
|
||||||
|
treeQueryJson: {},
|
||||||
|
leftTreeActiveInfo: {},
|
||||||
|
keyword: '',
|
||||||
|
viewList: [],
|
||||||
|
currentView: {},
|
||||||
|
});
|
||||||
|
const defaultSearchInfo = {
|
||||||
|
menuId: route.meta.modelId as string,
|
||||||
|
moduleId:'816296614598542021',
|
||||||
|
superQueryJson: '',
|
||||||
|
dataType:0,
|
||||||
|
};
|
||||||
|
const searchInfo = reactive({
|
||||||
|
...cloneDeep(defaultSearchInfo),
|
||||||
|
});
|
||||||
|
const { childColumnList, searchSchemas, viewList, currentView} = toRefs(state);
|
||||||
|
const [registerSearchForm, { updateSchema, resetFields, submit: searchFormSubmit, setFieldsValue}] = useForm({
|
||||||
|
baseColProps: { span: 6 },
|
||||||
|
showActionButtonGroup: true,
|
||||||
|
showAdvancedButton: true,
|
||||||
|
compact: true,
|
||||||
|
});
|
||||||
|
const [registerTable, { reload, setLoading, getFetchParams, getSelectRows, getSelectRowKeys, redoHeight,clearSelectedRowKeys }] = useTable({
|
||||||
|
api: getList,
|
||||||
|
immediate: false,
|
||||||
|
clickToRowSelect: false,
|
||||||
|
tableSetting: { setting: false },
|
||||||
|
afterFetch: (data) => {
|
||||||
|
const list = data.map((o) => ({
|
||||||
|
...o,
|
||||||
|
...state.expandObj,
|
||||||
|
}));
|
||||||
|
state.cacheList = cloneDeep(list);
|
||||||
|
return list;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const [registerChildTable] = useTable({
|
||||||
|
pagination: false,
|
||||||
|
canResize: false,
|
||||||
|
showTableSetting: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
provide('getLeftTreeActiveInfo', () => state.leftTreeActiveInfo);
|
||||||
|
|
||||||
|
const getHasBatchBtn = computed(() => {
|
||||||
|
let btnsList =[]
|
||||||
|
btnsList.push('download')
|
||||||
|
btnsList=btnsList.filter(o => hasBtnP('btn_' + o))
|
||||||
|
return !!btnsList.length
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
const getColumns = computed(() => {
|
||||||
|
const columns = state.complexColumns;
|
||||||
|
return setListValue(state.currentView?.columnList, columns, 'prop');
|
||||||
|
});
|
||||||
|
const getSearchList = computed(() => {
|
||||||
|
const searchSchemas = cloneDeep(state.searchSchemas).map(o => ({ ...o, show: true }));
|
||||||
|
return setListValue(state.currentView?.searchList, searchSchemas, 'field');
|
||||||
|
});
|
||||||
|
const getTableBindValue = computed(() => {
|
||||||
|
let columns = unref(getColumns);
|
||||||
|
const defaultSortConfig=[{"field":"company_code","sort":"asc","id":"sort38931d"}];
|
||||||
|
const sortField = defaultSortConfig.map(o => (o.sort === 'desc' ? '-' : '') + o.field);
|
||||||
|
const data: any = {
|
||||||
|
pagination: { pageSize: 20 }, //有分页
|
||||||
|
searchInfo: unref(searchInfo),
|
||||||
|
defSort: { sidx: sortField.join(',') },
|
||||||
|
sortFn: (sortInfo: SorterResult | SorterResult[]) => {
|
||||||
|
if (Array.isArray(sortInfo)) {
|
||||||
|
const sortList = sortInfo.map(o => (o.order === 'descend' ? '-' : '') + o.field);
|
||||||
|
return { sidx: sortList.join(',') };
|
||||||
|
} else {
|
||||||
|
const { field, order } = sortInfo;
|
||||||
|
if (field && order) {
|
||||||
|
// 排序字段
|
||||||
|
return { sidx: (order === 'descend' ? '-' : '') + field };
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ellipsis:true ,
|
||||||
|
columns,
|
||||||
|
bordered: true,
|
||||||
|
actionColumn: {
|
||||||
|
width: 150,
|
||||||
|
title: t('component.table.action'),
|
||||||
|
dataIndex: 'action',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
if (unref(getHasBatchBtn)) {
|
||||||
|
const rowSelection: any = { type: 'checkbox' };
|
||||||
|
data.rowSelection = rowSelection;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
});
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
state.config = {};
|
||||||
|
searchInfo.menuId = route.meta.modelId as string;
|
||||||
|
state.columnList = columnList;
|
||||||
|
setLoading(true);
|
||||||
|
getSearchSchemas();
|
||||||
|
getColumnList();
|
||||||
|
initViewList();
|
||||||
|
nextTick(() => {
|
||||||
|
unref(getSearchList)?.length ? searchFormSubmit() : reload({ page: 1 });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function getSearchSchemas() {
|
||||||
|
|
||||||
|
const schemas = getSearchFormSchemas(searchList);
|
||||||
|
state.searchSchemas = schemas;
|
||||||
|
schemas.forEach((cur) => {
|
||||||
|
const config = cur.__config__;
|
||||||
|
if (dyOptionsList.includes(config.yunzhupaasKey)) {
|
||||||
|
if (config.dataType === 'dictionary') {
|
||||||
|
if (!config.dictionaryType) return;
|
||||||
|
getDictionaryDataSelector(config.dictionaryType).then((res) => {
|
||||||
|
updateSchema([{ field: cur.field, componentProps: { options: res.data.list } }]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (config.dataType === 'dynamic') {
|
||||||
|
if (!config.propsUrl) return;
|
||||||
|
const query = { paramList: getParamList(config.templateJson) };
|
||||||
|
getDataInterfaceRes(config.propsUrl, query).then((res) => {
|
||||||
|
const data = Array.isArray(res.data) ? res.data : [];
|
||||||
|
updateSchema([{ field: cur.field, componentProps: { options: data } }]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cur.defaultValue = cur.value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function getColumnList() {
|
||||||
|
// 没有开启列表权限
|
||||||
|
let columnList = state.columnList;
|
||||||
|
state.exportList = columnList;
|
||||||
|
let columns = columnList.map((o) => ({
|
||||||
|
...o,
|
||||||
|
title: o.labelI18nCode ? t(o.labelI18nCode, o.label) : o.label,
|
||||||
|
dataIndex: o.prop,
|
||||||
|
align: o.align,
|
||||||
|
fixed: o.fixed == 'none' ? false : o.fixed,
|
||||||
|
sorter: o.sortable ? { multiple: 1 } : o.sortable,
|
||||||
|
width: o.width || 100,
|
||||||
|
}));
|
||||||
|
//添加复杂表头
|
||||||
|
columns = getComplexColumns(columns);
|
||||||
|
state.columns = columns.filter((o) => o.prop.indexOf('-') < 0);
|
||||||
|
//子表表头
|
||||||
|
getChildComplexColumns(columns);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//复杂表头
|
||||||
|
function getComplexColumns(columns) {
|
||||||
|
//这里生成复杂表头的配置
|
||||||
|
let complexHeaderList: any[] = [];
|
||||||
|
if (!complexHeaderList.length) return columns;
|
||||||
|
let childColumns: any[] = [];
|
||||||
|
let firstChildColumns: string[] = [];
|
||||||
|
for (let i = 0; i < complexHeaderList.length; i++) {
|
||||||
|
const e = complexHeaderList[i];
|
||||||
|
e.label = e.fullName;
|
||||||
|
e.labelI18nCode = e.fullNameI18nCode;
|
||||||
|
e.title = e.fullNameI18nCode ? t(e.fullNameI18nCode, e.fullName) : e.fullName;
|
||||||
|
e.align = e.align;
|
||||||
|
e.dataIndex = e.id;
|
||||||
|
e.prop = e.id;
|
||||||
|
e.children = [];
|
||||||
|
e.yunzhupaasKey = 'complexHeader';
|
||||||
|
if (e.childColumns?.length) {
|
||||||
|
childColumns.push(...e.childColumns);
|
||||||
|
for (let k = 0; k < e.childColumns.length; k++) {
|
||||||
|
const item = e.childColumns[k];
|
||||||
|
for (let j = 0; j < columns.length; j++) {
|
||||||
|
const o = columns[j];
|
||||||
|
if (o.prop == item && o.fixed !== 'left' && o.fixed !== 'right') e.children.push({ ...o });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.children.length) firstChildColumns.push(e.children[0].prop);
|
||||||
|
}
|
||||||
|
complexHeaderList = complexHeaderList.filter(o => o.children.length);
|
||||||
|
let list: any[] = [];
|
||||||
|
for (let i = 0; i < columns.length; i++) {
|
||||||
|
const e = columns[i];
|
||||||
|
if (!childColumns.includes(e.prop)) {
|
||||||
|
list.push(e);
|
||||||
|
} else {
|
||||||
|
if (firstChildColumns.includes(e.prop)) {
|
||||||
|
const item = complexHeaderList.find(o => o.childColumns.includes(e.prop));
|
||||||
|
list.push(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
//子表表头
|
||||||
|
function getChildComplexColumns(columnList) {
|
||||||
|
let list: any[] = [];
|
||||||
|
for (let i = 0; i < columnList.length; i++) {
|
||||||
|
const e = columnList[i];
|
||||||
|
if (!e.prop.includes('-')) {
|
||||||
|
list.push(e);
|
||||||
|
} else {
|
||||||
|
let prop = e.prop.split('-')[0];
|
||||||
|
let vModel = e.prop.split('-')[1];
|
||||||
|
let label = e.label.split('-')[0];
|
||||||
|
let childLabel = e.label.replace(label + '-', '');
|
||||||
|
if (e.fullNameI18nCode && Array.isArray(e.fullNameI18nCode) && e.fullNameI18nCode[0]) label = t(e.fullNameI18nCode[0], label);
|
||||||
|
let newItem = {
|
||||||
|
align: 'center',
|
||||||
|
yunzhupaasKey: 'table',
|
||||||
|
prop,
|
||||||
|
label,
|
||||||
|
title: label,
|
||||||
|
dataIndex: prop,
|
||||||
|
children: [],
|
||||||
|
};
|
||||||
|
e.dataIndex = vModel;
|
||||||
|
e.title = e.labelI18nCode ? t(e.labelI18nCode, childLabel) : childLabel;
|
||||||
|
if (!state.expandObj.hasOwnProperty(prop+`Expand`)) state.expandObj[prop+`Expand`] = false;
|
||||||
|
if (!list.some((o) => o.prop === prop)) list.push(newItem);
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
if (list[i].prop === prop) {
|
||||||
|
list[i].children.push(e);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 行内分组展示
|
||||||
|
getMergeList(list);
|
||||||
|
|
||||||
|
state.complexColumns = list;
|
||||||
|
state.childColumnList = list.filter((o) => o.yunzhupaasKey === 'table');
|
||||||
|
|
||||||
|
// 子表分组展示宽度取100
|
||||||
|
for (let i = 0; i < state.childColumnList.length; i++) {
|
||||||
|
const e = state.childColumnList[i];
|
||||||
|
if (e.children?.length) e.children = e.children.map(o => ({ ...o, width: 100 }));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getMergeList(list) {
|
||||||
|
list.forEach((item) => {
|
||||||
|
if (item.yunzhupaasKey === 'table' && item.children && item.children.length) {
|
||||||
|
item.children.forEach((child, index) => {
|
||||||
|
if (index == 0) {
|
||||||
|
child.customCell = () => ({
|
||||||
|
rowspan: 1,
|
||||||
|
colspan: item.children.length,
|
||||||
|
class: 'child-table-box',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
child.customCell = () => ({
|
||||||
|
rowspan: 0,
|
||||||
|
colspan: 0,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function toggleExpand(row, field) {
|
||||||
|
row[field] = !row[field];
|
||||||
|
}
|
||||||
|
// 关联表单查看详情
|
||||||
|
function toDetail(modelId, id, propsValue) {
|
||||||
|
if (!id) return;
|
||||||
|
getConfigData(modelId).then((res) => {
|
||||||
|
if (!res.data || !res.data.formData) return;
|
||||||
|
const formConf = JSON.parse(res.data.formData);
|
||||||
|
formConf.popupType = 'general';
|
||||||
|
formConf.hasPrintBtn = false;
|
||||||
|
formConf.customBtns = [];
|
||||||
|
const data = { id, formConf, modelId, propsValue};
|
||||||
|
relationDetailRef.value?.init(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function handleColumnChange(data) {
|
||||||
|
state.columnSettingList = data;
|
||||||
|
}
|
||||||
|
function getTableActions(record): ActionItem[] {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: t('common.editText','编辑') ,
|
||||||
|
onClick: updateHandle.bind(null, record),
|
||||||
|
auth: 'btn_edit', //有按钮权限
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('common.delText','删除') ,
|
||||||
|
color: 'error',
|
||||||
|
modelConfirm: {
|
||||||
|
onOk: handleDelete.bind(null, record.id),
|
||||||
|
},
|
||||||
|
auth: 'btn_remove', //有按钮权限
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('common.detailText','详情') ,
|
||||||
|
onClick: goDetail.bind(null, record),
|
||||||
|
auth: 'btn_detail', //有按钮权限
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
// 编辑
|
||||||
|
function updateHandle(record) {
|
||||||
|
// 不带工作流
|
||||||
|
const data = {
|
||||||
|
id: record.id,
|
||||||
|
menuId: searchInfo.menuId,
|
||||||
|
allList: state.cacheList,
|
||||||
|
};
|
||||||
|
formRef.value?.init(data);
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
function handleDelete(id) {
|
||||||
|
const query={ids:[id] }
|
||||||
|
batchDelete(query).then((res) => {
|
||||||
|
createMessage.success(res.msg);
|
||||||
|
clearSelectedRowKeys();
|
||||||
|
reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 查看详情
|
||||||
|
function goDetail(record) {
|
||||||
|
// 不带流程
|
||||||
|
const data = {
|
||||||
|
id: record.id,
|
||||||
|
};
|
||||||
|
detailRef.value?.init(data);
|
||||||
|
}
|
||||||
|
// 新增
|
||||||
|
function addHandle() {
|
||||||
|
// 不带流程新增
|
||||||
|
const data = {
|
||||||
|
id: '',
|
||||||
|
menuId: searchInfo.menuId,
|
||||||
|
allList: state.cacheList,
|
||||||
|
};
|
||||||
|
formRef.value?.init(data);
|
||||||
|
}
|
||||||
|
// 导出
|
||||||
|
function handleDownload(data) {
|
||||||
|
let query = { ...getFetchParams(), ...data };
|
||||||
|
exportData(query)
|
||||||
|
.then((res) => {
|
||||||
|
setExportModalProps({ confirmLoading: false });
|
||||||
|
if (!res.data.url) return;
|
||||||
|
downloadByUrl({ url: res.data.url });
|
||||||
|
closeExportModal();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
setExportModalProps({ confirmLoading: false });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 高级查询
|
||||||
|
function handleSuperQuery(superQueryJson) {
|
||||||
|
searchInfo.superQueryJson = superQueryJson;
|
||||||
|
reload({ page: 1 });
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSearchReset() {
|
||||||
|
clearSelectedRowKeys();
|
||||||
|
if (!state.resetFromTree) updateSearchFormValue();
|
||||||
|
if (state.resetFromTree) state.resetFromTree = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSearchSubmit(data) {
|
||||||
|
clearSelectedRowKeys();
|
||||||
|
let obj = {
|
||||||
|
...defaultSearchInfo,
|
||||||
|
superQueryJson: searchInfo.superQueryJson,
|
||||||
|
...data,
|
||||||
|
};
|
||||||
|
Object.keys(searchInfo).map(key => {
|
||||||
|
delete searchInfo[key];
|
||||||
|
});
|
||||||
|
for (let [key, value] of Object.entries(obj)) {
|
||||||
|
searchInfo[key.replaceAll('-', '_')] = value;
|
||||||
|
}
|
||||||
|
console.log(searchInfo);
|
||||||
|
reload({ page: 1 });
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateSearchFormValue() {
|
||||||
|
if (!state.treeActiveId) return searchFormSubmit();
|
||||||
|
let queryJson: any = {};
|
||||||
|
let leftTreeActiveInfo: any = {};
|
||||||
|
const isMultiple = !state.treeRelationObj ? false : state.treeRelationObj.searchMultiple;
|
||||||
|
//多级左侧树,需要拼父级->转为查询参数
|
||||||
|
if (state.treeRelationObj && state.treeRelationObj.yunzhupaasKey && ['organizeSelect', 'cascader', 'areaSelect'].includes(state.treeRelationObj.yunzhupaasKey)) {
|
||||||
|
let currValue = [];
|
||||||
|
currValue = state.treeActiveNodePath.map(o => o[state.treeFieldNames.key]);
|
||||||
|
queryJson = { 'org_id': isMultiple ? [currValue] : currValue };
|
||||||
|
leftTreeActiveInfo = { 'org_id': state.treeRelationObj.multiple ? [currValue] : currValue };
|
||||||
|
} else {
|
||||||
|
queryJson = { 'org_id': isMultiple ? [state.treeActiveId] : state.treeActiveId };
|
||||||
|
leftTreeActiveInfo = { 'org_id': state.treeRelationObj.multiple ? [state.treeActiveId] : state.treeActiveId };
|
||||||
|
}
|
||||||
|
state.leftTreeActiveInfo = leftTreeActiveInfo;
|
||||||
|
if(unref(getSearchList)?.length){
|
||||||
|
// 有搜索列表
|
||||||
|
setFieldsValue(queryJson);
|
||||||
|
searchFormSubmit();
|
||||||
|
}else{
|
||||||
|
// 无搜索列表
|
||||||
|
handleSearchSubmit(queryJson);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function initViewList(currentId = '') {
|
||||||
|
const query = {
|
||||||
|
menuId: route.meta.modelId,
|
||||||
|
};
|
||||||
|
getViewList(query).then(res => {
|
||||||
|
const columns : any[]= state.complexColumns;
|
||||||
|
const searchList: any[] = state.searchSchemas.map(o => ({ label: o.label, id: o.field, show: o.show, labelI18nCode: o.labelI18nCode }));
|
||||||
|
const columnList: any[] = columns.map(o => ({ label: o.label, id: o.prop, show: true, fixed: o.fixed || 'none', labelI18nCode: o.labelI18nCode }));
|
||||||
|
state.viewList = (res.data || []).map(o => {
|
||||||
|
if (o.type == 0) return { ...o, searchList, columnList };
|
||||||
|
return { ...o, searchList: o.searchList ? JSON.parse(o.searchList) : [], columnList: o.columnList ? JSON.parse(o.columnList) : [] };
|
||||||
|
});
|
||||||
|
if (currentId) {
|
||||||
|
state.currentView = state.viewList.filter(o => o.id === currentId)[0] || state.viewList[0];
|
||||||
|
} else {
|
||||||
|
state.currentView = state.viewList.filter(o => o.status === 1)[0] || state.viewList[0];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function handleViewClick(item) {
|
||||||
|
state.currentView = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setListValue(data: any[] = [], defaultData: any[] = [], key) {
|
||||||
|
let list: any[] = [];
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
for (let j = 0; j < defaultData.length; j++) {
|
||||||
|
if (data[i].show && data[i].id == defaultData[j][key]) list.push(defaultData[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
255
src/views/mdm/material/Detail.vue
Normal file
255
src/views/mdm/material/Detail.vue
Normal file
@@ -0,0 +1,255 @@
|
|||||||
|
<template>
|
||||||
|
<BasicDrawer v-bind="$attrs" @register="registerDrawer" :title="title" width="800px" showFooter
|
||||||
|
:showOkBtn="false">
|
||||||
|
<template #insertFooter>
|
||||||
|
</template>
|
||||||
|
<a-row class="p-10px dynamic-form ">
|
||||||
|
<!-- 表单 -->
|
||||||
|
<a-form :colon="false" size="middle" layout= "horizontal"
|
||||||
|
labelAlign= "right"
|
||||||
|
:labelCol="{ style: { width: '100px' } }" :model="dataForm" ref="formRef" >
|
||||||
|
<a-row :gutter="15">
|
||||||
|
<!-- 具体表单 -->
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="material_code" >
|
||||||
|
<template #label>物料编码
|
||||||
|
</template> <p>{{dataForm.material_code}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="material_name" >
|
||||||
|
<template #label>物料名称
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.material_name"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.material_name" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="material_category" >
|
||||||
|
<template #label>物料分类
|
||||||
|
</template> <p>{{dataForm.material_category}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="material_model" >
|
||||||
|
<template #label>规格型号
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.material_model"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.material_model" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="unit_name" >
|
||||||
|
<template #label>单位名称
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.unit_name"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.unit_name" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="brand" >
|
||||||
|
<template #label>品牌
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.brand"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.brand" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="tax_rate" >
|
||||||
|
<template #label>税率
|
||||||
|
</template> <p>{{dataForm.tax_rate}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="tax_code" >
|
||||||
|
<template #label>税收分类
|
||||||
|
</template> <p>{{dataForm.tax_code}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="texture" >
|
||||||
|
<template #label>材质/纹理
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.texture"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.texture" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="quality_standard" >
|
||||||
|
<template #label>质量标准
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.quality_standard"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.quality_standard" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="technical_standard" >
|
||||||
|
<template #label>技术标准
|
||||||
|
</template> <p>{{dataForm.technical_standard}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="acceptance_criteria" >
|
||||||
|
<template #label>验收标准
|
||||||
|
</template> <p>{{dataForm.acceptance_criteria}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="delivery_requirements" >
|
||||||
|
<template #label>交付要求
|
||||||
|
</template> <p>{{dataForm.delivery_requirements}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="storage_conditions" >
|
||||||
|
<template #label>储存条件
|
||||||
|
</template> <p>{{dataForm.storage_conditions}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<!-- 表单结束 -->
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-row>
|
||||||
|
</BasicDrawer>
|
||||||
|
<!-- 有关联表单详情:开始 -->
|
||||||
|
<RelationDetail ref="relationDetailRef" />
|
||||||
|
<!-- 有关联表单详情:结束 -->
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { getDetailInfo } from './helper/api';
|
||||||
|
import { getConfigData } from '@/api/onlineDev/visualDev';
|
||||||
|
import { reactive, toRefs, nextTick, ref, computed, unref ,toRaw} from 'vue';
|
||||||
|
import { BasicModal, useModal } from '@/components/Modal';
|
||||||
|
import { BasicDrawer, useDrawer } from '@/components/Drawer';
|
||||||
|
// 有关联表单详情
|
||||||
|
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
||||||
|
// 表单权限
|
||||||
|
import { usePermission } from '@/hooks/web/usePermission';
|
||||||
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
|
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { buildUUID } from '@/utils/uuid';
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n';
|
||||||
|
import { getDataChange } from '@/api/onlineDev/visualDev';
|
||||||
|
import { getDataInterfaceDataInfoByIds } from '@/api/systemData/dataInterface';
|
||||||
|
import ExtraRelationInfo from '@/components/yunzhupaas/RelationForm/src/ExtraRelationInfo.vue';
|
||||||
|
|
||||||
|
interface State {
|
||||||
|
dataForm: any;
|
||||||
|
title: string;
|
||||||
|
maskConfig: any;
|
||||||
|
interfaceRes: any;
|
||||||
|
locationScope: any;
|
||||||
|
extraOptions: any;
|
||||||
|
extraData: any;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
defineOptions({ name: 'Detail' });
|
||||||
|
const { createMessage, createConfirm } = useMessage();
|
||||||
|
const [registerDrawer, { openDrawer, setDrawerProps, closeDrawer }] = useDrawer();
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const relationDetailRef = ref<any>(null);
|
||||||
|
const state = reactive<State>({
|
||||||
|
dataForm:{},
|
||||||
|
title: t('common.detailText','详情'),
|
||||||
|
maskConfig:{
|
||||||
|
material_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
material_model: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
unit_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
brand: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
texture: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
quality_standard: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
}
|
||||||
|
,
|
||||||
|
interfaceRes: {"material_model":[],"texture":[],"quality_standard":[],"tax_rate":[],"material_category":[],"unit_name":[],"technical_standard":[],"tax_code":[],"storage_conditions":[],"material_name":[],"brand":[],"acceptance_criteria":[],"delivery_requirements":[],"material_code":[]},
|
||||||
|
locationScope:{
|
||||||
|
}
|
||||||
|
,
|
||||||
|
extraOptions: {
|
||||||
|
}
|
||||||
|
,
|
||||||
|
extraData: {
|
||||||
|
}
|
||||||
|
,
|
||||||
|
});
|
||||||
|
const { title, dataForm, maskConfig } = toRefs(state);
|
||||||
|
// 表单权限
|
||||||
|
const { hasFormP } = usePermission();
|
||||||
|
|
||||||
|
defineExpose({ init });
|
||||||
|
|
||||||
|
function init(data) {
|
||||||
|
state.dataForm.id = data.id;
|
||||||
|
openDrawer();
|
||||||
|
nextTick(() => {
|
||||||
|
setTimeout(initData, 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function initData() {
|
||||||
|
changeLoading(true);
|
||||||
|
if (state.dataForm.id) {
|
||||||
|
getData(state.dataForm.id);
|
||||||
|
} else {
|
||||||
|
closeDrawer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getData(id) {
|
||||||
|
getDetailInfo(id).then((res) => {
|
||||||
|
state.dataForm = res.data || {};
|
||||||
|
nextTick(() => {
|
||||||
|
changeLoading(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function toDetail(modelId, id, propsValue) {
|
||||||
|
if (!id) return;
|
||||||
|
getConfigData(modelId).then((res) => {
|
||||||
|
if (!res.data || !res.data.formData) return;
|
||||||
|
const formConf = JSON.parse(res.data.formData);
|
||||||
|
formConf.popupType = 'general';
|
||||||
|
formConf.hasPrintBtn = false;
|
||||||
|
formConf.customBtns = [];
|
||||||
|
const data = { id, formConf, modelId, propsValue};
|
||||||
|
relationDetailRef.value?.init(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function setFormProps(data) {
|
||||||
|
setDrawerProps(data);
|
||||||
|
}
|
||||||
|
function changeLoading(loading) {
|
||||||
|
setFormProps({ loading });
|
||||||
|
}
|
||||||
|
|
||||||
|
function getParamList(key) {
|
||||||
|
let templateJson: any[] = state.interfaceRes[key];
|
||||||
|
if (!templateJson || !templateJson.length || !state.dataForm) return templateJson;
|
||||||
|
for (let i = 0; i < templateJson.length; i++) {
|
||||||
|
if (templateJson[i].relationField && templateJson[i].sourceType == 1) {
|
||||||
|
templateJson[i].defaultValue = state.dataForm[templateJson[i].relationField + '_id'] || '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return templateJson;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -32,75 +32,131 @@
|
|||||||
:labelCol="{ style: { width: '100px' } }" :model="dataForm" :rules="dataRule" ref="formRef" >
|
:labelCol="{ style: { width: '100px' } }" :model="dataForm" :rules="dataRule" ref="formRef" >
|
||||||
<a-row :gutter="15">
|
<a-row :gutter="15">
|
||||||
<!-- 具体表单 -->
|
<!-- 具体表单 -->
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('lead_name')"
|
<a-col :span="12" class="ant-col-item" >
|
||||||
>
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
name="lead_name" >
|
name="material_code" >
|
||||||
<template #label>线索名称
|
<template #label>物料编码
|
||||||
</template> <YunzhupaasInput v-model:value="dataForm.lead_name" @change="changeData('lead_name',-1)"
|
</template> <YunzhupaasInput v-model:value="dataForm.material_code" @change="changeData('material_code',-1)"
|
||||||
placeholder="请输入线索名称" :maxlength="50" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.lead_name" :showCount = "false" >
|
placeholder="系统自动生成" readonly :style='{"width":"100%"}' >
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('mobile')"
|
<a-col :span="12" class="ant-col-item" >
|
||||||
>
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
name="mobile" >
|
name="material_name" >
|
||||||
<template #label>手机号
|
<template #label>物料名称
|
||||||
</template> <YunzhupaasInput v-model:value="dataForm.mobile" @change="changeData('mobile',-1)"
|
</template> <YunzhupaasInput v-model:value="dataForm.material_name" @change="changeData('material_name',-1)"
|
||||||
placeholder="请输入手机号" :maxlength="11" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.mobile" :showCount = "false" >
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.material_name" :showCount = "false" >
|
||||||
</YunzhupaasInput>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('email')"
|
<a-col :span="12" class="ant-col-item" >
|
||||||
>
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
name="email" >
|
name="material_category" >
|
||||||
<template #label>邮箱
|
<template #label>物料分类
|
||||||
</template> <YunzhupaasInput v-model:value="dataForm.email" @change="changeData('email',-1)"
|
</template> <YunzhupaasCascader v-model:value="dataForm.material_category" @change="changeData('material_category',-1)"
|
||||||
placeholder="请输入邮箱" :maxlength="50" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.email" :showCount = "false" >
|
placeholder="请选择" :templateJson="state.interfaceRes.material_category" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' :options="optionsObj.material_categoryOptions" :fieldNames="optionsObj.material_categoryProps"
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('lead_status')"
|
|
||||||
>
|
|
||||||
<a-form-item
|
|
||||||
name="lead_status" >
|
|
||||||
<template #label>状态
|
|
||||||
</template> <YunzhupaasSelect v-model:value="dataForm.lead_status" @change="changeData('lead_status',-1)"
|
|
||||||
placeholder="请选择状态" :templateJson="state.interfaceRes.lead_status" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' :options="optionsObj.lead_statusOptions" :fieldNames="optionsObj.lead_statusProps"
|
|
||||||
>
|
>
|
||||||
</YunzhupaasSelect>
|
</YunzhupaasCascader>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('sales_id')"
|
<a-col :span="12" class="ant-col-item" >
|
||||||
>
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
name="sales_id" >
|
name="material_model" >
|
||||||
<template #label>销售人员
|
<template #label>规格型号
|
||||||
</template> <YunzhupaasUsersSelect v-model:value="dataForm.sales_id" @change="changeData('sales_id',-1)"
|
</template> <YunzhupaasInput v-model:value="dataForm.material_model" @change="changeData('material_model',-1)"
|
||||||
placeholder="请选择销售人员" :allowClear='true' :style='{"width":"100%"}' selectType="all" >
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.material_model" :showCount = "false" >
|
||||||
</YunzhupaasUsersSelect>
|
</YunzhupaasInput>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('customer_source')"
|
<a-col :span="12" class="ant-col-item" >
|
||||||
>
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
name="customer_source" >
|
name="unit_name" >
|
||||||
<template #label>来源
|
<template #label>单位名称
|
||||||
</template> <YunzhupaasSelect v-model:value="dataForm.customer_source" @change="changeData('customer_source',-1)"
|
</template> <YunzhupaasInput v-model:value="dataForm.unit_name" @change="changeData('unit_name',-1)"
|
||||||
placeholder="请选择来源" :templateJson="state.interfaceRes.customer_source" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' :options="optionsObj.customer_sourceOptions" :fieldNames="optionsObj.customer_sourceProps"
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.unit_name" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="brand" >
|
||||||
|
<template #label>品牌
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.brand" @change="changeData('brand',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.brand" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="tax_rate" >
|
||||||
|
<template #label>税率
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.tax_rate" @change="changeData('tax_rate',-1)"
|
||||||
|
placeholder="请输入" :style='{"width":"100%"}' :step="1" :precision="2" addonAfter="%" :controls="false" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="tax_code" >
|
||||||
|
<template #label>税收分类
|
||||||
|
</template> <YunzhupaasCascader v-model:value="dataForm.tax_code" @change="changeData('tax_code',-1)"
|
||||||
|
placeholder="请选择" :templateJson="state.interfaceRes.tax_code" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' :options="optionsObj.tax_codeOptions" :fieldNames="optionsObj.tax_codeProps"
|
||||||
>
|
>
|
||||||
</YunzhupaasSelect>
|
</YunzhupaasCascader>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" class="ant-col-item" v-if="hasFormP('remark')"
|
<a-col :span="24" class="ant-col-item" >
|
||||||
>
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
name="remark" >
|
name="texture" >
|
||||||
<template #label>备注
|
<template #label>材质/纹理
|
||||||
</template> <YunzhupaasTextarea v-model:value="dataForm.remark" @change="changeData('remark',-1)"
|
</template> <YunzhupaasInput v-model:value="dataForm.texture" @change="changeData('texture',-1)"
|
||||||
placeholder="请输入备注" :maxlength="200" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":4,"maxRows":4}' :showCount = "false" >
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.texture" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="quality_standard" >
|
||||||
|
<template #label>质量标准
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.quality_standard" @change="changeData('quality_standard',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.quality_standard" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="technical_standard" >
|
||||||
|
<template #label>技术标准
|
||||||
|
</template> <YunzhupaasTextarea v-model:value="dataForm.technical_standard" @change="changeData('technical_standard',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":2,"maxRows":3}' :showCount = "false" >
|
||||||
|
</YunzhupaasTextarea>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="acceptance_criteria" >
|
||||||
|
<template #label>验收标准
|
||||||
|
</template> <YunzhupaasTextarea v-model:value="dataForm.acceptance_criteria" @change="changeData('acceptance_criteria',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":2,"maxRows":3}' :showCount = "false" >
|
||||||
|
</YunzhupaasTextarea>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="delivery_requirements" >
|
||||||
|
<template #label>交付要求
|
||||||
|
</template> <YunzhupaasTextarea v-model:value="dataForm.delivery_requirements" @change="changeData('delivery_requirements',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":2,"maxRows":3}' :showCount = "false" >
|
||||||
|
</YunzhupaasTextarea>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="storage_conditions" >
|
||||||
|
<template #label>储存条件
|
||||||
|
</template> <YunzhupaasTextarea v-model:value="dataForm.storage_conditions" @change="changeData('storage_conditions',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":2,"maxRows":3}' :showCount = "false" >
|
||||||
</YunzhupaasTextarea>
|
</YunzhupaasTextarea>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -163,13 +219,20 @@ continueText: string; allList: any[];
|
|||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
const state = reactive<State>({
|
const state = reactive<State>({
|
||||||
dataForm: {
|
dataForm: {
|
||||||
lead_name:undefined,
|
material_code:undefined,
|
||||||
mobile:undefined,
|
material_name:undefined,
|
||||||
email:undefined,
|
material_category:[],
|
||||||
lead_status:'Unassigned',
|
material_model:undefined,
|
||||||
sales_id:undefined,
|
unit_name:undefined,
|
||||||
customer_source:'',
|
brand:undefined,
|
||||||
remark:undefined,
|
tax_rate:0.01,
|
||||||
|
tax_code:[],
|
||||||
|
texture:undefined,
|
||||||
|
quality_standard:undefined,
|
||||||
|
technical_standard:undefined,
|
||||||
|
acceptance_criteria:undefined,
|
||||||
|
delivery_requirements:undefined,
|
||||||
|
storage_conditions:undefined,
|
||||||
version: 0,
|
version: 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -177,67 +240,30 @@ tableRows:{
|
|||||||
},
|
},
|
||||||
|
|
||||||
dataRule: {
|
dataRule: {
|
||||||
lead_name: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('sys.validate.textRequiredSuffix','不能为空'),
|
|
||||||
trigger: 'blur'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
mobile: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('sys.validate.textRequiredSuffix','不能为空'),
|
|
||||||
trigger: 'blur'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern: /^1[3456789]\d{9}$/,
|
|
||||||
message: t('sys.validate.mobilePhone','请输入正确的手机号码'),
|
|
||||||
trigger: 'blur'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
email: [
|
|
||||||
{
|
|
||||||
pattern: /^[a-z0-9]+([._\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/,
|
|
||||||
message: t('sys.validate.email','请输入正确的邮箱'),
|
|
||||||
trigger: 'blur'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
lead_status: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('sys.validate.arrayRequiredPrefix ','请至少选择一个'),
|
|
||||||
trigger: 'change'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
sales_id: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('sys.validate.arrayRequiredPrefix ','请至少选择一个'),
|
|
||||||
trigger: 'change'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
|
|
||||||
optionsObj:{
|
optionsObj:{
|
||||||
lead_statusOptions:[{"fullName":"待分配","id":"Unassigned"},{"fullName":"跟进中","id":"InProgress"},{"fullName":"已转换","id":"Converted"},{"fullName":"无效","id":"Invalid"}],
|
material_categoryOptions:[],
|
||||||
lead_statusProps:{"label":"fullName","value":"id" },
|
material_categoryProps:{"label":"fullName","value":"enCode" ,"children":"children" },
|
||||||
customer_sourceOptions:[],
|
tax_codeOptions:[],
|
||||||
customer_sourceProps:{"label":"fullName","value":"enCode" },
|
tax_codeProps:{"label":"fullName","value":"enCode" ,"children":"children" },
|
||||||
},
|
},
|
||||||
|
|
||||||
childIndex: -1,
|
childIndex: -1,
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
interfaceRes: {"lead_status":[],"mobile":[],"lead_name":[],"customer_source":[],"remark":[],"sales_id":[],"email":[]},
|
interfaceRes: {"material_model":[],"texture":[],"quality_standard":[],"tax_rate":[],"material_category":[],"unit_name":[],"technical_standard":[],"tax_code":[],"storage_conditions":[],"material_name":[],"brand":[],"acceptance_criteria":[],"delivery_requirements":[],"material_code":[]},
|
||||||
//可选范围默认值
|
//可选范围默认值
|
||||||
ableAll:{
|
ableAll:{
|
||||||
},
|
},
|
||||||
|
|
||||||
//掩码配置
|
//掩码配置
|
||||||
maskConfig:{
|
maskConfig:{
|
||||||
lead_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
material_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
mobile: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
material_model: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
email: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
unit_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
brand: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
texture: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
quality_standard: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
},
|
},
|
||||||
|
|
||||||
//定位属性
|
//定位属性
|
||||||
@@ -283,17 +309,25 @@ extraOptions:{
|
|||||||
getData(state.dataForm.id);
|
getData(state.dataForm.id);
|
||||||
} else {
|
} else {
|
||||||
//初始化options
|
//初始化options
|
||||||
getcustomer_sourceOptions();
|
getmaterial_categoryOptions();
|
||||||
|
gettax_codeOptions();
|
||||||
|
|
||||||
// 设置默认值
|
// 设置默认值
|
||||||
state.dataForm={
|
state.dataForm={
|
||||||
lead_name:undefined,
|
material_code:undefined,
|
||||||
mobile:undefined,
|
material_name:undefined,
|
||||||
email:undefined,
|
material_category:[],
|
||||||
lead_status:'Unassigned',
|
material_model:undefined,
|
||||||
sales_id:undefined,
|
unit_name:undefined,
|
||||||
customer_source:'',
|
brand:undefined,
|
||||||
remark:undefined,
|
tax_rate:0.01,
|
||||||
|
tax_code:[],
|
||||||
|
texture:undefined,
|
||||||
|
quality_standard:undefined,
|
||||||
|
technical_standard:undefined,
|
||||||
|
acceptance_criteria:undefined,
|
||||||
|
delivery_requirements:undefined,
|
||||||
|
storage_conditions:undefined,
|
||||||
version: 0,
|
version: 0,
|
||||||
};
|
};
|
||||||
if (getLeftTreeActiveInfo) state.dataForm = {...state.dataForm, ...(getLeftTreeActiveInfo() || {}) };
|
if (getLeftTreeActiveInfo) state.dataForm = {...state.dataForm, ...(getLeftTreeActiveInfo() || {}) };
|
||||||
@@ -311,7 +345,8 @@ version: 0,
|
|||||||
function getData(id) {
|
function getData(id) {
|
||||||
getInfo(id).then((res) => {
|
getInfo(id).then((res) => {
|
||||||
state.dataForm = res.data || {};
|
state.dataForm = res.data || {};
|
||||||
getcustomer_sourceOptions();
|
getmaterial_categoryOptions();
|
||||||
|
gettax_codeOptions();
|
||||||
|
|
||||||
state.childIndex = -1;
|
state.childIndex = -1;
|
||||||
changeLoading(false);
|
changeLoading(false);
|
||||||
@@ -408,9 +443,15 @@ function changeDataFormData(type, data, model,index,defaultValue) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//数据选项--数据字典初始化方法
|
//数据选项--数据字典初始化方法
|
||||||
function getcustomer_sourceOptions() {
|
function getmaterial_categoryOptions() {
|
||||||
getDictionaryDataSelector('797256993944371205').then(res => {
|
getDictionaryDataSelector('materialCategory').then(res => {
|
||||||
state.optionsObj.customer_sourceOptions = res.data.list
|
state.optionsObj.material_categoryOptions = res.data.list
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//数据选项--数据字典初始化方法
|
||||||
|
function gettax_codeOptions() {
|
||||||
|
getDictionaryDataSelector('taxCode').then(res => {
|
||||||
|
state.optionsObj.tax_codeOptions = res.data.list
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function getRelationDate(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
function getRelationDate(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
||||||
34
src/views/mdm/material/helper/api.ts
Normal file
34
src/views/mdm/material/helper/api.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import { defHttp } from '@/utils/http/axios';
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
export function getList(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Material/getList', data });
|
||||||
|
}
|
||||||
|
// 新建
|
||||||
|
export function create(data) {
|
||||||
|
return defHttp.post({ url:'/api/bcm/Material', data });
|
||||||
|
}
|
||||||
|
// 修改
|
||||||
|
export function update(data) {
|
||||||
|
return defHttp.put({ url: '/api/bcm/Material/'+ data.id, data });
|
||||||
|
}
|
||||||
|
// 详情(无转换数据)
|
||||||
|
export function getInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Material/' + id });
|
||||||
|
}
|
||||||
|
// 获取(转换数据)
|
||||||
|
export function getDetailInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Material/detail/' + id });
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export function del(id) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Material/' + id });
|
||||||
|
}
|
||||||
|
// 批量删除数据
|
||||||
|
export function batchDelete(data) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Material/batchRemove', data });
|
||||||
|
}
|
||||||
|
// 导出
|
||||||
|
export function exportData(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Material/Actions/Export', data });
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,14 @@
|
|||||||
const superQueryJson = [
|
const searchList = [
|
||||||
{
|
{
|
||||||
"clearable":true,
|
"yunzhupaasKey":"input",
|
||||||
"maxlength":50,
|
|
||||||
"useScan":false,
|
"useScan":false,
|
||||||
"suffixIcon":"",
|
"suffixIcon":"",
|
||||||
"fullName":"项目类型编码",
|
|
||||||
"fullNameI18nCode":[
|
"fullNameI18nCode":[
|
||||||
""
|
""
|
||||||
],
|
],
|
||||||
"addonAfter":"",
|
|
||||||
"showCount":false,
|
"showCount":false,
|
||||||
"__config__":{
|
"__config__":{
|
||||||
"formId":"formItem69cbe2",
|
"formId":"formItem83c40d",
|
||||||
"yunzhupaasKey":"input",
|
"yunzhupaasKey":"input",
|
||||||
"visibility":[
|
"visibility":[
|
||||||
"pc",
|
"pc",
|
||||||
@@ -22,166 +19,131 @@ const superQueryJson = [
|
|||||||
"tableFixed":"none",
|
"tableFixed":"none",
|
||||||
"dragDisabled":false,
|
"dragDisabled":false,
|
||||||
"className":[],
|
"className":[],
|
||||||
"label":"项目类型编码",
|
"label":"物料名称",
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"bcm_project_type",
|
|
||||||
"renderKey":1774504684544,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"__vModel__":"project_type_code",
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_type_code",
|
|
||||||
"placeholder":"请输入项目类型编码",
|
|
||||||
"prefixIcon":"",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"clearable":true,
|
|
||||||
"maxlength":50,
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullName":"项目类型名称",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"addonAfter":"",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItembf3850",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"项目类型名称",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"bcm_project_type",
|
|
||||||
"renderKey":1774504743202,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"__vModel__":"project_type_name",
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_type_name",
|
|
||||||
"placeholder":"请输入项目类型名称",
|
|
||||||
"prefixIcon":"",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"clearable":true,
|
|
||||||
"maxlength":100,
|
|
||||||
"fullName":"备注",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"autoSize":{
|
|
||||||
"minRows":3,
|
|
||||||
"maxRows":4
|
|
||||||
},
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formIteme2bc88",
|
|
||||||
"yunzhupaasKey":"textarea",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"备注",
|
|
||||||
"trigger":"blur",
|
"trigger":"blur",
|
||||||
"showLabel":true,
|
"showLabel":true,
|
||||||
"required":false,
|
"required":false,
|
||||||
"tableName":"bcm_project_type",
|
"tableName":"mdm_material",
|
||||||
"renderKey":1774504772430,
|
"renderKey":1777008057645,
|
||||||
"layout":"colFormItem",
|
"layout":"colFormItem",
|
||||||
"tagIcon":"icon-ym icon-ym-generator-textarea",
|
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||||
"tag":"YunzhupaasTextarea",
|
"tag":"YunzhupaasInput",
|
||||||
"regList":[],
|
"regList":[],
|
||||||
"tableAlign":"left",
|
"tableAlign":"left",
|
||||||
"span":24
|
"span":12
|
||||||
},
|
},
|
||||||
"readonly":false,
|
"readonly":false,
|
||||||
"__vModel__":"remark",
|
"prop":"material_name",
|
||||||
"style":{
|
"__vModel__":"material_name",
|
||||||
"width":"100%"
|
"searchMultiple":false,
|
||||||
},
|
|
||||||
"disabled":false,
|
"disabled":false,
|
||||||
"id":"remark",
|
"id":"material_name",
|
||||||
"placeholder":"请输入",
|
"placeholder":"请输入",
|
||||||
|
"addonBefore":"",
|
||||||
"on":{
|
"on":{
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
}
|
},
|
||||||
|
"clearable":true,
|
||||||
|
"searchType":2,
|
||||||
|
"maxlength":null,
|
||||||
|
"fullName":"物料名称",
|
||||||
|
"label":"物料名称",
|
||||||
|
"addonAfter":"",
|
||||||
|
"maskConfig":{
|
||||||
|
"prefixType":1,
|
||||||
|
"useUnrealMask":false,
|
||||||
|
"maskType":1,
|
||||||
|
"unrealMaskLength":1,
|
||||||
|
"prefixLimit":0,
|
||||||
|
"suffixLimit":0,
|
||||||
|
"filler":"*",
|
||||||
|
"prefixSpecifyChar":"",
|
||||||
|
"suffixType":1,
|
||||||
|
"ignoreChar":"",
|
||||||
|
"suffixSpecifyChar":""
|
||||||
|
},
|
||||||
|
"isKeyword":false,
|
||||||
|
"useMask":false,
|
||||||
|
"showPassword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"prefixIcon":"",
|
||||||
|
"labelI18nCode":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"yunzhupaasKey":"input",
|
||||||
|
"useScan":false,
|
||||||
|
"suffixIcon":"",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"showCount":false,
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItembbc1a2",
|
||||||
|
"yunzhupaasKey":"input",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"规格型号",
|
||||||
|
"trigger":"blur",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":false,
|
||||||
|
"tableName":"mdm_material",
|
||||||
|
"renderKey":1777014869849,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||||
|
"tag":"YunzhupaasInput",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"readonly":false,
|
||||||
|
"prop":"material_model",
|
||||||
|
"__vModel__":"material_model",
|
||||||
|
"searchMultiple":false,
|
||||||
|
"disabled":false,
|
||||||
|
"id":"material_model",
|
||||||
|
"placeholder":"请输入",
|
||||||
|
"addonBefore":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
},
|
||||||
|
"clearable":true,
|
||||||
|
"searchType":2,
|
||||||
|
"maxlength":null,
|
||||||
|
"fullName":"规格型号",
|
||||||
|
"label":"规格型号",
|
||||||
|
"addonAfter":"",
|
||||||
|
"maskConfig":{
|
||||||
|
"prefixType":1,
|
||||||
|
"useUnrealMask":false,
|
||||||
|
"maskType":1,
|
||||||
|
"unrealMaskLength":1,
|
||||||
|
"prefixLimit":0,
|
||||||
|
"suffixLimit":0,
|
||||||
|
"filler":"*",
|
||||||
|
"prefixSpecifyChar":"",
|
||||||
|
"suffixType":1,
|
||||||
|
"ignoreChar":"",
|
||||||
|
"suffixSpecifyChar":""
|
||||||
|
},
|
||||||
|
"isKeyword":false,
|
||||||
|
"useMask":false,
|
||||||
|
"showPassword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"prefixIcon":"",
|
||||||
|
"labelI18nCode":""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default superQueryJson
|
export default searchList
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -15,8 +15,12 @@
|
|||||||
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
||||||
@columns-change="handleColumnChange">
|
@columns-change="handleColumnChange">
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add"
|
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add" v-auth="'btn_add'"
|
||||||
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
||||||
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-download" v-auth="'btn_download'"
|
||||||
|
@click="openExportModal(true, { columnList: state.exportList, selectIds: getSelectRowKeys(), showExportSelected: true })"> {{t('common.exportText','导出')}}</a-button>
|
||||||
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-upload" v-auth="'btn_upload'"
|
||||||
|
@click="openImportModal(true, { url: 'bcm/Material', menuId: searchInfo.menuId })"> {{t('common.importText','导入')}}</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-tooltip placement="top">
|
<a-tooltip placement="top">
|
||||||
@@ -203,8 +207,8 @@
|
|||||||
customBtnsList: [],
|
customBtnsList: [],
|
||||||
treeFieldNames: {
|
treeFieldNames: {
|
||||||
children: 'children' ,
|
children: 'children' ,
|
||||||
title: 'project_type_name' ,
|
title: 'fullName' ,
|
||||||
key: 'project_type_code' ,
|
key: 'id' ,
|
||||||
isLeaf: 'isLeaf',
|
isLeaf: 'isLeaf',
|
||||||
},
|
},
|
||||||
leftTreeData: [],
|
leftTreeData: [],
|
||||||
@@ -233,7 +237,7 @@
|
|||||||
});
|
});
|
||||||
const defaultSearchInfo = {
|
const defaultSearchInfo = {
|
||||||
menuId: route.meta.modelId as string,
|
menuId: route.meta.modelId as string,
|
||||||
moduleId:'808252366691240901',
|
moduleId:'818749781147910917',
|
||||||
superQueryJson: '',
|
superQueryJson: '',
|
||||||
dataType:0,
|
dataType:0,
|
||||||
};
|
};
|
||||||
@@ -271,13 +275,15 @@
|
|||||||
|
|
||||||
const getHasBatchBtn = computed(() => {
|
const getHasBatchBtn = computed(() => {
|
||||||
let btnsList =[]
|
let btnsList =[]
|
||||||
|
btnsList.push('download')
|
||||||
|
btnsList=btnsList.filter(o => hasBtnP('btn_' + o))
|
||||||
return !!btnsList.length
|
return !!btnsList.length
|
||||||
});
|
});
|
||||||
|
|
||||||
const getLeftTreeBindValue = computed(() => {
|
const getLeftTreeBindValue = computed(() => {
|
||||||
const key = +new Date();
|
const key = +new Date();
|
||||||
const data: any = {
|
const data: any = {
|
||||||
title: '项目类型',
|
title: '物料分类',
|
||||||
showSearch: true, //异步的时候为false
|
showSearch: true, //异步的时候为false
|
||||||
fieldNames: state.treeFieldNames,
|
fieldNames: state.treeFieldNames,
|
||||||
defaultExpandAll: true, //异步的时候为false
|
defaultExpandAll: true, //异步的时候为false
|
||||||
@@ -349,17 +355,15 @@
|
|||||||
async function getTreeView(isInit = false) {
|
async function getTreeView(isInit = false) {
|
||||||
state.leftTreeLoading = true;
|
state.leftTreeLoading = true;
|
||||||
state.leftTreeData = [];
|
state.leftTreeData = [];
|
||||||
// 数据接口
|
// 左侧数据字典
|
||||||
let treeTemplateJson: any[] = []
|
getDictionaryDataSelector('materialCategory').then(res => {
|
||||||
const query = { paramList: getParamList(treeTemplateJson) };
|
state.leftTreeData = res.data.list;
|
||||||
getDataInterfaceRes('797165402772733957',query).then((res) => {
|
state.leftTreeLoading = false;
|
||||||
state.leftTreeData = Array.isArray(res.data) ? res.data : [];
|
nextTick(() => {
|
||||||
state.leftTreeLoading = false;
|
if(isInit){
|
||||||
nextTick(() => {
|
unref(getSearchList)?.length? searchFormSubmit() : reload({ page: 1 });
|
||||||
if (isInit){
|
}
|
||||||
unref(getSearchList)?.length? searchFormSubmit() : reload({ page: 1 });
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getSearchSchemas() {
|
function getSearchSchemas() {
|
||||||
@@ -367,7 +371,7 @@
|
|||||||
if (!state.treeRelationObj) {
|
if (!state.treeRelationObj) {
|
||||||
for (let i = 0; i < superQueryJson.length; i++) {
|
for (let i = 0; i < superQueryJson.length; i++) {
|
||||||
const e = superQueryJson[i];
|
const e = superQueryJson[i];
|
||||||
if (e.id === 'project_type') {
|
if (e.id === 'material_category') {
|
||||||
state.treeRelationObj = { ...e, searchMultiple: false, yunzhupaasKey: e.__config__.yunzhupaasKey };
|
state.treeRelationObj = { ...e, searchMultiple: false, yunzhupaasKey: e.__config__.yunzhupaasKey };
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -552,6 +556,7 @@
|
|||||||
{
|
{
|
||||||
label: t('common.editText','编辑') ,
|
label: t('common.editText','编辑') ,
|
||||||
onClick: updateHandle.bind(null, record),
|
onClick: updateHandle.bind(null, record),
|
||||||
|
auth: 'btn_edit', //有按钮权限
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('common.delText','删除') ,
|
label: t('common.delText','删除') ,
|
||||||
@@ -559,11 +564,13 @@
|
|||||||
modelConfirm: {
|
modelConfirm: {
|
||||||
onOk: handleDelete.bind(null, record.id),
|
onOk: handleDelete.bind(null, record.id),
|
||||||
},
|
},
|
||||||
|
auth: 'btn_remove', //有按钮权限
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('common.detailText','详情') ,
|
||||||
|
onClick: goDetail.bind(null, record),
|
||||||
|
auth: 'btn_detail', //有按钮权限
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// label: t('common.detailText','详情') ,
|
|
||||||
// onClick: goDetail.bind(null, record),
|
|
||||||
// },
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
// 编辑
|
// 编辑
|
||||||
@@ -603,6 +610,20 @@
|
|||||||
};
|
};
|
||||||
formRef.value?.init(data);
|
formRef.value?.init(data);
|
||||||
}
|
}
|
||||||
|
// 导出
|
||||||
|
function handleDownload(data) {
|
||||||
|
let query = { ...getFetchParams(), ...data };
|
||||||
|
exportData(query)
|
||||||
|
.then((res) => {
|
||||||
|
setExportModalProps({ confirmLoading: false });
|
||||||
|
if (!res.data.url) return;
|
||||||
|
downloadByUrl({ url: res.data.url });
|
||||||
|
closeExportModal();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
setExportModalProps({ confirmLoading: false });
|
||||||
|
});
|
||||||
|
}
|
||||||
function handleLeftTreeSelect(id, _node, nodePath) {
|
function handleLeftTreeSelect(id, _node, nodePath) {
|
||||||
if (state.treeActiveId == id) return;
|
if (state.treeActiveId == id) return;
|
||||||
state.treeActiveId = id;
|
state.treeActiveId = id;
|
||||||
@@ -650,11 +671,11 @@
|
|||||||
if (state.treeRelationObj && state.treeRelationObj.yunzhupaasKey && ['organizeSelect', 'cascader', 'areaSelect'].includes(state.treeRelationObj.yunzhupaasKey)) {
|
if (state.treeRelationObj && state.treeRelationObj.yunzhupaasKey && ['organizeSelect', 'cascader', 'areaSelect'].includes(state.treeRelationObj.yunzhupaasKey)) {
|
||||||
let currValue = [];
|
let currValue = [];
|
||||||
currValue = state.treeActiveNodePath.map(o => o[state.treeFieldNames.key]);
|
currValue = state.treeActiveNodePath.map(o => o[state.treeFieldNames.key]);
|
||||||
queryJson = { 'project_type': isMultiple ? [currValue] : currValue };
|
queryJson = { 'material_category': isMultiple ? [currValue] : currValue };
|
||||||
leftTreeActiveInfo = { 'project_type': state.treeRelationObj.multiple ? [currValue] : currValue };
|
leftTreeActiveInfo = { 'material_category': state.treeRelationObj.multiple ? [currValue] : currValue };
|
||||||
} else {
|
} else {
|
||||||
queryJson = { 'project_type': isMultiple ? [state.treeActiveId] : state.treeActiveId };
|
queryJson = { 'material_category': isMultiple ? [state.treeActiveId] : state.treeActiveId };
|
||||||
leftTreeActiveInfo = { 'project_type': state.treeRelationObj.multiple ? [state.treeActiveId] : state.treeActiveId };
|
leftTreeActiveInfo = { 'material_category': state.treeRelationObj.multiple ? [state.treeActiveId] : state.treeActiveId };
|
||||||
}
|
}
|
||||||
state.leftTreeActiveInfo = leftTreeActiveInfo;
|
state.leftTreeActiveInfo = leftTreeActiveInfo;
|
||||||
if(unref(getSearchList)?.length){
|
if(unref(getSearchList)?.length){
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { defHttp } from '@/utils/http/axios';
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
export function getList(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/MdmCompany/getList', data });
|
|
||||||
}
|
|
||||||
// 新建
|
|
||||||
export function create(data) {
|
|
||||||
return defHttp.post({ url:'/api/bcm/MdmCompany', data });
|
|
||||||
}
|
|
||||||
// 修改
|
|
||||||
export function update(data) {
|
|
||||||
return defHttp.put({ url: '/api/bcm/MdmCompany/'+ data.id, data });
|
|
||||||
}
|
|
||||||
// 详情(无转换数据)
|
|
||||||
export function getInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/MdmCompany/' + id });
|
|
||||||
}
|
|
||||||
// 获取(转换数据)
|
|
||||||
export function getDetailInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/MdmCompany/detail/' + id });
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
export function del(id) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/MdmCompany/' + id });
|
|
||||||
}
|
|
||||||
// 批量删除数据
|
|
||||||
export function batchDelete(data) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/MdmCompany/batchRemove', data });
|
|
||||||
}
|
|
||||||
// 导出
|
|
||||||
export function exportData(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/MdmCompany/Actions/Export', data });
|
|
||||||
}
|
|
||||||
@@ -1,402 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicPopup v-bind="$attrs" @register="registerPopup" :title="title" destroyOnClose>
|
|
||||||
<template #insertToolbar>
|
|
||||||
</template>
|
|
||||||
<a-row class="p-10px dynamic-form " :style="{ margin: '0 auto', width: '100%' }">
|
|
||||||
<!-- 表单 -->
|
|
||||||
<a-form :colon="false" size="middle" layout= "horizontal"
|
|
||||||
labelAlign= "right"
|
|
||||||
:labelCol="{ style: { width: '100px' } }" :model="dataForm" ref="formRef" >
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<!-- 具体表单 -->
|
|
||||||
<a-col :span="12" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="contract_type_code" >
|
|
||||||
<template #label>合同类型编码
|
|
||||||
</template> <YunzhupaasInput v-model:value="dataForm.contract_type_code"
|
|
||||||
placeholder="请输入合同类型编码" :maxlength="25" disabled
|
|
||||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.contract_type_code" >
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="contract_type_name" >
|
|
||||||
<template #label>合同类型名称
|
|
||||||
</template> <YunzhupaasInput v-model:value="dataForm.contract_type_name"
|
|
||||||
placeholder="请输入合同类型名称" :maxlength="50" disabled
|
|
||||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.contract_type_name" >
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="project_type" >
|
|
||||||
<template #label>项目类型
|
|
||||||
</template> <p>{{ dataForm.project_type }} </p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20" >
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="18" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":16,"line-height":15,"font-style":"normal","text-align":"left"}' content="合同财务性质分类" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="6" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="contract_mode" >
|
|
||||||
<p>{{ dataForm.contract_mode }} </p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":15,"font-style":"normal","text-align":"left"}' content="说明:合同财务性质分类,主要是将合同分为收入类合同、支出类合同。合同财务性质分类主要影响合同财务管理。收入类合同通常会导致企业资产增加的经济活动相关,如销售商品、提供服务等。支出类合同通常会导致企业资产减少或负情增加的经济活动相关,如采购材料、租赁设备、支付劳务费用等。" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20" >
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="16" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":16,"line-height":15,"font-style":"normal","text-align":"left"}' content="启动合同清单 —— 材料清单" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="cl_list_enabled" >
|
|
||||||
<p>{{ dataForm.cl_list_enabled }} </p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="cl_list_alias" >
|
|
||||||
<YunzhupaasInput v-model:value="dataForm.cl_list_alias"
|
|
||||||
placeholder="别名" :maxlength="10" disabled
|
|
||||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.cl_list_alias" >
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="cl_lst_seq" >
|
|
||||||
<YunzhupaasInputNumber v-model:value="dataForm.cl_lst_seq"
|
|
||||||
placeholder="序号" disabled
|
|
||||||
detailed :style='{"width":"100%"}' :step="1" :controls="false" >
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":15,"font-style":"normal","text-align":"left"}' content="说明:启用合同清单——材料清单,主要是用于控制该类型合同,在起草或者清单维护时,能提供材料清单的维护。" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20" >
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="16" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":16,"line-height":15,"font-style":"normal","text-align":"left"}' content="启动合同清单 —— 租赁清单" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="zl_list_enabled" >
|
|
||||||
<p>{{ dataForm.zl_list_enabled }} </p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="zl_list_alias" >
|
|
||||||
<YunzhupaasInput v-model:value="dataForm.zl_list_alias"
|
|
||||||
placeholder="别名" :maxlength="10" disabled
|
|
||||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.zl_list_alias" >
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="zl_lst_seq" >
|
|
||||||
<YunzhupaasInputNumber v-model:value="dataForm.zl_lst_seq"
|
|
||||||
placeholder="序号" disabled
|
|
||||||
detailed :style='{"width":"100%"}' :step="1" :controls="false" >
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":15,"font-style":"normal","text-align":"left"}' content="说明:启用合同清单——租赁清单,主要是用于控制该类型合同,在起草或者清单维护时,能提供材料清单的维护。" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20" >
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="16" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":16,"line-height":15,"font-style":"normal","text-align":"left"}' content="启动合同清单 —— 劳务清单" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="rg_list_enabled" >
|
|
||||||
<p>{{ dataForm.rg_list_enabled }} </p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="rg_list_alias" >
|
|
||||||
<YunzhupaasInput v-model:value="dataForm.rg_list_alias"
|
|
||||||
placeholder="别名" :maxlength="10" disabled
|
|
||||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.rg_list_alias" >
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="rg_lst_seq" >
|
|
||||||
<YunzhupaasInputNumber v-model:value="dataForm.rg_lst_seq"
|
|
||||||
placeholder="序号" disabled
|
|
||||||
detailed :style='{"width":"100%"}' :step="1" :controls="false" >
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":15,"font-style":"normal","text-align":"left"}' content="说明:启用合同清单——劳务清单,主要是用于控制该类型合同,在起草或者清单维护时,能提供劳务资源清单的维护。" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20" >
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="16" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":16,"line-height":15,"font-style":"normal","text-align":"left"}' content="启动合同清单 —— 工程量清单" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="gcl_list_enabled" >
|
|
||||||
<p>{{ dataForm.gcl_list_enabled }} </p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="gcl_list_alias" >
|
|
||||||
<YunzhupaasInput v-model:value="dataForm.gcl_list_alias"
|
|
||||||
placeholder="别名" :maxlength="10" disabled
|
|
||||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.gcl_list_alias" >
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="gcl_lst_seq" >
|
|
||||||
<YunzhupaasInputNumber v-model:value="dataForm.gcl_lst_seq"
|
|
||||||
placeholder="序号" disabled
|
|
||||||
detailed :style='{"width":"100%"}' :step="1" :controls="false" >
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":15,"font-style":"normal","text-align":"left"}' content="说明:启用合同清单——工程量清单,主要是用于控制该类型合同,在起草或者清单维护时,能提供工程量清单的维护。该清单一般不会与材料清单、租赁清单、劳务清单一起使用,但系统不做强控制。" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20" >
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="22" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":16,"line-height":15,"font-style":"normal","text-align":"left"}' content="启用在线合同模板" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="contract_temp_enabled" >
|
|
||||||
<p>{{ dataForm.contract_temp_enabled }} </p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20" >
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="16" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":16,"line-height":15,"font-style":"normal","text-align":"left"}' content="启用工作流程,审核合同签订的内容" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="workflow_enabled" >
|
|
||||||
<p>{{ dataForm.workflow_enabled }} </p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="workflow_temp_id" >
|
|
||||||
<p>{{ dataForm.workflow_temp_id }} </p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":15,"font-style":"normal","text-align":"left"}' content="说明:启用工作流程后,在合同在起草或者内容变更后,需要提交工作流进行合同内容的审核。未启用工作流时,提交合同,可直接生效合同内容。" >
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<!-- 表单结束 -->
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</a-row>
|
|
||||||
</BasicPopup>
|
|
||||||
<!-- 有关联表单详情:开始 -->
|
|
||||||
<RelationDetail ref="relationDetailRef" />
|
|
||||||
<!-- 有关联表单详情:结束 -->
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { getDetailInfo } from './helper/api';
|
|
||||||
import { getConfigData } from '@/api/onlineDev/visualDev';
|
|
||||||
import { reactive, toRefs, nextTick, ref, computed, unref ,toRaw} from 'vue';
|
|
||||||
import { BasicPopup, usePopup } from '@/components/Popup';
|
|
||||||
import { BasicModal, useModal } from '@/components/Modal';
|
|
||||||
// 有关联表单详情
|
|
||||||
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
|
||||||
// 表单权限
|
|
||||||
import { usePermission } from '@/hooks/web/usePermission';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { buildUUID } from '@/utils/uuid';
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
|
||||||
import { getDataChange } from '@/api/onlineDev/visualDev';
|
|
||||||
import { getDataInterfaceDataInfoByIds } from '@/api/systemData/dataInterface';
|
|
||||||
import ExtraRelationInfo from '@/components/yunzhupaas/RelationForm/src/ExtraRelationInfo.vue';
|
|
||||||
|
|
||||||
interface State {
|
|
||||||
dataForm: any;
|
|
||||||
title: string;
|
|
||||||
maskConfig: any;
|
|
||||||
interfaceRes: any;
|
|
||||||
locationScope: any;
|
|
||||||
extraOptions: any;
|
|
||||||
extraData: any;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
defineOptions({ name: 'Detail' });
|
|
||||||
const { createMessage, createConfirm } = useMessage();
|
|
||||||
const [registerPopup, { openPopup, setPopupProps, closePopup }] = usePopup();
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
|
||||||
const relationDetailRef = ref<any>(null);
|
|
||||||
const state = reactive<State>({
|
|
||||||
dataForm:{},
|
|
||||||
title: t('common.detailText','详情'),
|
|
||||||
maskConfig:{
|
|
||||||
contract_type_code: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
|
||||||
contract_type_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
|
||||||
cl_list_alias: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
|
||||||
zl_list_alias: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
|
||||||
rg_list_alias: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
|
||||||
gcl_list_alias: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
|
||||||
}
|
|
||||||
,
|
|
||||||
interfaceRes: {"project_type":[],"contract_mode":[],"workflow_enabled":[],"rg_list_alias":[],"rg_list_enabled":[],"cl_list_alias":[],"zl_list_enabled":[],"zl_list_alias":[],"contract_type_code":[],"cl_lst_seq":[],"workflow_temp_id":[],"gcl_list_enabled":[],"contract_temp_enabled":[],"contract_type_name":[],"rg_lst_seq":[],"gcl_lst_seq":[],"gcl_list_alias":[],"zl_lst_seq":[],"cl_list_enabled":[]},
|
|
||||||
locationScope:{
|
|
||||||
}
|
|
||||||
,
|
|
||||||
extraOptions: {
|
|
||||||
}
|
|
||||||
,
|
|
||||||
extraData: {
|
|
||||||
}
|
|
||||||
,
|
|
||||||
});
|
|
||||||
const { title, dataForm, maskConfig } = toRefs(state);
|
|
||||||
// 表单权限
|
|
||||||
const { hasFormP } = usePermission();
|
|
||||||
|
|
||||||
defineExpose({ init });
|
|
||||||
|
|
||||||
function init(data) {
|
|
||||||
state.dataForm.id = data.id;
|
|
||||||
openPopup();
|
|
||||||
nextTick(() => {
|
|
||||||
setTimeout(initData, 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function initData() {
|
|
||||||
changeLoading(true);
|
|
||||||
if (state.dataForm.id) {
|
|
||||||
getData(state.dataForm.id);
|
|
||||||
} else {
|
|
||||||
closePopup();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getData(id) {
|
|
||||||
getDetailInfo(id).then((res) => {
|
|
||||||
state.dataForm = res.data || {};
|
|
||||||
nextTick(() => {
|
|
||||||
changeLoading(false);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function toDetail(modelId, id, propsValue) {
|
|
||||||
if (!id) return;
|
|
||||||
getConfigData(modelId).then((res) => {
|
|
||||||
if (!res.data || !res.data.formData) return;
|
|
||||||
const formConf = JSON.parse(res.data.formData);
|
|
||||||
formConf.popupType = 'general';
|
|
||||||
formConf.hasPrintBtn = false;
|
|
||||||
formConf.customBtns = [];
|
|
||||||
const data = { id, formConf, modelId, propsValue};
|
|
||||||
relationDetailRef.value?.init(data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function setFormProps(data) {
|
|
||||||
setPopupProps(data);
|
|
||||||
}
|
|
||||||
function changeLoading(loading) {
|
|
||||||
setFormProps({ loading });
|
|
||||||
}
|
|
||||||
|
|
||||||
function getParamList(key) {
|
|
||||||
let templateJson: any[] = state.interfaceRes[key];
|
|
||||||
if (!templateJson || !templateJson.length || !state.dataForm) return templateJson;
|
|
||||||
for (let i = 0; i < templateJson.length; i++) {
|
|
||||||
if (templateJson[i].relationField && templateJson[i].sourceType == 1) {
|
|
||||||
templateJson[i].defaultValue = state.dataForm[templateJson[i].relationField + '_id'] || '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return templateJson;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,998 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicPopup
|
|
||||||
v-bind="$attrs"
|
|
||||||
@register="registerPopup"
|
|
||||||
showOkBtn
|
|
||||||
destroyOnClose
|
|
||||||
:cancelText="t('common.cancelText', '取消')"
|
|
||||||
:okText="t('common.okText', '确定')"
|
|
||||||
@ok="handleSubmit"
|
|
||||||
:closeFunc="onClose">
|
|
||||||
<template #title>
|
|
||||||
<a-space :size="10">
|
|
||||||
<div class="text-16px font-medium">{{ title }}</div>
|
|
||||||
<a-space-compact size="small" block v-if="dataForm.id">
|
|
||||||
<a-tooltip :title="t('common.prevRecord')">
|
|
||||||
<a-button size="small" :disabled="getPrevDisabled" @click="handlePrev">
|
|
||||||
<i class="icon-ym icon-ym-caret-left text-10px"></i>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
<a-tooltip :title="t('common.nextRecord')">
|
|
||||||
<a-button size="small" :disabled="getNextDisabled" @click="handleNext">
|
|
||||||
<i class="icon-ym icon-ym-caret-right text-10px"></i>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
</a-space-compact>
|
|
||||||
</a-space>
|
|
||||||
</template>
|
|
||||||
<template #insertToolbar>
|
|
||||||
<yunzhupaasCheckboxSingle v-model:value="submitType" :label="continueText" v-if="showContinueBtn" />
|
|
||||||
</template>
|
|
||||||
<a-row class="p-10px dynamic-form" :style="{ margin: '0 auto', width: '100%' }">
|
|
||||||
<a-form
|
|
||||||
:colon="false"
|
|
||||||
size="middle"
|
|
||||||
layout="horizontal"
|
|
||||||
labelAlign="right"
|
|
||||||
:labelCol="{ style: { width: '100px' } }"
|
|
||||||
:model="dataForm"
|
|
||||||
:rules="dataRule"
|
|
||||||
ref="formRef">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<!-- 具体表单 -->
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="contract_type_code">
|
|
||||||
<template #label>合同类型编码 </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.contract_type_code"
|
|
||||||
@change="changeData('contract_type_code', -1)"
|
|
||||||
placeholder="请输入合同类型编码"
|
|
||||||
:maxlength="25"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.contract_type_code"
|
|
||||||
:showCount="false">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="contract_type_name">
|
|
||||||
<template #label>合同类型名称 </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.contract_type_name"
|
|
||||||
@change="changeData('contract_type_name', -1)"
|
|
||||||
placeholder="请输入合同类型名称"
|
|
||||||
:maxlength="50"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.contract_type_name"
|
|
||||||
:showCount="false">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="project_type">
|
|
||||||
<template #label>项目类型 </template>
|
|
||||||
<YunzhupaasSelect
|
|
||||||
v-model:value="dataForm.project_type"
|
|
||||||
@change="changeData('project_type', -1)"
|
|
||||||
placeholder="请选择合同模式"
|
|
||||||
:templateJson="state.interfaceRes.project_type"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:showSearch="false"
|
|
||||||
:options="optionsObj.project_typeOptions"
|
|
||||||
:fieldNames="optionsObj.project_typeProps">
|
|
||||||
</YunzhupaasSelect>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="18" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 16,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="合同财务性质分类">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="6" class="ant-col-item">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="contract_mode">
|
|
||||||
<YunzhupaasSelect
|
|
||||||
v-model:value="dataForm.contract_mode"
|
|
||||||
@change="changeData('contract_mode', -1)"
|
|
||||||
placeholder="请选择"
|
|
||||||
:templateJson="state.interfaceRes.contract_mode"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:showSearch="false"
|
|
||||||
:options="optionsObj.contract_modeOptions"
|
|
||||||
:fieldNames="optionsObj.contract_modeProps">
|
|
||||||
</YunzhupaasSelect>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 12,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="说明:合同财务性质分类,主要是将合同分为收入类合同、支出类合同。合同财务性质分类主要影响合同财务管理。收入类合同通常会导致企业资产增加的经济活动相关,如销售商品、提供服务等。支出类合同通常会导致企业资产减少或负情增加的经济活动相关,如采购材料、租赁设备、支付劳务费用等。">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="dataForm.cl_list_enabled==1?16:22" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 16,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="启动合同清单 —— 材料清单">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="cl_list_enabled">
|
|
||||||
<YunzhupaasSwitch v-model:value="dataForm.cl_list_enabled" @change="changeData('cl_list_enabled', -1)"> </YunzhupaasSwitch>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" class="ant-col-item" v-if="dataForm.cl_list_enabled==1">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="cl_list_alias">
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.cl_list_alias"
|
|
||||||
@change="changeData('cl_list_alias', -1)"
|
|
||||||
placeholder="别名"
|
|
||||||
:maxlength="10"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.cl_list_alias"
|
|
||||||
:showCount="false">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" v-if="dataForm.cl_list_enabled==1">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="cl_lst_seq">
|
|
||||||
<YunzhupaasInputNumber
|
|
||||||
v-model:value="dataForm.cl_lst_seq"
|
|
||||||
@change="changeData('cl_lst_seq', -1)"
|
|
||||||
placeholder="序号"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:step="1"
|
|
||||||
:controls="false">
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 12,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="说明:启用合同清单——材料清单,主要是用于控制该类型合同,在起草或者清单维护时,能提供材料清单的维护。">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="dataForm.zl_list_enabled==1?16:22" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 16,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="启动合同清单 —— 租赁清单">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="zl_list_enabled">
|
|
||||||
<YunzhupaasSwitch v-model:value="dataForm.zl_list_enabled" @change="changeData('zl_list_enabled', -1)"> </YunzhupaasSwitch>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" class="ant-col-item" v-if="dataForm.zl_list_enabled==1">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="zl_list_alias">
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.zl_list_alias"
|
|
||||||
@change="changeData('zl_list_alias', -1)"
|
|
||||||
placeholder="别名"
|
|
||||||
:maxlength="10"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.zl_list_alias"
|
|
||||||
:showCount="false">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" v-if="dataForm.zl_list_enabled==1">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="zl_lst_seq">
|
|
||||||
<YunzhupaasInputNumber
|
|
||||||
v-model:value="dataForm.zl_lst_seq"
|
|
||||||
@change="changeData('zl_lst_seq', -1)"
|
|
||||||
placeholder="序号"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:step="1"
|
|
||||||
:controls="false">
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 12,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="说明:启用合同清单——租赁清单,主要是用于控制该类型合同,在起草或者清单维护时,能提供材料清单的维护。">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="dataForm.rg_list_enabled==1?16:22" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 16,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="启动合同清单 —— 劳务清单">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" >
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="rg_list_enabled">
|
|
||||||
<YunzhupaasSwitch v-model:value="dataForm.rg_list_enabled" @change="changeData('rg_list_enabled', -1)"> </YunzhupaasSwitch>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" class="ant-col-item" v-if="dataForm.rg_list_enabled==1">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="rg_list_alias">
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.rg_list_alias"
|
|
||||||
@change="changeData('rg_list_alias', -1)"
|
|
||||||
placeholder="别名"
|
|
||||||
:maxlength="10"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.rg_list_alias"
|
|
||||||
:showCount="false">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" v-if="dataForm.rg_list_enabled==1">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="rg_lst_seq">
|
|
||||||
<YunzhupaasInputNumber
|
|
||||||
v-model:value="dataForm.rg_lst_seq"
|
|
||||||
@change="changeData('rg_lst_seq', -1)"
|
|
||||||
placeholder="序号"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:step="1"
|
|
||||||
:controls="false">
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 12,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="说明:启用合同清单——劳务清单,主要是用于控制该类型合同,在起草或者清单维护时,能提供劳务资源清单的维护。">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="dataForm.gcl_list_enabled==1?16:22" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 16,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="启动合同清单 —— 工程量清单">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="gcl_list_enabled">
|
|
||||||
<YunzhupaasSwitch v-model:value="dataForm.gcl_list_enabled" @change="changeData('gcl_list_enabled', -1)"> </YunzhupaasSwitch>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" class="ant-col-item" v-if="dataForm.gcl_list_enabled==1">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="gcl_list_alias">
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.gcl_list_alias"
|
|
||||||
@change="changeData('gcl_list_alias', -1)"
|
|
||||||
placeholder="别名"
|
|
||||||
:maxlength="10"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.gcl_list_alias"
|
|
||||||
:showCount="false">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item" v-if="dataForm.gcl_list_enabled==1">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="gcl_lst_seq">
|
|
||||||
<YunzhupaasInputNumber
|
|
||||||
v-model:value="dataForm.gcl_lst_seq"
|
|
||||||
@change="changeData('gcl_lst_seq', -1)"
|
|
||||||
placeholder="序号"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:step="1"
|
|
||||||
:controls="false">
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 12,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="说明:启用合同清单——工程量清单,主要是用于控制该类型合同,在起草或者清单维护时,能提供工程量清单的维护。该清单一般不会与材料清单、租赁清单、劳务清单一起使用,但系统不做强控制。">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="22" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 16,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="启用在线合同模板">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="contract_temp_enabled">
|
|
||||||
<YunzhupaasSwitch v-model:value="dataForm.contract_temp_enabled" @change="changeData('contract_temp_enabled', -1)"> </YunzhupaasSwitch>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-card class="mb-20">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="dataForm.workflow_enabled==1?16:22" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 16,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="启用工作流程,审核合同签订的内容">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="2" class="ant-col-item">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="workflow_enabled">
|
|
||||||
<YunzhupaasSwitch v-model:value="dataForm.workflow_enabled" @change="changeData('workflow_enabled', -1)"> </YunzhupaasSwitch>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" class="ant-col-item" v-if="dataForm.workflow_enabled==1">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="workflow_temp_id">
|
|
||||||
<YunzhupaasSelect
|
|
||||||
v-model:value="dataForm.workflow_temp_id"
|
|
||||||
@change="changeData('workflow_temp_id', -1)"
|
|
||||||
placeholder="请选择"
|
|
||||||
:templateJson="state.interfaceRes.workflow_temp_id"
|
|
||||||
:allowClear="true"
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:showSearch="false"
|
|
||||||
:options="optionsObj.workflow_temp_idOptions"
|
|
||||||
:fieldNames="optionsObj.workflow_temp_idProps">
|
|
||||||
</YunzhupaasSelect>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item>
|
|
||||||
<YunzhupaasText
|
|
||||||
:textStyle="{
|
|
||||||
color: '#000000',
|
|
||||||
'font-weight': 'normal',
|
|
||||||
'text-decoration': 'none',
|
|
||||||
'font-size': 12,
|
|
||||||
'line-height': 15,
|
|
||||||
'font-style': 'normal',
|
|
||||||
'text-align': 'left',
|
|
||||||
}"
|
|
||||||
content="说明:启用工作流程后,在合同在起草或者内容变更后,需要提交工作流进行合同内容的审核。未启用工作流时,提交合同,可直接生效合同内容。">
|
|
||||||
</YunzhupaasText>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<!-- 表单结束 -->
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</a-row>
|
|
||||||
</BasicPopup>
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { create, update, getInfo } from './helper/api';
|
|
||||||
import { reactive, toRefs, nextTick, ref, unref, computed, toRaw, inject } from 'vue';
|
|
||||||
import { BasicPopup, usePopup } from '@/components/Popup';
|
|
||||||
import { yunzhupaasRelationForm } from '@/components/yunzhupaas';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
|
||||||
import { useUserStore } from '@/store/modules/user';
|
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
|
||||||
import { thousandsFormat, getDateTimeUnit, getTimeUnit } from '@/utils/yunzhupaas';
|
|
||||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary';
|
|
||||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
// 表单权限
|
|
||||||
import { usePermission } from '@/hooks/web/usePermission';
|
|
||||||
import { cloneDeep } from 'lodash-es';
|
|
||||||
import { buildUUID } from '@/utils/uuid';
|
|
||||||
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
|
||||||
|
|
||||||
interface State {
|
|
||||||
dataForm: any;
|
|
||||||
tableRows: any;
|
|
||||||
dataRule: any;
|
|
||||||
optionsObj: any;
|
|
||||||
childIndex: any;
|
|
||||||
isEdit: any;
|
|
||||||
interfaceRes: any;
|
|
||||||
//可选范围默认值
|
|
||||||
ableAll: any;
|
|
||||||
//掩码配置
|
|
||||||
maskConfig: any;
|
|
||||||
//定位属性
|
|
||||||
locationScope: any;
|
|
||||||
extraOptions: any;
|
|
||||||
title: string;
|
|
||||||
continueText: string;
|
|
||||||
allList: any[];
|
|
||||||
currIndex: number;
|
|
||||||
isContinue: boolean;
|
|
||||||
submitType: number;
|
|
||||||
showContinueBtn: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
const emit = defineEmits(['reload']);
|
|
||||||
const getLeftTreeActiveInfo: (() => any) | null = inject('getLeftTreeActiveInfo', null);
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const userInfo = userStore.getUserInfo;
|
|
||||||
const { createMessage, createConfirm } = useMessage();
|
|
||||||
const { t } = useI18n();
|
|
||||||
const [registerPopup, { openPopup, setPopupProps }] = usePopup();
|
|
||||||
const formRef = ref<FormInstance>();
|
|
||||||
const state = reactive<State>({
|
|
||||||
dataForm: {
|
|
||||||
contract_type_code: undefined,
|
|
||||||
contract_type_name: undefined,
|
|
||||||
project_type: 'SOFT',
|
|
||||||
contract_mode: 'revenue',
|
|
||||||
cl_list_enabled: 0,
|
|
||||||
cl_list_alias: '材料清单',
|
|
||||||
cl_lst_seq: 1,
|
|
||||||
zl_list_enabled: 0,
|
|
||||||
zl_list_alias: '租赁清单',
|
|
||||||
zl_lst_seq: 1,
|
|
||||||
rg_list_enabled: 0,
|
|
||||||
rg_list_alias: '劳务清单',
|
|
||||||
rg_lst_seq: 1,
|
|
||||||
gcl_list_enabled: 0,
|
|
||||||
gcl_list_alias: '工程量清单',
|
|
||||||
gcl_lst_seq: 1,
|
|
||||||
contract_temp_enabled: 0,
|
|
||||||
workflow_enabled: 0,
|
|
||||||
workflow_temp_id: '',
|
|
||||||
version: 0,
|
|
||||||
},
|
|
||||||
|
|
||||||
tableRows: {},
|
|
||||||
|
|
||||||
dataRule: {
|
|
||||||
contract_type_code: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('sys.validate.textRequiredSuffix', '不能为空'),
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
contract_type_name: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('sys.validate.textRequiredSuffix', '不能为空'),
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
project_type: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('sys.validate.arrayRequiredPrefix ', '请至少选择一个'),
|
|
||||||
trigger: 'change',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
optionsObj: {
|
|
||||||
project_typeOptions: [],
|
|
||||||
project_typeProps: { label: 'project_type_name', value: 'project_type_code' },
|
|
||||||
contract_modeOptions: [
|
|
||||||
{ fullName: '收入类合同', id: 'revenue' },
|
|
||||||
{ fullName: '支付类合同', id: 'payment' },
|
|
||||||
],
|
|
||||||
contract_modeProps: { label: 'fullName', value: 'id' },
|
|
||||||
workflow_temp_idOptions: [
|
|
||||||
{ fullName: '选项一', id: '1' },
|
|
||||||
{ fullName: '选项二', id: '2' },
|
|
||||||
],
|
|
||||||
workflow_temp_idProps: { label: 'fullName', value: 'id' },
|
|
||||||
},
|
|
||||||
|
|
||||||
childIndex: -1,
|
|
||||||
isEdit: false,
|
|
||||||
interfaceRes: {
|
|
||||||
project_type: [],
|
|
||||||
contract_mode: [],
|
|
||||||
workflow_enabled: [],
|
|
||||||
rg_list_alias: [],
|
|
||||||
rg_list_enabled: [],
|
|
||||||
cl_list_alias: [],
|
|
||||||
zl_list_enabled: [],
|
|
||||||
zl_list_alias: [],
|
|
||||||
contract_type_code: [],
|
|
||||||
cl_lst_seq: [],
|
|
||||||
workflow_temp_id: [],
|
|
||||||
gcl_list_enabled: [],
|
|
||||||
contract_temp_enabled: [],
|
|
||||||
contract_type_name: [],
|
|
||||||
rg_lst_seq: [],
|
|
||||||
gcl_lst_seq: [],
|
|
||||||
gcl_list_alias: [],
|
|
||||||
zl_lst_seq: [],
|
|
||||||
cl_list_enabled: [],
|
|
||||||
},
|
|
||||||
//可选范围默认值
|
|
||||||
ableAll: {},
|
|
||||||
|
|
||||||
//掩码配置
|
|
||||||
maskConfig: {
|
|
||||||
contract_type_code: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
contract_type_name: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
cl_list_alias: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
zl_list_alias: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
rg_list_alias: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
gcl_list_alias: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
//定位属性
|
|
||||||
locationScope: {},
|
|
||||||
|
|
||||||
extraOptions: {},
|
|
||||||
|
|
||||||
title: '',
|
|
||||||
continueText: '',
|
|
||||||
allList: [],
|
|
||||||
currIndex: 0,
|
|
||||||
isContinue: false,
|
|
||||||
submitType: 0,
|
|
||||||
showContinueBtn: true,
|
|
||||||
});
|
|
||||||
const { title, continueText, showContinueBtn, dataRule, dataForm, optionsObj, ableAll, maskConfig, submitType } = toRefs(state);
|
|
||||||
|
|
||||||
const getPrevDisabled = computed(() => state.currIndex === 0);
|
|
||||||
const getNextDisabled = computed(() => state.currIndex === state.allList.length - 1);
|
|
||||||
// 表单权限
|
|
||||||
const { hasFormP } = usePermission();
|
|
||||||
|
|
||||||
defineExpose({ init });
|
|
||||||
|
|
||||||
function init(data) {
|
|
||||||
state.submitType = 0;
|
|
||||||
state.isContinue = false;
|
|
||||||
state.title = !data.id ? t('common.add2Text', '新增') : t('common.editText', '编辑');
|
|
||||||
state.continueText = !data.id ? t('common.continueAndAddText', '确定并新增') : t('common.continueText', '确定并继续');
|
|
||||||
setFormProps({ continueLoading: false });
|
|
||||||
state.dataForm.id = data.id;
|
|
||||||
openPopup();
|
|
||||||
state.allList = data.allList;
|
|
||||||
state.currIndex = state.allList.length && data.id ? state.allList.findIndex(item => item.id === data.id) : 0;
|
|
||||||
nextTick(() => {
|
|
||||||
getForm().resetFields();
|
|
||||||
setTimeout(initData, 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function initData() {
|
|
||||||
changeLoading(true);
|
|
||||||
if (state.dataForm.id) {
|
|
||||||
getData(state.dataForm.id);
|
|
||||||
} else {
|
|
||||||
//初始化options
|
|
||||||
getproject_typeOptions();
|
|
||||||
|
|
||||||
// 设置默认值
|
|
||||||
state.dataForm = {
|
|
||||||
contract_type_code: undefined,
|
|
||||||
contract_type_name: undefined,
|
|
||||||
project_type: 'SOFT',
|
|
||||||
contract_mode: 'revenue',
|
|
||||||
cl_list_enabled: 0,
|
|
||||||
cl_list_alias: '材料清单',
|
|
||||||
cl_lst_seq: 1,
|
|
||||||
zl_list_enabled: 0,
|
|
||||||
zl_list_alias: '租赁清单',
|
|
||||||
zl_lst_seq: 1,
|
|
||||||
rg_list_enabled: 0,
|
|
||||||
rg_list_alias: '劳务清单',
|
|
||||||
rg_lst_seq: 1,
|
|
||||||
gcl_list_enabled: 0,
|
|
||||||
gcl_list_alias: '工程量清单',
|
|
||||||
gcl_lst_seq: 1,
|
|
||||||
contract_temp_enabled: 0,
|
|
||||||
workflow_enabled: 0,
|
|
||||||
workflow_temp_id: '',
|
|
||||||
version: 0,
|
|
||||||
};
|
|
||||||
if (getLeftTreeActiveInfo) state.dataForm = { ...state.dataForm, ...(getLeftTreeActiveInfo() || {}) };
|
|
||||||
state.childIndex = -1;
|
|
||||||
changeLoading(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getForm() {
|
|
||||||
const form = unref(formRef);
|
|
||||||
if (!form) {
|
|
||||||
throw new Error('form is null!');
|
|
||||||
}
|
|
||||||
return form;
|
|
||||||
}
|
|
||||||
function getData(id) {
|
|
||||||
getInfo(id).then(res => {
|
|
||||||
state.dataForm = res.data || {};
|
|
||||||
getproject_typeOptions();
|
|
||||||
|
|
||||||
state.childIndex = -1;
|
|
||||||
changeLoading(false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
async function handleSubmit(type) {
|
|
||||||
try {
|
|
||||||
const values = await getForm()?.validate();
|
|
||||||
if (!values) return;
|
|
||||||
|
|
||||||
setFormProps({ confirmLoading: true });
|
|
||||||
const formMethod = state.dataForm.id ? update : create;
|
|
||||||
formMethod(state.dataForm)
|
|
||||||
.then(res => {
|
|
||||||
createMessage.success(res.msg);
|
|
||||||
setFormProps({ confirmLoading: false });
|
|
||||||
if (state.submitType == 1) {
|
|
||||||
initData();
|
|
||||||
state.isContinue = true;
|
|
||||||
} else {
|
|
||||||
setFormProps({ open: false });
|
|
||||||
emit('reload');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
setFormProps({ confirmLoading: false });
|
|
||||||
});
|
|
||||||
} catch (_) {}
|
|
||||||
}
|
|
||||||
function handlePrev() {
|
|
||||||
state.currIndex--;
|
|
||||||
handleGetNewInfo();
|
|
||||||
}
|
|
||||||
function handleNext() {
|
|
||||||
state.currIndex++;
|
|
||||||
handleGetNewInfo();
|
|
||||||
}
|
|
||||||
function handleGetNewInfo() {
|
|
||||||
changeLoading(true);
|
|
||||||
getForm().resetFields();
|
|
||||||
const id = state.allList[state.currIndex].id;
|
|
||||||
getData(id);
|
|
||||||
}
|
|
||||||
function setFormProps(data) {
|
|
||||||
setPopupProps(data);
|
|
||||||
}
|
|
||||||
function changeLoading(loading) {
|
|
||||||
setPopupProps({ loading });
|
|
||||||
}
|
|
||||||
async function onClose() {
|
|
||||||
if (state.isContinue) emit('reload');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeData(model, index) {
|
|
||||||
state.isEdit = false;
|
|
||||||
state.childIndex = index;
|
|
||||||
for (let key in state.interfaceRes) {
|
|
||||||
if (key != model) {
|
|
||||||
let faceReList = state.interfaceRes[key];
|
|
||||||
for (let i = 0; i < faceReList.length; i++) {
|
|
||||||
let relationField = faceReList[i].relationField;
|
|
||||||
if (relationField) {
|
|
||||||
let modelAll = relationField.split('-');
|
|
||||||
let faceMode = '';
|
|
||||||
let faceMode2 = modelAll.length == 2 ? modelAll[0].substring(0, modelAll[0].length - 4) + modelAll[1] : '';
|
|
||||||
for (let i = 0; i < modelAll.length; i++) {
|
|
||||||
faceMode += modelAll[i];
|
|
||||||
}
|
|
||||||
if (faceMode == model || faceMode2 == model) {
|
|
||||||
let options = 'get' + key + 'Options';
|
|
||||||
eval(options)(true);
|
|
||||||
changeData(key, index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function changeDataFormData(type, data, model, index, defaultValue) {
|
|
||||||
if (!state.isEdit) {
|
|
||||||
if (type == 2) {
|
|
||||||
for (let i = 0; i < state.dataForm[data].length; i++) {
|
|
||||||
if (index == -1) {
|
|
||||||
state.dataForm[data][i][model] = defaultValue;
|
|
||||||
} else if (index == i) {
|
|
||||||
state.dataForm[data][i][model] = defaultValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
state.dataForm[data] = defaultValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//数据选项--远端数据初始化方法
|
|
||||||
function getproject_typeOptions(isClear = false) {
|
|
||||||
const index = state.childIndex;
|
|
||||||
let templateJsonList = JSON.parse(JSON.stringify(state.interfaceRes.project_type));
|
|
||||||
for (let i = 0; i < templateJsonList.length; i++) {
|
|
||||||
let json = templateJsonList[i];
|
|
||||||
if (json.relationField && json.sourceType == 1) {
|
|
||||||
let relationFieldAll = json.relationField.split('-');
|
|
||||||
let val = json.defaultValue;
|
|
||||||
if (relationFieldAll.length > 1 && index > -1) {
|
|
||||||
if (relationFieldAll[0].endsWith('List')) {
|
|
||||||
val =
|
|
||||||
state.dataForm[relationFieldAll[0]] && state.dataForm[relationFieldAll[0]].length
|
|
||||||
? state.dataForm[relationFieldAll[0]][index][relationFieldAll[1]]
|
|
||||||
: '';
|
|
||||||
} else {
|
|
||||||
val =
|
|
||||||
state.dataForm[relationFieldAll[0] + 'List'] && state.dataForm[relationFieldAll[0] + 'List'].length
|
|
||||||
? state.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]]
|
|
||||||
: '';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val = state.dataForm[relationFieldAll];
|
|
||||||
}
|
|
||||||
json.defaultValue = val ? val : '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let template = {
|
|
||||||
paramList: templateJsonList,
|
|
||||||
};
|
|
||||||
getDataInterfaceRes('797165402772733957', template).then(res => {
|
|
||||||
let data = res.data;
|
|
||||||
state.optionsObj.project_typeOptions = data;
|
|
||||||
if (index == -1) return;
|
|
||||||
if (isClear) {
|
|
||||||
changeDataFormData(1, 'List', 'project_type', index, '');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function getRelationDate(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
|
||||||
let timeDataValue: any = null;
|
|
||||||
let timeValue = Number(timeValueData);
|
|
||||||
if (timeRule) {
|
|
||||||
if (timeType == 1) {
|
|
||||||
timeDataValue = timeValue;
|
|
||||||
} else if (timeType == 2) {
|
|
||||||
timeDataValue = dataValue;
|
|
||||||
} else if (timeType == 3) {
|
|
||||||
timeDataValue = new Date().getTime();
|
|
||||||
} else if (timeType == 4 || timeType == 5) {
|
|
||||||
const type = getTimeUnit(timeTarget);
|
|
||||||
const method = timeType == 4 ? 'subtract' : 'add';
|
|
||||||
timeDataValue = dayjs()[method](timeValue, type).valueOf();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return timeDataValue;
|
|
||||||
}
|
|
||||||
function getRelationTime(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
|
||||||
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType;
|
|
||||||
let timeDataValue: any = null;
|
|
||||||
if (timeRule) {
|
|
||||||
if (timeType == 1) {
|
|
||||||
timeDataValue = timeValue || '00:00:00';
|
|
||||||
if (timeDataValue.split(':').length == 3) {
|
|
||||||
timeDataValue = timeDataValue;
|
|
||||||
} else {
|
|
||||||
timeDataValue = timeDataValue + ':00';
|
|
||||||
}
|
|
||||||
} else if (timeType == 2) {
|
|
||||||
timeDataValue = dataValue;
|
|
||||||
} else if (timeType == 3) {
|
|
||||||
timeDataValue = dayjs().format(format);
|
|
||||||
} else if (timeType == 4 || timeType == 5) {
|
|
||||||
const type = getTimeUnit(timeTarget + 3);
|
|
||||||
const method = timeType == 4 ? 'subtract' : 'add';
|
|
||||||
timeDataValue = dayjs()[method](timeValue, type).format(format);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return timeDataValue;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.mb-20 {
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
background-color: #F5F7FA;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { defHttp } from '@/utils/http/axios';
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
export function getList(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/MdmContractType/getList', data });
|
|
||||||
}
|
|
||||||
// 新建
|
|
||||||
export function create(data) {
|
|
||||||
return defHttp.post({ url:'/api/bcm/MdmContractType', data });
|
|
||||||
}
|
|
||||||
// 修改
|
|
||||||
export function update(data) {
|
|
||||||
return defHttp.put({ url: '/api/bcm/MdmContractType/'+ data.id, data });
|
|
||||||
}
|
|
||||||
// 详情(无转换数据)
|
|
||||||
export function getInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/MdmContractType/' + id });
|
|
||||||
}
|
|
||||||
// 获取(转换数据)
|
|
||||||
export function getDetailInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/MdmContractType/detail/' + id });
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
export function del(id) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/MdmContractType/' + id });
|
|
||||||
}
|
|
||||||
// 批量删除数据
|
|
||||||
export function batchDelete(data) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/MdmContractType/batchRemove', data });
|
|
||||||
}
|
|
||||||
// 导出
|
|
||||||
export function exportData(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/MdmContractType/Actions/Export', data });
|
|
||||||
}
|
|
||||||
@@ -1,600 +0,0 @@
|
|||||||
const columnList = [
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem49f65f",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"合同类型编码",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774838784995,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"contract_type_code",
|
|
||||||
"__vModel__":"contract_type_code",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"contract_type_code",
|
|
||||||
"placeholder":"请输入合同类型编码",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":25,
|
|
||||||
"fullName":"合同类型编码",
|
|
||||||
"label":"合同类型编码",
|
|
||||||
"sortable":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"width":null,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItema51d1e",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"合同类型名称",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774838789410,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"contract_type_name",
|
|
||||||
"__vModel__":"contract_type_name",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"contract_type_name",
|
|
||||||
"placeholder":"请输入合同类型名称",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":50,
|
|
||||||
"fullName":"合同类型名称",
|
|
||||||
"label":"合同类型名称",
|
|
||||||
"sortable":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"width":null,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"项目类型",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"项目类型",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"props":{
|
|
||||||
"label":"project_type_name",
|
|
||||||
"value":"project_type_code"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"SOFT",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"797165402772733957",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774840899305,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItemac75d7",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dynamic",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"项目类型",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"项目类型列表",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"prop":"project_type",
|
|
||||||
"width":null,
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"project_type",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_type",
|
|
||||||
"placeholder":"请选择合同模式",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"合同模式",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"合同模式",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"id"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"revenue",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":false,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774839981641,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItemb30132",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"static",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"合同模式",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":6
|
|
||||||
},
|
|
||||||
"prop":"contract_mode",
|
|
||||||
"width":null,
|
|
||||||
"options":[
|
|
||||||
{
|
|
||||||
"fullName":"收入类合同",
|
|
||||||
"id":"revenue"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fullName":"支付类合同",
|
|
||||||
"id":"payment"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"__vModel__":"contract_mode",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"contract_mode",
|
|
||||||
"placeholder":"请选择",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"resizable":true,
|
|
||||||
"activeValue":1,
|
|
||||||
"inactiveValue":0,
|
|
||||||
"fullName":"材料清单",
|
|
||||||
"inactiveTxt":"N",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"材料清单",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItemef29e9",
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":0,
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"材料清单",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":false,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774840487884,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-switch",
|
|
||||||
"tag":"YunzhupaasSwitch",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":2
|
|
||||||
},
|
|
||||||
"prop":"cl_list_enabled",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"cl_list_enabled",
|
|
||||||
"fixed":"none",
|
|
||||||
"disabled":false,
|
|
||||||
"activeTxt":"Y",
|
|
||||||
"id":"cl_list_enabled",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"resizable":true,
|
|
||||||
"activeValue":1,
|
|
||||||
"inactiveValue":0,
|
|
||||||
"fullName":"劳务清单",
|
|
||||||
"inactiveTxt":"N",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"劳务清单",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItemc48550",
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":0,
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"劳务清单",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":false,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774840557640,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-switch",
|
|
||||||
"tag":"YunzhupaasSwitch",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":2
|
|
||||||
},
|
|
||||||
"prop":"rg_list_enabled",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"rg_list_enabled",
|
|
||||||
"fixed":"none",
|
|
||||||
"disabled":false,
|
|
||||||
"activeTxt":"Y",
|
|
||||||
"id":"rg_list_enabled",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"resizable":true,
|
|
||||||
"activeValue":1,
|
|
||||||
"inactiveValue":0,
|
|
||||||
"fullName":"工程量清单",
|
|
||||||
"inactiveTxt":"N",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"工程量清单",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem477d28",
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":0,
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"工程量清单",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":false,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774840573827,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-switch",
|
|
||||||
"tag":"YunzhupaasSwitch",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":2
|
|
||||||
},
|
|
||||||
"prop":"gcl_list_enabled",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"gcl_list_enabled",
|
|
||||||
"fixed":"none",
|
|
||||||
"disabled":false,
|
|
||||||
"activeTxt":"Y",
|
|
||||||
"id":"gcl_list_enabled",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"resizable":true,
|
|
||||||
"activeValue":1,
|
|
||||||
"inactiveValue":0,
|
|
||||||
"fullName":"租赁清单",
|
|
||||||
"inactiveTxt":"N",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"租赁清单",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem061f70",
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":0,
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"租赁清单",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":false,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774840537386,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-switch",
|
|
||||||
"tag":"YunzhupaasSwitch",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":2
|
|
||||||
},
|
|
||||||
"prop":"zl_list_enabled",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"zl_list_enabled",
|
|
||||||
"fixed":"none",
|
|
||||||
"disabled":false,
|
|
||||||
"activeTxt":"Y",
|
|
||||||
"id":"zl_list_enabled",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"resizable":true,
|
|
||||||
"activeValue":1,
|
|
||||||
"inactiveValue":0,
|
|
||||||
"fullName":"工作流程",
|
|
||||||
"inactiveTxt":"N",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"工作流程",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem43b97d",
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":0,
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"工作流程",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":false,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774840790597,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-switch",
|
|
||||||
"tag":"YunzhupaasSwitch",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":2
|
|
||||||
},
|
|
||||||
"prop":"workflow_enabled",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"workflow_enabled",
|
|
||||||
"fixed":"none",
|
|
||||||
"disabled":false,
|
|
||||||
"activeTxt":"Y",
|
|
||||||
"id":"workflow_enabled",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"resizable":true,
|
|
||||||
"activeValue":1,
|
|
||||||
"inactiveValue":0,
|
|
||||||
"fullName":"在线合同模板",
|
|
||||||
"inactiveTxt":"N",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"在线合同模板",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem098126",
|
|
||||||
"yunzhupaasKey":"switch",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":0,
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"在线合同模板",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":false,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774840646431,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-switch",
|
|
||||||
"tag":"YunzhupaasSwitch",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":2
|
|
||||||
},
|
|
||||||
"prop":"contract_temp_enabled",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"contract_temp_enabled",
|
|
||||||
"fixed":"none",
|
|
||||||
"disabled":false,
|
|
||||||
"activeTxt":"Y",
|
|
||||||
"id":"contract_temp_enabled",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default columnList
|
|
||||||
@@ -1,223 +0,0 @@
|
|||||||
const searchList = [
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem49f65f",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"合同类型编码",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774838784995,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"contract_type_code",
|
|
||||||
"__vModel__":"contract_type_code",
|
|
||||||
"searchMultiple":false,
|
|
||||||
"disabled":false,
|
|
||||||
"id":"contract_type_code",
|
|
||||||
"placeholder":"请输入合同类型编码",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"searchType":2,
|
|
||||||
"maxlength":25,
|
|
||||||
"fullName":"合同类型编码",
|
|
||||||
"label":"合同类型编码",
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"isKeyword":false,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItema51d1e",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"合同类型名称",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774838789410,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"contract_type_name",
|
|
||||||
"__vModel__":"contract_type_name",
|
|
||||||
"searchMultiple":false,
|
|
||||||
"disabled":false,
|
|
||||||
"id":"contract_type_name",
|
|
||||||
"placeholder":"请输入合同类型名称",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"searchType":2,
|
|
||||||
"maxlength":50,
|
|
||||||
"fullName":"合同类型名称",
|
|
||||||
"label":"合同类型名称",
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"isKeyword":true,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"searchType":1,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"合同模式",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"合同模式",
|
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"id"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"revenue",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":false,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_contract_type",
|
|
||||||
"renderKey":1774839981641,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItemb30132",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"static",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"合同模式",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":6
|
|
||||||
},
|
|
||||||
"prop":"contract_mode",
|
|
||||||
"options":[
|
|
||||||
{
|
|
||||||
"fullName":"收入类合同",
|
|
||||||
"id":"revenue"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fullName":"支付类合同",
|
|
||||||
"id":"payment"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"__vModel__":"contract_mode",
|
|
||||||
"searchMultiple":false,
|
|
||||||
"isKeyword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"contract_mode",
|
|
||||||
"placeholder":"请选择",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default searchList
|
|
||||||
@@ -1,231 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicDrawer v-bind="$attrs" @register="registerDrawer" :title="title" width="800px" showFooter :showOkBtn="false">
|
|
||||||
<template #insertFooter> </template>
|
|
||||||
<a-row class="p-10px dynamic-form">
|
|
||||||
<!-- 表单 -->
|
|
||||||
<a-form :colon="false" size="middle" layout="horizontal" labelAlign="right" :labelCol="{ style: { width: '100px' } }" :model="dataForm" ref="formRef">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<!-- 具体表单 -->
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="project_code">
|
|
||||||
<template #label>项目编码: </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.project_code"
|
|
||||||
placeholder="请输入项目编码"
|
|
||||||
:maxlength="30"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.project_code">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="project_name">
|
|
||||||
<template #label>项目名称: </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.project_name"
|
|
||||||
placeholder="请输入项目名称"
|
|
||||||
:maxlength="50"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.project_name">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="parent_project_id">
|
|
||||||
<template #label>上级项目: </template> <p>{{ dataForm.parent_project_id }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="org_id">
|
|
||||||
<template #label>归属组织: </template> <p>{{ dataForm.org_id }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="project_type">
|
|
||||||
<template #label>项目类型: </template> <p>{{ dataForm.project_type }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="project_start_date">
|
|
||||||
<template #label>启动日期: </template> <p>{{ dataForm.project_start_date }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="project_state_id">
|
|
||||||
<template #label>项目状态: </template> <p>{{ dataForm.project_state_id }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="seq_num">
|
|
||||||
<template #label>顺序号: </template>
|
|
||||||
<YunzhupaasInputNumber
|
|
||||||
v-model:value="dataForm.seq_num"
|
|
||||||
placeholder="请输入顺序号"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:step="1"
|
|
||||||
:controls="false">
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="remark">
|
|
||||||
<template #label>备注: </template> <p>{{ dataForm.remark }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<!-- 表单结束 -->
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</a-row>
|
|
||||||
</BasicDrawer>
|
|
||||||
<!-- 有关联表单详情:开始 -->
|
|
||||||
<RelationDetail ref="relationDetailRef" />
|
|
||||||
<!-- 有关联表单详情:结束 -->
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { getDetailInfo } from './helper/api';
|
|
||||||
import { getConfigData } from '@/api/onlineDev/visualDev';
|
|
||||||
import { reactive, toRefs, nextTick, ref, computed, unref, toRaw } from 'vue';
|
|
||||||
import { BasicModal, useModal } from '@/components/Modal';
|
|
||||||
import { BasicDrawer, useDrawer } from '@/components/Drawer';
|
|
||||||
// 有关联表单详情
|
|
||||||
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
|
||||||
// 表单权限
|
|
||||||
import { usePermission } from '@/hooks/web/usePermission';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { buildUUID } from '@/utils/uuid';
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
|
||||||
import { getDataChange } from '@/api/onlineDev/visualDev';
|
|
||||||
import { getDataInterfaceDataInfoByIds } from '@/api/systemData/dataInterface';
|
|
||||||
import ExtraRelationInfo from '@/components/yunzhupaas/RelationForm/src/ExtraRelationInfo.vue';
|
|
||||||
|
|
||||||
interface State {
|
|
||||||
dataForm: any;
|
|
||||||
title: string;
|
|
||||||
maskConfig: any;
|
|
||||||
interfaceRes: any;
|
|
||||||
locationScope: any;
|
|
||||||
extraOptions: any;
|
|
||||||
extraData: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
defineOptions({ name: 'Detail' });
|
|
||||||
const { createMessage, createConfirm } = useMessage();
|
|
||||||
const [registerDrawer, { openDrawer, setDrawerProps, closeDrawer }] = useDrawer();
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
|
||||||
const relationDetailRef = ref<any>(null);
|
|
||||||
const state = reactive<State>({
|
|
||||||
dataForm: {},
|
|
||||||
title: t('common.detailText', '详情'),
|
|
||||||
maskConfig: {
|
|
||||||
project_code: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
project_name: {
|
|
||||||
prefixType: 1,
|
|
||||||
useUnrealMask: false,
|
|
||||||
maskType: 1,
|
|
||||||
unrealMaskLength: 1,
|
|
||||||
prefixLimit: 0,
|
|
||||||
suffixLimit: 0,
|
|
||||||
filler: '*',
|
|
||||||
prefixSpecifyChar: '',
|
|
||||||
suffixType: 1,
|
|
||||||
ignoreChar: '',
|
|
||||||
suffixSpecifyChar: '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
interfaceRes: {
|
|
||||||
project_type: [],
|
|
||||||
org_id: [],
|
|
||||||
project_state_id: [],
|
|
||||||
project_code: [],
|
|
||||||
remark: [],
|
|
||||||
project_name: [],
|
|
||||||
parent_project_id: [],
|
|
||||||
seq_num: [],
|
|
||||||
project_start_date: [],
|
|
||||||
},
|
|
||||||
locationScope: {},
|
|
||||||
extraOptions: {},
|
|
||||||
extraData: {},
|
|
||||||
});
|
|
||||||
const { title, dataForm, maskConfig } = toRefs(state);
|
|
||||||
// 表单权限
|
|
||||||
const { hasFormP } = usePermission();
|
|
||||||
|
|
||||||
defineExpose({ init });
|
|
||||||
|
|
||||||
function init(data) {
|
|
||||||
state.dataForm.id = data.id;
|
|
||||||
openDrawer();
|
|
||||||
nextTick(() => {
|
|
||||||
setTimeout(initData, 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function initData() {
|
|
||||||
changeLoading(true);
|
|
||||||
if (state.dataForm.id) {
|
|
||||||
getData(state.dataForm.id);
|
|
||||||
} else {
|
|
||||||
closeDrawer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getData(id) {
|
|
||||||
getDetailInfo(id).then(res => {
|
|
||||||
state.dataForm = res.data || {};
|
|
||||||
nextTick(() => {
|
|
||||||
changeLoading(false);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function toDetail(modelId, id, propsValue) {
|
|
||||||
if (!id) return;
|
|
||||||
getConfigData(modelId).then(res => {
|
|
||||||
if (!res.data || !res.data.formData) return;
|
|
||||||
const formConf = JSON.parse(res.data.formData);
|
|
||||||
formConf.popupType = 'general';
|
|
||||||
formConf.hasPrintBtn = false;
|
|
||||||
formConf.customBtns = [];
|
|
||||||
const data = { id, formConf, modelId, propsValue };
|
|
||||||
relationDetailRef.value?.init(data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function setFormProps(data) {
|
|
||||||
setDrawerProps(data);
|
|
||||||
}
|
|
||||||
function changeLoading(loading) {
|
|
||||||
setFormProps({ loading });
|
|
||||||
}
|
|
||||||
|
|
||||||
function getParamList(key) {
|
|
||||||
let templateJson: any[] = state.interfaceRes[key];
|
|
||||||
if (!templateJson || !templateJson.length || !state.dataForm) return templateJson;
|
|
||||||
for (let i = 0; i < templateJson.length; i++) {
|
|
||||||
if (templateJson[i].relationField && templateJson[i].sourceType == 1) {
|
|
||||||
templateJson[i].defaultValue = state.dataForm[templateJson[i].relationField + '_id'] || '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return templateJson;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,521 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicDrawer v-bind="$attrs" @register="registerDrawer" width="800px" showFooter
|
|
||||||
:cancelText="t('common.cancelText','取消')"
|
|
||||||
:okText="t('common.okText','确定')"
|
|
||||||
@ok="handleSubmit" :closeFunc="onClose">
|
|
||||||
<template #title>
|
|
||||||
<a-space :size="10">
|
|
||||||
<div class="text-16px font-medium">{{ title }}</div>
|
|
||||||
<a-space-compact size="small" block v-if="dataForm.id">
|
|
||||||
<a-tooltip :title="t('common.prevRecord')">
|
|
||||||
<a-button size="small" :disabled="getPrevDisabled" @click="handlePrev">
|
|
||||||
<i class="icon-ym icon-ym-caret-left text-10px"></i>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
<a-tooltip :title="t('common.nextRecord')">
|
|
||||||
<a-button size="small" :disabled="getNextDisabled" @click="handleNext">
|
|
||||||
<i class="icon-ym icon-ym-caret-right text-10px"></i>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
</a-space-compact>
|
|
||||||
</a-space>
|
|
||||||
</template>
|
|
||||||
<template #insertFooter>
|
|
||||||
<div class="float-left mt-5px">
|
|
||||||
<yunzhupaasCheckboxSingle v-model:value="submitType" :label="continueText" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<a-row class="p-10px dynamic-form ">
|
|
||||||
<!-- 表单 -->
|
|
||||||
<a-form :colon="false" size="middle" layout= "horizontal"
|
|
||||||
labelAlign= "right"
|
|
||||||
:labelCol="{ style: { width: '100px' } }" :model="dataForm" :rules="dataRule" ref="formRef" >
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<!-- 具体表单 -->
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="project_code" >
|
|
||||||
<template #label>项目编码
|
|
||||||
</template> <YunzhupaasInput v-model:value="dataForm.project_code" @change="changeData('project_code',-1)"
|
|
||||||
placeholder="请输入项目编码" :maxlength="30" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.project_code" :showCount = "false" >
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="project_name" >
|
|
||||||
<template #label>项目名称
|
|
||||||
</template> <YunzhupaasInput v-model:value="dataForm.project_name" @change="changeData('project_name',-1)"
|
|
||||||
placeholder="请输入项目名称" :maxlength="50" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.project_name" :showCount = "false" >
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="parent_project_id" >
|
|
||||||
<template #label>上级项目
|
|
||||||
</template> <YunzhupaasTreeSelect v-model:value="dataForm.parent_project_id" @change="changeData('parent_project_id',-1)"
|
|
||||||
placeholder="请选择上级项目" :templateJson="state.interfaceRes.parent_project_id" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' :options="optionsObj.parent_project_idOptions" :fieldNames="optionsObj.parent_project_idProps"
|
|
||||||
>
|
|
||||||
</YunzhupaasTreeSelect>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="org_id" >
|
|
||||||
<template #label>归属组织
|
|
||||||
</template> <YunzhupaasOrganizeSelect v-model:value="dataForm.org_id" @change="changeData('org_id',-1)"
|
|
||||||
placeholder="请选择归属组织" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' selectType="all" >
|
|
||||||
</YunzhupaasOrganizeSelect>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="project_type" >
|
|
||||||
<template #label>项目类型
|
|
||||||
</template> <YunzhupaasSelect v-model:value="dataForm.project_type" @change="changeData('project_type',-1)"
|
|
||||||
placeholder="请选择项目类型" :templateJson="state.interfaceRes.project_type" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' :options="optionsObj.project_typeOptions" :fieldNames="optionsObj.project_typeProps"
|
|
||||||
>
|
|
||||||
</YunzhupaasSelect>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="project_start_date" >
|
|
||||||
<template #label>启动日期
|
|
||||||
</template> <YunzhupaasDatePicker v-model:value="dataForm.project_start_date" @change="changeData('project_start_date',-1)"
|
|
||||||
placeholder="请选择启动日期" :allowClear='true' :style='{"width":"100%"}' format="yyyy-MM-dd" :startTime="getRelationDate(false,1,1,'','')" :endTime="getRelationDate(false,1,1,'','')" >
|
|
||||||
</YunzhupaasDatePicker>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="project_state_id" >
|
|
||||||
<template #label>项目状态
|
|
||||||
</template> <YunzhupaasSelect v-model:value="dataForm.project_state_id" @change="changeData('project_state_id',-1)"
|
|
||||||
placeholder="请选择项目状态" :templateJson="state.interfaceRes.project_state_id" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' :options="optionsObj.project_state_idOptions" :fieldNames="optionsObj.project_state_idProps"
|
|
||||||
>
|
|
||||||
</YunzhupaasSelect>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="seq_num" >
|
|
||||||
<template #label>顺序号
|
|
||||||
</template> <YunzhupaasInputNumber v-model:value="dataForm.seq_num" @change="changeData('seq_num',-1)"
|
|
||||||
placeholder="请输入顺序号" :style='{"width":"100%"}' :step="1" :controls="false" >
|
|
||||||
</YunzhupaasInputNumber>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item" >
|
|
||||||
<a-form-item
|
|
||||||
name="remark" >
|
|
||||||
<template #label>备注
|
|
||||||
</template> <YunzhupaasTextarea v-model:value="dataForm.remark" @change="changeData('remark',-1)"
|
|
||||||
placeholder="请输入备注" :maxlength="200" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":4,"maxRows":4}' :showCount = "true" >
|
|
||||||
</YunzhupaasTextarea>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<!-- 表单结束 -->
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</a-row>
|
|
||||||
</BasicDrawer>
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { create, update, getInfo } from './helper/api';
|
|
||||||
import { reactive, toRefs, nextTick, ref, unref, computed,toRaw, inject } from 'vue';
|
|
||||||
import { BasicDrawer, useDrawer } from '@/components/Drawer';
|
|
||||||
import { yunzhupaasRelationForm } from '@/components/yunzhupaas';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
|
||||||
import { useUserStore } from '@/store/modules/user';
|
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
|
||||||
import { thousandsFormat , getDateTimeUnit, getTimeUnit} from '@/utils/yunzhupaas';
|
|
||||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary';
|
|
||||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
// 表单权限
|
|
||||||
import { usePermission } from '@/hooks/web/usePermission';
|
|
||||||
import { cloneDeep } from 'lodash-es';
|
|
||||||
import { buildUUID } from '@/utils/uuid';
|
|
||||||
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
|
||||||
|
|
||||||
|
|
||||||
interface State {
|
|
||||||
dataForm: any;
|
|
||||||
tableRows: any;
|
|
||||||
dataRule: any;
|
|
||||||
optionsObj: any;
|
|
||||||
childIndex: any;
|
|
||||||
isEdit: any;
|
|
||||||
interfaceRes: any;
|
|
||||||
//可选范围默认值
|
|
||||||
ableAll: any;
|
|
||||||
//掩码配置
|
|
||||||
maskConfig:any;
|
|
||||||
//定位属性
|
|
||||||
locationScope:any;
|
|
||||||
extraOptions: any;
|
|
||||||
title: string;
|
|
||||||
continueText: string; allList: any[];
|
|
||||||
currIndex: number;
|
|
||||||
isContinue: boolean;
|
|
||||||
submitType: number;
|
|
||||||
showContinueBtn: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
const emit = defineEmits(['reload']);
|
|
||||||
const getLeftTreeActiveInfo: (() => any) | null = inject('getLeftTreeActiveInfo', null);
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const userInfo = userStore.getUserInfo;
|
|
||||||
const { createMessage, createConfirm } = useMessage();
|
|
||||||
const { t } = useI18n();
|
|
||||||
const [registerDrawer, { openDrawer, setDrawerProps }] = useDrawer();
|
|
||||||
const formRef = ref<FormInstance>();
|
|
||||||
const state = reactive<State>({
|
|
||||||
dataForm: {
|
|
||||||
project_code:undefined,
|
|
||||||
project_name:undefined,
|
|
||||||
parent_project_id:'',
|
|
||||||
org_id: userInfo.organizeIdList?userInfo.organizeIdList:'',
|
|
||||||
project_type:'',
|
|
||||||
project_start_date:undefined,
|
|
||||||
project_state_id:'',
|
|
||||||
seq_num:undefined,
|
|
||||||
remark:undefined,
|
|
||||||
},
|
|
||||||
|
|
||||||
tableRows:{
|
|
||||||
},
|
|
||||||
|
|
||||||
dataRule: {
|
|
||||||
project_code: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('sys.validate.textRequiredSuffix','不能为空'),
|
|
||||||
trigger: 'blur'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
project_name: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: t('sys.validate.textRequiredSuffix','不能为空'),
|
|
||||||
trigger: 'blur'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
optionsObj:{
|
|
||||||
parent_project_idOptions:[],
|
|
||||||
parent_project_idProps:{"label":"project_name","value":"project_id" ,"children":"children" },
|
|
||||||
project_typeOptions:[],
|
|
||||||
project_typeProps:{"label":"project_type_name","value":"project_type_id" },
|
|
||||||
project_state_idOptions:[],
|
|
||||||
project_state_idProps:{"label":"fullName","value":"enCode" },
|
|
||||||
},
|
|
||||||
|
|
||||||
childIndex: -1,
|
|
||||||
isEdit: false,
|
|
||||||
interfaceRes: {"project_type":[],"org_id":[],"project_state_id":[],"project_code":[],"remark":[],"project_name":[],"parent_project_id":[],"seq_num":[],"project_start_date":[]},
|
|
||||||
//可选范围默认值
|
|
||||||
ableAll:{
|
|
||||||
},
|
|
||||||
|
|
||||||
//掩码配置
|
|
||||||
maskConfig:{
|
|
||||||
project_code: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
|
||||||
project_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
|
||||||
},
|
|
||||||
|
|
||||||
//定位属性
|
|
||||||
locationScope:{
|
|
||||||
},
|
|
||||||
|
|
||||||
extraOptions:{
|
|
||||||
},
|
|
||||||
|
|
||||||
title: "",
|
|
||||||
continueText: "", allList: [],
|
|
||||||
currIndex: 0,
|
|
||||||
isContinue: false,
|
|
||||||
submitType: 0,
|
|
||||||
showContinueBtn: true ,
|
|
||||||
});
|
|
||||||
const { title, continueText, showContinueBtn, dataRule, dataForm, optionsObj, ableAll, maskConfig,submitType } = toRefs(state);
|
|
||||||
|
|
||||||
const getPrevDisabled = computed(() => state.currIndex === 0);
|
|
||||||
const getNextDisabled = computed(() => state.currIndex === state.allList.length - 1);
|
|
||||||
// 表单权限
|
|
||||||
const { hasFormP } = usePermission();
|
|
||||||
|
|
||||||
defineExpose({ init });
|
|
||||||
|
|
||||||
function init(data) {
|
|
||||||
state.submitType = 0;
|
|
||||||
state.isContinue = false;
|
|
||||||
state.title = !data.id ? t('common.add2Text','新增') : t('common.editText','编辑');
|
|
||||||
state.continueText = !data.id ? t('common.continueAndAddText','确定并新增') : t('common.continueText','确定并继续'); setFormProps({ continueLoading: false });
|
|
||||||
state.dataForm.id = data.id;
|
|
||||||
openDrawer();
|
|
||||||
state.allList = data.allList;
|
|
||||||
state.currIndex = state.allList.length && data.id ? state.allList.findIndex((item) => item.id === data.id) : 0;
|
|
||||||
nextTick(() => {
|
|
||||||
getForm().resetFields();
|
|
||||||
setTimeout(initData, 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function initData() {
|
|
||||||
changeLoading(true);
|
|
||||||
if (state.dataForm.id) {
|
|
||||||
getData(state.dataForm.id);
|
|
||||||
} else {
|
|
||||||
//初始化options
|
|
||||||
getparent_project_idOptions();
|
|
||||||
getproject_typeOptions();
|
|
||||||
getproject_state_idOptions();
|
|
||||||
|
|
||||||
// 设置默认值
|
|
||||||
state.dataForm={
|
|
||||||
project_code:undefined,
|
|
||||||
project_name:undefined,
|
|
||||||
parent_project_id:'',
|
|
||||||
org_id: userInfo.organizeIdList?userInfo.organizeIdList:'',
|
|
||||||
project_type:'',
|
|
||||||
project_start_date:undefined,
|
|
||||||
project_state_id:'',
|
|
||||||
seq_num:undefined,
|
|
||||||
remark:undefined,
|
|
||||||
};
|
|
||||||
if (getLeftTreeActiveInfo) state.dataForm = {...state.dataForm, ...(getLeftTreeActiveInfo() || {}) };
|
|
||||||
state.childIndex = -1;
|
|
||||||
changeLoading(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getForm() {
|
|
||||||
const form = unref(formRef);
|
|
||||||
if (!form) {
|
|
||||||
throw new Error('form is null!');
|
|
||||||
}
|
|
||||||
return form;
|
|
||||||
}
|
|
||||||
function getData(id) {
|
|
||||||
getInfo(id).then((res) => {
|
|
||||||
state.dataForm = res.data || {};
|
|
||||||
getparent_project_idOptions();
|
|
||||||
getproject_typeOptions();
|
|
||||||
getproject_state_idOptions();
|
|
||||||
|
|
||||||
state.childIndex = -1;
|
|
||||||
changeLoading(false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
async function handleSubmit(type) {
|
|
||||||
try {
|
|
||||||
const values = await getForm()?.validate();
|
|
||||||
if (!values) return;
|
|
||||||
|
|
||||||
|
|
||||||
setFormProps({ confirmLoading: true });
|
|
||||||
const formMethod = state.dataForm.id ? update : create;
|
|
||||||
formMethod(state.dataForm)
|
|
||||||
.then((res) => {
|
|
||||||
createMessage.success(res.msg);
|
|
||||||
setFormProps({ confirmLoading: false });
|
|
||||||
if (state.submitType == 1) {
|
|
||||||
initData();
|
|
||||||
state.isContinue = true;
|
|
||||||
} else {
|
|
||||||
setFormProps({ open: false });
|
|
||||||
emit('reload');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
setFormProps({ confirmLoading: false });
|
|
||||||
});
|
|
||||||
} catch (_) {}
|
|
||||||
}
|
|
||||||
function handlePrev() {
|
|
||||||
state.currIndex--;
|
|
||||||
handleGetNewInfo();
|
|
||||||
}
|
|
||||||
function handleNext() {
|
|
||||||
state.currIndex++;
|
|
||||||
handleGetNewInfo();
|
|
||||||
}
|
|
||||||
function handleGetNewInfo() {
|
|
||||||
changeLoading(true);
|
|
||||||
getForm().resetFields();
|
|
||||||
const id = state.allList[state.currIndex].id;
|
|
||||||
getData(id);
|
|
||||||
}
|
|
||||||
function setFormProps(data) {
|
|
||||||
setDrawerProps(data);
|
|
||||||
}
|
|
||||||
function changeLoading(loading) {
|
|
||||||
setDrawerProps({ loading });
|
|
||||||
}
|
|
||||||
async function onClose() {
|
|
||||||
if (state.isContinue) emit('reload');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeData(model, index) {
|
|
||||||
state.isEdit = false
|
|
||||||
state.childIndex = index
|
|
||||||
for (let key in state.interfaceRes) {
|
|
||||||
if (key != model) {
|
|
||||||
let faceReList = state.interfaceRes[key]
|
|
||||||
for (let i = 0; i < faceReList.length; i++) {
|
|
||||||
let relationField = faceReList[i].relationField;
|
|
||||||
if(relationField){
|
|
||||||
let modelAll = relationField.split('-');
|
|
||||||
let faceMode = '';
|
|
||||||
let faceMode2 = modelAll.length == 2?modelAll[0].substring(0, modelAll[0].length-4) +modelAll[1]:""
|
|
||||||
for (let i = 0; i < modelAll.length; i++) {
|
|
||||||
faceMode += modelAll[i];
|
|
||||||
}
|
|
||||||
if (faceMode == model || faceMode2 == model ) {
|
|
||||||
let options = 'get' + key + 'Options';
|
|
||||||
eval(options)(true);
|
|
||||||
changeData(key, index)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function changeDataFormData(type, data, model,index,defaultValue) {
|
|
||||||
if(!state.isEdit) {
|
|
||||||
if (type == 2) {
|
|
||||||
for (let i = 0; i < state.dataForm[data].length; i++) {
|
|
||||||
if (index == -1) {
|
|
||||||
state.dataForm[data][i][model] = defaultValue
|
|
||||||
} else if (index == i) {
|
|
||||||
state.dataForm[data][i][model] = defaultValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
state.dataForm[data] = defaultValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//数据选项--远端数据初始化方法
|
|
||||||
function getparent_project_idOptions(isClear = false) {
|
|
||||||
const index = state.childIndex
|
|
||||||
let templateJsonList = JSON.parse(JSON.stringify(state.interfaceRes.parent_project_id))
|
|
||||||
for (let i = 0; i < templateJsonList.length; i++) {
|
|
||||||
let json = templateJsonList[i];
|
|
||||||
if(json.relationField&&json.sourceType ==1){
|
|
||||||
let relationFieldAll = json.relationField.split("-");
|
|
||||||
let val = json.defaultValue;
|
|
||||||
if(relationFieldAll.length>1 && index>-1){
|
|
||||||
if(relationFieldAll[0].endsWith("List")){
|
|
||||||
val = state.dataForm[relationFieldAll[0]]&&state.dataForm[relationFieldAll[0]].length?
|
|
||||||
state.dataForm[relationFieldAll[0]][index][relationFieldAll[1]]:''
|
|
||||||
}else{
|
|
||||||
val = state.dataForm[relationFieldAll[0]+'List']&&state.dataForm[relationFieldAll[0]+'List'].length?
|
|
||||||
state.dataForm[relationFieldAll[0]+'List'][index][relationFieldAll[1]]:''
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
val = state.dataForm[relationFieldAll]
|
|
||||||
}
|
|
||||||
json.defaultValue = val ? val : '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let template ={
|
|
||||||
paramList:templateJsonList
|
|
||||||
}
|
|
||||||
getDataInterfaceRes('797177453981204485',template).then(res => {
|
|
||||||
let data = res.data
|
|
||||||
state.optionsObj.parent_project_idOptions = data
|
|
||||||
if(index==-1) return
|
|
||||||
if(isClear){
|
|
||||||
changeDataFormData(1,'List','parent_project_id',index,'')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//数据选项--远端数据初始化方法
|
|
||||||
function getproject_typeOptions(isClear = false) {
|
|
||||||
const index = state.childIndex
|
|
||||||
let templateJsonList = JSON.parse(JSON.stringify(state.interfaceRes.project_type))
|
|
||||||
for (let i = 0; i < templateJsonList.length; i++) {
|
|
||||||
let json = templateJsonList[i];
|
|
||||||
if(json.relationField&&json.sourceType ==1){
|
|
||||||
let relationFieldAll = json.relationField.split("-");
|
|
||||||
let val = json.defaultValue;
|
|
||||||
if(relationFieldAll.length>1 && index>-1){
|
|
||||||
if(relationFieldAll[0].endsWith("List")){
|
|
||||||
val = state.dataForm[relationFieldAll[0]]&&state.dataForm[relationFieldAll[0]].length?
|
|
||||||
state.dataForm[relationFieldAll[0]][index][relationFieldAll[1]]:''
|
|
||||||
}else{
|
|
||||||
val = state.dataForm[relationFieldAll[0]+'List']&&state.dataForm[relationFieldAll[0]+'List'].length?
|
|
||||||
state.dataForm[relationFieldAll[0]+'List'][index][relationFieldAll[1]]:''
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
val = state.dataForm[relationFieldAll]
|
|
||||||
}
|
|
||||||
json.defaultValue = val ? val : '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let template ={
|
|
||||||
paramList:templateJsonList
|
|
||||||
}
|
|
||||||
getDataInterfaceRes('797165402772733957',template).then(res => {
|
|
||||||
let data = res.data
|
|
||||||
state.optionsObj.project_typeOptions = data
|
|
||||||
if(index==-1) return
|
|
||||||
if(isClear){
|
|
||||||
changeDataFormData(1,'List','project_type',index,'')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//数据选项--数据字典初始化方法
|
|
||||||
function getproject_state_idOptions() {
|
|
||||||
getDictionaryDataSelector('797036777536749573').then(res => {
|
|
||||||
state.optionsObj.project_state_idOptions = res.data.list
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function getRelationDate(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
|
||||||
let timeDataValue: any = null;
|
|
||||||
let timeValue = Number(timeValueData);
|
|
||||||
if (timeRule) {
|
|
||||||
if (timeType == 1) {
|
|
||||||
timeDataValue = timeValue;
|
|
||||||
} else if (timeType == 2) {
|
|
||||||
timeDataValue = dataValue;
|
|
||||||
} else if (timeType == 3) {
|
|
||||||
timeDataValue = new Date().getTime();
|
|
||||||
} else if (timeType == 4 || timeType == 5) {
|
|
||||||
const type = getTimeUnit(timeTarget);
|
|
||||||
const method = timeType == 4 ? 'subtract' : 'add';
|
|
||||||
timeDataValue = dayjs()[method](timeValue, type).valueOf();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return timeDataValue;
|
|
||||||
}
|
|
||||||
function getRelationTime(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
|
||||||
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType;
|
|
||||||
let timeDataValue: any = null;
|
|
||||||
if (timeRule) {
|
|
||||||
if (timeType == 1) {
|
|
||||||
timeDataValue = timeValue || '00:00:00';
|
|
||||||
if (timeDataValue.split(':').length == 3) {
|
|
||||||
timeDataValue = timeDataValue;
|
|
||||||
} else {
|
|
||||||
timeDataValue = timeDataValue + ':00';
|
|
||||||
}
|
|
||||||
} else if (timeType == 2) {
|
|
||||||
timeDataValue = dataValue;
|
|
||||||
} else if (timeType == 3) {
|
|
||||||
timeDataValue = dayjs().format(format);
|
|
||||||
} else if (timeType == 4 || timeType == 5) {
|
|
||||||
const type = getTimeUnit(timeTarget + 3);
|
|
||||||
const method = timeType == 4 ? 'subtract' : 'add';
|
|
||||||
timeDataValue = dayjs()[method](timeValue, type).format(format);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return timeDataValue;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { defHttp } from '@/utils/http/axios';
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
export function getList(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/MdmProject/getList', data });
|
|
||||||
}
|
|
||||||
// 新建
|
|
||||||
export function create(data) {
|
|
||||||
return defHttp.post({ url:'/api/bcm/MdmProject', data });
|
|
||||||
}
|
|
||||||
// 修改
|
|
||||||
export function update(data) {
|
|
||||||
return defHttp.put({ url: '/api/bcm/MdmProject/'+ data.id, data });
|
|
||||||
}
|
|
||||||
// 详情(无转换数据)
|
|
||||||
export function getInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/MdmProject/' + id });
|
|
||||||
}
|
|
||||||
// 获取(转换数据)
|
|
||||||
export function getDetailInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/MdmProject/detail/' + id });
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
export function del(id) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/MdmProject/' + id });
|
|
||||||
}
|
|
||||||
// 批量删除数据
|
|
||||||
export function batchDelete(data) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/MdmProject/batchRemove', data });
|
|
||||||
}
|
|
||||||
// 导出
|
|
||||||
export function exportData(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/MdmProject/Actions/Export', data });
|
|
||||||
}
|
|
||||||
@@ -1,475 +0,0 @@
|
|||||||
const columnList = [
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem36dc22",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"项目编码",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774508650570,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"project_code",
|
|
||||||
"__vModel__":"project_code",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_code",
|
|
||||||
"placeholder":"请输入项目编码",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":30,
|
|
||||||
"fullName":"项目编码",
|
|
||||||
"label":"项目编码",
|
|
||||||
"sortable":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"width":null,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItemd2b645",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"项目名称",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774508651244,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"project_name",
|
|
||||||
"__vModel__":"project_name",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_name",
|
|
||||||
"placeholder":"请输入项目名称",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":50,
|
|
||||||
"fullName":"项目名称",
|
|
||||||
"label":"项目名称",
|
|
||||||
"sortable":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"width":null,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"treeSelect",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"上级项目",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"上级项目",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"props":{
|
|
||||||
"children":"children",
|
|
||||||
"label":"project_name",
|
|
||||||
"value":"project_id"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"treeSelect",
|
|
||||||
"defaultValue":"",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"797177453981204485",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509368149,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-tree",
|
|
||||||
"tag":"YunzhupaasTreeSelect",
|
|
||||||
"formId":"formItem503db0",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dynamic",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"上级项目",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"项目结构树",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"prop":"parent_project_id",
|
|
||||||
"width":null,
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"parent_project_id",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"parent_project_id",
|
|
||||||
"placeholder":"请选择上级项目",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"organizeSelect",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"ableIds":[],
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"归属组织",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"归属组织",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem0f5baf",
|
|
||||||
"yunzhupaasKey":"organizeSelect",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":[],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"归属组织",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509431105,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-company",
|
|
||||||
"defaultCurrent":true,
|
|
||||||
"tag":"YunzhupaasOrganizeSelect",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"prop":"org_id",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"org_id",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"selectType":"all",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"org_id",
|
|
||||||
"placeholder":"请选择归属组织",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"项目类型",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"项目类型",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"props":{
|
|
||||||
"label":"project_type_name",
|
|
||||||
"value":"project_type_id"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"797165402772733957",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509499767,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItemb4a566",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dynamic",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"项目类型",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"项目类型列表",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"prop":"project_type",
|
|
||||||
"width":null,
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"project_type",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_type",
|
|
||||||
"placeholder":"请选择项目类型",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"datePicker",
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"format":"yyyy-MM-dd",
|
|
||||||
"fullName":"启动日期",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"启动日期",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"datePicker",
|
|
||||||
"endRelationField":"",
|
|
||||||
"defaultValue":null,
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509542390,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-date",
|
|
||||||
"startRelationField":"",
|
|
||||||
"defaultCurrent":false,
|
|
||||||
"tag":"YunzhupaasDatePicker",
|
|
||||||
"formId":"formItem27f6a6",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"endTimeTarget":1,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"startTimeType":1,
|
|
||||||
"endTimeRule":false,
|
|
||||||
"label":"启动日期",
|
|
||||||
"trigger":"change",
|
|
||||||
"startTimeRule":false,
|
|
||||||
"startTimeValue":null,
|
|
||||||
"endTimeValue":null,
|
|
||||||
"endTimeType":1,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"startTimeTarget":1,
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"prop":"project_start_date",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"project_start_date",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"startTime":null,
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_start_date",
|
|
||||||
"placeholder":"请选择启动日期",
|
|
||||||
"endTime":null,
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"项目状态",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"项目状态",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"enCode"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509577696,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItem4ff05a",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dictionary",
|
|
||||||
"dictionaryType":"797036777536749573",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"项目状态",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"prop":"project_state_id",
|
|
||||||
"width":null,
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"project_state_id",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_state_id",
|
|
||||||
"placeholder":"请选择项目状态",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default columnList
|
|
||||||
@@ -1,513 +0,0 @@
|
|||||||
const superQueryJson = [
|
|
||||||
{
|
|
||||||
"clearable":true,
|
|
||||||
"maxlength":30,
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullName":"项目编码",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"addonAfter":"",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem36dc22",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"项目编码",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774508650570,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"__vModel__":"project_code",
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_code",
|
|
||||||
"placeholder":"请输入项目编码",
|
|
||||||
"prefixIcon":"",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"clearable":true,
|
|
||||||
"maxlength":50,
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullName":"项目名称",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"addonAfter":"",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItemd2b645",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"项目名称",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774508651244,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"__vModel__":"project_name",
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_name",
|
|
||||||
"placeholder":"请输入项目名称",
|
|
||||||
"prefixIcon":"",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"上级项目",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"props":{
|
|
||||||
"children":"children",
|
|
||||||
"label":"project_name",
|
|
||||||
"value":"project_id"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"treeSelect",
|
|
||||||
"defaultValue":"",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"797177453981204485",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509368149,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-tree",
|
|
||||||
"tag":"YunzhupaasTreeSelect",
|
|
||||||
"formId":"formItem503db0",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dynamic",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"上级项目",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"项目结构树",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"parent_project_id",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"parent_project_id",
|
|
||||||
"placeholder":"请选择上级项目",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"ableIds":[],
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"归属组织",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem0f5baf",
|
|
||||||
"yunzhupaasKey":"organizeSelect",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":[],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"归属组织",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509431105,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-company",
|
|
||||||
"defaultCurrent":true,
|
|
||||||
"tag":"YunzhupaasOrganizeSelect",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"__vModel__":"org_id",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"selectType":"all",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"org_id",
|
|
||||||
"placeholder":"请选择归属组织",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"项目类型",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"props":{
|
|
||||||
"label":"project_type_name",
|
|
||||||
"value":"project_type_id"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"797165402772733957",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509499767,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItemb4a566",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dynamic",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"项目类型",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"项目类型列表",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"project_type",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_type",
|
|
||||||
"placeholder":"请选择项目类型",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"clearable":true,
|
|
||||||
"format":"yyyy-MM-dd",
|
|
||||||
"fullName":"启动日期",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"datePicker",
|
|
||||||
"endRelationField":"",
|
|
||||||
"defaultValue":null,
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509542390,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-date",
|
|
||||||
"startRelationField":"",
|
|
||||||
"defaultCurrent":false,
|
|
||||||
"tag":"YunzhupaasDatePicker",
|
|
||||||
"formId":"formItem27f6a6",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"endTimeTarget":1,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"startTimeType":1,
|
|
||||||
"endTimeRule":false,
|
|
||||||
"label":"启动日期",
|
|
||||||
"trigger":"change",
|
|
||||||
"startTimeRule":false,
|
|
||||||
"startTimeValue":null,
|
|
||||||
"endTimeValue":null,
|
|
||||||
"endTimeType":1,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"startTimeTarget":1,
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"__vModel__":"project_start_date",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"startTime":null,
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_start_date",
|
|
||||||
"placeholder":"请选择启动日期",
|
|
||||||
"endTime":null,
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"项目状态",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"enCode"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509577696,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItem4ff05a",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dictionary",
|
|
||||||
"dictionaryType":"797036777536749573",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"项目状态",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"project_state_id",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_state_id",
|
|
||||||
"placeholder":"请选择项目状态",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"controls":false,
|
|
||||||
"fullName":"顺序号",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"thousands":false,
|
|
||||||
"isAmountChinese":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem28643a",
|
|
||||||
"yunzhupaasKey":"inputNumber",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"顺序号",
|
|
||||||
"trigger":[
|
|
||||||
"blur",
|
|
||||||
"change"
|
|
||||||
],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509649106,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-number",
|
|
||||||
"tag":"YunzhupaasInputNumber",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"__vModel__":"seq_num",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"step":1,
|
|
||||||
"disabled":false,
|
|
||||||
"id":"seq_num",
|
|
||||||
"placeholder":"请输入顺序号",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"clearable":true,
|
|
||||||
"maxlength":200,
|
|
||||||
"fullName":"备注",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"autoSize":{
|
|
||||||
"minRows":4,
|
|
||||||
"maxRows":4
|
|
||||||
},
|
|
||||||
"showCount":true,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem793976",
|
|
||||||
"yunzhupaasKey":"textarea",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"备注",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"mdm_project",
|
|
||||||
"renderKey":1774509685351,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-textarea",
|
|
||||||
"tag":"YunzhupaasTextarea",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":24
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"__vModel__":"remark",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"remark",
|
|
||||||
"placeholder":"请输入备注",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default superQueryJson
|
|
||||||
343
src/views/mdm/product/Detail.vue
Normal file
343
src/views/mdm/product/Detail.vue
Normal file
@@ -0,0 +1,343 @@
|
|||||||
|
<template>
|
||||||
|
<BasicPopup v-bind="$attrs" @register="registerPopup" :title="title" destroyOnClose>
|
||||||
|
<template #insertToolbar>
|
||||||
|
</template>
|
||||||
|
<a-row class="p-10px dynamic-form " :style="{ margin: '0 auto', width: '100%' }">
|
||||||
|
<!-- 表单 -->
|
||||||
|
<a-form :colon="false" size="middle" layout= "horizontal"
|
||||||
|
labelAlign= "right"
|
||||||
|
:labelCol="{ style: { width: '100px' } }" :model="dataForm" ref="formRef" >
|
||||||
|
<a-row :gutter="15">
|
||||||
|
<!-- 具体表单 -->
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_code" >
|
||||||
|
<template #label>商品编码
|
||||||
|
</template> <p>{{dataForm.product_code}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_name" >
|
||||||
|
<template #label>商品名称
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.product_name"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.product_name" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_type" >
|
||||||
|
<template #label>商品类型
|
||||||
|
</template> <p>{{dataForm.product_type}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_category" >
|
||||||
|
<template #label>商品分类
|
||||||
|
</template> <p>{{dataForm.product_category}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="short_name" >
|
||||||
|
<template #label>商品简称
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.short_name"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.short_name" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="brand" >
|
||||||
|
<template #label>品牌
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.brand"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.brand" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_model" >
|
||||||
|
<template #label>规格型号
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.product_model"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.product_model" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="color" >
|
||||||
|
<template #label>颜色
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.color"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.color" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_size" >
|
||||||
|
<template #label>尺寸/规格
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.product_size"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.product_size" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="weight" >
|
||||||
|
<template #label>重量
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.weight"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.weight" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="min_order_quantity" >
|
||||||
|
<template #label>最小起订量
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.min_order_quantity"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed :style='{"width":"100%"}' :step="1" :precision="4" :controls="false" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="standard_sales_price" >
|
||||||
|
<template #label>标准销售单价
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.standard_sales_price"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed :style='{"width":"100%"}' :step="1" :precision="2" :controls="false" addonAfter="元" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="gross_weight" >
|
||||||
|
<template #label>毛重
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.gross_weight"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed :style='{"width":"100%"}' :step="1" :precision="4" :controls="false" addonAfter="KG" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="net_weight" >
|
||||||
|
<template #label>净重
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.net_weight"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed :style='{"width":"100%"}' :step="1" :precision="4" :controls="false" addonAfter="KG" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="unit_name" >
|
||||||
|
<template #label>单位名称
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.unit_name"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.unit_name" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="packagesize" >
|
||||||
|
<template #label>包装尺寸
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.packagesize"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.packagesize" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="tax_rate" >
|
||||||
|
<template #label>税率
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.tax_rate"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed :style='{"width":"100%"}' :step="1" :precision="2" :controls="false" addonAfter="%" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="cost_price" >
|
||||||
|
<template #label>成本价
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.cost_price"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed :style='{"width":"100%"}' :step="1" :precision="2" :controls="false" addonAfter="元" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="warranty_period" >
|
||||||
|
<template #label>保修期
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.warranty_period"
|
||||||
|
placeholder="请输入" disabled
|
||||||
|
detailed :style='{"width":"100%"}' :step="1" :controls="false" addonAfter="月" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="tax_code" >
|
||||||
|
<template #label>税收分类
|
||||||
|
</template> <p>{{dataForm.tax_code}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="warranty_terms" >
|
||||||
|
<template #label>保修条款
|
||||||
|
</template> <p>{{dataForm.warranty_terms}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="remark" >
|
||||||
|
<template #label>备注
|
||||||
|
</template> <p>{{dataForm.remark}}</p>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<!-- 表单结束 -->
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-row>
|
||||||
|
</BasicPopup>
|
||||||
|
<!-- 有关联表单详情:开始 -->
|
||||||
|
<RelationDetail ref="relationDetailRef" />
|
||||||
|
<!-- 有关联表单详情:结束 -->
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { getDetailInfo } from './helper/api';
|
||||||
|
import { getConfigData } from '@/api/onlineDev/visualDev';
|
||||||
|
import { reactive, toRefs, nextTick, ref, computed, unref ,toRaw} from 'vue';
|
||||||
|
import { BasicPopup, usePopup } from '@/components/Popup';
|
||||||
|
import { BasicModal, useModal } from '@/components/Modal';
|
||||||
|
// 有关联表单详情
|
||||||
|
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
||||||
|
// 表单权限
|
||||||
|
import { usePermission } from '@/hooks/web/usePermission';
|
||||||
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
|
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { buildUUID } from '@/utils/uuid';
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n';
|
||||||
|
import { getDataChange } from '@/api/onlineDev/visualDev';
|
||||||
|
import { getDataInterfaceDataInfoByIds } from '@/api/systemData/dataInterface';
|
||||||
|
import ExtraRelationInfo from '@/components/yunzhupaas/RelationForm/src/ExtraRelationInfo.vue';
|
||||||
|
|
||||||
|
interface State {
|
||||||
|
dataForm: any;
|
||||||
|
title: string;
|
||||||
|
maskConfig: any;
|
||||||
|
interfaceRes: any;
|
||||||
|
locationScope: any;
|
||||||
|
extraOptions: any;
|
||||||
|
extraData: any;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
defineOptions({ name: 'Detail' });
|
||||||
|
const { createMessage, createConfirm } = useMessage();
|
||||||
|
const [registerPopup, { openPopup, setPopupProps, closePopup }] = usePopup();
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const relationDetailRef = ref<any>(null);
|
||||||
|
const state = reactive<State>({
|
||||||
|
dataForm:{},
|
||||||
|
title: t('common.detailText','详情'),
|
||||||
|
maskConfig:{
|
||||||
|
product_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
short_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
brand: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
product_model: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
color: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
product_size: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
weight: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
unit_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
packagesize: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
}
|
||||||
|
,
|
||||||
|
interfaceRes: {"standard_sales_price":[],"color":[],"product_size":[],"weight":[],"remark":[],"product_code":[],"product_name":[],"net_weight":[],"min_order_quantity":[],"tax_rate":[],"unit_name":[],"warranty_period":[],"tax_code":[],"warranty_terms":[],"product_type":[],"short_name":[],"gross_weight":[],"packagesize":[],"brand":[],"product_category":[],"product_model":[],"cost_price":[]},
|
||||||
|
locationScope:{
|
||||||
|
}
|
||||||
|
,
|
||||||
|
extraOptions: {
|
||||||
|
}
|
||||||
|
,
|
||||||
|
extraData: {
|
||||||
|
}
|
||||||
|
,
|
||||||
|
});
|
||||||
|
const { title, dataForm, maskConfig } = toRefs(state);
|
||||||
|
// 表单权限
|
||||||
|
const { hasFormP } = usePermission();
|
||||||
|
|
||||||
|
defineExpose({ init });
|
||||||
|
|
||||||
|
function init(data) {
|
||||||
|
state.dataForm.id = data.id;
|
||||||
|
openPopup();
|
||||||
|
nextTick(() => {
|
||||||
|
setTimeout(initData, 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function initData() {
|
||||||
|
changeLoading(true);
|
||||||
|
if (state.dataForm.id) {
|
||||||
|
getData(state.dataForm.id);
|
||||||
|
} else {
|
||||||
|
closePopup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getData(id) {
|
||||||
|
getDetailInfo(id).then((res) => {
|
||||||
|
state.dataForm = res.data || {};
|
||||||
|
nextTick(() => {
|
||||||
|
changeLoading(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function toDetail(modelId, id, propsValue) {
|
||||||
|
if (!id) return;
|
||||||
|
getConfigData(modelId).then((res) => {
|
||||||
|
if (!res.data || !res.data.formData) return;
|
||||||
|
const formConf = JSON.parse(res.data.formData);
|
||||||
|
formConf.popupType = 'general';
|
||||||
|
formConf.hasPrintBtn = false;
|
||||||
|
formConf.customBtns = [];
|
||||||
|
const data = { id, formConf, modelId, propsValue};
|
||||||
|
relationDetailRef.value?.init(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function setFormProps(data) {
|
||||||
|
setPopupProps(data);
|
||||||
|
}
|
||||||
|
function changeLoading(loading) {
|
||||||
|
setFormProps({ loading });
|
||||||
|
}
|
||||||
|
|
||||||
|
function getParamList(key) {
|
||||||
|
let templateJson: any[] = state.interfaceRes[key];
|
||||||
|
if (!templateJson || !templateJson.length || !state.dataForm) return templateJson;
|
||||||
|
for (let i = 0; i < templateJson.length; i++) {
|
||||||
|
if (templateJson[i].relationField && templateJson[i].sourceType == 1) {
|
||||||
|
templateJson[i].defaultValue = state.dataForm[templateJson[i].relationField + '_id'] || '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return templateJson;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
618
src/views/mdm/product/Form.vue
Normal file
618
src/views/mdm/product/Form.vue
Normal file
@@ -0,0 +1,618 @@
|
|||||||
|
<template>
|
||||||
|
<BasicPopup v-bind="$attrs" @register="registerPopup" showOkBtn destroyOnClose
|
||||||
|
:cancelText="t('common.cancelText','取消')"
|
||||||
|
:okText="t('common.okText','确定')"
|
||||||
|
@ok="handleSubmit" :closeFunc="onClose">
|
||||||
|
<template #title>
|
||||||
|
<a-space :size="10">
|
||||||
|
<div class="text-16px font-medium">{{ title }}</div>
|
||||||
|
<a-space-compact size="small" block v-if="dataForm.id">
|
||||||
|
<a-tooltip :title="t('common.prevRecord')">
|
||||||
|
<a-button size="small" :disabled="getPrevDisabled" @click="handlePrev">
|
||||||
|
<i class="icon-ym icon-ym-caret-left text-10px"></i>
|
||||||
|
</a-button>
|
||||||
|
</a-tooltip>
|
||||||
|
<a-tooltip :title="t('common.nextRecord')">
|
||||||
|
<a-button size="small" :disabled="getNextDisabled" @click="handleNext">
|
||||||
|
<i class="icon-ym icon-ym-caret-right text-10px"></i>
|
||||||
|
</a-button>
|
||||||
|
</a-tooltip>
|
||||||
|
</a-space-compact>
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
|
<template #insertToolbar>
|
||||||
|
<yunzhupaasCheckboxSingle v-model:value="submitType" :label="continueText" v-if="showContinueBtn" />
|
||||||
|
</template>
|
||||||
|
<a-row class="p-10px dynamic-form " :style="{ margin: '0 auto', width: '100%' }">
|
||||||
|
<a-form :colon="false" size="middle" layout= "horizontal"
|
||||||
|
labelAlign= "right"
|
||||||
|
:labelCol="{ style: { width: '100px' } }" :model="dataForm" :rules="dataRule" ref="formRef" >
|
||||||
|
<a-row :gutter="15">
|
||||||
|
<!-- 具体表单 -->
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_code" >
|
||||||
|
<template #label>商品编码
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.product_code" @change="changeData('product_code',-1)"
|
||||||
|
placeholder="系统自动生成" readonly :style='{"width":"100%"}' >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_name" >
|
||||||
|
<template #label>商品名称
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.product_name" @change="changeData('product_name',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.product_name" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_type" >
|
||||||
|
<template #label>商品类型
|
||||||
|
</template> <YunzhupaasSelect v-model:value="dataForm.product_type" @change="changeData('product_type',-1)"
|
||||||
|
placeholder="请选择" :templateJson="state.interfaceRes.product_type" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' :options="optionsObj.product_typeOptions" :fieldNames="optionsObj.product_typeProps"
|
||||||
|
>
|
||||||
|
</YunzhupaasSelect>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_category" >
|
||||||
|
<template #label>商品分类
|
||||||
|
</template> <YunzhupaasCascader v-model:value="dataForm.product_category" @change="changeData('product_category',-1)"
|
||||||
|
placeholder="请选择" :templateJson="state.interfaceRes.product_category" :allowClear='true' :style='{"width":"100%"}' :showSearch='true' :options="optionsObj.product_categoryOptions" :fieldNames="optionsObj.product_categoryProps"
|
||||||
|
>
|
||||||
|
</YunzhupaasCascader>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="short_name" >
|
||||||
|
<template #label>商品简称
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.short_name" @change="changeData('short_name',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.short_name" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="brand" >
|
||||||
|
<template #label>品牌
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.brand" @change="changeData('brand',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.brand" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_model" >
|
||||||
|
<template #label>规格型号
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.product_model" @change="changeData('product_model',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.product_model" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="color" >
|
||||||
|
<template #label>颜色
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.color" @change="changeData('color',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.color" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="product_size" >
|
||||||
|
<template #label>尺寸/规格
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.product_size" @change="changeData('product_size',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.product_size" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="weight" >
|
||||||
|
<template #label>重量
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.weight" @change="changeData('weight',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.weight" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="min_order_quantity" >
|
||||||
|
<template #label>最小起订量
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.min_order_quantity" @change="changeData('min_order_quantity',-1)"
|
||||||
|
placeholder="请输入" :style='{"width":"100%"}' :step="1" :precision="4" :controls="false" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="standard_sales_price" >
|
||||||
|
<template #label>标准销售单价
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.standard_sales_price" @change="changeData('standard_sales_price',-1)"
|
||||||
|
placeholder="请输入" :style='{"width":"100%"}' :step="1" :precision="2" addonAfter="元" :controls="false" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="gross_weight" >
|
||||||
|
<template #label>毛重
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.gross_weight" @change="changeData('gross_weight',-1)"
|
||||||
|
placeholder="请输入" :style='{"width":"100%"}' :step="1" :precision="4" addonAfter="KG" :controls="false" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="net_weight" >
|
||||||
|
<template #label>净重
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.net_weight" @change="changeData('net_weight',-1)"
|
||||||
|
placeholder="请输入" :style='{"width":"100%"}' :step="1" :precision="4" addonAfter="KG" :controls="false" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="unit_name" >
|
||||||
|
<template #label>单位名称
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.unit_name" @change="changeData('unit_name',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.unit_name" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="packagesize" >
|
||||||
|
<template #label>包装尺寸
|
||||||
|
</template> <YunzhupaasInput v-model:value="dataForm.packagesize" @change="changeData('packagesize',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.packagesize" :showCount = "false" >
|
||||||
|
</YunzhupaasInput>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="tax_rate" >
|
||||||
|
<template #label>税率
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.tax_rate" @change="changeData('tax_rate',-1)"
|
||||||
|
placeholder="请输入" :style='{"width":"100%"}' :step="1" :precision="2" addonAfter="%" :controls="false" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="cost_price" >
|
||||||
|
<template #label>成本价
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.cost_price" @change="changeData('cost_price',-1)"
|
||||||
|
placeholder="请输入" :style='{"width":"100%"}' :step="1" :precision="2" addonAfter="元" :controls="false" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="warranty_period" >
|
||||||
|
<template #label>保修期
|
||||||
|
</template> <YunzhupaasInputNumber v-model:value="dataForm.warranty_period" @change="changeData('warranty_period',-1)"
|
||||||
|
placeholder="请输入" :style='{"width":"100%"}' :step="1" addonAfter="月" :controls="false" >
|
||||||
|
</YunzhupaasInputNumber>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="tax_code" >
|
||||||
|
<template #label>税收分类
|
||||||
|
</template> <YunzhupaasCascader v-model:value="dataForm.tax_code" @change="changeData('tax_code',-1)"
|
||||||
|
placeholder="请选择" :templateJson="state.interfaceRes.tax_code" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' :options="optionsObj.tax_codeOptions" :fieldNames="optionsObj.tax_codeProps"
|
||||||
|
>
|
||||||
|
</YunzhupaasCascader>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="warranty_terms" >
|
||||||
|
<template #label>保修条款
|
||||||
|
</template> <YunzhupaasTextarea v-model:value="dataForm.warranty_terms" @change="changeData('warranty_terms',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":3,"maxRows":4}' :showCount = "false" >
|
||||||
|
</YunzhupaasTextarea>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" class="ant-col-item" >
|
||||||
|
<a-form-item
|
||||||
|
name="remark" >
|
||||||
|
<template #label>备注
|
||||||
|
</template> <YunzhupaasTextarea v-model:value="dataForm.remark" @change="changeData('remark',-1)"
|
||||||
|
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":2,"maxRows":4}' :showCount = "false" >
|
||||||
|
</YunzhupaasTextarea>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<!-- 表单结束 -->
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-row>
|
||||||
|
</BasicPopup>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { create, update, getInfo } from './helper/api';
|
||||||
|
import { reactive, toRefs, nextTick, ref, unref, computed,toRaw, inject } from 'vue';
|
||||||
|
import { BasicPopup, usePopup } from '@/components/Popup';
|
||||||
|
import { yunzhupaasRelationForm } from '@/components/yunzhupaas';
|
||||||
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
|
import { useI18n } from '@/hooks/web/useI18n';
|
||||||
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
|
import { thousandsFormat , getDateTimeUnit, getTimeUnit} from '@/utils/yunzhupaas';
|
||||||
|
import { getDictionaryDataSelector } from '@/api/systemData/dictionary';
|
||||||
|
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
// 表单权限
|
||||||
|
import { usePermission } from '@/hooks/web/usePermission';
|
||||||
|
import { cloneDeep } from 'lodash-es';
|
||||||
|
import { buildUUID } from '@/utils/uuid';
|
||||||
|
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
||||||
|
|
||||||
|
|
||||||
|
interface State {
|
||||||
|
dataForm: any;
|
||||||
|
tableRows: any;
|
||||||
|
dataRule: any;
|
||||||
|
optionsObj: any;
|
||||||
|
childIndex: any;
|
||||||
|
isEdit: any;
|
||||||
|
interfaceRes: any;
|
||||||
|
//可选范围默认值
|
||||||
|
ableAll: any;
|
||||||
|
//掩码配置
|
||||||
|
maskConfig:any;
|
||||||
|
//定位属性
|
||||||
|
locationScope:any;
|
||||||
|
extraOptions: any;
|
||||||
|
title: string;
|
||||||
|
continueText: string; allList: any[];
|
||||||
|
currIndex: number;
|
||||||
|
isContinue: boolean;
|
||||||
|
submitType: number;
|
||||||
|
showContinueBtn: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const emit = defineEmits(['reload']);
|
||||||
|
const getLeftTreeActiveInfo: (() => any) | null = inject('getLeftTreeActiveInfo', null);
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const userInfo = userStore.getUserInfo;
|
||||||
|
const { createMessage, createConfirm } = useMessage();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const [registerPopup, { openPopup, setPopupProps }] = usePopup();
|
||||||
|
const formRef = ref<FormInstance>();
|
||||||
|
const state = reactive<State>({
|
||||||
|
dataForm: {
|
||||||
|
product_code:undefined,
|
||||||
|
product_name:undefined,
|
||||||
|
product_type:'',
|
||||||
|
product_category:[],
|
||||||
|
short_name:undefined,
|
||||||
|
brand:undefined,
|
||||||
|
product_model:undefined,
|
||||||
|
color:undefined,
|
||||||
|
product_size:undefined,
|
||||||
|
weight:undefined,
|
||||||
|
min_order_quantity:undefined,
|
||||||
|
standard_sales_price:undefined,
|
||||||
|
gross_weight:undefined,
|
||||||
|
net_weight:undefined,
|
||||||
|
unit_name:undefined,
|
||||||
|
packagesize:undefined,
|
||||||
|
tax_rate:undefined,
|
||||||
|
cost_price:undefined,
|
||||||
|
warranty_period:undefined,
|
||||||
|
tax_code:[],
|
||||||
|
warranty_terms:undefined,
|
||||||
|
remark:undefined,
|
||||||
|
version: 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
tableRows:{
|
||||||
|
},
|
||||||
|
|
||||||
|
dataRule: {
|
||||||
|
product_name: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: t('sys.validate.textRequiredSuffix','不能为空'),
|
||||||
|
trigger: 'blur'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
product_type: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: t('sys.validate.arrayRequiredPrefix ','请至少选择一个'),
|
||||||
|
trigger: 'change'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
product_category: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: t('sys.validate.arrayRequiredPrefix ','请至少选择一个'),
|
||||||
|
trigger: 'change'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
optionsObj:{
|
||||||
|
product_typeOptions:[],
|
||||||
|
product_typeProps:{"label":"fullName","value":"id" },
|
||||||
|
product_categoryOptions:[],
|
||||||
|
product_categoryProps:{"label":"fullName","value":"id" ,"children":"children" },
|
||||||
|
tax_codeOptions:[],
|
||||||
|
tax_codeProps:{"label":"fullName","value":"enCode" ,"children":"children" },
|
||||||
|
},
|
||||||
|
|
||||||
|
childIndex: -1,
|
||||||
|
isEdit: false,
|
||||||
|
interfaceRes: {"standard_sales_price":[],"color":[],"product_size":[],"weight":[],"remark":[],"product_code":[],"product_name":[],"net_weight":[],"min_order_quantity":[],"tax_rate":[],"unit_name":[],"warranty_period":[],"tax_code":[],"warranty_terms":[],"product_type":[],"short_name":[],"gross_weight":[],"packagesize":[],"brand":[],"product_category":[],"product_model":[],"cost_price":[]},
|
||||||
|
//可选范围默认值
|
||||||
|
ableAll:{
|
||||||
|
},
|
||||||
|
|
||||||
|
//掩码配置
|
||||||
|
maskConfig:{
|
||||||
|
product_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
short_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
brand: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
product_model: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
color: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
product_size: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
weight: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
unit_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
packagesize: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||||
|
},
|
||||||
|
|
||||||
|
//定位属性
|
||||||
|
locationScope:{
|
||||||
|
},
|
||||||
|
|
||||||
|
extraOptions:{
|
||||||
|
},
|
||||||
|
|
||||||
|
title: "",
|
||||||
|
continueText: "", allList: [],
|
||||||
|
currIndex: 0,
|
||||||
|
isContinue: false,
|
||||||
|
submitType: 0,
|
||||||
|
showContinueBtn: true ,
|
||||||
|
});
|
||||||
|
const { title, continueText, showContinueBtn, dataRule, dataForm, optionsObj, ableAll, maskConfig,submitType } = toRefs(state);
|
||||||
|
|
||||||
|
const getPrevDisabled = computed(() => state.currIndex === 0);
|
||||||
|
const getNextDisabled = computed(() => state.currIndex === state.allList.length - 1);
|
||||||
|
// 表单权限
|
||||||
|
const { hasFormP } = usePermission();
|
||||||
|
|
||||||
|
defineExpose({ init });
|
||||||
|
|
||||||
|
function init(data) {
|
||||||
|
state.submitType = 0;
|
||||||
|
state.isContinue = false;
|
||||||
|
state.title = !data.id ? t('common.add2Text','新增') : t('common.editText','编辑');
|
||||||
|
state.continueText = !data.id ? t('common.continueAndAddText','确定并新增') : t('common.continueText','确定并继续'); setFormProps({ continueLoading: false });
|
||||||
|
state.dataForm.id = data.id;
|
||||||
|
openPopup();
|
||||||
|
state.allList = data.allList;
|
||||||
|
state.currIndex = state.allList.length && data.id ? state.allList.findIndex((item) => item.id === data.id) : 0;
|
||||||
|
nextTick(() => {
|
||||||
|
getForm().resetFields();
|
||||||
|
setTimeout(initData, 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function initData() {
|
||||||
|
changeLoading(true);
|
||||||
|
if (state.dataForm.id) {
|
||||||
|
getData(state.dataForm.id);
|
||||||
|
} else {
|
||||||
|
//初始化options
|
||||||
|
getproduct_typeOptions();
|
||||||
|
getproduct_categoryOptions();
|
||||||
|
gettax_codeOptions();
|
||||||
|
|
||||||
|
// 设置默认值
|
||||||
|
state.dataForm={
|
||||||
|
product_code:undefined,
|
||||||
|
product_name:undefined,
|
||||||
|
product_type:'',
|
||||||
|
product_category:[],
|
||||||
|
short_name:undefined,
|
||||||
|
brand:undefined,
|
||||||
|
product_model:undefined,
|
||||||
|
color:undefined,
|
||||||
|
product_size:undefined,
|
||||||
|
weight:undefined,
|
||||||
|
min_order_quantity:undefined,
|
||||||
|
standard_sales_price:undefined,
|
||||||
|
gross_weight:undefined,
|
||||||
|
net_weight:undefined,
|
||||||
|
unit_name:undefined,
|
||||||
|
packagesize:undefined,
|
||||||
|
tax_rate:undefined,
|
||||||
|
cost_price:undefined,
|
||||||
|
warranty_period:undefined,
|
||||||
|
tax_code:[],
|
||||||
|
warranty_terms:undefined,
|
||||||
|
remark:undefined,
|
||||||
|
version: 0,
|
||||||
|
};
|
||||||
|
if (getLeftTreeActiveInfo) state.dataForm = {...state.dataForm, ...(getLeftTreeActiveInfo() || {}) };
|
||||||
|
state.childIndex = -1;
|
||||||
|
changeLoading(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getForm() {
|
||||||
|
const form = unref(formRef);
|
||||||
|
if (!form) {
|
||||||
|
throw new Error('form is null!');
|
||||||
|
}
|
||||||
|
return form;
|
||||||
|
}
|
||||||
|
function getData(id) {
|
||||||
|
getInfo(id).then((res) => {
|
||||||
|
state.dataForm = res.data || {};
|
||||||
|
getproduct_typeOptions();
|
||||||
|
getproduct_categoryOptions();
|
||||||
|
gettax_codeOptions();
|
||||||
|
|
||||||
|
state.childIndex = -1;
|
||||||
|
changeLoading(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function handleSubmit(type) {
|
||||||
|
try {
|
||||||
|
const values = await getForm()?.validate();
|
||||||
|
if (!values) return;
|
||||||
|
|
||||||
|
|
||||||
|
setFormProps({ confirmLoading: true });
|
||||||
|
const formMethod = state.dataForm.id ? update : create;
|
||||||
|
formMethod(state.dataForm)
|
||||||
|
.then((res) => {
|
||||||
|
createMessage.success(res.msg);
|
||||||
|
setFormProps({ confirmLoading: false });
|
||||||
|
if (state.submitType == 1) {
|
||||||
|
initData();
|
||||||
|
state.isContinue = true;
|
||||||
|
} else {
|
||||||
|
setFormProps({ open: false });
|
||||||
|
emit('reload');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
setFormProps({ confirmLoading: false });
|
||||||
|
});
|
||||||
|
} catch (_) {}
|
||||||
|
}
|
||||||
|
function handlePrev() {
|
||||||
|
state.currIndex--;
|
||||||
|
handleGetNewInfo();
|
||||||
|
}
|
||||||
|
function handleNext() {
|
||||||
|
state.currIndex++;
|
||||||
|
handleGetNewInfo();
|
||||||
|
}
|
||||||
|
function handleGetNewInfo() {
|
||||||
|
changeLoading(true);
|
||||||
|
getForm().resetFields();
|
||||||
|
const id = state.allList[state.currIndex].id;
|
||||||
|
getData(id);
|
||||||
|
}
|
||||||
|
function setFormProps(data) {
|
||||||
|
setPopupProps(data);
|
||||||
|
}
|
||||||
|
function changeLoading(loading) {
|
||||||
|
setPopupProps({ loading });
|
||||||
|
}
|
||||||
|
async function onClose() {
|
||||||
|
if (state.isContinue) emit('reload');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeData(model, index) {
|
||||||
|
state.isEdit = false
|
||||||
|
state.childIndex = index
|
||||||
|
for (let key in state.interfaceRes) {
|
||||||
|
if (key != model) {
|
||||||
|
let faceReList = state.interfaceRes[key]
|
||||||
|
for (let i = 0; i < faceReList.length; i++) {
|
||||||
|
let relationField = faceReList[i].relationField;
|
||||||
|
if(relationField){
|
||||||
|
let modelAll = relationField.split('-');
|
||||||
|
let faceMode = '';
|
||||||
|
let faceMode2 = modelAll.length == 2?modelAll[0].substring(0, modelAll[0].length-4) +modelAll[1]:""
|
||||||
|
for (let i = 0; i < modelAll.length; i++) {
|
||||||
|
faceMode += modelAll[i];
|
||||||
|
}
|
||||||
|
if (faceMode == model || faceMode2 == model ) {
|
||||||
|
let options = 'get' + key + 'Options';
|
||||||
|
eval(options)(true);
|
||||||
|
changeData(key, index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function changeDataFormData(type, data, model,index,defaultValue) {
|
||||||
|
if(!state.isEdit) {
|
||||||
|
if (type == 2) {
|
||||||
|
for (let i = 0; i < state.dataForm[data].length; i++) {
|
||||||
|
if (index == -1) {
|
||||||
|
state.dataForm[data][i][model] = defaultValue
|
||||||
|
} else if (index == i) {
|
||||||
|
state.dataForm[data][i][model] = defaultValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
state.dataForm[data] = defaultValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//数据选项--数据字典初始化方法
|
||||||
|
function getproduct_typeOptions() {
|
||||||
|
getDictionaryDataSelector('productType').then(res => {
|
||||||
|
state.optionsObj.product_typeOptions = res.data.list
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//数据选项--数据字典初始化方法
|
||||||
|
function getproduct_categoryOptions() {
|
||||||
|
getDictionaryDataSelector('productCategory').then(res => {
|
||||||
|
state.optionsObj.product_categoryOptions = res.data.list
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//数据选项--数据字典初始化方法
|
||||||
|
function gettax_codeOptions() {
|
||||||
|
getDictionaryDataSelector('taxCode').then(res => {
|
||||||
|
state.optionsObj.tax_codeOptions = res.data.list
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function getRelationDate(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
||||||
|
let timeDataValue: any = null;
|
||||||
|
let timeValue = Number(timeValueData);
|
||||||
|
if (timeRule) {
|
||||||
|
if (timeType == 1) {
|
||||||
|
timeDataValue = timeValue;
|
||||||
|
} else if (timeType == 2) {
|
||||||
|
timeDataValue = dataValue;
|
||||||
|
} else if (timeType == 3) {
|
||||||
|
timeDataValue = new Date().getTime();
|
||||||
|
} else if (timeType == 4 || timeType == 5) {
|
||||||
|
const type = getTimeUnit(timeTarget);
|
||||||
|
const method = timeType == 4 ? 'subtract' : 'add';
|
||||||
|
timeDataValue = dayjs()[method](timeValue, type).valueOf();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return timeDataValue;
|
||||||
|
}
|
||||||
|
function getRelationTime(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
||||||
|
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType;
|
||||||
|
let timeDataValue: any = null;
|
||||||
|
if (timeRule) {
|
||||||
|
if (timeType == 1) {
|
||||||
|
timeDataValue = timeValue || '00:00:00';
|
||||||
|
if (timeDataValue.split(':').length == 3) {
|
||||||
|
timeDataValue = timeDataValue;
|
||||||
|
} else {
|
||||||
|
timeDataValue = timeDataValue + ':00';
|
||||||
|
}
|
||||||
|
} else if (timeType == 2) {
|
||||||
|
timeDataValue = dataValue;
|
||||||
|
} else if (timeType == 3) {
|
||||||
|
timeDataValue = dayjs().format(format);
|
||||||
|
} else if (timeType == 4 || timeType == 5) {
|
||||||
|
const type = getTimeUnit(timeTarget + 3);
|
||||||
|
const method = timeType == 4 ? 'subtract' : 'add';
|
||||||
|
timeDataValue = dayjs()[method](timeValue, type).format(format);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return timeDataValue;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
34
src/views/mdm/product/helper/api.ts
Normal file
34
src/views/mdm/product/helper/api.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import { defHttp } from '@/utils/http/axios';
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
export function getList(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Products/getList', data });
|
||||||
|
}
|
||||||
|
// 新建
|
||||||
|
export function create(data) {
|
||||||
|
return defHttp.post({ url:'/api/bcm/Products', data });
|
||||||
|
}
|
||||||
|
// 修改
|
||||||
|
export function update(data) {
|
||||||
|
return defHttp.put({ url: '/api/bcm/Products/'+ data.id, data });
|
||||||
|
}
|
||||||
|
// 详情(无转换数据)
|
||||||
|
export function getInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Products/' + id });
|
||||||
|
}
|
||||||
|
// 获取(转换数据)
|
||||||
|
export function getDetailInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Products/detail/' + id });
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export function del(id) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Products/' + id });
|
||||||
|
}
|
||||||
|
// 批量删除数据
|
||||||
|
export function batchDelete(data) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Products/batchRemove', data });
|
||||||
|
}
|
||||||
|
// 导出
|
||||||
|
export function exportData(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Products/Actions/Export', data });
|
||||||
|
}
|
||||||
1358
src/views/mdm/product/helper/columnList.ts
Normal file
1358
src/views/mdm/product/helper/columnList.ts
Normal file
File diff suppressed because it is too large
Load Diff
217
src/views/mdm/product/helper/searchList.ts
Normal file
217
src/views/mdm/product/helper/searchList.ts
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
const searchList = [
|
||||||
|
{
|
||||||
|
"yunzhupaasKey":"input",
|
||||||
|
"useScan":false,
|
||||||
|
"suffixIcon":"",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"showCount":false,
|
||||||
|
"__config__":{
|
||||||
|
"formId":"formItem388306",
|
||||||
|
"yunzhupaasKey":"input",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"商品名称",
|
||||||
|
"trigger":"blur",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_product",
|
||||||
|
"renderKey":1777015778372,
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||||
|
"tag":"YunzhupaasInput",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"readonly":false,
|
||||||
|
"prop":"product_name",
|
||||||
|
"__vModel__":"product_name",
|
||||||
|
"searchMultiple":false,
|
||||||
|
"disabled":false,
|
||||||
|
"id":"product_name",
|
||||||
|
"placeholder":"请输入",
|
||||||
|
"addonBefore":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
},
|
||||||
|
"clearable":true,
|
||||||
|
"searchType":2,
|
||||||
|
"maxlength":null,
|
||||||
|
"fullName":"商品名称",
|
||||||
|
"label":"商品名称",
|
||||||
|
"addonAfter":"",
|
||||||
|
"maskConfig":{
|
||||||
|
"prefixType":1,
|
||||||
|
"useUnrealMask":false,
|
||||||
|
"maskType":1,
|
||||||
|
"unrealMaskLength":1,
|
||||||
|
"prefixLimit":0,
|
||||||
|
"suffixLimit":0,
|
||||||
|
"filler":"*",
|
||||||
|
"prefixSpecifyChar":"",
|
||||||
|
"suffixType":1,
|
||||||
|
"ignoreChar":"",
|
||||||
|
"suffixSpecifyChar":""
|
||||||
|
},
|
||||||
|
"isKeyword":false,
|
||||||
|
"useMask":false,
|
||||||
|
"showPassword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"prefixIcon":"",
|
||||||
|
"labelI18nCode":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"yunzhupaasKey":"cascader",
|
||||||
|
"filterable":true,
|
||||||
|
"clearable":true,
|
||||||
|
"searchType":1,
|
||||||
|
"multiple":false,
|
||||||
|
"fullName":"商品分类",
|
||||||
|
"fullNameI18nCode":[
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label":"商品分类",
|
||||||
|
"props":{
|
||||||
|
"children":"children",
|
||||||
|
"label":"fullName",
|
||||||
|
"value":"id"
|
||||||
|
},
|
||||||
|
"__config__":{
|
||||||
|
"yunzhupaasKey":"cascader",
|
||||||
|
"defaultValue":[],
|
||||||
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"propsUrl":"",
|
||||||
|
"templateJson":[],
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_product",
|
||||||
|
"renderKey":1777016020981,
|
||||||
|
"tagIcon":"icon-ym icon-ym-generator-cascader",
|
||||||
|
"tag":"YunzhupaasCascader",
|
||||||
|
"formId":"formItema7e5eb",
|
||||||
|
"visibility":[
|
||||||
|
"pc",
|
||||||
|
"app"
|
||||||
|
],
|
||||||
|
"noShow":false,
|
||||||
|
"dataType":"dictionary",
|
||||||
|
"dictionaryType":"productCategory",
|
||||||
|
"tipLabel":"",
|
||||||
|
"tableFixed":"none",
|
||||||
|
"label":"商品分类",
|
||||||
|
"trigger":"change",
|
||||||
|
"layout":"colFormItem",
|
||||||
|
"useCache":true,
|
||||||
|
"propsName":"",
|
||||||
|
"regList":[],
|
||||||
|
"tableAlign":"left",
|
||||||
|
"span":12
|
||||||
|
},
|
||||||
|
"prop":"product_category",
|
||||||
|
"options":[
|
||||||
|
{
|
||||||
|
"enCode":"10.10",
|
||||||
|
"children":[
|
||||||
|
{
|
||||||
|
"enCode":"10",
|
||||||
|
"children":null,
|
||||||
|
"hasChildren":false,
|
||||||
|
"fullName":"核心发电单元",
|
||||||
|
"id":"817364726802547461",
|
||||||
|
"parentId":"817364810650878725"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hasChildren":true,
|
||||||
|
"fullName":"光伏组件",
|
||||||
|
"id":"817364810650878725",
|
||||||
|
"parentId":"0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enCode":"20",
|
||||||
|
"children":[
|
||||||
|
{
|
||||||
|
"enCode":"20.10",
|
||||||
|
"children":null,
|
||||||
|
"hasChildren":false,
|
||||||
|
"fullName":"逆变器",
|
||||||
|
"id":"817364973343736581",
|
||||||
|
"parentId":"817364893576463109"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enCode":"20.20",
|
||||||
|
"children":null,
|
||||||
|
"hasChildren":false,
|
||||||
|
"fullName":"光伏控制器",
|
||||||
|
"id":"817365033645245189",
|
||||||
|
"parentId":"817364893576463109"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hasChildren":true,
|
||||||
|
"fullName":"电力转换与控制系统",
|
||||||
|
"id":"817364893576463109",
|
||||||
|
"parentId":"0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enCode":"30",
|
||||||
|
"children":[
|
||||||
|
{
|
||||||
|
"enCode":"30.10",
|
||||||
|
"children":null,
|
||||||
|
"hasChildren":false,
|
||||||
|
"fullName":"直流侧设备",
|
||||||
|
"id":"817365215380243205",
|
||||||
|
"parentId":"817365130466558725"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enCode":"30.20",
|
||||||
|
"children":null,
|
||||||
|
"hasChildren":false,
|
||||||
|
"fullName":"交流侧设备",
|
||||||
|
"id":"817365288625373957",
|
||||||
|
"parentId":"817365130466558725"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enCode":"30.30",
|
||||||
|
"children":null,
|
||||||
|
"hasChildren":false,
|
||||||
|
"fullName":"电缆及桥架",
|
||||||
|
"id":"817365357449708293",
|
||||||
|
"parentId":"817365130466558725"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hasChildren":true,
|
||||||
|
"fullName":"电气配套与汇流设备",
|
||||||
|
"id":"817365130466558725",
|
||||||
|
"parentId":"0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"__vModel__":"product_category",
|
||||||
|
"searchMultiple":false,
|
||||||
|
"isKeyword":false,
|
||||||
|
"style":{
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"disabled":false,
|
||||||
|
"id":"product_category",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"labelI18nCode":"",
|
||||||
|
"on":{
|
||||||
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||||
|
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
export default searchList
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -15,8 +15,12 @@
|
|||||||
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
||||||
@columns-change="handleColumnChange">
|
@columns-change="handleColumnChange">
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add"
|
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add" v-auth="'btn_add'"
|
||||||
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
||||||
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-download" v-auth="'btn_download'"
|
||||||
|
@click="openExportModal(true, { columnList: state.exportList, selectIds: getSelectRowKeys(), showExportSelected: true })"> {{t('common.exportText','导出')}}</a-button>
|
||||||
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-upload" v-auth="'btn_upload'"
|
||||||
|
@click="openImportModal(true, { url: 'bcm/Product', menuId: searchInfo.menuId })"> {{t('common.importText','导入')}}</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-tooltip placement="top">
|
<a-tooltip placement="top">
|
||||||
@@ -240,7 +244,7 @@
|
|||||||
});
|
});
|
||||||
const defaultSearchInfo = {
|
const defaultSearchInfo = {
|
||||||
menuId: route.meta.modelId as string,
|
menuId: route.meta.modelId as string,
|
||||||
moduleId:'806868519370098181',
|
moduleId:'817386322065883909',
|
||||||
superQueryJson: '',
|
superQueryJson: '',
|
||||||
dataType:0,
|
dataType:0,
|
||||||
};
|
};
|
||||||
@@ -278,6 +282,8 @@
|
|||||||
|
|
||||||
const getHasBatchBtn = computed(() => {
|
const getHasBatchBtn = computed(() => {
|
||||||
let btnsList =[]
|
let btnsList =[]
|
||||||
|
btnsList.push('download')
|
||||||
|
btnsList=btnsList.filter(o => hasBtnP('btn_' + o))
|
||||||
return !!btnsList.length
|
return !!btnsList.length
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -386,12 +392,12 @@
|
|||||||
//标签初始化
|
//标签初始化
|
||||||
async function getTabList() {
|
async function getTabList() {
|
||||||
// 字典
|
// 字典
|
||||||
const data = (await baseStore.getDicDataSelector('797036777536749573'))
|
const data = (await baseStore.getDicDataSelector('productType'))
|
||||||
const options = data.map(o => ({ ...o, id: o.enCode }));
|
const options = data ;
|
||||||
state.tabList = [...state.tabList,...options]
|
state.tabList = [...state.tabList,...options]
|
||||||
state.tabList.unshift({ fullName: '全部', id: '' });
|
state.tabList.unshift({ fullName: '全部', id: '' });
|
||||||
state.tabActiveKey = state.tabList[0].id || '';
|
state.tabActiveKey = state.tabList[0].id || '';
|
||||||
state.tabQueryJson = { project_state_id : state.tabList[0].id };
|
state.tabQueryJson = { product_type : state.tabList[0].id };
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
unref(getSearchList)?.length? searchFormSubmit() : reload({ page: 1 });
|
unref(getSearchList)?.length? searchFormSubmit() : reload({ page: 1 });
|
||||||
});
|
});
|
||||||
@@ -531,6 +537,7 @@
|
|||||||
{
|
{
|
||||||
label: t('common.editText','编辑') ,
|
label: t('common.editText','编辑') ,
|
||||||
onClick: updateHandle.bind(null, record),
|
onClick: updateHandle.bind(null, record),
|
||||||
|
auth: 'btn_edit', //有按钮权限
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('common.delText','删除') ,
|
label: t('common.delText','删除') ,
|
||||||
@@ -538,10 +545,12 @@
|
|||||||
modelConfirm: {
|
modelConfirm: {
|
||||||
onOk: handleDelete.bind(null, record.id),
|
onOk: handleDelete.bind(null, record.id),
|
||||||
},
|
},
|
||||||
|
auth: 'btn_remove', //有按钮权限
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('common.detailText','详情') ,
|
label: t('common.detailText','详情') ,
|
||||||
onClick: goDetail.bind(null, record),
|
onClick: goDetail.bind(null, record),
|
||||||
|
auth: 'btn_detail', //有按钮权限
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -582,6 +591,20 @@
|
|||||||
};
|
};
|
||||||
formRef.value?.init(data);
|
formRef.value?.init(data);
|
||||||
}
|
}
|
||||||
|
// 导出
|
||||||
|
function handleDownload(data) {
|
||||||
|
let query = { ...getFetchParams(), ...data };
|
||||||
|
exportData(query)
|
||||||
|
.then((res) => {
|
||||||
|
setExportModalProps({ confirmLoading: false });
|
||||||
|
if (!res.data.url) return;
|
||||||
|
downloadByUrl({ url: res.data.url });
|
||||||
|
closeExportModal();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
setExportModalProps({ confirmLoading: false });
|
||||||
|
});
|
||||||
|
}
|
||||||
// 高级查询
|
// 高级查询
|
||||||
function handleSuperQuery(superQueryJson) {
|
function handleSuperQuery(superQueryJson) {
|
||||||
searchInfo.superQueryJson = superQueryJson;
|
searchInfo.superQueryJson = superQueryJson;
|
||||||
@@ -612,7 +635,7 @@
|
|||||||
reload({ page: 1 });
|
reload({ page: 1 });
|
||||||
}
|
}
|
||||||
function onTabChange(val) {
|
function onTabChange(val) {
|
||||||
state.tabQueryJson = { project_state_id : val }; //这个key是取json中的tabConfig.relationFiled
|
state.tabQueryJson = { product_type : val }; //这个key是取json中的tabConfig.relationFiled
|
||||||
unref(getSearchList).length?searchFormSubmit():resetFields()
|
unref(getSearchList).length?searchFormSubmit():resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
1170
src/views/mdm/suppinfo/Detail.vue
Normal file
1170
src/views/mdm/suppinfo/Detail.vue
Normal file
File diff suppressed because it is too large
Load Diff
2072
src/views/mdm/suppinfo/Form.vue
Normal file
2072
src/views/mdm/suppinfo/Form.vue
Normal file
File diff suppressed because it is too large
Load Diff
34
src/views/mdm/suppinfo/helper/api.ts
Normal file
34
src/views/mdm/suppinfo/helper/api.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import { defHttp } from '@/utils/http/axios';
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
export function getList(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Suppinfo/getList', data });
|
||||||
|
}
|
||||||
|
// 新建
|
||||||
|
export function create(data) {
|
||||||
|
return defHttp.post({ url:'/api/bcm/Suppinfo', data });
|
||||||
|
}
|
||||||
|
// 修改
|
||||||
|
export function update(data) {
|
||||||
|
return defHttp.put({ url: '/api/bcm/Suppinfo/'+ data.id, data });
|
||||||
|
}
|
||||||
|
// 详情(无转换数据)
|
||||||
|
export function getInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Suppinfo/' + id });
|
||||||
|
}
|
||||||
|
// 获取(转换数据)
|
||||||
|
export function getDetailInfo(id) {
|
||||||
|
return defHttp.get({ url: '/api/bcm/Suppinfo/detail/' + id });
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export function del(id) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Suppinfo/' + id });
|
||||||
|
}
|
||||||
|
// 批量删除数据
|
||||||
|
export function batchDelete(data) {
|
||||||
|
return defHttp.delete({ url: '/api/bcm/Suppinfo/batchRemove', data });
|
||||||
|
}
|
||||||
|
// 导出
|
||||||
|
export function exportData(data) {
|
||||||
|
return defHttp.post({ url: '/api/bcm/Suppinfo/Actions/Export', data });
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ const searchList = [
|
|||||||
],
|
],
|
||||||
"showCount":false,
|
"showCount":false,
|
||||||
"__config__":{
|
"__config__":{
|
||||||
"formId":"formItem977ea9",
|
"formId":"formItem478e5c",
|
||||||
"yunzhupaasKey":"input",
|
"yunzhupaasKey":"input",
|
||||||
"visibility":[
|
"visibility":[
|
||||||
"pc",
|
"pc",
|
||||||
@@ -24,7 +24,7 @@ const searchList = [
|
|||||||
"showLabel":true,
|
"showLabel":true,
|
||||||
"required":true,
|
"required":true,
|
||||||
"tableName":"mdm_company",
|
"tableName":"mdm_company",
|
||||||
"renderKey":1774517624902,
|
"renderKey":1774506482470,
|
||||||
"layout":"colFormItem",
|
"layout":"colFormItem",
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||||
"unique":true,
|
"unique":true,
|
||||||
@@ -47,7 +47,7 @@ const searchList = [
|
|||||||
},
|
},
|
||||||
"clearable":true,
|
"clearable":true,
|
||||||
"searchType":2,
|
"searchType":2,
|
||||||
"maxlength":50,
|
"maxlength":200,
|
||||||
"fullName":"企业名称",
|
"fullName":"企业名称",
|
||||||
"label":"企业名称",
|
"label":"企业名称",
|
||||||
"addonAfter":"",
|
"addonAfter":"",
|
||||||
@@ -64,7 +64,7 @@ const searchList = [
|
|||||||
"ignoreChar":"",
|
"ignoreChar":"",
|
||||||
"suffixSpecifyChar":""
|
"suffixSpecifyChar":""
|
||||||
},
|
},
|
||||||
"isKeyword":true,
|
"isKeyword":false,
|
||||||
"useMask":false,
|
"useMask":false,
|
||||||
"showPassword":false,
|
"showPassword":false,
|
||||||
"style":{
|
"style":{
|
||||||
@@ -74,76 +74,60 @@ const searchList = [
|
|||||||
"labelI18nCode":""
|
"labelI18nCode":""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"yunzhupaasKey":"radio",
|
"yunzhupaasKey":"organizeSelect",
|
||||||
|
"filterable":false,
|
||||||
|
"clearable":true,
|
||||||
"searchType":1,
|
"searchType":1,
|
||||||
"buttonStyle":"solid",
|
"ableIds":[],
|
||||||
"fullName":"类型",
|
"multiple":false,
|
||||||
|
"fullName":"归属组织",
|
||||||
"fullNameI18nCode":[
|
"fullNameI18nCode":[
|
||||||
""
|
""
|
||||||
],
|
],
|
||||||
"label":"类型",
|
"label":"归属组织",
|
||||||
"props":{
|
|
||||||
"label":"fullName",
|
|
||||||
"value":"id"
|
|
||||||
},
|
|
||||||
"optionType":"default",
|
|
||||||
"__config__":{
|
"__config__":{
|
||||||
"yunzhupaasKey":"radio",
|
"formId":"formItemfc6848",
|
||||||
"defaultValue":"ORG",
|
"yunzhupaasKey":"organizeSelect",
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"mdm_company",
|
|
||||||
"renderKey":1774517712501,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-radio",
|
|
||||||
"tag":"YunzhupaasRadio",
|
|
||||||
"formId":"formItem60d037",
|
|
||||||
"visibility":[
|
"visibility":[
|
||||||
"pc",
|
"pc",
|
||||||
"app"
|
"app"
|
||||||
],
|
],
|
||||||
|
"defaultValue":[],
|
||||||
"noShow":false,
|
"noShow":false,
|
||||||
"dataType":"static",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
"tipLabel":"",
|
||||||
"tableFixed":"none",
|
"tableFixed":"none",
|
||||||
"label":"类型",
|
"dragDisabled":false,
|
||||||
|
"className":[],
|
||||||
|
"label":"归属组织",
|
||||||
"trigger":"change",
|
"trigger":"change",
|
||||||
|
"showLabel":true,
|
||||||
|
"required":true,
|
||||||
|
"tableName":"mdm_company",
|
||||||
|
"renderKey":1776912270086,
|
||||||
"layout":"colFormItem",
|
"layout":"colFormItem",
|
||||||
"useCache":true,
|
"tagIcon":"icon-ym icon-ym-generator-company",
|
||||||
"propsName":"",
|
"defaultCurrent":true,
|
||||||
|
"tag":"YunzhupaasOrganizeSelect",
|
||||||
"regList":[],
|
"regList":[],
|
||||||
"tableAlign":"left",
|
"tableAlign":"left",
|
||||||
"span":8
|
"span":8
|
||||||
},
|
},
|
||||||
"size":"default",
|
"prop":"org_id",
|
||||||
"prop":"entity_type",
|
"__vModel__":"org_id",
|
||||||
"options":[
|
"searchMultiple":true,
|
||||||
{
|
|
||||||
"fullName":"企业",
|
|
||||||
"id":"ORG"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fullName":"个人",
|
|
||||||
"id":"IND"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"__vModel__":"entity_type",
|
|
||||||
"searchMultiple":false,
|
|
||||||
"isKeyword":false,
|
"isKeyword":false,
|
||||||
"style":{
|
"style":{
|
||||||
"width":"100%"
|
"width":"100%"
|
||||||
},
|
},
|
||||||
|
"selectType":"all",
|
||||||
"disabled":false,
|
"disabled":false,
|
||||||
"id":"entity_type",
|
"id":"org_id",
|
||||||
|
"placeholder":"请选择",
|
||||||
|
"value":[],
|
||||||
"labelI18nCode":"",
|
"labelI18nCode":"",
|
||||||
"on":{
|
"on":{
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||||
},
|
}
|
||||||
"direction":"horizontal"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default searchList
|
export default searchList
|
||||||
2631
src/views/mdm/suppinfo/helper/superQueryJson.ts
Normal file
2631
src/views/mdm/suppinfo/helper/superQueryJson.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -11,8 +11,12 @@
|
|||||||
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
||||||
@columns-change="handleColumnChange">
|
@columns-change="handleColumnChange">
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add"
|
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add" v-auth="'btn_add'"
|
||||||
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
||||||
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-download" v-auth="'btn_download'"
|
||||||
|
@click="openExportModal(true, { columnList: state.exportList, selectIds: getSelectRowKeys(), showExportSelected: true })"> {{t('common.exportText','导出')}}</a-button>
|
||||||
|
<a-button type="link" preIcon="icon-ym icon-ym-btn-upload" v-auth="'btn_upload'"
|
||||||
|
@click="openImportModal(true, { url: 'bcm/Suppinfo', menuId: searchInfo.menuId })"> {{t('common.importText','导入')}}</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-tooltip placement="top">
|
<a-tooltip placement="top">
|
||||||
@@ -228,7 +232,7 @@
|
|||||||
});
|
});
|
||||||
const defaultSearchInfo = {
|
const defaultSearchInfo = {
|
||||||
menuId: route.meta.modelId as string,
|
menuId: route.meta.modelId as string,
|
||||||
moduleId:'807147983731689285',
|
moduleId:'817082533433836293',
|
||||||
superQueryJson: '',
|
superQueryJson: '',
|
||||||
dataType:0,
|
dataType:0,
|
||||||
};
|
};
|
||||||
@@ -266,6 +270,8 @@
|
|||||||
|
|
||||||
const getHasBatchBtn = computed(() => {
|
const getHasBatchBtn = computed(() => {
|
||||||
let btnsList =[]
|
let btnsList =[]
|
||||||
|
btnsList.push('download')
|
||||||
|
btnsList=btnsList.filter(o => hasBtnP('btn_' + o))
|
||||||
return !!btnsList.length
|
return !!btnsList.length
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -508,6 +514,7 @@
|
|||||||
{
|
{
|
||||||
label: t('common.editText','编辑') ,
|
label: t('common.editText','编辑') ,
|
||||||
onClick: updateHandle.bind(null, record),
|
onClick: updateHandle.bind(null, record),
|
||||||
|
auth: 'btn_edit', //有按钮权限
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('common.delText','删除') ,
|
label: t('common.delText','删除') ,
|
||||||
@@ -515,10 +522,12 @@
|
|||||||
modelConfirm: {
|
modelConfirm: {
|
||||||
onOk: handleDelete.bind(null, record.id),
|
onOk: handleDelete.bind(null, record.id),
|
||||||
},
|
},
|
||||||
|
auth: 'btn_remove', //有按钮权限
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('common.detailText','详情') ,
|
label: t('common.detailText','详情') ,
|
||||||
onClick: goDetail.bind(null, record),
|
onClick: goDetail.bind(null, record),
|
||||||
|
auth: 'btn_detail', //有按钮权限
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -559,6 +568,20 @@
|
|||||||
};
|
};
|
||||||
formRef.value?.init(data);
|
formRef.value?.init(data);
|
||||||
}
|
}
|
||||||
|
// 导出
|
||||||
|
function handleDownload(data) {
|
||||||
|
let query = { ...getFetchParams(), ...data };
|
||||||
|
exportData(query)
|
||||||
|
.then((res) => {
|
||||||
|
setExportModalProps({ confirmLoading: false });
|
||||||
|
if (!res.data.url) return;
|
||||||
|
downloadByUrl({ url: res.data.url });
|
||||||
|
closeExportModal();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
setExportModalProps({ confirmLoading: false });
|
||||||
|
});
|
||||||
|
}
|
||||||
// 高级查询
|
// 高级查询
|
||||||
function handleSuperQuery(superQueryJson) {
|
function handleSuperQuery(superQueryJson) {
|
||||||
searchInfo.superQueryJson = superQueryJson;
|
searchInfo.superQueryJson = superQueryJson;
|
||||||
@@ -1,622 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicPopup v-bind="$attrs" @register="registerPopup" :title="title" destroyOnClose>
|
|
||||||
<template #insertToolbar> </template>
|
|
||||||
|
|
||||||
<!-- 整体容器 -->
|
|
||||||
<div class="p-4 bg-[#f7f8fa]">
|
|
||||||
<!-- ====================== 顶部:合同基础信息卡片 ====================== -->
|
|
||||||
<a-card class="mb-4" :bordered="false">
|
|
||||||
<a-row :gutter="15">
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="contract_name">
|
|
||||||
<template #label>合同名称 </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.contract_name"
|
|
||||||
placeholder="请输入合同名称"
|
|
||||||
:maxlength="30"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.contract_name">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="contract_code">
|
|
||||||
<template #label>合同编号 </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.contract_code"
|
|
||||||
placeholder="请输入合同编号"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.contract_code">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="project_id">
|
|
||||||
<template #label>归属项目 </template> <p>{{ dataForm.project_id }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="contract_type_code">
|
|
||||||
<template #label>合同类型 </template> <p>{{ state.dataForm.htlxxx?.contract_type_name || '-' }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="contract_date">
|
|
||||||
<template #label>签约日期 </template> <p>{{ dataForm.contract_date }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="valid_to">
|
|
||||||
<template #label>合同有效期 </template> <p>{{ dataForm.valid_to }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="second_party">
|
|
||||||
<template #label>对方单位 </template>
|
|
||||||
<p class="link-text leading-32px" @click="toDetail('808987555000226117', dataForm.second_party_id, 'company_id')">{{
|
|
||||||
dataForm.second_party + '(' + dataForm.second_party_type + ')'
|
|
||||||
}}</p>
|
|
||||||
<!-- <ExtraRelationInfo
|
|
||||||
:extraOptions="state.extraOptions.second_party"
|
|
||||||
:data="state.extraData.second_party"
|
|
||||||
v-if="
|
|
||||||
state.extraOptions.second_party?.length && state.extraData.second_party && JSON.stringify(state.extraData.second_party) !== '{}'
|
|
||||||
" /> -->
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<!-- <a-col :span="4" class="ant-col-item">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="second_party_type">
|
|
||||||
<p>{{ dataForm.second_party_type }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col> -->
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="first_party">
|
|
||||||
<template #label>我方单位 </template>
|
|
||||||
<p class="link-text leading-32px" @click="toDetail('808987592929317189', dataForm.first_party_id, 'company_id')">{{
|
|
||||||
dataForm.first_party + '(' + dataForm.first_party_type + ')'
|
|
||||||
}}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<!-- <a-col :span="4" class="ant-col-item">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="first_party_type">
|
|
||||||
<p>{{ dataForm.first_party_type }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col> -->
|
|
||||||
</a-row>
|
|
||||||
</a-card>
|
|
||||||
|
|
||||||
<!-- ====================== 中间:金额统计卡片 ====================== -->
|
|
||||||
<a-row :gutter="16" class="mb-4">
|
|
||||||
<a-col :span="8">
|
|
||||||
<a-card class="stat-card">
|
|
||||||
<div class="stat-item">
|
|
||||||
<a-avatar :size="36" style="background: #e6f7ff">
|
|
||||||
<WalletOutlined style="color: #1890ff" />
|
|
||||||
</a-avatar>
|
|
||||||
<div>
|
|
||||||
<div class="stat-value">累计已申请:0</div>
|
|
||||||
<div class="stat-value">到期未申请:0</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="8">
|
|
||||||
<a-card class="stat-card">
|
|
||||||
<div class="stat-item">
|
|
||||||
<a-avatar :size="36" style="background: #e6f7ff">
|
|
||||||
<FileTextOutlined style="color: #1890ff" />
|
|
||||||
</a-avatar>
|
|
||||||
<div>
|
|
||||||
<div class="stat-value">已开票:0</div>
|
|
||||||
<div class="stat-value">未开票:0</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="8">
|
|
||||||
<a-card class="stat-card">
|
|
||||||
<div class="stat-item">
|
|
||||||
<a-avatar :size="36" style="background: #e6f7ff">
|
|
||||||
<PayCircleOutlined style="color: #1890ff" />
|
|
||||||
</a-avatar>
|
|
||||||
<div>
|
|
||||||
<div class="stat-value">已收/付款:0</div>
|
|
||||||
<div class="stat-value">欠款:0</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
|
|
||||||
<!-- ====================== 下方:标签页 ====================== -->
|
|
||||||
<a-card :bordered="false">
|
|
||||||
<a-tabs v-model:activeKey="activeTab" :tabBarGutter="50" size="large " class="pane-tabs">
|
|
||||||
<!-- ========== 标签1:基础信息 ========== -->
|
|
||||||
<a-tab-pane key="base" tab="基础信息">
|
|
||||||
<a-row :gutter="15" class="mt-2">
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="second_party">
|
|
||||||
<template #label>对方单位 </template>
|
|
||||||
<p class="link-text leading-32px" @click="toDetail('806858527036409349', dataForm.second_party_id, 'company_id')">{{
|
|
||||||
dataForm.second_party + '(' + dataForm.second_party_type + ')'
|
|
||||||
}}</p>
|
|
||||||
<!-- <ExtraRelationInfo
|
|
||||||
:extraOptions="state.extraOptions.second_party"
|
|
||||||
:data="state.extraData.second_party"
|
|
||||||
v-if="
|
|
||||||
state.extraOptions.second_party?.length && state.extraData.second_party && JSON.stringify(state.extraData.second_party) !== '{}'
|
|
||||||
" /> -->
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<!-- <a-col :span="4" class="ant-col-item">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="second_party_type">
|
|
||||||
<p>{{ dataForm.second_party_type }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col> -->
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="first_party">
|
|
||||||
<template #label>我方单位 </template>
|
|
||||||
<p class="link-text leading-32px" @click="toDetail('806858527036409349', dataForm.first_party_id, 'company_id')">{{
|
|
||||||
dataForm.first_party + '(' + dataForm.first_party_type + ')'
|
|
||||||
}}</p>
|
|
||||||
<!-- <ExtraRelationInfo
|
|
||||||
:extraOptions="state.extraOptions.first_party"
|
|
||||||
:data="state.extraData.first_party"
|
|
||||||
v-if="
|
|
||||||
state.extraOptions.first_party?.length && state.extraData.first_party && JSON.stringify(state.extraData.first_party) !== '{}'
|
|
||||||
" /> -->
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<!-- <a-col :span="4" class="ant-col-item">
|
|
||||||
<a-form-item :labelCol="{ style: { width: '0px' } }" name="first_party_type">
|
|
||||||
<p>{{ dataForm.first_party_type }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col> -->
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="second_party_address">
|
|
||||||
<template #label>通讯地址 </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.second_party_address"
|
|
||||||
placeholder="请输入对方单位地址"
|
|
||||||
:maxlength="100"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.second_party_address">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="first_party_address">
|
|
||||||
<template #label>通讯地址 </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.first_party_address"
|
|
||||||
placeholder="请输入我方单位地址"
|
|
||||||
:maxlength="100"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.first_party_address">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="second_party_person">
|
|
||||||
<template #label>负责人 </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.second_party_person"
|
|
||||||
placeholder="请输入对方负责人"
|
|
||||||
:maxlength="100"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.second_party_person">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="first_party_person">
|
|
||||||
<template #label>负责人 </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.first_party_person"
|
|
||||||
placeholder="请输入我方负责人"
|
|
||||||
:maxlength="100"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.first_party_person">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="second_party_tel">
|
|
||||||
<template #label>联系方式 </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.second_party_tel"
|
|
||||||
placeholder="请输入对方联系方式"
|
|
||||||
:maxlength="100"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.second_party_tel">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="first_party_tel">
|
|
||||||
<template #label>联系方式 </template>
|
|
||||||
<YunzhupaasInput
|
|
||||||
v-model:value="dataForm.first_party_tel"
|
|
||||||
placeholder="请输入我方联系方式"
|
|
||||||
:maxlength="100"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
allowClear
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
:maskConfig="maskConfig.first_party_tel">
|
|
||||||
</YunzhupaasInput>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="contract_terms">
|
|
||||||
<template #label>合同条款 </template> <p>{{ dataForm.contract_terms }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="remark">
|
|
||||||
<template #label>说明 </template> <p>{{ dataForm.remark }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="operator_id">
|
|
||||||
<template #label>经办人 </template> <p>{{ dataForm.operator_id }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="ant-col-item">
|
|
||||||
<a-form-item name="operator_date">
|
|
||||||
<template #label>经办日期 </template> <p>{{ dataForm.operator_date }}</p>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24" class="ant-col-item">
|
|
||||||
<a-form-item name="pcmDocument">
|
|
||||||
<template #label>附件 <BasicHelp text="默认选择完文件自动提交" /></template>
|
|
||||||
<YunzhupaasUploadFile
|
|
||||||
v-model:value="dataForm.pcmDocument"
|
|
||||||
disabled
|
|
||||||
detailed
|
|
||||||
:fileSize="10"
|
|
||||||
sizeUnit="MB"
|
|
||||||
:limit="9"
|
|
||||||
pathType="defaultPath"
|
|
||||||
timeFormat="YYYY"
|
|
||||||
buttonText="选取文件">
|
|
||||||
</YunzhupaasUploadFile>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-tab-pane>
|
|
||||||
|
|
||||||
<!-- ========== 标签2:合同清单 ========== -->
|
|
||||||
<a-tab-pane key="list" tab="合同清单" v-model:activeKey="activeKey">
|
|
||||||
<a-collapse :default-active-key="['1', '2', '3', '4']" class="mt-2">
|
|
||||||
<!-- 劳务清单 -->
|
|
||||||
<a-collapse-panel key="1" header="劳务清单" v-if="dataForm.htlxxx?.rg_list_enabled == '1'">
|
|
||||||
<a-table :data-source="dataForm.tableFieldc5c2d3" :columns="pcm_contract_itemColumns" size="small" :pagination="false" bordered>
|
|
||||||
<!-- ✅ 在这里加:序号渲染 -->
|
|
||||||
<template #bodyCell="{ column, index }">
|
|
||||||
<template v-if="column.key === 'index'">
|
|
||||||
{{ index + 1 }}
|
|
||||||
</template>
|
|
||||||
</template></a-table
|
|
||||||
>
|
|
||||||
</a-collapse-panel>
|
|
||||||
<!-- 采购清单 -->
|
|
||||||
<a-collapse-panel key="2" header="采购清单" v-if="dataForm.htlxxx?.cl_list_enabled == '1'">
|
|
||||||
<a-table :data-source="dataForm.tableFieldc5c2d4" :columns="cg_pcm_contract_itemColumns" size="small" :pagination="false" bordered>
|
|
||||||
<!-- ✅ 在这里加:序号渲染 -->
|
|
||||||
<template #bodyCell="{ column, index }">
|
|
||||||
<template v-if="column.key === 'index'">
|
|
||||||
{{ index + 1 }}
|
|
||||||
</template>
|
|
||||||
</template></a-table
|
|
||||||
>
|
|
||||||
</a-collapse-panel>
|
|
||||||
<!-- 租赁清单 -->
|
|
||||||
<a-collapse-panel key="3" header="租赁清单" v-if="dataForm.htlxxx?.zl_list_enabled == '1'">
|
|
||||||
<a-table :data-source="dataForm.tableFieldc5c2d5" :columns="zd_pcm_contract_itemColumns" size="small" :pagination="false" bordered>
|
|
||||||
<!-- ✅ 在这里加:序号渲染 -->
|
|
||||||
<template #bodyCell="{ column, index }">
|
|
||||||
<template v-if="column.key === 'index'">
|
|
||||||
{{ index + 1 }}
|
|
||||||
</template>
|
|
||||||
</template></a-table
|
|
||||||
>
|
|
||||||
</a-collapse-panel>
|
|
||||||
<!-- 工程量清单 -->
|
|
||||||
<a-collapse-panel key="4" header="工程量清单" v-if="dataForm.htlxxx?.gcl_list_enabled == '1'">
|
|
||||||
<a-table :data-source="dataForm.tableFieldc5c2d6" :columns="gcl_pcm_contract_itemColumns" size="small" :pagination="false" bordered>
|
|
||||||
<!-- ✅ 在这里加:序号渲染 -->
|
|
||||||
<template #bodyCell="{ column, index }">
|
|
||||||
<template v-if="column.key === 'index'">
|
|
||||||
{{ index + 1 }}
|
|
||||||
</template>
|
|
||||||
</template></a-table
|
|
||||||
>
|
|
||||||
</a-collapse-panel>
|
|
||||||
</a-collapse>
|
|
||||||
</a-tab-pane>
|
|
||||||
|
|
||||||
<!-- ========== 标签3:收款信息 ========== -->
|
|
||||||
<a-tab-pane key="payment" tab="收款信息">
|
|
||||||
<a-table :data-source="dataForm.tableField9213ba" :columns="pcm_payment_planColumns" size="small" :pagination="false" bordered class="mt-2">
|
|
||||||
<template #bodyCell="{ column, index }">
|
|
||||||
<template v-if="column.key === 'index'">
|
|
||||||
{{ index + 1 }}
|
|
||||||
</template>
|
|
||||||
</template></a-table
|
|
||||||
>
|
|
||||||
</a-tab-pane>
|
|
||||||
</a-tabs>
|
|
||||||
</a-card>
|
|
||||||
</div>
|
|
||||||
</BasicPopup>
|
|
||||||
<CompanyDetailDrawer ref="companyDetailRef" />
|
|
||||||
|
|
||||||
<RelationDetail ref="relationDetailRef" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import CompanyDetailDrawer from '@/views/mdm/mdmcompany/Detail.vue'; // 根据实际路径调整
|
|
||||||
|
|
||||||
import { getDetailInfo } from './helper/api';
|
|
||||||
import { getConfigData } from '@/api/onlineDev/visualDev';
|
|
||||||
import { reactive, toRefs, nextTick, ref } from 'vue';
|
|
||||||
import { BasicPopup, usePopup } from '@/components/Popup';
|
|
||||||
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
|
||||||
import { usePermission } from '@/hooks/web/usePermission';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import { WalletOutlined, FileTextOutlined, PayCircleOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
|
||||||
import { getDataChange } from '@/api/onlineDev/visualDev';
|
|
||||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
|
||||||
|
|
||||||
interface State {
|
|
||||||
dataForm: any;
|
|
||||||
title: string;
|
|
||||||
maskConfig: any;
|
|
||||||
interfaceRes: any;
|
|
||||||
extraOptions: any;
|
|
||||||
extraData: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
defineOptions({ name: 'Detail' });
|
|
||||||
const { createMessage } = useMessage();
|
|
||||||
const [registerPopup, { openPopup, setPopupProps, closePopup }] = usePopup();
|
|
||||||
const { t } = useI18n();
|
|
||||||
const relationDetailRef = ref<any>(null);
|
|
||||||
const companyDetailRef = ref<any>(null); // 新增 ref
|
|
||||||
|
|
||||||
const activeTab = ref('base');
|
|
||||||
|
|
||||||
const state = reactive<State>({
|
|
||||||
activeKey: ref('1'),
|
|
||||||
dataForm: { htlxxx: { contract_type_name: '' } },
|
|
||||||
title: t('common.detailText', '详情'),
|
|
||||||
maskConfig: {},
|
|
||||||
interfaceRes: {},
|
|
||||||
extraOptions: {
|
|
||||||
second_party: [{ label: '企业名称', value: 'company_name' }],
|
|
||||||
first_party: [{ label: '企业名称', value: 'company_name' }],
|
|
||||||
},
|
|
||||||
extraData: { second_party: {}, first_party: {} },
|
|
||||||
});
|
|
||||||
|
|
||||||
const { title, dataForm, maskConfig } = toRefs(state);
|
|
||||||
const { hasFormP } = usePermission();
|
|
||||||
|
|
||||||
// ==================== 表格列定义 ====================
|
|
||||||
const pcm_contract_itemColumns = ref([
|
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
key: 'index', // 只需要这个
|
|
||||||
align: 'center',
|
|
||||||
width: 60,
|
|
||||||
},
|
|
||||||
{ title: '工种', dataIndex: 'resources_name' },
|
|
||||||
{ title: '单位', dataIndex: 'resources_unit' },
|
|
||||||
{ title: '单价', dataIndex: 'resources_price' },
|
|
||||||
{ title: '工时', dataIndex: 'resources_quantity' },
|
|
||||||
{ title: '小计', dataIndex: 'resources_money' },
|
|
||||||
]);
|
|
||||||
const cg_pcm_contract_itemColumns = ref([
|
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
key: 'index', // 只需要这个
|
|
||||||
align: 'center',
|
|
||||||
width: 60,
|
|
||||||
},
|
|
||||||
{ title: '材料名称', dataIndex: 'resources_name' },
|
|
||||||
{ title: '单位', dataIndex: 'resources_unit' },
|
|
||||||
{ title: '单价', dataIndex: 'resources_price' },
|
|
||||||
{ title: '数量', dataIndex: 'resources_quantity' },
|
|
||||||
{ title: '小计', dataIndex: 'resources_money' },
|
|
||||||
]);
|
|
||||||
const zd_pcm_contract_itemColumns = ref([
|
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
key: 'index', // 只需要这个
|
|
||||||
align: 'center',
|
|
||||||
width: 60,
|
|
||||||
},
|
|
||||||
{ title: '资源名称', dataIndex: 'resources_name' },
|
|
||||||
{ title: '单位', dataIndex: 'resources_unit' },
|
|
||||||
{ title: '单价', dataIndex: 'resources_price' },
|
|
||||||
{ title: '周期', dataIndex: 'resources_quantity' },
|
|
||||||
{ title: '小计', dataIndex: 'resources_money' },
|
|
||||||
]);
|
|
||||||
const gcl_pcm_contract_itemColumns = ref([
|
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
key: 'index', // 只需要这个
|
|
||||||
align: 'center',
|
|
||||||
width: 60,
|
|
||||||
},
|
|
||||||
{ title: '施工内容', dataIndex: 'resources_name' },
|
|
||||||
{ title: '单位', dataIndex: 'resources_unit' },
|
|
||||||
{ title: '单价', dataIndex: 'resources_price' },
|
|
||||||
{ title: '工程量', dataIndex: 'resources_quantity' },
|
|
||||||
{ title: '小计', dataIndex: 'resources_money' },
|
|
||||||
]);
|
|
||||||
const pcm_payment_planColumns = ref([
|
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
key: 'index', // 只需要这个
|
|
||||||
align: 'center',
|
|
||||||
width: 60,
|
|
||||||
},
|
|
||||||
{ title: '款项名称', dataIndex: 'payment_type' },
|
|
||||||
{ title: '付款条件', dataIndex: 'payment_terms' },
|
|
||||||
{ title: '预计付款日期', dataIndex: 'payment_date' },
|
|
||||||
{ title: '付款比例(%)', dataIndex: 'payment_redio' },
|
|
||||||
{ title: '付款金额', dataIndex: 'payment_money' },
|
|
||||||
]);
|
|
||||||
|
|
||||||
defineExpose({ init });
|
|
||||||
function init(data) {
|
|
||||||
state.dataForm.id = data.id;
|
|
||||||
openPopup();
|
|
||||||
nextTick(() => setTimeout(initData, 0));
|
|
||||||
}
|
|
||||||
function initData() {
|
|
||||||
changeLoading(true);
|
|
||||||
if (state.dataForm.id) getData(state.dataForm.id);
|
|
||||||
else closePopup();
|
|
||||||
}
|
|
||||||
function getData(id) {
|
|
||||||
getDetailInfo(id).then(res => {
|
|
||||||
// 保留原来的 htlxxx,不被覆盖
|
|
||||||
state.dataForm = {
|
|
||||||
...res.data,
|
|
||||||
htlxxx: state.dataForm.htlxxx,
|
|
||||||
};
|
|
||||||
|
|
||||||
getDataInterfaceRes('808356583347064133', {
|
|
||||||
paramList: [
|
|
||||||
{
|
|
||||||
dataType: 'varchar',
|
|
||||||
defaultValue: 'SOFT',
|
|
||||||
field: 'projectType',
|
|
||||||
fieldName: '',
|
|
||||||
id: '87bd31',
|
|
||||||
isSubTable: false,
|
|
||||||
relationField: 'SOFT',
|
|
||||||
required: '1',
|
|
||||||
sourceType: 2,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}).then(res => {
|
|
||||||
let data = res.data;
|
|
||||||
// ✅ 核心:判断不为空时,从 data 中找到匹配的一行数据
|
|
||||||
if (Array.isArray(data) && data.length > 0) {
|
|
||||||
console.log(666666666,state.dataForm.contract_type_code);
|
|
||||||
// 根据 contract_type_code 查找对应行
|
|
||||||
const targetRow = data.find(item => item.contract_type_name === state.dataForm.contract_type_code);
|
|
||||||
console.log(666666666,targetRow);
|
|
||||||
|
|
||||||
// 找到了就可以使用 targetRow(整行数据)
|
|
||||||
if (targetRow) {
|
|
||||||
state.dataForm.htlxxx = {
|
|
||||||
contract_type_name: targetRow.contract_type_name,
|
|
||||||
cl_list_enabled: targetRow.cl_list_enabled,
|
|
||||||
rg_list_enabled: targetRow.rg_list_enabled,
|
|
||||||
zl_list_enabled: targetRow.zl_list_enabled,
|
|
||||||
gcl_list_enabled: targetRow.gcl_list_enabled,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
nextTick(() => {
|
|
||||||
getsecond_partyExtraInfo();
|
|
||||||
getfirst_partyExtraInfo();
|
|
||||||
changeLoading(false);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function toDetail(modelId, id, propsValue) {
|
|
||||||
if (!id) return;
|
|
||||||
// 先调用 toDetail_add,如果返回 true 表示已处理,直接 return
|
|
||||||
if (toDetail_add(modelId, id, propsValue)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
getConfigData(modelId).then(res => {
|
|
||||||
if (!res.data?.formData) return;
|
|
||||||
const formConf = JSON.parse(res.data.formData);
|
|
||||||
formConf.popupType = 'general';
|
|
||||||
relationDetailRef.value?.init({ id, formConf, modelId, propsValue });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function setFormProps(data) {
|
|
||||||
setPopupProps(data);
|
|
||||||
}
|
|
||||||
function changeLoading(loading) {
|
|
||||||
setFormProps({ loading });
|
|
||||||
}
|
|
||||||
function getsecond_partyExtraInfo() {
|
|
||||||
if (!state.dataForm.second_party_id) return;
|
|
||||||
getDataChange('808987555000226117', { id: state.dataForm.second_party_id, propsValue: 'company_id' }).then(res => {
|
|
||||||
if (res.data?.data) state.extraData.second_party = JSON.parse(res.data.data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function getfirst_partyExtraInfo() {
|
|
||||||
if (!state.dataForm.first_party_id) return;
|
|
||||||
getDataChange('808987592929317189', { id: state.dataForm.first_party_id, propsValue: 'company_id' }).then(res => {
|
|
||||||
if (res.data?.data) state.extraData.first_party = JSON.parse(res.data.data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/** 新增方法 */
|
|
||||||
// 修改 toDetail 方法,区分不同类型的详情
|
|
||||||
function toDetail_add(modelId, id, propsValue) {
|
|
||||||
// 直接打开企业详情 Drawer
|
|
||||||
companyDetailRef.value?.init({ id });
|
|
||||||
return true; // 返回 true 表示已处理
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.stat-card {
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 8px;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.stat-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 8px 4px;
|
|
||||||
}
|
|
||||||
.stat-label {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #666;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
.stat-value {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.link-text {
|
|
||||||
color: #1890ff;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
|||||||
import { defHttp } from '@/utils/http/axios';
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
export function getList(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/PcmContract/getList', data });
|
|
||||||
}
|
|
||||||
// 新建
|
|
||||||
export function create(data) {
|
|
||||||
return defHttp.post({ url:'/api/bcm/PcmContract', data });
|
|
||||||
}
|
|
||||||
// 修改
|
|
||||||
export function update(data) {
|
|
||||||
return defHttp.put({ url: '/api/bcm/PcmContract/'+ data.id, data });
|
|
||||||
}
|
|
||||||
// 详情(无转换数据)
|
|
||||||
export function getInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/PcmContract/' + id });
|
|
||||||
}
|
|
||||||
// 获取(转换数据)
|
|
||||||
export function getDetailInfo(id) {
|
|
||||||
return defHttp.get({ url: '/api/bcm/PcmContract/detail/' + id });
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
export function del(id) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/PcmContract/' + id });
|
|
||||||
}
|
|
||||||
// 批量删除数据
|
|
||||||
export function batchDelete(data) {
|
|
||||||
return defHttp.delete({ url: '/api/bcm/PcmContract/batchRemove', data });
|
|
||||||
}
|
|
||||||
// 导出
|
|
||||||
export function exportData(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/PcmContract/Actions/Export', data });
|
|
||||||
}
|
|
||||||
// 获取列表
|
|
||||||
export function getBcmprojecttypeList(data) {
|
|
||||||
return defHttp.post({ url: '/api/bcm/BcmProjectType/getBcmprojecttypeList', data });
|
|
||||||
}
|
|
||||||
@@ -1,586 +0,0 @@
|
|||||||
const columnList = [
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem80771b",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"合同名称",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"pcm_contract",
|
|
||||||
"renderKey":1774858890992,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":16
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"contract_name",
|
|
||||||
"__vModel__":"contract_name",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"contract_name",
|
|
||||||
"placeholder":"请输入合同名称",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"maxlength":30,
|
|
||||||
"fullName":"合同名称",
|
|
||||||
"label":"合同名称",
|
|
||||||
"sortable":false,
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"width":null,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"归属项目",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"归属项目",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"props":{
|
|
||||||
"label":"project_name",
|
|
||||||
"value":"project_id"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"797177453981204485",
|
|
||||||
"templateJson":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"pcm_contract",
|
|
||||||
"renderKey":1774862672330,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItemf49ec8",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dynamic",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"归属项目",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"项目结构树",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"prop":"project_id",
|
|
||||||
"width":null,
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"project_id",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"project_id",
|
|
||||||
"placeholder":"请选择归属项目",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"合同类型",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"合同类型",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"props":{
|
|
||||||
"label":"contract_type_name",
|
|
||||||
"value":"contract_type_code"
|
|
||||||
},
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"select",
|
|
||||||
"defaultValue":"测试数据",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"propsUrl":"808356583347064133",
|
|
||||||
"templateJson":[
|
|
||||||
{
|
|
||||||
"fieldName":"",
|
|
||||||
"field":"projectType",
|
|
||||||
"sourceType":2,
|
|
||||||
"defaultValue":"SOFT",
|
|
||||||
"dataType":"varchar",
|
|
||||||
"id":"87bd31",
|
|
||||||
"required":1,
|
|
||||||
"relationField":"SOFT"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"pcm_contract",
|
|
||||||
"renderKey":1774862835058,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
|
||||||
"tag":"YunzhupaasSelect",
|
|
||||||
"formId":"formItem41e426",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"dataType":"dynamic",
|
|
||||||
"dictionaryType":"",
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"label":"合同类型",
|
|
||||||
"trigger":"change",
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"useCache":true,
|
|
||||||
"propsName":"销售合同类型",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"prop":"contract_type_code",
|
|
||||||
"width":null,
|
|
||||||
"options":[],
|
|
||||||
"__vModel__":"contract_type_code",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"disabled":false,
|
|
||||||
"id":"contract_type_code",
|
|
||||||
"placeholder":"请选择合同类型",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"popupType":"dialog",
|
|
||||||
"yunzhupaasKey":"relationForm",
|
|
||||||
"hasPage":false,
|
|
||||||
"modelId":"806858527036409349",
|
|
||||||
"pageSize":20,
|
|
||||||
"columnOptions":[
|
|
||||||
{
|
|
||||||
"label":"企业编码",
|
|
||||||
"value":"company_code"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label":"企业名称",
|
|
||||||
"value":"company_name"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label":"简称/昵称",
|
|
||||||
"value":"short_name"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label":"类型",
|
|
||||||
"value":"entity_type"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItemdd50ee",
|
|
||||||
"yunzhupaasKey":"relationForm",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":"",
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"对方单位",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"pcm_contract",
|
|
||||||
"renderKey":1774864329913,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"transferList":[],
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-menu",
|
|
||||||
"tag":"YunzhupaasRelationFormByUrl",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":8
|
|
||||||
},
|
|
||||||
"prop":"second_party",
|
|
||||||
"__vModel__":"second_party",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"second_party",
|
|
||||||
"placeholder":"请选择对方单位",
|
|
||||||
"popupWidth":"1000px",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"fullName":"对方单位",
|
|
||||||
"label":"对方单位",
|
|
||||||
"sortable":false,
|
|
||||||
"relationField":"company_name",
|
|
||||||
"queryType":0,
|
|
||||||
"extraOptions":[
|
|
||||||
{
|
|
||||||
"label":"企业名称",
|
|
||||||
"value":"company_name"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"popupTitle":"选择对方单位",
|
|
||||||
"width":null,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"propsValue":"company_id"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"popupType":"drawer",
|
|
||||||
"yunzhupaasKey":"relationForm",
|
|
||||||
"hasPage":false,
|
|
||||||
"modelId":"806858527036409349q",
|
|
||||||
"pageSize":20,
|
|
||||||
"columnOptions":[
|
|
||||||
{
|
|
||||||
"label":"企业编码",
|
|
||||||
"value":"company_code"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label":"企业名称",
|
|
||||||
"value":"company_name"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label":"简称/昵称",
|
|
||||||
"value":"short_name"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label":"类型",
|
|
||||||
"value":"entity_type"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem79de4c",
|
|
||||||
"yunzhupaasKey":"relationForm",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":"",
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"我方单位",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"pcm_contract",
|
|
||||||
"renderKey":1774864691317,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"transferList":[],
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-menu",
|
|
||||||
"tag":"YunzhupaasRelationFormByUrl",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":8
|
|
||||||
},
|
|
||||||
"prop":"first_party",
|
|
||||||
"__vModel__":"first_party",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"first_party",
|
|
||||||
"placeholder":"请选择我方单位",
|
|
||||||
"popupWidth":"1000px",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"filterable":false,
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"fullName":"我方单位",
|
|
||||||
"label":"我方单位",
|
|
||||||
"sortable":false,
|
|
||||||
"relationField":"company_name",
|
|
||||||
"queryType":0,
|
|
||||||
"extraOptions":[
|
|
||||||
{
|
|
||||||
"label":"企业名称",
|
|
||||||
"value":"company_name"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"popupTitle":"选择对方单位",
|
|
||||||
"width":null,
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"propsValue":"company_id"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"datePicker",
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"format":"yyyy-MM-dd",
|
|
||||||
"fullName":"签约日期",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"签约日期",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"datePicker",
|
|
||||||
"endRelationField":"",
|
|
||||||
"defaultValue":null,
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"pcm_contract",
|
|
||||||
"renderKey":1774864123292,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-date",
|
|
||||||
"startRelationField":"",
|
|
||||||
"defaultCurrent":true,
|
|
||||||
"tag":"YunzhupaasDatePicker",
|
|
||||||
"formId":"formItem0a3ac8",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"endTimeTarget":1,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"startTimeType":1,
|
|
||||||
"endTimeRule":false,
|
|
||||||
"label":"签约日期",
|
|
||||||
"trigger":"change",
|
|
||||||
"startTimeRule":false,
|
|
||||||
"startTimeValue":null,
|
|
||||||
"endTimeValue":null,
|
|
||||||
"endTimeType":1,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"startTimeTarget":1,
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"prop":"contract_date",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"contract_date",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"startTime":null,
|
|
||||||
"disabled":false,
|
|
||||||
"id":"contract_date",
|
|
||||||
"placeholder":"请选择签约日期",
|
|
||||||
"endTime":null,
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ableRelationIds":[],
|
|
||||||
"yunzhupaasKey":"userSelect",
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"ableIds":[],
|
|
||||||
"multiple":false,
|
|
||||||
"fullName":"经办人",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"经办人",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"relationField":"",
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItema98546",
|
|
||||||
"yunzhupaasKey":"userSelect",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"defaultValue":"",
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"经办人",
|
|
||||||
"trigger":"change",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"pcm_contract",
|
|
||||||
"renderKey":1774919327581,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-user",
|
|
||||||
"defaultCurrent":true,
|
|
||||||
"tag":"YunzhupaasUserSelect",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"prop":"operator_id",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"operator_id",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"selectType":"all",
|
|
||||||
"disabled":false,
|
|
||||||
"id":"operator_id",
|
|
||||||
"placeholder":"请选择经办人",
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"datePicker",
|
|
||||||
"clearable":true,
|
|
||||||
"resizable":true,
|
|
||||||
"format":"yyyy-MM-dd",
|
|
||||||
"fullName":"经办日期",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"经办日期",
|
|
||||||
"sortable":false,
|
|
||||||
"align":"left",
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"datePicker",
|
|
||||||
"endRelationField":"",
|
|
||||||
"defaultValue":null,
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":false,
|
|
||||||
"tableName":"pcm_contract",
|
|
||||||
"renderKey":1774919345223,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-date",
|
|
||||||
"startRelationField":"",
|
|
||||||
"defaultCurrent":true,
|
|
||||||
"tag":"YunzhupaasDatePicker",
|
|
||||||
"formId":"formItem08ab93",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"endTimeTarget":1,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"startTimeType":1,
|
|
||||||
"endTimeRule":false,
|
|
||||||
"label":"经办日期",
|
|
||||||
"trigger":"change",
|
|
||||||
"startTimeRule":false,
|
|
||||||
"startTimeValue":null,
|
|
||||||
"endTimeValue":null,
|
|
||||||
"endTimeType":1,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"startTimeTarget":1,
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"prop":"operator_date",
|
|
||||||
"width":null,
|
|
||||||
"__vModel__":"operator_date",
|
|
||||||
"fixed":"none",
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"startTime":null,
|
|
||||||
"disabled":false,
|
|
||||||
"id":"operator_date",
|
|
||||||
"placeholder":"请选择合同有效期",
|
|
||||||
"endTime":null,
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default columnList
|
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
const searchList = [
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem80771b",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"合同名称",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"pcm_contract",
|
|
||||||
"renderKey":1774858890992,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":16
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"contract_name",
|
|
||||||
"__vModel__":"contract_name",
|
|
||||||
"searchMultiple":false,
|
|
||||||
"disabled":false,
|
|
||||||
"id":"contract_name",
|
|
||||||
"placeholder":"请输入合同名称",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"searchType":2,
|
|
||||||
"maxlength":30,
|
|
||||||
"fullName":"合同名称",
|
|
||||||
"label":"合同名称",
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"isKeyword":false,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"useScan":false,
|
|
||||||
"suffixIcon":"",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"showCount":false,
|
|
||||||
"__config__":{
|
|
||||||
"formId":"formItem25b3f5",
|
|
||||||
"yunzhupaasKey":"input",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"label":"合同编号",
|
|
||||||
"trigger":"blur",
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"pcm_contract",
|
|
||||||
"renderKey":1774858900215,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
|
||||||
"unique":true,
|
|
||||||
"tag":"YunzhupaasInput",
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":8
|
|
||||||
},
|
|
||||||
"readonly":false,
|
|
||||||
"prop":"contract_code",
|
|
||||||
"__vModel__":"contract_code",
|
|
||||||
"searchMultiple":false,
|
|
||||||
"disabled":true,
|
|
||||||
"id":"contract_code",
|
|
||||||
"placeholder":"请输入合同编号",
|
|
||||||
"addonBefore":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
},
|
|
||||||
"clearable":true,
|
|
||||||
"searchType":2,
|
|
||||||
"maxlength":null,
|
|
||||||
"fullName":"合同编号",
|
|
||||||
"label":"合同编号",
|
|
||||||
"addonAfter":"",
|
|
||||||
"maskConfig":{
|
|
||||||
"prefixType":1,
|
|
||||||
"useUnrealMask":false,
|
|
||||||
"maskType":1,
|
|
||||||
"unrealMaskLength":1,
|
|
||||||
"prefixLimit":0,
|
|
||||||
"suffixLimit":0,
|
|
||||||
"filler":"*",
|
|
||||||
"prefixSpecifyChar":"",
|
|
||||||
"suffixType":1,
|
|
||||||
"ignoreChar":"",
|
|
||||||
"suffixSpecifyChar":""
|
|
||||||
},
|
|
||||||
"isKeyword":false,
|
|
||||||
"useMask":false,
|
|
||||||
"showPassword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"prefixIcon":"",
|
|
||||||
"labelI18nCode":""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"yunzhupaasKey":"datePicker",
|
|
||||||
"clearable":true,
|
|
||||||
"searchType":3,
|
|
||||||
"format":"yyyy-MM-dd",
|
|
||||||
"fullName":"签约日期",
|
|
||||||
"fullNameI18nCode":[
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label":"签约日期",
|
|
||||||
"__config__":{
|
|
||||||
"yunzhupaasKey":"datePicker",
|
|
||||||
"endRelationField":"",
|
|
||||||
"defaultValue":null,
|
|
||||||
"dragDisabled":false,
|
|
||||||
"className":[],
|
|
||||||
"showLabel":true,
|
|
||||||
"required":true,
|
|
||||||
"tableName":"pcm_contract",
|
|
||||||
"renderKey":1774864123292,
|
|
||||||
"tagIcon":"icon-ym icon-ym-generator-date",
|
|
||||||
"startRelationField":"",
|
|
||||||
"defaultCurrent":true,
|
|
||||||
"tag":"YunzhupaasDatePicker",
|
|
||||||
"formId":"formItem0a3ac8",
|
|
||||||
"visibility":[
|
|
||||||
"pc",
|
|
||||||
"app"
|
|
||||||
],
|
|
||||||
"noShow":false,
|
|
||||||
"endTimeTarget":1,
|
|
||||||
"tipLabel":"",
|
|
||||||
"tableFixed":"none",
|
|
||||||
"startTimeType":1,
|
|
||||||
"endTimeRule":false,
|
|
||||||
"label":"签约日期",
|
|
||||||
"trigger":"change",
|
|
||||||
"startTimeRule":false,
|
|
||||||
"startTimeValue":null,
|
|
||||||
"endTimeValue":null,
|
|
||||||
"endTimeType":1,
|
|
||||||
"layout":"colFormItem",
|
|
||||||
"startTimeTarget":1,
|
|
||||||
"regList":[],
|
|
||||||
"tableAlign":"left",
|
|
||||||
"span":12
|
|
||||||
},
|
|
||||||
"prop":"contract_date",
|
|
||||||
"__vModel__":"contract_date",
|
|
||||||
"searchMultiple":false,
|
|
||||||
"isKeyword":false,
|
|
||||||
"style":{
|
|
||||||
"width":"100%"
|
|
||||||
},
|
|
||||||
"startTime":null,
|
|
||||||
"disabled":false,
|
|
||||||
"id":"contract_date",
|
|
||||||
"placeholder":"请选择签约日期",
|
|
||||||
"endTime":null,
|
|
||||||
"value":[],
|
|
||||||
"labelI18nCode":"",
|
|
||||||
"on":{
|
|
||||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
|
||||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default searchList
|
|
||||||
@@ -1,683 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="yunzhupaas-content-wrapper">
|
|
||||||
<div class="yunzhupaas-content-wrapper-center">
|
|
||||||
<!-- ===================== 新增 TAB 开始 ===================== -->
|
|
||||||
<!-- <a-tabs v-model:activeKey="activeKey" class="mb-3" @change="handleTabChange">
|
|
||||||
<a-tab-pane
|
|
||||||
v-for="item in tabList"
|
|
||||||
:key="item.id"
|
|
||||||
:tab="item.name"
|
|
||||||
:name="item.id"
|
|
||||||
/>
|
|
||||||
</a-tabs> -->
|
|
||||||
<!-- ===================== 新增 TAB 结束 ===================== -->
|
|
||||||
<div class="yunzhupaas-content-wrapper-search-box" v-if="getSearchList.length">
|
|
||||||
<BasicForm
|
|
||||||
@register="registerSearchForm"
|
|
||||||
:schemas="getSearchList"
|
|
||||||
@advanced-change="redoHeight"
|
|
||||||
@submit="handleSearchSubmit"
|
|
||||||
@reset="handleSearchReset"
|
|
||||||
class="search-form">
|
|
||||||
</BasicForm>
|
|
||||||
</div>
|
|
||||||
<div class="yunzhupaas-content-wrapper-content bg-white">
|
|
||||||
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef" @columns-change="handleColumnChange">
|
|
||||||
<template #tableTitle>
|
|
||||||
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add" @click="addHandle()"> {{ t('common.add2Text2', '合同登记') }}</a-button>
|
|
||||||
</template>
|
|
||||||
<template #toolbar>
|
|
||||||
<a-tooltip placement="top">
|
|
||||||
<template #title>
|
|
||||||
<span>{{ t('common.superQuery') }}</span>
|
|
||||||
</template>
|
|
||||||
<filter-outlined @click="openSuperQuery(true, { columnOptions: superQueryJson })" />
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
<template #toolbarAfter>
|
|
||||||
<ViewList :menuId="route.meta.modelId" :viewList="viewList" @itemClick="handleViewClick" @reload="initViewList" />
|
|
||||||
<ViewSetting :menuId="route.meta.modelId" :viewList="viewList" :currentView="currentView" @reload="initViewList" />
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record, index }">
|
|
||||||
<template v-for="(item, index) in childColumnList" v-if="childColumnList.length">
|
|
||||||
<template v-if="column?.id?.includes('-') && item.children && item.children[0] && column.key === item.children[0]?.dataIndex">
|
|
||||||
<ChildTableColumn
|
|
||||||
:data="record[item.prop]"
|
|
||||||
:head="item.children"
|
|
||||||
@toggleExpand="toggleExpand(record, item.prop + `Expand`)"
|
|
||||||
@toDetail="toDetail"
|
|
||||||
:expand="record[item.prop + `Expand`]"
|
|
||||||
:key="index"
|
|
||||||
:showOverflow="true" />
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template v-if="!(record.top || column.id?.includes('-'))">
|
|
||||||
<template v-if="column.yunzhupaasKey === 'relationForm'">
|
|
||||||
<p class="link-text" @click="toDetail(column.modelId, record[column.dataIndex + `_id`], column.propsValue)"> {{ record[column.dataIndex] }}</p>
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'inputNumber'">
|
|
||||||
<yunzhupaas-input-number v-model:value="record[column.prop]" :precision="column.precision" :thousands="column.thousands" disabled detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'calculate'">
|
|
||||||
<yunzhupaas-calculate
|
|
||||||
v-model:value="record[column.prop]"
|
|
||||||
:isStorage="column.isStorage"
|
|
||||||
:precision="column.precision"
|
|
||||||
:thousands="column.thousands"
|
|
||||||
detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'sign'">
|
|
||||||
<yunzhupaas-sign v-model:value="record[column.prop]" detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'signature'">
|
|
||||||
<yunzhupaas-signature v-model:value="record[column.prop]" detailed />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'rate'">
|
|
||||||
<yunzhupaas-rate v-model:value="record[column.prop]" :count="column.count" :allowHalf="column.allowHalf" disabled />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'slider'">
|
|
||||||
<yunzhupaas-slider v-model:value="record[column.prop]" :min="column.min" :max="column.max" :step="column.step" disabled />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'uploadImg'">
|
|
||||||
<yunzhupaas-upload-img v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'uploadFile'">
|
|
||||||
<yunzhupaas-upload-file v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
|
||||||
</template>
|
|
||||||
<template v-if="column.yunzhupaasKey === 'input'">
|
|
||||||
<yunzhupaas-input v-model:value="record[column.prop]" :useMask="column.useMask" :maskConfig="column.maskConfig" :showOverflow="true" detailed />
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template v-if="column.key === 'action' && !record.top">
|
|
||||||
<TableAction :actions="getTableActions(record)" />
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Form ref="formRef" @reload="reload" />
|
|
||||||
<Detail ref="detailRef" />
|
|
||||||
<ExportModal @register="registerExportModal" @download="handleDownload" />
|
|
||||||
<ImportModal @register="registerImportModal" @reload="reload" />
|
|
||||||
<PrintSelect @register="registerPrintSelect" @change="handleShowBrowse" />
|
|
||||||
<PrintBrowse @register="registerPrintBrowse" />
|
|
||||||
<RelationDetail ref="relationDetailRef" />
|
|
||||||
<SuperQueryModal @register="registerSuperQueryModal" @superQuery="handleSuperQuery" />
|
|
||||||
<CompanyDetailDrawer ref="companyDetailRef" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import CompanyDetailDrawer from '@/views/mdm/mdmcompany/Detail.vue'; // 根据实际路径调整
|
|
||||||
|
|
||||||
import { getList, del, exportData, batchDelete } from './helper/api';
|
|
||||||
import { getConfigData, getViewList } from '@/api/onlineDev/visualDev';
|
|
||||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary';
|
|
||||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
|
||||||
import { getOrgByOrganizeCondition, getDepartmentSelectAsyncList } from '@/api/permission/organize';
|
|
||||||
import { ref, reactive, onMounted, toRefs, computed, unref, nextTick, toRaw, provide } from 'vue';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
|
||||||
import { useOrganizeStore } from '@/store/modules/organize';
|
|
||||||
import { useUserStore } from '@/store/modules/user';
|
|
||||||
import { BasicModal, useModal } from '@/components/Modal';
|
|
||||||
import { usePopup } from '@/components/Popup';
|
|
||||||
import { ScrollContainer } from '@/components/Container';
|
|
||||||
import { BasicLeftTree, TreeActionType } from '@/components/Tree';
|
|
||||||
import { BasicForm, useForm } from '@/components/Form';
|
|
||||||
import { BasicTable, useTable, TableAction, ActionItem, TableActionType, SorterResult } from '@/components/Table';
|
|
||||||
import { SuperQueryModal } from '@/components/CommonModal';
|
|
||||||
import Form from './Form.vue';
|
|
||||||
import Detail from './Detail.vue';
|
|
||||||
// 有关联表单详情:开始
|
|
||||||
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
|
||||||
// 有关联表单详情:结束
|
|
||||||
import ChildTableColumn from '@/views/common/dynamicModel/list/ChildTableColumn.vue';
|
|
||||||
import { ExportModal } from '@/components/CommonModal';
|
|
||||||
import { downloadByUrl } from '@/utils/file/download';
|
|
||||||
import { ImportModal } from '@/components/CommonModal';
|
|
||||||
// 打印模板多条生成PrintSelect
|
|
||||||
import PrintSelect from '@/components/PrintDesign/printSelect/index.vue';
|
|
||||||
import PrintBrowse from '@/components/PrintDesign/printBrowse/index.vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { FilterOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { getSearchFormSchemas } from '@/components/FormGenerator/src/helper/transform';
|
|
||||||
import { cloneDeep } from 'lodash-es';
|
|
||||||
import columnList from './helper/columnList';
|
|
||||||
import searchList from './helper/searchList';
|
|
||||||
import superQueryJson from './helper/superQueryJson';
|
|
||||||
import { dyOptionsList, systemComponentsList } from '@/components/FormGenerator/src/helper/config';
|
|
||||||
import { thousandsFormat, getParamList } from '@/utils/yunzhupaas';
|
|
||||||
import { usePermission } from '@/hooks/web/usePermission';
|
|
||||||
|
|
||||||
import ViewSetting from '@/views/common/dynamicModel/list/components/ViewSetting.vue';
|
|
||||||
import ViewList from '@/views/common/dynamicModel/list/components/ViewList.vue';
|
|
||||||
|
|
||||||
// 加到 state 外面即可
|
|
||||||
const activeKey = ref<string>(''); // 当前选中tab
|
|
||||||
const tabList = ref<any[]>([]); // tab列表
|
|
||||||
interface State {
|
|
||||||
config: any;
|
|
||||||
columnList: any[];
|
|
||||||
printListOptions: any[];
|
|
||||||
columnBtnsList: any[];
|
|
||||||
customBtnsList: any[];
|
|
||||||
treeFieldNames: any;
|
|
||||||
leftTreeData: any[];
|
|
||||||
leftTreeLoading: boolean;
|
|
||||||
treeActiveId: string;
|
|
||||||
treeActiveNodePath: any;
|
|
||||||
columns: any[];
|
|
||||||
complexColumns: any[];
|
|
||||||
childColumnList: any[];
|
|
||||||
exportList: any[];
|
|
||||||
cacheList: any[];
|
|
||||||
currFlow: any;
|
|
||||||
isCustomCopy: boolean;
|
|
||||||
candidateType: number;
|
|
||||||
currRow: any;
|
|
||||||
workFlowFormData: any;
|
|
||||||
expandObj: any;
|
|
||||||
columnSettingList: any[];
|
|
||||||
searchSchemas: any[];
|
|
||||||
treeRelationObj: any;
|
|
||||||
treeQueryJson: any;
|
|
||||||
leftTreeActiveInfo: any;
|
|
||||||
keyword: string;
|
|
||||||
viewList: any[];
|
|
||||||
currentView: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
const { hasBtnP } = usePermission();
|
|
||||||
const { createMessage, createConfirm } = useMessage();
|
|
||||||
const { t } = useI18n();
|
|
||||||
const organizeStore = useOrganizeStore();
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const userInfo = userStore.getUserInfo;
|
|
||||||
|
|
||||||
const [registerExportModal, { openModal: openExportModal, closeModal: closeExportModal, setModalProps: setExportModalProps }] = useModal();
|
|
||||||
const [registerImportModal, { openModal: openImportModal }] = useModal();
|
|
||||||
const [registerSuperQueryModal, { openModal: openSuperQuery }] = useModal();
|
|
||||||
const formRef = ref<any>(null);
|
|
||||||
const tableRef = ref<Nullable<TableActionType>>(null);
|
|
||||||
const detailRef = ref<any>(null);
|
|
||||||
const relationDetailRef = ref<any>(null);
|
|
||||||
const companyDetailRef = ref<any>(null); // 新增 ref
|
|
||||||
|
|
||||||
const state = reactive<State>({
|
|
||||||
config: {},
|
|
||||||
columnList: [],
|
|
||||||
printListOptions: [],
|
|
||||||
columnBtnsList: [],
|
|
||||||
customBtnsList: [],
|
|
||||||
treeFieldNames: {
|
|
||||||
children: 'children',
|
|
||||||
title: 'fullName',
|
|
||||||
key: 'id',
|
|
||||||
isLeaf: 'isLeaf',
|
|
||||||
},
|
|
||||||
leftTreeData: [],
|
|
||||||
leftTreeLoading: false,
|
|
||||||
treeActiveId: '',
|
|
||||||
treeActiveNodePath: [],
|
|
||||||
columns: [],
|
|
||||||
complexColumns: [], // 复杂表头
|
|
||||||
childColumnList: [],
|
|
||||||
exportList: [],
|
|
||||||
cacheList: [],
|
|
||||||
currFlow: {},
|
|
||||||
isCustomCopy: false,
|
|
||||||
candidateType: 1,
|
|
||||||
currRow: {},
|
|
||||||
workFlowFormData: {},
|
|
||||||
expandObj: {},
|
|
||||||
columnSettingList: [],
|
|
||||||
searchSchemas: [],
|
|
||||||
treeRelationObj: null,
|
|
||||||
treeQueryJson: {},
|
|
||||||
leftTreeActiveInfo: {},
|
|
||||||
keyword: '',
|
|
||||||
viewList: [],
|
|
||||||
currentView: {},
|
|
||||||
});
|
|
||||||
const defaultSearchInfo = {
|
|
||||||
menuId: route.meta.modelId as string,
|
|
||||||
moduleId: '808334712857693445',
|
|
||||||
superQueryJson: '',
|
|
||||||
dataType: 0,
|
|
||||||
};
|
|
||||||
const searchInfo = reactive({
|
|
||||||
...cloneDeep(defaultSearchInfo),
|
|
||||||
});
|
|
||||||
const { childColumnList, searchSchemas, viewList, currentView } = toRefs(state);
|
|
||||||
const [registerSearchForm, { updateSchema, resetFields, submit: searchFormSubmit, setFieldsValue }] = useForm({
|
|
||||||
baseColProps: { span: 6 },
|
|
||||||
showActionButtonGroup: true,
|
|
||||||
showAdvancedButton: true,
|
|
||||||
compact: true,
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, setLoading, getFetchParams, getSelectRows, getSelectRowKeys, redoHeight, clearSelectedRowKeys }] = useTable({
|
|
||||||
api: getList,
|
|
||||||
immediate: false,
|
|
||||||
clickToRowSelect: false,
|
|
||||||
tableSetting: { setting: false },
|
|
||||||
afterFetch: data => {
|
|
||||||
const list = data.map(o => ({
|
|
||||||
...o,
|
|
||||||
...state.expandObj,
|
|
||||||
}));
|
|
||||||
state.cacheList = cloneDeep(list);
|
|
||||||
return list;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerChildTable] = useTable({
|
|
||||||
pagination: false,
|
|
||||||
canResize: false,
|
|
||||||
showTableSetting: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
provide('getLeftTreeActiveInfo', () => state.leftTreeActiveInfo);
|
|
||||||
|
|
||||||
const getHasBatchBtn = computed(() => {
|
|
||||||
let btnsList = [];
|
|
||||||
return !!btnsList.length;
|
|
||||||
});
|
|
||||||
|
|
||||||
const getColumns = computed(() => {
|
|
||||||
const columns = state.complexColumns;
|
|
||||||
return setListValue(state.currentView?.columnList, columns, 'prop');
|
|
||||||
});
|
|
||||||
const getSearchList = computed(() => {
|
|
||||||
const searchSchemas = cloneDeep(state.searchSchemas).map(o => ({ ...o, show: true }));
|
|
||||||
return setListValue(state.currentView?.searchList, searchSchemas, 'field');
|
|
||||||
});
|
|
||||||
const getTableBindValue = computed(() => {
|
|
||||||
let columns = unref(getColumns);
|
|
||||||
const defaultSortConfig = [];
|
|
||||||
const sortField = defaultSortConfig.map(o => (o.sort === 'desc' ? '-' : '') + o.field);
|
|
||||||
const data: any = {
|
|
||||||
pagination: { pageSize: 20 }, //有分页
|
|
||||||
searchInfo: unref(searchInfo),
|
|
||||||
defSort: { sidx: sortField.join(',') },
|
|
||||||
sortFn: (sortInfo: SorterResult | SorterResult[]) => {
|
|
||||||
if (Array.isArray(sortInfo)) {
|
|
||||||
const sortList = sortInfo.map(o => (o.order === 'descend' ? '-' : '') + o.field);
|
|
||||||
return { sidx: sortList.join(',') };
|
|
||||||
} else {
|
|
||||||
const { field, order } = sortInfo;
|
|
||||||
if (field && order) {
|
|
||||||
// 排序字段
|
|
||||||
return { sidx: (order === 'descend' ? '-' : '') + field };
|
|
||||||
} else {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
ellipsis: true,
|
|
||||||
columns,
|
|
||||||
bordered: true,
|
|
||||||
actionColumn: {
|
|
||||||
width: 150,
|
|
||||||
title: t('component.table.action'),
|
|
||||||
dataIndex: 'action',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
if (unref(getHasBatchBtn)) {
|
|
||||||
const rowSelection: any = { type: 'checkbox' };
|
|
||||||
data.rowSelection = rowSelection;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
});
|
|
||||||
// 随便加在 script 里就行
|
|
||||||
const registerPrintBrowse = () => {
|
|
||||||
console.log('打印功能');
|
|
||||||
};
|
|
||||||
function init() {
|
|
||||||
state.config = {};
|
|
||||||
searchInfo.menuId = route.meta.modelId as string;
|
|
||||||
state.columnList = columnList;
|
|
||||||
setLoading(true);
|
|
||||||
getSearchSchemas();
|
|
||||||
getColumnList();
|
|
||||||
initViewList();
|
|
||||||
nextTick(() => {
|
|
||||||
unref(getSearchList)?.length ? searchFormSubmit() : reload({ page: 1 });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function getSearchSchemas() {
|
|
||||||
const schemas = getSearchFormSchemas(searchList);
|
|
||||||
state.searchSchemas = schemas;
|
|
||||||
schemas.forEach(cur => {
|
|
||||||
const config = cur.__config__;
|
|
||||||
if (dyOptionsList.includes(config.yunzhupaasKey)) {
|
|
||||||
if (config.dataType === 'dictionary') {
|
|
||||||
if (!config.dictionaryType) return;
|
|
||||||
getDictionaryDataSelector(config.dictionaryType).then(res => {
|
|
||||||
updateSchema([{ field: cur.field, componentProps: { options: res.data.list } }]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (config.dataType === 'dynamic') {
|
|
||||||
if (!config.propsUrl) return;
|
|
||||||
const query = { paramList: getParamList(config.templateJson) };
|
|
||||||
getDataInterfaceRes(config.propsUrl, query).then(res => {
|
|
||||||
const data = Array.isArray(res.data) ? res.data : [];
|
|
||||||
updateSchema([{ field: cur.field, componentProps: { options: data } }]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cur.defaultValue = cur.value;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function getColumnList() {
|
|
||||||
// 没有开启列表权限
|
|
||||||
let columnList = state.columnList;
|
|
||||||
state.exportList = columnList;
|
|
||||||
let columns = columnList.map(o => ({
|
|
||||||
...o,
|
|
||||||
title: o.labelI18nCode ? t(o.labelI18nCode, o.label) : o.label,
|
|
||||||
dataIndex: o.prop,
|
|
||||||
align: o.align,
|
|
||||||
fixed: o.fixed == 'none' ? false : o.fixed,
|
|
||||||
sorter: o.sortable ? { multiple: 1 } : o.sortable,
|
|
||||||
width: o.width || 100,
|
|
||||||
}));
|
|
||||||
//添加复杂表头
|
|
||||||
columns = getComplexColumns(columns);
|
|
||||||
state.columns = columns.filter(o => o.prop.indexOf('-') < 0);
|
|
||||||
//子表表头
|
|
||||||
getChildComplexColumns(columns);
|
|
||||||
}
|
|
||||||
|
|
||||||
//复杂表头
|
|
||||||
function getComplexColumns(columns) {
|
|
||||||
//这里生成复杂表头的配置
|
|
||||||
let complexHeaderList: any[] = [];
|
|
||||||
if (!complexHeaderList.length) return columns;
|
|
||||||
let childColumns: any[] = [];
|
|
||||||
let firstChildColumns: string[] = [];
|
|
||||||
for (let i = 0; i < complexHeaderList.length; i++) {
|
|
||||||
const e = complexHeaderList[i];
|
|
||||||
e.label = e.fullName;
|
|
||||||
e.labelI18nCode = e.fullNameI18nCode;
|
|
||||||
e.title = e.fullNameI18nCode ? t(e.fullNameI18nCode, e.fullName) : e.fullName;
|
|
||||||
e.align = e.align;
|
|
||||||
e.dataIndex = e.id;
|
|
||||||
e.prop = e.id;
|
|
||||||
e.children = [];
|
|
||||||
e.yunzhupaasKey = 'complexHeader';
|
|
||||||
if (e.childColumns?.length) {
|
|
||||||
childColumns.push(...e.childColumns);
|
|
||||||
for (let k = 0; k < e.childColumns.length; k++) {
|
|
||||||
const item = e.childColumns[k];
|
|
||||||
for (let j = 0; j < columns.length; j++) {
|
|
||||||
const o = columns[j];
|
|
||||||
if (o.prop == item && o.fixed !== 'left' && o.fixed !== 'right') e.children.push({ ...o });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (e.children.length) firstChildColumns.push(e.children[0].prop);
|
|
||||||
}
|
|
||||||
complexHeaderList = complexHeaderList.filter(o => o.children.length);
|
|
||||||
let list: any[] = [];
|
|
||||||
for (let i = 0; i < columns.length; i++) {
|
|
||||||
const e = columns[i];
|
|
||||||
if (!childColumns.includes(e.prop)) {
|
|
||||||
list.push(e);
|
|
||||||
} else {
|
|
||||||
if (firstChildColumns.includes(e.prop)) {
|
|
||||||
const item = complexHeaderList.find(o => o.childColumns.includes(e.prop));
|
|
||||||
list.push(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
//子表表头
|
|
||||||
function getChildComplexColumns(columnList) {
|
|
||||||
let list: any[] = [];
|
|
||||||
for (let i = 0; i < columnList.length; i++) {
|
|
||||||
const e = columnList[i];
|
|
||||||
if (!e.prop.includes('-')) {
|
|
||||||
list.push(e);
|
|
||||||
} else {
|
|
||||||
let prop = e.prop.split('-')[0];
|
|
||||||
let vModel = e.prop.split('-')[1];
|
|
||||||
let label = e.label.split('-')[0];
|
|
||||||
let childLabel = e.label.replace(label + '-', '');
|
|
||||||
if (e.fullNameI18nCode && Array.isArray(e.fullNameI18nCode) && e.fullNameI18nCode[0]) label = t(e.fullNameI18nCode[0], label);
|
|
||||||
let newItem = {
|
|
||||||
align: 'center',
|
|
||||||
yunzhupaasKey: 'table',
|
|
||||||
prop,
|
|
||||||
label,
|
|
||||||
title: label,
|
|
||||||
dataIndex: prop,
|
|
||||||
children: [],
|
|
||||||
};
|
|
||||||
e.dataIndex = vModel;
|
|
||||||
e.title = e.labelI18nCode ? t(e.labelI18nCode, childLabel) : childLabel;
|
|
||||||
if (!state.expandObj.hasOwnProperty(prop + `Expand`)) state.expandObj[prop + `Expand`] = false;
|
|
||||||
if (!list.some(o => o.prop === prop)) list.push(newItem);
|
|
||||||
for (let i = 0; i < list.length; i++) {
|
|
||||||
if (list[i].prop === prop) {
|
|
||||||
list[i].children.push(e);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 行内分组展示
|
|
||||||
getMergeList(list);
|
|
||||||
|
|
||||||
state.complexColumns = list;
|
|
||||||
state.childColumnList = list.filter(o => o.yunzhupaasKey === 'table');
|
|
||||||
|
|
||||||
// 子表分组展示宽度取100
|
|
||||||
for (let i = 0; i < state.childColumnList.length; i++) {
|
|
||||||
const e = state.childColumnList[i];
|
|
||||||
if (e.children?.length) e.children = e.children.map(o => ({ ...o, width: 100 }));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getMergeList(list) {
|
|
||||||
list.forEach(item => {
|
|
||||||
if (item.yunzhupaasKey === 'table' && item.children && item.children.length) {
|
|
||||||
item.children.forEach((child, index) => {
|
|
||||||
if (index == 0) {
|
|
||||||
child.customCell = () => ({
|
|
||||||
rowspan: 1,
|
|
||||||
colspan: item.children.length,
|
|
||||||
class: 'child-table-box',
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
child.customCell = () => ({
|
|
||||||
rowspan: 0,
|
|
||||||
colspan: 0,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function toggleExpand(row, field) {
|
|
||||||
row[field] = !row[field];
|
|
||||||
}
|
|
||||||
// 关联表单查看详情
|
|
||||||
function toDetail(modelId, id, propsValue) {
|
|
||||||
if (!id) return;
|
|
||||||
// 先调用 toDetail_add,如果返回 true 表示已处理,直接 return
|
|
||||||
if (toDetail_add(modelId, id, propsValue)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
getConfigData(modelId).then(res => {
|
|
||||||
if (!res.data || !res.data.formData) return;
|
|
||||||
const formConf = JSON.parse(res.data.formData);
|
|
||||||
formConf.popupType = 'general';
|
|
||||||
formConf.hasPrintBtn = false;
|
|
||||||
formConf.customBtns = [];
|
|
||||||
const data = { id, formConf, modelId, propsValue };
|
|
||||||
relationDetailRef.value?.init(data);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function handleColumnChange(data) {
|
|
||||||
state.columnSettingList = data;
|
|
||||||
}
|
|
||||||
function getTableActions(record): ActionItem[] {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: t('common.editText', '编辑'),
|
|
||||||
onClick: updateHandle.bind(null, record),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('common.delText', '删除'),
|
|
||||||
color: 'error',
|
|
||||||
modelConfirm: {
|
|
||||||
onOk: handleDelete.bind(null, record.id),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('common.detailText', '详情'),
|
|
||||||
onClick: goDetail.bind(null, record),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
// 编辑
|
|
||||||
function updateHandle(record) {
|
|
||||||
// 不带工作流
|
|
||||||
const data = {
|
|
||||||
id: record.id,
|
|
||||||
menuId: searchInfo.menuId,
|
|
||||||
allList: state.cacheList,
|
|
||||||
};
|
|
||||||
formRef.value?.init(data);
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
function handleDelete(id) {
|
|
||||||
const query = { ids: [id] };
|
|
||||||
batchDelete(query).then(res => {
|
|
||||||
createMessage.success(res.msg);
|
|
||||||
clearSelectedRowKeys();
|
|
||||||
reload();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 查看详情
|
|
||||||
function goDetail(record) {
|
|
||||||
// 不带流程
|
|
||||||
const data = {
|
|
||||||
id: record.id,
|
|
||||||
};
|
|
||||||
detailRef.value?.init(data);
|
|
||||||
}
|
|
||||||
// 新增
|
|
||||||
function addHandle() {
|
|
||||||
// 不带流程新增
|
|
||||||
const data = {
|
|
||||||
id: '',
|
|
||||||
menuId: searchInfo.menuId,
|
|
||||||
allList: state.cacheList,
|
|
||||||
};
|
|
||||||
formRef.value?.init(data);
|
|
||||||
}
|
|
||||||
// 高级查询
|
|
||||||
function handleSuperQuery(superQueryJson) {
|
|
||||||
searchInfo.superQueryJson = superQueryJson;
|
|
||||||
reload({ page: 1 });
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSearchReset() {
|
|
||||||
clearSelectedRowKeys();
|
|
||||||
if (!state.resetFromTree) updateSearchFormValue();
|
|
||||||
if (state.resetFromTree) state.resetFromTree = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSearchSubmit(data) {
|
|
||||||
clearSelectedRowKeys();
|
|
||||||
let obj = {
|
|
||||||
...defaultSearchInfo,
|
|
||||||
superQueryJson: searchInfo.superQueryJson,
|
|
||||||
...data,
|
|
||||||
};
|
|
||||||
Object.keys(searchInfo).map(key => {
|
|
||||||
delete searchInfo[key];
|
|
||||||
});
|
|
||||||
for (let [key, value] of Object.entries(obj)) {
|
|
||||||
searchInfo[key.replaceAll('-', '_')] = value;
|
|
||||||
}
|
|
||||||
console.log(searchInfo);
|
|
||||||
reload({ page: 1 });
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateSearchFormValue() {
|
|
||||||
if (!state.treeActiveId) return searchFormSubmit();
|
|
||||||
let queryJson: any = {};
|
|
||||||
let leftTreeActiveInfo: any = {};
|
|
||||||
const isMultiple = !state.treeRelationObj ? false : state.treeRelationObj.searchMultiple;
|
|
||||||
//多级左侧树,需要拼父级->转为查询参数
|
|
||||||
if (
|
|
||||||
state.treeRelationObj &&
|
|
||||||
state.treeRelationObj.yunzhupaasKey &&
|
|
||||||
['organizeSelect', 'cascader', 'areaSelect'].includes(state.treeRelationObj.yunzhupaasKey)
|
|
||||||
) {
|
|
||||||
let currValue = [];
|
|
||||||
currValue = state.treeActiveNodePath.map(o => o[state.treeFieldNames.key]);
|
|
||||||
queryJson = { '': isMultiple ? [currValue] : currValue };
|
|
||||||
leftTreeActiveInfo = { '': state.treeRelationObj.multiple ? [currValue] : currValue };
|
|
||||||
} else {
|
|
||||||
queryJson = { '': isMultiple ? [state.treeActiveId] : state.treeActiveId };
|
|
||||||
leftTreeActiveInfo = { '': state.treeRelationObj.multiple ? [state.treeActiveId] : state.treeActiveId };
|
|
||||||
}
|
|
||||||
state.leftTreeActiveInfo = leftTreeActiveInfo;
|
|
||||||
if (unref(getSearchList)?.length) {
|
|
||||||
// 有搜索列表
|
|
||||||
setFieldsValue(queryJson);
|
|
||||||
searchFormSubmit();
|
|
||||||
} else {
|
|
||||||
// 无搜索列表
|
|
||||||
handleSearchSubmit(queryJson);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function initViewList(currentId = '') {
|
|
||||||
const query = {
|
|
||||||
menuId: route.meta.modelId,
|
|
||||||
};
|
|
||||||
getViewList(query).then(res => {
|
|
||||||
const columns: any[] = state.complexColumns;
|
|
||||||
const searchList: any[] = state.searchSchemas.map(o => ({ label: o.label, id: o.field, show: o.show, labelI18nCode: o.labelI18nCode }));
|
|
||||||
const columnList: any[] = columns.map(o => ({ label: o.label, id: o.prop, show: true, fixed: o.fixed || 'none', labelI18nCode: o.labelI18nCode }));
|
|
||||||
state.viewList = (res.data || []).map(o => {
|
|
||||||
if (o.type == 0) return { ...o, searchList, columnList };
|
|
||||||
return { ...o, searchList: o.searchList ? JSON.parse(o.searchList) : [], columnList: o.columnList ? JSON.parse(o.columnList) : [] };
|
|
||||||
});
|
|
||||||
if (currentId) {
|
|
||||||
state.currentView = state.viewList.filter(o => o.id === currentId)[0] || state.viewList[0];
|
|
||||||
} else {
|
|
||||||
state.currentView = state.viewList.filter(o => o.status === 1)[0] || state.viewList[0];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function handleViewClick(item) {
|
|
||||||
state.currentView = item;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setListValue(data: any[] = [], defaultData: any[] = [], key) {
|
|
||||||
let list: any[] = [];
|
|
||||||
for (let i = 0; i < data.length; i++) {
|
|
||||||
for (let j = 0; j < defaultData.length; j++) {
|
|
||||||
if (data[i].show && data[i].id == defaultData[j][key]) list.push(defaultData[j]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
init();
|
|
||||||
});
|
|
||||||
|
|
||||||
/** 新增方法 */
|
|
||||||
// 修改 toDetail 方法,区分不同类型的详情
|
|
||||||
function toDetail_add(modelId, id, propsValue) {
|
|
||||||
// 直接打开企业详情 Drawer
|
|
||||||
companyDetailRef.value?.init({ id });
|
|
||||||
return true; // 返回 true 表示已处理
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<em>GET</em>
|
<em>GET</em>
|
||||||
/api/system/DataInterface/{id}/Actions/Response?tenantId=xxxxx&name=abc<br />
|
/api/system/DataInterface/{id}/Actions/Response?tenantId=xxxxx&name=abc<br />
|
||||||
Host : localhost:30000<br />
|
Host : localhost:40000<br />
|
||||||
YmDate : 1656404771000<br />
|
YmDate : 1656404771000<br />
|
||||||
UserKey : xxxxxxx<br />
|
UserKey : xxxxxxx<br />
|
||||||
</p>
|
</p>
|
||||||
@@ -85,10 +85,10 @@
|
|||||||
<tr><td>URL Path</td><td>/api/system/DataInterface/{id}/Actions/Response</td> </tr>
|
<tr><td>URL Path</td><td>/api/system/DataInterface/{id}/Actions/Response</td> </tr>
|
||||||
<tr><td>YmDate</td><td>1656404771000</td> </tr>
|
<tr><td>YmDate</td><td>1656404771000</td> </tr>
|
||||||
<tr><td>UserKey</td><td>xxxxxxx</td> </tr>
|
<tr><td>UserKey</td><td>xxxxxxx</td> </tr>
|
||||||
<tr><td>Host</td><td>localhost:30000</td> </tr>
|
<tr><td>Host</td><td>localhost:40000</td> </tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>最终待签名字符串</td>
|
<td>最终待签名字符串</td>
|
||||||
<td>以下 \n 表明换行<br />GET\n<br />/api/system/DataInterface/{id}/Actions/Response\n<br />1656404771000\n <br />localhost:30000\n<br /> </td>
|
<td>以下 \n 表明换行<br />GET\n<br />/api/system/DataInterface/{id}/Actions/Response\n<br />1656404771000\n <br />localhost:40000\n<br /> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>最终计算的 Authorization header</td>
|
<td>最终计算的 Authorization header</td>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<em>
|
<em>
|
||||||
POST /api/system/DataInterface/{id}/Actions/Response<br />
|
POST /api/system/DataInterface/{id}/Actions/Response<br />
|
||||||
Host : localhost:30000<br />
|
Host : localhost:40000<br />
|
||||||
YmDate : 1656404771000<br />
|
YmDate : 1656404771000<br />
|
||||||
UserKey : xxxxxxx<br />
|
UserKey : xxxxxxx<br />
|
||||||
body参数json格式如:{"tenantId":"123","name":"abc"}
|
body参数json格式如:{"tenantId":"123","name":"abc"}
|
||||||
@@ -117,10 +117,10 @@
|
|||||||
<tr><td>URL Path</td><td>/api/system/DataInterface/{id}/Actions/Response</td> </tr>
|
<tr><td>URL Path</td><td>/api/system/DataInterface/{id}/Actions/Response</td> </tr>
|
||||||
<tr><td>YmDate</td><td>1656404771000</td> </tr>
|
<tr><td>YmDate</td><td>1656404771000</td> </tr>
|
||||||
<tr><td>UserKey</td><td>xxxxxxx</td> </tr>
|
<tr><td>UserKey</td><td>xxxxxxx</td> </tr>
|
||||||
<tr><td>Host</td><td>localhost:30000</td> </tr>
|
<tr><td>Host</td><td>localhost:40000</td> </tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>最终待签名字符串</td>
|
<td>最终待签名字符串</td>
|
||||||
<td>以下 \n 表明换行<br />POST\n<br />/hmac/testPost\n<br />1656404771000\n <br />localhost:30000\n<br /></td>
|
<td>以下 \n 表明换行<br />POST\n<br />/hmac/testPost\n<br />1656404771000\n <br />localhost:40000\n<br /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>最终计算的 Authorization header</td>
|
<td>最终计算的 Authorization header</td>
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
String method <span class="token operator">=</span> <span class="token string">"POST"</span><span class="token punctuation">;</span>
|
String method <span class="token operator">=</span> <span class="token string">"POST"</span><span class="token punctuation">;</span>
|
||||||
String urlPath <span class="token operator">=</span> <span class="token string">"/api/system/DataInterface/{id}/Actions/Response"</span><span class="token punctuation">;</span>
|
String urlPath <span class="token operator">=</span> <span class="token string">"/api/system/DataInterface/{id}/Actions/Response"</span><span class="token punctuation">;</span>
|
||||||
String YmDate <span class="token operator">=</span> <span class="token string">"1656404771000"</span><span class="token punctuation">;</span>
|
String YmDate <span class="token operator">=</span> <span class="token string">"1656404771000"</span><span class="token punctuation">;</span>
|
||||||
String host <span class="token operator">=</span> <span class="token string">"localhost:30000"</span><span class="token punctuation">;</span>
|
String host <span class="token operator">=</span> <span class="token string">"localhost:40000"</span><span class="token punctuation">;</span>
|
||||||
String source <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">StringBuilder()</span>
|
String source <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">StringBuilder()</span>
|
||||||
<span class="token punctuation">.</span><span class="token function">append</span>(method)<span class="token punctuation">.</span><span class="token function">append</span><span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">)</span>
|
<span class="token punctuation">.</span><span class="token function">append</span>(method)<span class="token punctuation">.</span><span class="token function">append</span><span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">)</span>
|
||||||
<span class="token punctuation">.</span><span class="token function">append</span>(url)<span class="token punctuation">.</span><span class="token function">append</span><span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">)</span>
|
<span class="token punctuation">.</span><span class="token function">append</span>(url)<span class="token punctuation">.</span><span class="token function">append</span><span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">)</span>
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
String method <span class="token operator">=</span> <span class="token string">"POST"</span><span class="token punctuation">;</span>
|
String method <span class="token operator">=</span> <span class="token string">"POST"</span><span class="token punctuation">;</span>
|
||||||
String urlPath <span class="token operator">=</span> <span class="token string">"/api/system/DataInterface/{id}/Actions/Response"</span><span class="token punctuation">;</span>
|
String urlPath <span class="token operator">=</span> <span class="token string">"/api/system/DataInterface/{id}/Actions/Response"</span><span class="token punctuation">;</span>
|
||||||
String YmDate <span class="token operator">=</span> <span class="token string">"1656404771000"</span><span class="token punctuation">;</span>
|
String YmDate <span class="token operator">=</span> <span class="token string">"1656404771000"</span><span class="token punctuation">;</span>
|
||||||
String host <span class="token operator">=</span> <span class="token string">"localhost:30000"</span><span class="token punctuation">;</span>
|
String host <span class="token operator">=</span> <span class="token string">"localhost:40000"</span><span class="token punctuation">;</span>
|
||||||
String source <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">StringBuilder()</span>
|
String source <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">StringBuilder()</span>
|
||||||
<span class="token punctuation">.</span><span class="token function">Append</span>(method)<span class="token punctuation">.</span><span class="token function">Append</span><span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">)</span>
|
<span class="token punctuation">.</span><span class="token function">Append</span>(method)<span class="token punctuation">.</span><span class="token function">Append</span><span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">)</span>
|
||||||
<span class="token punctuation">.</span><span class="token function">Append</span>(url)<span class="token punctuation">.</span><span class="token function">Append</span><span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">)</span>
|
<span class="token punctuation">.</span><span class="token function">Append</span>(url)<span class="token punctuation">.</span><span class="token function">Append</span><span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">)</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user