Commit f1e6f7d3 by 张珈源

Merge remote-tracking branch 'origin/weiqiao-vue3' into weiqiao-vue3

parents 8d4a7ace 0e127f3e
...@@ -6,11 +6,7 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -6,11 +6,7 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface RokeRoutingPageParams extends BasicPageParams { export interface RokeRoutingPageParams extends BasicPageParams {
code: string; code: string;
companyId: string;
name: string; name: string;
lotRuleId: string;
} }
/** /**
...@@ -21,11 +17,9 @@ export interface RokeRoutingPageModel { ...@@ -21,11 +17,9 @@ export interface RokeRoutingPageModel {
code: string; code: string;
companyId: string;
name: string; name: string;
lotRuleId: string; note: string;
} }
/** /**
...@@ -170,6 +164,10 @@ export interface RokeRoutingProcessModel { ...@@ -170,6 +164,10 @@ export interface RokeRoutingProcessModel {
routingId: string; routingId: string;
processId: string; processId: string;
px: string;
processName: string;
} }
/** /**
......
import { MesAlloyStandardPageModel, MesAlloyStandardPageParams, MesAlloyStandardPageResult } from './model/HejinbzModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/jcsj/hujinbz/page',
List = '/jcsj/hujinbz/list',
Info = '/jcsj/hujinbz/info',
MesAlloyStandard = '/jcsj/hujinbz',
}
/**
* @description: 查询MesAlloyStandard分页列表
*/
export async function getMesAlloyStandardPage(params: MesAlloyStandardPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesAlloyStandardPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesAlloyStandard信息
*/
export async function getMesAlloyStandard(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesAlloyStandardPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesAlloyStandard
*/
export async function addMesAlloyStandard(mesAlloyStandard: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesAlloyStandard,
params: mesAlloyStandard,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesAlloyStandard
*/
export async function updateMesAlloyStandard(mesAlloyStandard: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesAlloyStandard,
params: mesAlloyStandard,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesAlloyStandard(批量删除)
*/
export async function deleteMesAlloyStandard(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesAlloyStandard,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesAlloyStandard分页参数 模型
*/
export interface MesAlloyStandardPageParams extends BasicPageParams {
code: string;
name: string;
kh: string;
cp: string;
version: string;
remark: string;
}
/**
* @description: MesAlloyStandard分页返回值模型
*/
export interface MesAlloyStandardPageModel {
id: string;
code: string;
name: string;
remark: string;
kh: string;
cp: string;
version: string;
}
/**
* @description: MesAlloyStandard表类型
*/
export interface MesAlloyStandardModel {
id: string;
deleteMark: string;
code: string;
name: string;
remark: string;
p1: string;
p2: string;
p3: string;
p4: string;
p5: string;
p6: string;
p7: string;
p8: string;
p9: string;
p10: string;
createDate: string;
createUserId: string;
modifyDate: string;
modifyUserId: string;
kh: string;
cp: string;
version: string;
mesAlloyStandardDetailsList?: MesAlloyStandardDetailsModel;
}
/**
* @description: MesAlloyStandardDetails表类型
*/
export interface MesAlloyStandardDetailsModel {
id: string;
deleteMark: string;
standardId: string;
productId: string;
name: string;
code: string;
customerStandard: string;
customerUpperLimit: string;
customerLowerLimit: string;
internalStandard: string;
internalUpperLimit: string;
internalLowerLimit: string;
remark: string;
p1: string;
p2: string;
p3: string;
p4: string;
p5: string;
p6: string;
p7: string;
p8: string;
p9: string;
p10: string;
createDate: string;
createUserId: string;
modifyDate: string;
modifyUserId: string;
}
/**
* @description: MesAlloyStandard分页返回值结构
*/
export type MesAlloyStandardPageResult = BasicFetchResult<MesAlloyStandardPageModel>;
...@@ -6,35 +6,11 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -6,35 +6,11 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesEquipmentPageParams extends BasicPageParams { export interface MesEquipmentPageParams extends BasicPageParams {
name: string; name: string;
workCenterId: string; companyId: string;
specification: string;
archivesCode: string;
code: string;
location: string;
registerCode: string;
createArchivesUserId: string;
categoryId: string; categoryId: string;
userId: string;
usePermitCode: string;
manufacturer: string;
eState: string; eState: string;
companyId: string;
indexCode: string;
manufactureDate: string;
} }
/** /**
...@@ -47,33 +23,11 @@ export interface MesEquipmentPageModel { ...@@ -47,33 +23,11 @@ export interface MesEquipmentPageModel {
specification: string; specification: string;
code: string;
categoryId: string; categoryId: string;
userId: string;
eState: string; eState: string;
companyId: string; companyId: string;
workCenterId: string;
archivesCode: string;
location: string;
registerCode: string;
createArchivesUserId: string;
usePermitCode: string;
manufacturer: string;
indexCode: string;
manufactureDate: string;
} }
/** /**
......
...@@ -4,13 +4,10 @@ import { defHttp } from '/@/utils/http/axios'; ...@@ -4,13 +4,10 @@ import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios'; import { ErrorMessageMode } from '/#/axios';
enum Api { enum Api {
Page = '/质量管理/zjxm/page', Page = '/zlgl/zjxm/page',
List = '/质量管理/zjxm/list', List = '/zlgl/zjxm/list',
Info = '/质量管理/zjxm/info', Info = '/zlgl/zjxm/info',
MesQuailtyProject = '/质量管理/zjxm', MesQuailtyProject = '/zlgl/zjxm',
} }
/** /**
......
...@@ -4,13 +4,10 @@ import { defHttp } from '/@/utils/http/axios'; ...@@ -4,13 +4,10 @@ import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios'; import { ErrorMessageMode } from '/#/axios';
enum Api { enum Api {
Page = '/质量管理/zjxmlb/page', Page = '/zlgl/zjxmlb/page',
List = '/质量管理/zjxmlb/list', List = '/zlgl/zjxmlb/list',
Info = '/质量管理/zjxmlb/info', Info = '/zlgl/zjxmlb/info',
MesQualityType = '/质量管理/zjxmlb', MesQualityType = '/zlgl/zjxmlb',
} }
/** /**
......
...@@ -16,22 +16,6 @@ export const permissionList = [ ...@@ -16,22 +16,6 @@ export const permissionList = [
options: {}, options: {},
}, },
{ {
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '公司',
fieldId: 'companyId',
isSubTable: false,
showChildren: true,
type: 'select',
key: '62dc90bd2b2548f39626c59222f2c208',
children: [],
options: {},
},
{
required: true, required: true,
view: true, view: true,
edit: true, edit: true,
...@@ -51,22 +35,6 @@ export const permissionList = [ ...@@ -51,22 +35,6 @@ export const permissionList = [
{ {
required: false, required: false,
view: true, view: true,
edit: false,
disabled: true,
isSaveTable: false,
tableName: '',
fieldName: '批次号',
fieldId: 'lotRuleId',
isSubTable: false,
showChildren: true,
type: 'auto-code',
key: '2a666ef333114556a7e018a75573fd92',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true, edit: true,
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
...@@ -121,9 +89,9 @@ export const permissionList = [ ...@@ -121,9 +89,9 @@ export const permissionList = [
showChildren: false, showChildren: false,
tableName: 'rokeRoutingProcessList', tableName: 'rokeRoutingProcessList',
fieldName: '名称', fieldName: '名称',
fieldId: 'processId', fieldId: 'processName',
type: 'MultiplePopup', type: 'Input',
key: '9e9467d976174786a67851ccb34bb8f7', key: 'bffa8112410f4112b3e5fcd32ac28f0e',
children: [], children: [],
}, },
{ {
...@@ -150,10 +118,10 @@ export const permissionList = [ ...@@ -150,10 +118,10 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'rokeRoutingProcessList', tableName: 'rokeRoutingProcessList',
fieldName: '工序类别', fieldName: '采集方案',
fieldId: 'categoryId', fieldId: 'collectionSchemeId',
type: 'XjrSelect', type: 'XjrSelect',
key: 'a56d6b8d54aa4d7c8246feb647f8da8b', key: 'bfdf4979bec74654ae607c3339e56ef2',
children: [], children: [],
}, },
{ {
...@@ -165,10 +133,10 @@ export const permissionList = [ ...@@ -165,10 +133,10 @@ export const permissionList = [
isSaveTable: false, isSaveTable: false,
showChildren: false, showChildren: false,
tableName: 'rokeRoutingProcessList', tableName: 'rokeRoutingProcessList',
fieldName: '采集方案', fieldName: '工序类别',
fieldId: 'collectionSchemeId', fieldId: 'categoryId',
type: 'XjrSelect', type: 'XjrSelect',
key: 'bfdf4979bec74654ae607c3339e56ef2', key: 'a56d6b8d54aa4d7c8246feb647f8da8b',
children: [], children: [],
}, },
{ {
...@@ -186,6 +154,36 @@ export const permissionList = [ ...@@ -186,6 +154,36 @@ export const permissionList = [
key: 'd7f88b9a824042b8b717ba4ffc0aa729', key: 'd7f88b9a824042b8b717ba4ffc0aa729',
children: [], children: [],
}, },
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'rokeRoutingProcessList',
fieldName: '排序',
fieldId: 'px',
type: 'InputNumber',
key: '750b63c0c1804f27abd10e748d7d15f3',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'rokeRoutingProcessList',
fieldName: '工序ID',
fieldId: 'processId',
type: 'Input',
key: '8534d25739fe413788dea3fc99ac7580',
children: [],
},
], ],
}, },
]; ];
<template>
<div class="pt-4">
<SimpleForm
ref="systemFormRef"
:formProps="data.formDataProps"
:formModel="state.formModel"
:isWorkFlow="props.fromPage!=FromPageType.MENU"
:isCamelCase="true"
@model-change="handleChange"
/>
</div>
</template>
<script lang="ts" setup>
import { reactive, ref, onMounted, nextTick, watch } from 'vue';
import { formProps, formEventConfigs } from './config';
import SimpleForm from '/@/components/SimpleForm/src/SimpleForm.vue';
import { addMesAlloyStandard, getMesAlloyStandard, updateMesAlloyStandard } from '/@/api/jcsj/hejinbz';
import { cloneDeep, isString } from 'lodash-es';
import { FormDataProps } from '/@/components/Designer/src/types';
import { usePermission } from '/@/hooks/web/usePermission';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { FromPageType } from '/@/enums/workflowEnum';
import { createFormEvent, getFormDataEvent, loadFormEvent, submitFormEvent,} from '/@/hooks/web/useFormEvent';
import { changeWorkFlowForm, changeSchemaDisabled } from '/@/hooks/web/useWorkFlowForm';
import { WorkFlowFormParams } from '/@/model/workflow/bpmnConfig';
import { useRouter } from 'vue-router';
const { filterFormSchemaAuth } = usePermission();
const RowKey = 'id';
const emits = defineEmits(['changeUploadComponentIds','loadingCompleted', 'update:value']);
const props = defineProps({
fromPage: {
type: Number,
default: FromPageType.MENU,
},
});
const systemFormRef = ref();
const data: { formDataProps: FormDataProps } = reactive({
formDataProps: cloneDeep(formProps),
});
const state = reactive({
formModel: {},
formInfo:{formId:'',formName:''}
});
const { currentRoute } = useRouter();
watch(
() => state.formModel,
(val) => {
emits('update:value', val);
},
{
deep: true,
},
);
onMounted(async () => {
try {
if (props.fromPage == FromPageType.MENU) {
setMenuPermission();
if(currentRoute.value.meta){
state.formInfo.formName = currentRoute.value.meta.title&&isString(currentRoute.value.meta.title)?currentRoute.value.meta.title:'';
state.formInfo.formId = currentRoute.value.meta.formId&&isString(currentRoute.value.meta.formId)?currentRoute.value.meta.formId:'';
}
await createFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单
await nextTick();
await loadFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单
} else if (props.fromPage == FromPageType.FLOW) {
emits('loadingCompleted'); //告诉系统表单已经加载完毕
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
} else if (props.fromPage == FromPageType.PREVIEW) {
// 预览 无需权限,表单事件也无需执行
} else if (props.fromPage == FromPageType.DESKTOP) {
// 桌面设计 表单事件需要执行
emits('loadingCompleted'); //告诉系统表单已经加载完毕
await createFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单
await loadFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单
}
} catch (error) {}
});
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function setMenuPermission() {
data.formDataProps.schemas = filterFormSchemaAuth(data.formDataProps.schemas!);
}
// 校验form 通过返回表单数据
async function validate() {
let values = [];
try {
values = await systemFormRef.value?.validate();
//添加隐藏组件
if (data.formDataProps.hiddenComponent?.length) {
data.formDataProps.hiddenComponent.forEach((component) => {
values[component.bindField] = component.value;
});
}
} finally {
}
return values;
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async function setFormDataFromId(rowId) {
try {
const record = await getMesAlloyStandard(rowId);
setFieldsValue(record);
state.formModel = record;
await getFormDataEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:获取表单数据
} catch (error) {
}
}
// 辅助返回表单数据
async function getFieldsValue() {
let values = [];
try {
values = await systemFormRef.value?.getFieldsValue();
//添加隐藏组件
if (data.formDataProps.hiddenComponent?.length) {
data.formDataProps.hiddenComponent.forEach((component) => {
values[component.bindField] = component.value;
});
}
} finally {
}
return values;
}
// 辅助设置表单数据
function setFieldsValue(record) {
systemFormRef.value.setFieldsValue(record);
}
// 重置表单数据
async function resetFields() {
await systemFormRef.value.resetFields();
}
// 设置表单数据全部为Disabled 【查看】
async function setDisabledForm( ) {
data.formDataProps.schemas = changeSchemaDisabled(cloneDeep(data.formDataProps.schemas));
}
// 获取行键值
function getRowKey() {
return RowKey;
}
// 更新api表单数据
async function update({ values, rowId }) {
try {
values[RowKey] = rowId;
state.formModel = values;
let saveVal = await updateMesAlloyStandard(values);
await submitFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单
return saveVal;
} catch (error) {}
}
// 新增api表单数据
async function add(values) {
try {
state.formModel = values;
let saveVal = await addMesAlloyStandard(values);
await submitFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单
return saveVal;
} catch (error) {}
}
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async function setWorkFlowForm(obj: WorkFlowFormParams) {
try {
if (obj.formId) state.formInfo.formId = obj.formId;
if (obj.formName) state.formInfo.formName = obj.formName;
let flowData = await changeWorkFlowForm(cloneDeep(formProps), obj);
let { buildOptionJson, uploadComponentIds, formModels, isViewProcess } = flowData;
data.formDataProps = buildOptionJson;
emits('changeUploadComponentIds', uploadComponentIds); //工作流中必须保存上传组件id【附件汇总需要】
if (isViewProcess) {
setDisabledForm(); //查看
}
state.formModel = formModels;
setFieldsValue(formModels);
} catch (error) {}
await createFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单
await loadFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单
}
function handleChange(val) {
emits('update:value', val);
}
async function sendMessageForAllIframe() {
try {
if (systemFormRef.value && systemFormRef.value.sendMessageForAllIframe) {
systemFormRef.value.sendMessageForAllIframe();
}
} catch (error) {}
}
defineExpose({
setFieldsValue,
resetFields,
validate,
add,
update,
setFormDataFromId,
setDisabledForm,
setMenuPermission,
setWorkFlowForm,
getRowKey,
getFieldsValue,
sendMessageForAllIframe
});
</script>
\ No newline at end of file
<template>
<BasicModal
:height="500"
v-bind="$attrs" @register="registerModal" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" >
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, reactive, provide, Ref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { formProps } from './config';
import ModalForm from './Form.vue';
import { FromPageType } from '/@/enums/workflowEnum';
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const formRef = ref();
const isCopy = ref<boolean>(false)
const state = reactive({
formModel: {},
isUpdate: true,
isView: false,
rowId: '',
});
provide<Ref<boolean>>('isCopy', isCopy);
const { t } = useI18n();
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await handleInner(data);
});
const getTitle = computed(() => (state.isView ? '查看' : state.isUpdate ? '编辑' : isCopy.value ? '复制数据' : '新增'));
async function handleInner(data){
state.isUpdate = !!data?.isUpdate;
state.isView = !!data?.isView;
isCopy.value = !!data?.isCopy;
setModalProps({
destroyOnClose: true,
maskClosable: false,
showCancelBtn: !state.isView,
showOkBtn: !state.isView,
canFullscreen: true,
width: 900,
footer: state.isView ? null : undefined,defaultFullscreen:true,
});
if (state.isUpdate || state.isView || isCopy.value) {
state.rowId = data.id;
if (state.isView) {
await formRef.value.setDisabledForm();
}
await formRef.value.setFormDataFromId(state.rowId);
} else {
formRef.value.resetFields();
}
}
async function saveModal() {
let saveSuccess = false;
try {
const values = await formRef.value?.validate();
//添加隐藏组件
if (formProps.hiddenComponent?.length) {
formProps.hiddenComponent.forEach((component) => {
values[component.bindField] = component.value;
});
}
if (values !== false) {
try {
if (!state.isUpdate || isCopy.value) {
saveSuccess = await formRef.value.add(values);
} else {
saveSuccess = await formRef.value.update({ values, rowId: state.rowId });
}
return saveSuccess;
} catch (error) {}
}
} catch (error) {
return saveSuccess;
}
}
async function handleSubmit() {
try {
const saveSuccess = await saveModal();
setModalProps({ confirmLoading: true });
if (saveSuccess) {
if (!state.isUpdate || isCopy.value) {
//false 新增
notification.success({
message: 'Tip',
description: isCopy.value ? '复制成功' : t('新增成功!'),
}); //提示消息
} else {
notification.success({
message: 'Tip',
description: t('修改成功!'),
}); //提示消息
}
closeModal();
formRef.value.resetFields();
emit('success');
}
} finally {
setModalProps({ confirmLoading: false });
}
}
function handleClose() {
formRef.value.resetFields();
}
</script>
\ No newline at end of file
export const permissionList = [
{
required: false,
view: true,
edit: false,
disabled: true,
isSaveTable: false,
tableName: '',
fieldName: '编号',
fieldId: 'code',
isSubTable: false,
showChildren: true,
type: 'auto-code',
key: '584fa619df5f4924826ca66e40616a8b',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '名称',
fieldId: 'name',
isSubTable: false,
showChildren: true,
type: 'input',
key: '2945f8e78cd2440caeb234bb50fc62df',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '客户',
fieldId: 'kh',
isSubTable: false,
showChildren: true,
type: 'input',
key: '6b65727e36f64dbab21964ffe147629e',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品',
fieldId: 'cp',
isSubTable: false,
showChildren: true,
type: 'input',
key: '2e3cafb071d74bfc9c7edc6ba89e595e',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '版本',
fieldId: 'version',
isSubTable: false,
showChildren: true,
type: 'number',
key: 'e87056b245c94f8f8e6b715366c61f61',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '备注',
fieldId: 'remark',
isSubTable: false,
showChildren: true,
type: 'textarea',
key: '8058eb6a0c04427f8b332f6c4130e7c6',
children: [],
options: {},
defaultValue: '',
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: true,
showChildren: false,
tableName: 'mesAlloyStandardDetailsList',
fieldName: '',
fieldId: 'mesAlloyStandardDetailsList',
type: 'form',
key: 'd89bbb38963b43daa19a38b8ac6d91e3',
children: [
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesAlloyStandardDetailsList',
fieldName: '合金名称',
fieldId: 'name',
type: 'Input',
key: '2712bdd338964f038f45439d4c1feb8e',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesAlloyStandardDetailsList',
fieldName: '客户标准',
fieldId: 'customerStandard',
type: 'Input',
key: '341f1c4031554a88af26de53261b1e94',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesAlloyStandardDetailsList',
fieldName: '客户标准上限',
fieldId: 'customerUpperLimit',
type: 'Input',
key: '98af38feed0f417f9c9a1a899720ec06',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesAlloyStandardDetailsList',
fieldName: '客户标准下限',
fieldId: 'customerLowerLimit',
type: 'Input',
key: 'acb300ec5c0f4ca9b7b91b250f668800',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesAlloyStandardDetailsList',
fieldName: '内控标准',
fieldId: 'internalStandard',
type: 'Input',
key: '9369baff2e2d4105b0488e21bd19fe2f',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesAlloyStandardDetailsList',
fieldName: '内控标准上限',
fieldId: 'internalUpperLimit',
type: 'Input',
key: 'eadf6efef4094aa080eead40c9eaa177',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesAlloyStandardDetailsList',
fieldName: '内控标准下限',
fieldId: 'internalLowerLimit',
type: 'Input',
key: '53085afd908a493f859852a6b02d517c',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesAlloyStandardDetailsList',
fieldName: '备注',
fieldId: 'remark',
type: 'Input',
key: '3f55ad59b15d4dd8945eb272600401e9',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesAlloyStandardDetailsList',
fieldName: '产品编号',
fieldId: 'code',
type: 'Input',
key: 'e618c972ba9f497f80a3b3656e962a80',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesAlloyStandardDetailsList',
fieldName: '产品ID',
fieldId: 'productId',
type: 'Input',
key: '0e961ed9254b44e8b6e478daca3bf64d',
children: [],
},
],
},
];
<template>
<ResizePageWrapper :hasLeft="false">
<template #resizeRight>
<BasicTable @register="registerTable" isMenuTable ref="tableRef"
>
<template #toolbar>
<template v-for="button in tableButtonConfig" :key="button.code">
<a-button v-if="button.isDefault" type="primary" @click="buttonClick(button.code)">
<template #icon><Icon :icon="button.icon" /></template>
{{ button.name }}
</a-button>
<CustomButtonModal v-else-if="button.buttonType == 'modal'" :info="button" />
<a-button v-else :type="button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'" :danger="button.buttonType === 'danger'" >
<template #icon><Icon :icon="button.icon" /></template>
{{ button.name }}
</a-button>
</template>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'action'">
<TableAction
:actions="getLessActions(record)"
:dropDownActions="getMoreActions(record)"
/>
</template>
<template v-else-if="column.dataIndex && column?.listStyle">
<span :style="executeListStyle(getValue(record, column, 'style'), column?.listStyle)">{{
getValue(record, column, 'value')
}}</span>
</template>
</template>
</BasicTable>
</template>
<HejinbzModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel"/>
</ResizePageWrapper>
</template>
<script lang="ts" setup>
import { ref, computed,provide,Ref, createVNode,
} from 'vue';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getMesAlloyStandardPage, deleteMesAlloyStandard} from '/@/api/jcsj/hejinbz';
import { ResizePageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { usePermission } from '/@/hooks/web/usePermission';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { executeListStyle, getValue } from '/@/hooks/web/useListStyle';//列表样式配置
import { useRouter } from 'vue-router';
import { useModal } from '/@/components/Modal';
import HejinbzModal from './components/HejinbzModal.vue';
import { searchFormSchema, columns } from './components/config';
import Icon from '/@/components/Icon/index';
const listSpliceNum = ref(3); //操作列最先展示几个
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
const pageParamsInfo = ref<any>({});
const { enableLockeData,handleOpenFormEnableLockeData, handleCloseFormEnableLocke, handleHasEnableLocke } =
useConcurrentLock();
const { notification } = useMessage();
const { t } = useI18n();
defineEmits(['register']);
const { filterColumnAuth, filterButtonAuth, hasPermission } = usePermission();
const filterColumns = filterColumnAuth(columns);
const tableRef = ref();
//展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","delete"]);
const buttonConfigs = computed(()=>{
const list = [{"buttonId":"2008425744182145024","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2008425744186339328","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2008425744186339329","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2008425744186339330","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
return filterButtonAuth(list);
})
const tableButtonConfig = computed(() => {
return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
});
const actionButtonConfig = computed(() => {
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
});
const btnEvent = {view : handleView,add : handleAdd,edit : handleEdit,delete : handleDelete,}
const { currentRoute } = useRouter();
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
provide<Ref<string>>('currentFormId', formIdComputedRef);
const [registerModal, { openModal }] = useModal();
const [registerTable, { reload, }] = useTable({
title: 'Hejinbz列表',
api: getMesAlloyStandardPage,
rowKey: 'id',
columns: filterColumns,
pagination: {
pageSize: 10,
},
formConfig: {
labelWidth: 100,
schemas: searchFormSchema,
fieldMapToTime: [],
showResetButton: false,
},
bordered:false,
beforeFetch: (params) => {
pageParamsInfo.value = {...params, FormId: formIdComputedRef.value,PK: 'id' }
return pageParamsInfo.value;
},
afterFetch: (res) => {
},
useSearchForm: true,
showTableSetting: true,
striped: false,
actionColumn: {
width: 195,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
},
tableSetting: {
size: false,
},
customRow,
isAdvancedQuery: false,
querySelectOption: JSON.stringify(searchFormSchema),
objectId: formIdComputedRef.value, ////系统表单formId,自定义表单releaseId的id值
});
function buttonClick(code) {
btnEvent[code]();
}
function handleAdd() {
openModal(true, { isUpdate: false, });
}
async function handleEdit(record: Recordable) {
let field = 'id';
try {
let hasIn = handleHasEnableLocke(buttonConfigs.value, 'edit');
if (hasIn) {
let res = await handleOpenFormEnableLockeData(
record[field],
formIdComputedRef.value,
);
if (res !== null) {
return;
}
}
let info = {
id: record[field],
isUpdate: true,
};
openModal(true, info);
} catch (error) {}
}
function handleDelete(record: Recordable) {
deleteList([record.id]);
}
function deleteList(ids) {
Modal.confirm({
title: '提示信息',
icon: createVNode(ExclamationCircleOutlined),
content: '是否确认删除?',
okText: '确认',
cancelText: '取消',
onOk() {
deleteMesAlloyStandard(ids).then((_) => {
handleSuccess();
notification.success({
message: 'Tip',
description: t('删除成功!'),
});
});
},
onCancel() {},
});
}
function customRow(record: Recordable) {
return {
ondblclick: () => {
if (record.isCanEdit && hasPermission("hejinbz:edit")) {
handleEdit(record);
}
},
};
}
function handleSuccess() {
reload();
}
function handleFormSuccess() {
handleSuccess();
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
}
function handleFormCancel() {
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
}
function handleView(record: Recordable) {
let info={
isView: true,
id: record.id,
}
openModal(true, info);
}
function getLessActions(record: Recordable) {
let list = getActions(record);
return list.slice(0, listSpliceNum.value);
}
function getMoreActions(record: Recordable) {
let list = getActions(record);
return list.slice(listSpliceNum.value);
}
function getActions(record: Recordable):ActionItem[] {
record.isCanEdit = false;
let actionsList: ActionItem[] = [];
actionButtonConfig.value?.map((button) => {
if (!record?.workflowData?.processId) {
record.isCanEdit = true;
actionsList.push({
...button,
auth: `hejinbz:${button.code}`,
label: button?.name,
color: button.code === 'delete' ? 'error' : undefined,
onClick: btnEvent[button.code]?.bind(null, record),
});
} else {
if (!['edit', 'delete'].includes(button.code)) {
actionsList.push({
auth: `hejinbz:${button.code}`,
label: button?.name,
onClick: btnEvent[button.code]?.bind(null, record),
});
}
}
});
return actionsList;
}
</script>
<style lang="less" scoped>
:deep(.ant-table-selection-col) {
width: 50px;
}
.show{
display: flex;
}
.hide{
display: none !important;
}
</style>
\ No newline at end of file
...@@ -9,6 +9,21 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -9,6 +9,21 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input', component: 'Input',
}, },
{ {
field: 'p20',
label: '业务组织',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
{
field: 'jbbz', field: 'jbbz',
label: '交班班组', label: '交班班组',
defaultValue: undefined, defaultValue: undefined,
...@@ -166,6 +181,19 @@ export const columns: BasicColumn[] = [ ...@@ -166,6 +181,19 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: '', listStyle: '',
}, },
{
resizable: true,
dataIndex: 'p20',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -250,6 +278,54 @@ export const formProps: FormProps = { ...@@ -250,6 +278,54 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: 'lkajsldjaljdla',
field: 'p20',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择业务组织',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
{
key: 'fd1b0f4df3ff44179f86dfa5ec6a5c1f', key: 'fd1b0f4df3ff44179f86dfa5ec6a5c1f',
field: 'jjdh', field: 'jjdh',
label: '交接单号', label: '交接单号',
......
...@@ -183,4 +183,20 @@ export const permissionList = [ ...@@ -183,4 +183,20 @@ export const permissionList = [
options: {}, options: {},
defaultValue: '', defaultValue: '',
}, },
{
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'p20',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'lkajsldjaljdla',
children: [],
options: {},
},
]; ];
...@@ -121,8 +121,9 @@ ...@@ -121,8 +121,9 @@
const { t } = useI18n(); const { t } = useI18n();
defineEmits(['register']); defineEmits(['register']);
const { filterColumnAuth, filterButtonAuth, hasPermission } = usePermission(); const { filterColumnAuth, filterButtonAuth, hasPermission } = usePermission();
// console.log('初始值',columns)
const filterColumns = filterColumnAuth(columns); const filterColumns = filterColumnAuth(columns);
// console.log('过滤后的列表',filterColumns)
const tableRef = ref(); const tableRef = ref();
......
...@@ -67,6 +67,22 @@ export const permissionList = [ ...@@ -67,6 +67,22 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'companyId',
isSubTable: false,
showChildren: true,
type: 'select',
key: '25184c444b82451c970b1b6702aa7fa9',
children: [],
options: {},
},
{
required: false, required: false,
view: true, view: true,
edit: false, edit: false,
...@@ -123,23 +139,6 @@ export const permissionList = [ ...@@ -123,23 +139,6 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '建档人',
fieldId: 'createArchivesUserId',
isSubTable: false,
showChildren: true,
type: 'user',
key: 'de0cf6d1a54c42e0b3dbe4a845bd1859',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '设备类别', fieldName: '设备类别',
fieldId: 'categoryId', fieldId: 'categoryId',
isSubTable: false, isSubTable: false,
...@@ -224,14 +223,15 @@ export const permissionList = [ ...@@ -224,14 +223,15 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '公司', fieldName: '整机编号',
fieldId: 'companyId', fieldId: 'indexCode',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'select', type: 'input',
key: '25184c444b82451c970b1b6702aa7fa9', key: '45fb316373fa4a9390907b157823eef3',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -240,12 +240,12 @@ export const permissionList = [ ...@@ -240,12 +240,12 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '整机编号', fieldName: '生产日期',
fieldId: 'indexCode', fieldId: 'manufactureDate',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'input', type: 'date',
key: '45fb316373fa4a9390907b157823eef3', key: '6fcb84a124a741deb3b3d6d17553b39e',
children: [], children: [],
options: {}, options: {},
defaultValue: '', defaultValue: '',
...@@ -257,12 +257,12 @@ export const permissionList = [ ...@@ -257,12 +257,12 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '生产日期', fieldName: '建档人',
fieldId: 'manufactureDate', fieldId: 'createArchivesUserId',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'date', type: 'user',
key: '6fcb84a124a741deb3b3d6d17553b39e', key: 'de0cf6d1a54c42e0b3dbe4a845bd1859',
children: [], children: [],
options: {}, options: {},
defaultValue: '', defaultValue: '',
......
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
formConfig: { formConfig: {
labelWidth: 100, labelWidth: 100,
schemas: searchFormSchema, schemas: searchFormSchema,
fieldMapToTime: [['manufactureDate', ['manufactureDateStart', 'manufactureDateEnd'], 'YYYY-MM-DD ', true],], fieldMapToTime: [],
showResetButton: false, showResetButton: false,
}, },
bordered:false, bordered:false,
......
...@@ -24,7 +24,21 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -24,7 +24,21 @@ export const searchFormSchema: FormSchema[] = [
placeholder: '请选择', placeholder: '请选择',
}, },
}, },
{
field: 'ywzz',
label: '业务组织',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
{ {
field: 'sszz', field: 'sszz',
label: '所属组织', label: '所属组织',
...@@ -115,6 +129,18 @@ export const columns: BasicColumn[] = [ ...@@ -115,6 +129,18 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -199,35 +225,24 @@ export const formProps: FormProps = { ...@@ -199,35 +225,24 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '8a0b1b090265471babfd8fb5068a3781', key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'djbh', field: 'djbh',
label: '单据编号', label: '单据编号',
type: 'input', type: 'auto-code',
component: 'Input', component: 'AutoCodeRule',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 4, span: 4,
defaultValue: '', placeholder: '自动生成编号',
placeholder: '请输入单据编号单据编号',
maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
autoCodeRule: 'BHGPCL',
required: true, required: true,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
...@@ -389,6 +404,59 @@ export const formProps: FormProps = { ...@@ -389,6 +404,59 @@ export const formProps: FormProps = {
], ],
}, },
{ {
span: 8,
list: [
{
key: 'lkajsldjaljdla',
field: 'ywzz',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 4,
placeholder: '请选择下拉选择业务组织',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
],
},
{
span: 24, span: 24,
list: [ list: [
{ {
......
...@@ -17,6 +17,22 @@ export const permissionList = [ ...@@ -17,6 +17,22 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'lkajsldjaljdla',
children: [],
options: {},
},
{
required: false, required: false,
view: true, view: true,
edit: true, edit: true,
......
...@@ -19,7 +19,21 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -19,7 +19,21 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{
field: 'ywzz',
label: '业务组织',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
{ {
field: 'bjsl', field: 'bjsl',
label: '报检数量', label: '报检数量',
...@@ -299,6 +313,18 @@ export const columns: BasicColumn[] = [ ...@@ -299,6 +313,18 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -383,42 +409,32 @@ export const formProps: FormProps = { ...@@ -383,42 +409,32 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '90e17393b46b4ecd841ad4083888029d', key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'bh', field: 'bh',
label: '编号', label: '编号',
type: 'input', type: 'auto-code',
component: 'Input', component: 'AutoCodeRule',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '自动生成编号',
placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
required: false, autoCodeRule: 'GCZJD',
rules: [], required: true,
events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
{ {
key: 'bcd62d5caf1c4fc3a10b065f6f54cdbe', key: '47e825566c424771bdb773c64173ea76',
field: 'createDate', field: 'createDate',
label: '创建时间', label: '创建日期',
type: 'date', type: 'date',
component: 'DatePicker', component: 'DatePicker',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -427,7 +443,7 @@ export const formProps: FormProps = { ...@@ -427,7 +443,7 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
width: '100%', width: '100%',
placeholder: '', placeholder: '请选择创建日期',
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true, showLabel: true,
allowClear: false, allowClear: false,
...@@ -436,7 +452,7 @@ export const formProps: FormProps = { ...@@ -436,7 +452,7 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
rules: [], rules: [],
events: {}, events: {},
isGetCurrent: false, isGetCurrent: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
searchType: 'time', searchType: 'time',
style: { width: '100%' }, style: { width: '100%' },
...@@ -648,9 +664,9 @@ export const formProps: FormProps = { ...@@ -648,9 +664,9 @@ export const formProps: FormProps = {
clearable: false, clearable: false,
disabled: false, disabled: false,
staticOptions: [{ key: 1, label: '成功', value: '成功' }], staticOptions: [{ key: 1, label: '成功', value: '成功' }],
defaultSelect: '', defaultSelect: null,
datasourceType: 'staticData', datasourceType: 'dic',
labelField: 'label', labelField: 'name',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: 'CodeGeneration/selection',
...@@ -663,6 +679,8 @@ export const formProps: FormProps = { ...@@ -663,6 +679,8 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036275783090178' },
itemId: '2012036275783090178',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -683,14 +701,21 @@ export const formProps: FormProps = { ...@@ -683,14 +701,21 @@ export const formProps: FormProps = {
clearable: false, clearable: false,
disabled: false, disabled: false,
staticOptions: [{ key: 1, label: '设备1', value: '设备1' }], staticOptions: [{ key: 1, label: '设备1', value: '设备1' }],
defaultSelect: '', defaultSelect: null,
datasourceType: 'staticData', datasourceType: 'api',
labelField: 'label', labelField: 'name',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: '/zlgl//zjjcsj/getZjsb',
method: 'GET', method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: 'ae3834298bc54c2fb66e9e9af18765e6',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select *,id as value,name as label from mes_equipment where delete_mark=0';\r\nreturn db.select(sql)",
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
...@@ -698,6 +723,8 @@ export const formProps: FormProps = { ...@@ -698,6 +723,8 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036686640332802' },
itemId: '2012036686640332802',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -935,6 +962,59 @@ export const formProps: FormProps = { ...@@ -935,6 +962,59 @@ export const formProps: FormProps = {
}, },
], ],
}, },
{
span: 8,
list: [
{
key: 'lkajsldjaljdla',
field: 'ywzz',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择业务组织',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
],
},
], ],
componentProps: { componentProps: {
gutter: 16, gutter: 16,
......
...@@ -17,6 +17,22 @@ export const permissionList = [ ...@@ -17,6 +17,22 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'lkajsldjaljdla',
children: [],
options: {},
},
{
required: false, required: false,
view: true, view: true,
edit: false, edit: false,
......
...@@ -45,6 +45,21 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -45,6 +45,21 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{
field: 'ywzz',
label: '业务组织',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
...@@ -134,6 +149,18 @@ export const columns: BasicColumn[] = [ ...@@ -134,6 +149,18 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -218,42 +245,32 @@ export const formProps: FormProps = { ...@@ -218,42 +245,32 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '90e17393b46b4ecd841ad4083888029d', key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'bh', field: 'bh',
label: '编号', label: '编号',
type: 'input', type: 'auto-code',
component: 'Input', component: 'AutoCodeRule',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '自动生成编号',
placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
required: false, autoCodeRule: 'CPRKZJD',
rules: [], required: true,
events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
{ {
key: 'bcd62d5caf1c4fc3a10b065f6f54cdbe', key: '47e825566c424771bdb773c64173ea76',
field: 'createDate', field: 'createDate',
label: '创建时间', label: '创建日期',
type: 'date', type: 'date',
component: 'DatePicker', component: 'DatePicker',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -262,7 +279,7 @@ export const formProps: FormProps = { ...@@ -262,7 +279,7 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
width: '100%', width: '100%',
placeholder: '', placeholder: '请选择创建日期',
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true, showLabel: true,
allowClear: false, allowClear: false,
...@@ -271,7 +288,7 @@ export const formProps: FormProps = { ...@@ -271,7 +288,7 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
rules: [], rules: [],
events: {}, events: {},
isGetCurrent: false, isGetCurrent: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
searchType: 'time', searchType: 'time',
style: { width: '100%' }, style: { width: '100%' },
...@@ -482,9 +499,9 @@ export const formProps: FormProps = { ...@@ -482,9 +499,9 @@ export const formProps: FormProps = {
clearable: false, clearable: false,
disabled: false, disabled: false,
staticOptions: [{ key: 1, label: '成功', value: '成功' }], staticOptions: [{ key: 1, label: '成功', value: '成功' }],
defaultSelect: '', defaultSelect: null,
datasourceType: 'staticData', datasourceType: 'dic',
labelField: 'label', labelField: 'name',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: 'CodeGeneration/selection',
...@@ -497,6 +514,8 @@ export const formProps: FormProps = { ...@@ -497,6 +514,8 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036275783090178' },
itemId: '2012036275783090178',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -517,14 +536,21 @@ export const formProps: FormProps = { ...@@ -517,14 +536,21 @@ export const formProps: FormProps = {
clearable: false, clearable: false,
disabled: false, disabled: false,
staticOptions: [{ key: 1, label: '设备1', value: '设备1' }], staticOptions: [{ key: 1, label: '设备1', value: '设备1' }],
defaultSelect: '', defaultSelect: null,
datasourceType: 'staticData', datasourceType: 'api',
labelField: 'label', labelField: 'name',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: '/zlgl//zjjcsj/getZjsb',
method: 'GET', method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: 'ae3834298bc54c2fb66e9e9af18765e6',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select *,id as value,name as label from mes_equipment where delete_mark=0';\r\nreturn db.select(sql)",
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
...@@ -532,6 +558,8 @@ export const formProps: FormProps = { ...@@ -532,6 +558,8 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036686640332802' },
itemId: '2012036686640332802',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -769,6 +797,59 @@ export const formProps: FormProps = { ...@@ -769,6 +797,59 @@ export const formProps: FormProps = {
}, },
], ],
}, },
{
span: 8,
list: [
{
key: 'lkajsldjaljdla',
field: 'ywzz',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择业务组织',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
],
},
], ],
componentProps: { componentProps: {
gutter: 16, gutter: 16,
......
...@@ -17,6 +17,22 @@ export const permissionList = [ ...@@ -17,6 +17,22 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'lkajsldjaljdla',
children: [],
options: {},
},
{
required: false, required: false,
view: true, view: true,
edit: false, edit: false,
......
export const permissionList = [
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '编号',
fieldId: 'bh',
isSubTable: false,
showChildren: true,
type: 'input',
key: '90e17393b46b4ecd841ad4083888029d',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '创建时间',
fieldId: 'createDate',
isSubTable: false,
showChildren: true,
type: 'date',
key: 'bcd62d5caf1c4fc3a10b065f6f54cdbe',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '报检数量',
fieldId: 'bjsl',
isSubTable: false,
showChildren: true,
type: 'number',
key: '66ad7ce1e05243f2adcd7fa0cf171366',
children: [],
options: {},
defaultValue: 0,
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '合格数量',
fieldId: 'hgsl',
isSubTable: false,
showChildren: true,
type: 'number',
key: '48725b4795ef4acaa2a0a65947fc1a33',
children: [],
options: {},
defaultValue: 0,
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '不合格数量',
fieldId: 'bhgsl',
isSubTable: false,
showChildren: true,
type: 'number',
key: '23eae64f88844ce6aed93750c00cf2ca',
children: [],
options: {},
defaultValue: 0,
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '炉批号',
fieldId: 'lch',
isSubTable: false,
showChildren: true,
type: 'input',
key: '9ac1e63ebbcd433bb4b2ec76621ab12d',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '单据类型',
fieldId: 'djlx',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'f6d2ae8c71be45799b3df9658293c992',
children: [],
options: {},
defaultValue: '成品入库质检单',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '完成时间',
fieldId: 'wcsj',
isSubTable: false,
showChildren: true,
type: 'date',
key: '4238bac09a354b92be265ab76b9199d5',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '质检方案',
fieldId: 'zjfa',
isSubTable: false,
showChildren: true,
type: 'select',
key: '4ae7e425cb11408c9527f83e9ea687cf',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '质检结果',
fieldId: 'zjgj',
isSubTable: false,
showChildren: true,
type: 'select',
key: '8ded01cc9af1472394c68f4ffc91cfab',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '质检设备',
fieldId: 'zjsb',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'eb931e3d443b4d99ba84e37feb03cb4c',
children: [],
options: {},
},
{
required: false,
view: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '质检状态',
fieldId: 'zt',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'f7f68f4d1adf4f01abb41d84b0c20d81',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '质检部门',
fieldId: 'zjbmmc',
isSubTable: false,
showChildren: true,
type: 'organization',
key: '059b800f9fc2442fb818556a328bcab4',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '质检人员',
fieldId: 'zjry',
isSubTable: false,
showChildren: true,
type: 'user',
key: '3e47c712e5694502847ada7d0e6ad18d',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品编号',
fieldId: 'cpbh',
isSubTable: false,
showChildren: true,
type: 'input',
key: '407b6d0cd2fa47e6892e4e8fad4e333a',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品名称',
fieldId: 'cp',
isSubTable: false,
showChildren: true,
type: 'select',
key: '0136c3ef97f04ab0a81d7ce310fba07b',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '来源单号',
fieldId: 'lydh',
isSubTable: false,
showChildren: true,
type: 'input',
key: '2a763195eed14c92bfab2c3cd1b25def',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '备注',
fieldId: 'bz',
isSubTable: false,
showChildren: true,
type: 'textarea',
key: 'c7c9aaad45c24224a283f68e880d9945',
children: [],
options: {},
defaultValue: '',
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: true,
showChildren: false,
tableName: 'mesQualityInspectionDetailList',
fieldName: '',
fieldId: 'mesQualityInspectionDetailList',
type: 'form',
key: '01faea74508545a483a4260392c34e51',
children: [
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesQualityInspectionDetailList',
fieldName: '质检项目',
fieldId: 'zjxm',
type: 'Input',
key: 'bd03a87d38a54626bdd79b11892d57e7',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesQualityInspectionDetailList',
fieldName: '标准值',
fieldId: 'bzz',
type: 'Input',
key: 'd772ec9a04ca4518b17310fc5dfb99f2',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesQualityInspectionDetailList',
fieldName: '检验值',
fieldId: 'jcz',
type: 'Input',
key: 'd4bc7070e61b46dda5f46478f6a569b2',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesQualityInspectionDetailList',
fieldName: '完成时间',
fieldId: 'wcsj',
type: 'DatePicker',
key: '1da8de428b0c430791fc4c34c3303a43',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesQualityInspectionDetailList',
fieldName: '质检结果',
fieldId: 'zjgj',
type: 'Input',
key: '6986f7e28de04ed28fa39dadb135de5f',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesQualityInspectionDetailList',
fieldName: '检验方法',
fieldId: 'jyyf',
type: 'Input',
key: 'cb28485b397e417c9481e9a64f5399a9',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesQualityInspectionDetailList',
fieldName: '备注',
fieldId: 'bz',
type: 'Input',
key: '72e34813edec46b390d7ed87ac9e4757',
children: [],
},
],
},
];
...@@ -19,7 +19,21 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -19,7 +19,21 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{
field: 'ywzz',
label: '业务组织',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
{ {
field: 'bjsl', field: 'bjsl',
label: '报检数量', label: '报检数量',
...@@ -312,6 +326,18 @@ export const columns: BasicColumn[] = [ ...@@ -312,6 +326,18 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -396,42 +422,32 @@ export const formProps: FormProps = { ...@@ -396,42 +422,32 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '90e17393b46b4ecd841ad4083888029d', key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'bh', field: 'bh',
label: '编号', label: '编号',
type: 'input', type: 'auto-code',
component: 'Input', component: 'AutoCodeRule',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '自动生成编号',
placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
required: false, autoCodeRule: 'FHZJD',
rules: [], required: true,
events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
{ {
key: 'bcd62d5caf1c4fc3a10b065f6f54cdbe', key: '47e825566c424771bdb773c64173ea76',
field: 'createDate', field: 'createDate',
label: '创建时间', label: '创建日期',
type: 'date', type: 'date',
component: 'DatePicker', component: 'DatePicker',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -440,7 +456,7 @@ export const formProps: FormProps = { ...@@ -440,7 +456,7 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
width: '100%', width: '100%',
placeholder: '', placeholder: '请选择创建日期',
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true, showLabel: true,
allowClear: false, allowClear: false,
...@@ -449,7 +465,7 @@ export const formProps: FormProps = { ...@@ -449,7 +465,7 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
rules: [], rules: [],
events: {}, events: {},
isGetCurrent: false, isGetCurrent: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
searchType: 'time', searchType: 'time',
style: { width: '100%' }, style: { width: '100%' },
...@@ -660,9 +676,9 @@ export const formProps: FormProps = { ...@@ -660,9 +676,9 @@ export const formProps: FormProps = {
clearable: false, clearable: false,
disabled: false, disabled: false,
staticOptions: [{ key: 1, label: '成功', value: '成功' }], staticOptions: [{ key: 1, label: '成功', value: '成功' }],
defaultSelect: '', defaultSelect: null,
datasourceType: 'staticData', datasourceType: 'dic',
labelField: 'label', labelField: 'name',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: 'CodeGeneration/selection',
...@@ -675,6 +691,8 @@ export const formProps: FormProps = { ...@@ -675,6 +691,8 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036275783090178' },
itemId: '2012036275783090178',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -695,14 +713,21 @@ export const formProps: FormProps = { ...@@ -695,14 +713,21 @@ export const formProps: FormProps = {
clearable: false, clearable: false,
disabled: false, disabled: false,
staticOptions: [{ key: 1, label: '设备1', value: '设备1' }], staticOptions: [{ key: 1, label: '设备1', value: '设备1' }],
defaultSelect: '', defaultSelect: null,
datasourceType: 'staticData', datasourceType: 'api',
labelField: 'label', labelField: 'name',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: '/zlgl//zjjcsj/getZjsb',
method: 'GET', method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: 'ae3834298bc54c2fb66e9e9af18765e6',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select *,id as value,name as label from mes_equipment where delete_mark=0';\r\nreturn db.select(sql)",
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
...@@ -710,6 +735,8 @@ export const formProps: FormProps = { ...@@ -710,6 +735,8 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036686640332802' },
itemId: '2012036686640332802',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -947,6 +974,59 @@ export const formProps: FormProps = { ...@@ -947,6 +974,59 @@ export const formProps: FormProps = {
}, },
], ],
}, },
{
span: 8,
list: [
{
key: 'lkajsldjaljdla',
field: 'ywzz',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择业务组织',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
],
},
], ],
componentProps: { componentProps: {
gutter: 16, gutter: 16,
......
...@@ -17,6 +17,22 @@ export const permissionList = [ ...@@ -17,6 +17,22 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'lkajsldjaljdla',
children: [],
options: {},
},
{
required: false, required: false,
view: true, view: true,
edit: false, edit: false,
......
...@@ -58,6 +58,21 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -58,6 +58,21 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{
field: 'ywzz',
label: '业务组织',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
...@@ -164,6 +179,18 @@ export const columns: BasicColumn[] = [ ...@@ -164,6 +179,18 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -248,42 +275,32 @@ export const formProps: FormProps = { ...@@ -248,42 +275,32 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '90e17393b46b4ecd841ad4083888029d', key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'bh', field: 'bh',
label: '编号', label: '编号',
type: 'input', type: 'auto-code',
component: 'Input', component: 'AutoCodeRule',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '自动生成编号',
placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
required: false, autoCodeRule: 'LLZJD',
rules: [], required: true,
events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
{ {
key: 'bcd62d5caf1c4fc3a10b065f6f54cdbe', key: '47e825566c424771bdb773c64173ea76',
field: 'createDate', field: 'createDate',
label: '创建时间', label: '创建日期',
type: 'date', type: 'date',
component: 'DatePicker', component: 'DatePicker',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -292,7 +309,7 @@ export const formProps: FormProps = { ...@@ -292,7 +309,7 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
width: '100%', width: '100%',
placeholder: '', placeholder: '请选择创建日期',
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true, showLabel: true,
allowClear: false, allowClear: false,
...@@ -301,7 +318,7 @@ export const formProps: FormProps = { ...@@ -301,7 +318,7 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
rules: [], rules: [],
events: {}, events: {},
isGetCurrent: false, isGetCurrent: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
searchType: 'time', searchType: 'time',
style: { width: '100%' }, style: { width: '100%' },
...@@ -815,6 +832,59 @@ export const formProps: FormProps = { ...@@ -815,6 +832,59 @@ export const formProps: FormProps = {
}, },
], ],
}, },
{
span: 8,
list: [
{
key: 'lkajsldjaljdla',
field: 'ywzz',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择业务组织',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
],
},
], ],
componentProps: { componentProps: {
gutter: 16, gutter: 16,
......
...@@ -17,6 +17,22 @@ export const permissionList = [ ...@@ -17,6 +17,22 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'lkajsldjaljdla',
children: [],
options: {},
},
{
required: false, required: false,
view: true, view: true,
edit: false, edit: false,
......
...@@ -58,6 +58,21 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -58,6 +58,21 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{
field: 'ywzz',
label: '业务组织',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2015724355955159041' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
...@@ -164,6 +179,18 @@ export const columns: BasicColumn[] = [ ...@@ -164,6 +179,18 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'ywzz',
title: '业务组织',
componentType: 'select',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -248,42 +275,32 @@ export const formProps: FormProps = { ...@@ -248,42 +275,32 @@ export const formProps: FormProps = {
span: 8, span: 8,
list: [ list: [
{ {
key: '90e17393b46b4ecd841ad4083888029d', key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'bh', field: 'bh',
label: '编号', label: '编号',
type: 'input', type: 'auto-code',
component: 'Input', component: 'AutoCodeRule',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '自动生成编号',
placeholder: '',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
required: false, autoCodeRule: 'QTZJD',
rules: [], required: true,
events: {},
listStyle: '',
isSave: false,
isShow: true, isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
{ {
key: 'bcd62d5caf1c4fc3a10b065f6f54cdbe', key: '47e825566c424771bdb773c64173ea76',
field: 'createDate', field: 'createDate',
label: '创建时间', label: '创建日期',
type: 'date', type: 'date',
component: 'DatePicker', component: 'DatePicker',
colProps: { span: 24 }, colProps: { span: 24 },
...@@ -292,7 +309,7 @@ export const formProps: FormProps = { ...@@ -292,7 +309,7 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
width: '100%', width: '100%',
placeholder: '', placeholder: '请选择创建日期',
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true, showLabel: true,
allowClear: false, allowClear: false,
...@@ -301,7 +318,7 @@ export const formProps: FormProps = { ...@@ -301,7 +318,7 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
rules: [], rules: [],
events: {}, events: {},
isGetCurrent: false, isGetCurrent: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
searchType: 'time', searchType: 'time',
style: { width: '100%' }, style: { width: '100%' },
...@@ -512,6 +529,7 @@ export const formProps: FormProps = { ...@@ -512,6 +529,7 @@ export const formProps: FormProps = {
clearable: false, clearable: false,
disabled: false, disabled: false,
staticOptions: [{ key: 1, label: '成功', value: '成功' }], staticOptions: [{ key: 1, label: '成功', value: '成功' }],
defaultSelect: null,
datasourceType: 'dic', datasourceType: 'dic',
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
...@@ -548,13 +566,21 @@ export const formProps: FormProps = { ...@@ -548,13 +566,21 @@ export const formProps: FormProps = {
clearable: false, clearable: false,
disabled: false, disabled: false,
staticOptions: [{ key: 1, label: '设备1', value: '设备1' }], staticOptions: [{ key: 1, label: '设备1', value: '设备1' }],
datasourceType: 'dic', defaultSelect: null,
datasourceType: 'api',
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: '/zlgl//zjjcsj/getZjsb',
method: 'GET', method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: 'ae3834298bc54c2fb66e9e9af18765e6',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select *,id as value,name as label from mes_equipment where delete_mark=0';\r\nreturn db.select(sql)",
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
...@@ -802,6 +828,59 @@ export const formProps: FormProps = { ...@@ -802,6 +828,59 @@ export const formProps: FormProps = {
}, },
], ],
}, },
{
span: 8,
list: [
{
key: 'lkajsldjaljdla',
field: 'ywzz',
label: '业务组织',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择业务组织',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: '/bmxx/getCompanyList',
method: 'GET',
apiId: 'copy1765431632890d13798',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from res_company";\r\nreturn db.select(sql);',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2015724355955159041' },
itemId: '2015724355955159041',
style: { width: '100%' },
},
},
],
},
], ],
componentProps: { componentProps: {
gutter: 16, gutter: 16,
......
...@@ -17,6 +17,22 @@ export const permissionList = [ ...@@ -17,6 +17,22 @@ export const permissionList = [
defaultValue: '', defaultValue: '',
}, },
{ {
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '业务组织',
fieldId: 'ywzz',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'lkajsldjaljdla',
children: [],
options: {},
},
{
required: false, required: false,
view: true, view: true,
edit: false, edit: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment