Commit 5f8a1a8a by 金民

feat(scgl): 新增生产任务管理模块

- 创建了生产任务表单组件,支持工作流和菜单页面模式
- 实现了生产任务的增删改查功能和分页列表展示
- 集成了表单事件处理、权限控制和并发锁机制
- 添加了工作流表单配置和样式设置功能
- 实现了表单数据验证、隐藏组件处理和附件上传功能
- 创建了弹窗表单组件,支持查看、编辑和新增操作
- 配置了生产任务相关的API接口和数据模型
- 实现了工作流权限配置和表单字段权限控制
parent 3e41c784
import { MesProductionTaskPageModel, MesProductionTaskPageParams, MesProductionTaskPageResult } from './model/ScrwModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/scgl/scrw/page',
List = '/scgl/scrw/list',
Info = '/scgl/scrw/info',
MesProductionTask = '/scgl/scrw',
}
/**
* @description: 查询MesProductionTask分页列表
*/
export async function getMesProductionTaskPage(params: MesProductionTaskPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesProductionTaskPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取MesProductionTask信息
*/
export async function getMesProductionTask(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesProductionTaskPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增MesProductionTask
*/
export async function addMesProductionTask(mesProductionTask: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesProductionTask,
params: mesProductionTask,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新MesProductionTask
*/
export async function updateMesProductionTask(mesProductionTask: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesProductionTask,
params: mesProductionTask,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除MesProductionTask(批量删除)
*/
export async function deleteMesProductionTask(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesProductionTask,
data: ids,
},
{
errorMessageMode: mode,
},
);
}
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesProductionTask分页参数 模型
*/
export interface MesProductionTaskPageParams extends BasicPageParams {
rwbh: string;
sfnbdd: string;
}
/**
* @description: MesProductionTask分页返回值模型
*/
export interface MesProductionTaskPageModel {
id: string;
jhbh: string;
rwbh: string;
cpid: string;
rch: string;
zch: string;
zl: string;
jhksrq: string;
jhjsrq: string;
}
/**
* @description: MesProductionTask表类型
*/
export interface MesProductionTaskModel {
id: string;
deleteMark: string;
rwbh: string;
jhbh: string;
rch: string;
zch: string;
hjzt: string;
cpid: string;
cplx: string;
kh: string;
gg: string;
sl: string;
zl: string;
jz: string;
zxbz: string;
jhksrq: string;
jhjsrq: string;
bom: string;
gylx: string;
scrq: string;
sccj: string;
sccx: string;
jsyq: string;
sfnbdd: string;
zt: string;
bz: 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;
mesProductionGongdanList?: MesProductionGongdanModel;
}
/**
* @description: MesProductionGongdan表类型
*/
export interface MesProductionGongdanModel {
id: string;
deleteMark: string;
rwbh: string;
jhbh: string;
zzl: string;
rch: string;
zch: string;
hjzt: string;
cpid: string;
cplx: string;
gx: string;
gxmc: string;
kh: string;
gg: string;
sl: string;
zl: string;
zxbz: string;
jhksrq: string;
jhjsrq: string;
scrq: string;
sccj: string;
sccx: string;
jsyq: string;
sfnbdd: string;
zt: string;
bz: 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: MesProductionTask分页返回值结构
*/
export type MesProductionTaskPageResult = BasicFetchResult<MesProductionTaskPageModel>;
<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 { addMesProductionTask, getMesProductionTask, updateMesProductionTask } from '/@/api/scgl/scrw';
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 getMesProductionTask(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 updateMesProductionTask(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 addMesProductionTask(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="1080"
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: 1920,
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
import { FormProps, FormSchema } from '/@/components/Form';
import { BasicColumn } from '/@/components/Table';
export const searchFormSchema: FormSchema[] = [
{
field: 'rwbh',
label: '任务编号',
defaultValue: undefined,
component: 'Input',
},
{
field: 'sfnbdd',
label: '是否内部订单',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'staticData',
staticOptions: [
{ key: 2, label: '是', value: '1' },
{ key: 3, label: '否', value: '2' },
],
labelField: 'label',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
];
export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'jhbh',
title: '计划编号',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'rwbh',
title: '任务编号',
componentType: 'auto-code',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'cpid',
title: '生产产品',
componentType: 'associate-popup',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'rch',
title: '熔次号',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'zch',
title: '铸次号',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'zl',
title: '重量/KG',
componentType: 'number',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'jhksrq',
title: '任务日期开始时间',
componentType: 'date-range',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'jhjsrq',
title: '任务日期结束时间',
componentType: 'date-range',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
];
//表头合并配置
export const headerMergingData = [];
//表单事件
export const formEventConfigs = {
0: [
{
type: 'circle',
color: '#2774ff',
text: '开始节点',
icon: '#icon-kaishi',
bgcColor: '#D8E5FF',
isUserDefined: false,
isClick: false,
},
{
color: '#F6AB01',
icon: '#icon-chushihua',
text: '初始化表单',
bgcColor: '#f9f5ea',
isUserDefined: false,
nodeInfo: { processEvent: [] },
isClick: false,
},
],
1: [
{
color: '#B36EDB',
icon: '#icon-shujufenxi',
text: '获取表单数据',
detail: '(新增无此操作)',
bgcColor: '#F8F2FC',
isUserDefined: false,
nodeInfo: { processEvent: [] },
isClick: false,
},
],
2: [
{
color: '#F8625C',
icon: '#icon-jiazai',
text: '加载表单',
bgcColor: '#FFF1F1',
isUserDefined: false,
nodeInfo: { processEvent: [] },
isClick: false,
},
],
3: [
{
color: '#6C6AE0',
icon: '#icon-jsontijiao',
text: '提交表单',
bgcColor: '#F5F4FF',
isUserDefined: false,
nodeInfo: { processEvent: [] },
isClick: false,
},
],
4: [
{
type: 'circle',
color: '#F8625C',
text: '结束节点',
icon: '#icon-jieshuzhiliao',
bgcColor: '#FFD6D6',
isLast: true,
isUserDefined: false,
isClick: false,
},
],
};
export const formProps: FormProps = {
labelCol: { span: 3, offset: 0 },
labelAlign: 'right',
layout: 'horizontal',
size: 'default',
schemas: [
{
key: '3e3187de71654c0e9761cc59cbd16b80',
field: '',
label: '',
type: 'grid',
colProps: { span: 24 },
component: 'Grid',
children: [
{
span: 6,
list: [
{
key: '8c8e1195fac049468aac7e5096b32835',
field: 'rwbh',
label: '任务编号',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请输入任务编号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
showLabel: true,
autoCodeRule: 'SCRW',
required: true,
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'b22f0a133613428f84ee08c70c61311b',
field: 'zch',
label: '铸次号',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入铸次号',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {
change:
'for(let i=0;i<formModel.mesProductionGongdanList.length;i++){ formModel.mesProductionGongdanList[i].rwbh=formModel.rwbh;\nformModel.mesProductionGongdanList[i].jhbh=formModel.jhbh;\nformModel.mesProductionGongdanList[i].rch=formModel.rch;\nformModel.mesProductionGongdanList[i].zch=formModel.zch;\nformModel.mesProductionGongdanList[i].hjzt=formModel.hjzt;\nformModel.mesProductionGongdanList[i].cpid=formModel.cpid;\nformModel.mesProductionGongdanList[i].cplx=formModel.cplx;\nformModel.mesProductionGongdanList[i].kh=formModel.kh;\nformModel.mesProductionGongdanList[i].zzl=formModel.zzl;\nformModel.mesProductionGongdanList[i].sl=formModel.sl;\nformModel.mesProductionGongdanList[i].zl=formModel.zl;\nformModel.mesProductionGongdanList[i].gg=formModel.gg;\nformModel.mesProductionGongdanList[i].zxbz=formModel.zxbz;\nformModel.mesProductionGongdanList[i].sccj=formModel.sccj;\nformModel.mesProductionGongdanList[i].sccx=formModel.sccx;\nformModel.mesProductionGongdanList[i].jsyq=formModel.jsyq;\nformModel.mesProductionGongdanList[i].sfnbdd=formModel.sfnbdd;\n}',
},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'c1164302d0e34bca96563db3f47700f6',
field: 'cpid',
label: '生产产品',
type: 'associate-popup',
component: 'MultiplePopup',
colProps: { span: 24 },
componentProps: {
popupType: 'associate',
width: '100%',
span: 7,
placeholder: '请选择生产产品',
showLabel: true,
disabled: false,
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
pageSize: 10,
assoTitle: '选择产品',
apiConfig: {
path: '/scgl/scjh/getAllProduct',
method: 'GET',
apiId: 'f4fbb57f2f18425e97918a031c8aa7d8',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';\r\nreturn db.select(sql)",
outputParams: [
{ name: 'cpmc', tableTitle: '产品名称', show: true, width: 150 },
{
name: 'cplx',
tableTitle: '产品类别',
bindField: 'cplx',
show: true,
width: 150,
component: 'a954da9a8da9429895b9ca947b937c92',
},
{
name: 'gg',
tableTitle: '规格',
bindField: 'gg',
show: true,
width: 150,
component: '6baebd752fae4267aa0ce0a684aa3a1c',
},
],
},
dicOptions: [],
required: true,
rules: [],
events: {
change:
'for(let i=0;i<formModel.mesProductionGongdanList.length;i++){ formModel.mesProductionGongdanList[i].rwbh=formModel.rwbh;\nformModel.mesProductionGongdanList[i].jhbh=formModel.jhbh;\nformModel.mesProductionGongdanList[i].rch=formModel.rch;\nformModel.mesProductionGongdanList[i].zch=formModel.zch;\nformModel.mesProductionGongdanList[i].hjzt=formModel.hjzt;\nformModel.mesProductionGongdanList[i].cpid=formModel.cpid;\nformModel.mesProductionGongdanList[i].cplx=formModel.cplx;\nformModel.mesProductionGongdanList[i].kh=formModel.kh;\nformModel.mesProductionGongdanList[i].zzl=formModel.zzl;\nformModel.mesProductionGongdanList[i].sl=formModel.sl;\nformModel.mesProductionGongdanList[i].zl=formModel.zl;\nformModel.mesProductionGongdanList[i].gg=formModel.gg;\nformModel.mesProductionGongdanList[i].zxbz=formModel.zxbz;\nformModel.mesProductionGongdanList[i].sccj=formModel.sccj;\nformModel.mesProductionGongdanList[i].sccx=formModel.sccx;\nformModel.mesProductionGongdanList[i].jsyq=formModel.jsyq;\nformModel.mesProductionGongdanList[i].sfnbdd=formModel.sfnbdd;\n}',
},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: '25e30bcce47a437fb5674d9dbce3523a',
field: 'zl',
label: '重量/KG',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: 0,
componentProps: {
width: '100%',
span: 7,
defaultValue: 0,
min: 0,
max: null,
step: 0.1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {
change:
'for(let i=0;i<formModel.mesProductionGongdanList.length;i++){ formModel.mesProductionGongdanList[i].rwbh=formModel.rwbh;\nformModel.mesProductionGongdanList[i].jhbh=formModel.jhbh;\nformModel.mesProductionGongdanList[i].rch=formModel.rch;\nformModel.mesProductionGongdanList[i].zch=formModel.zch;\nformModel.mesProductionGongdanList[i].hjzt=formModel.hjzt;\nformModel.mesProductionGongdanList[i].cpid=formModel.cpid;\nformModel.mesProductionGongdanList[i].cplx=formModel.cplx;\nformModel.mesProductionGongdanList[i].kh=formModel.kh;\nformModel.mesProductionGongdanList[i].zzl=formModel.zzl;\nformModel.mesProductionGongdanList[i].sl=formModel.sl;\nformModel.mesProductionGongdanList[i].zl=formModel.zl;\nformModel.mesProductionGongdanList[i].gg=formModel.gg;\nformModel.mesProductionGongdanList[i].zxbz=formModel.zxbz;\nformModel.mesProductionGongdanList[i].sccj=formModel.sccj;\nformModel.mesProductionGongdanList[i].sccx=formModel.sccx;\nformModel.mesProductionGongdanList[i].jsyq=formModel.jsyq;\nformModel.mesProductionGongdanList[i].sfnbdd=formModel.sfnbdd;\n}',
},
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: '90df3bd996a3469789d4557edf80aca7',
field: 'gylx',
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: '',
datasourceType: 'api',
params: null,
labelField: 'label',
valueField: 'value',
apiConfig: {
path: '/scgl/scrw/getAllgylx',
method: 'GET',
apiId: '07d17a5272a746c5b8711e8820440c65',
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 roke_routing where delete_mark=0';\r\nreturn db.select(sql)",
},
dicOptions: [],
required: true,
rules: [],
events: { change: "formActionType.refreshAPI('29977890304c441bae527eba5f019e46')" },
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 6,
list: [
{
key: 'd27a9e1461404e13bfa27c0e8b5b94a8',
field: 'jhbh',
label: '计划编号',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入计划编号计划编号',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'd3addcbd077740439873f39f77b4f57f',
field: 'hjzt',
label: '合金状态',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入合金状态',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {
change:
'for(let i=0;i<formModel.mesProductionGongdanList.length;i++){ formModel.mesProductionGongdanList[i].rwbh=formModel.rwbh;\nformModel.mesProductionGongdanList[i].jhbh=formModel.jhbh;\nformModel.mesProductionGongdanList[i].rch=formModel.rch;\nformModel.mesProductionGongdanList[i].zch=formModel.zch;\nformModel.mesProductionGongdanList[i].hjzt=formModel.hjzt;\nformModel.mesProductionGongdanList[i].cpid=formModel.cpid;\nformModel.mesProductionGongdanList[i].cplx=formModel.cplx;\nformModel.mesProductionGongdanList[i].kh=formModel.kh;\nformModel.mesProductionGongdanList[i].zzl=formModel.zzl;\nformModel.mesProductionGongdanList[i].sl=formModel.sl;\nformModel.mesProductionGongdanList[i].zl=formModel.zl;\nformModel.mesProductionGongdanList[i].gg=formModel.gg;\nformModel.mesProductionGongdanList[i].zxbz=formModel.zxbz;\nformModel.mesProductionGongdanList[i].sccj=formModel.sccj;\nformModel.mesProductionGongdanList[i].sccx=formModel.sccx;\nformModel.mesProductionGongdanList[i].jsyq=formModel.jsyq;\nformModel.mesProductionGongdanList[i].sfnbdd=formModel.sfnbdd;\n}',
},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'a954da9a8da9429895b9ca947b937c92',
field: 'cplx',
label: '产品类别',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择产品类别',
showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: true,
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',
params: { itemId: '2003761375221407745' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2003761375221407745',
style: { width: '100%' },
},
},
{
key: '8970047af14d421897b19c5dbd0cb216',
field: 'zxbz',
label: '执行标准',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入执行标准',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {
change:
'for(let i=0;i<formModel.mesProductionGongdanList.length;i++){ formModel.mesProductionGongdanList[i].rwbh=formModel.rwbh;\nformModel.mesProductionGongdanList[i].jhbh=formModel.jhbh;\nformModel.mesProductionGongdanList[i].rch=formModel.rch;\nformModel.mesProductionGongdanList[i].zch=formModel.zch;\nformModel.mesProductionGongdanList[i].hjzt=formModel.hjzt;\nformModel.mesProductionGongdanList[i].cpid=formModel.cpid;\nformModel.mesProductionGongdanList[i].cplx=formModel.cplx;\nformModel.mesProductionGongdanList[i].kh=formModel.kh;\nformModel.mesProductionGongdanList[i].zzl=formModel.zzl;\nformModel.mesProductionGongdanList[i].sl=formModel.sl;\nformModel.mesProductionGongdanList[i].zl=formModel.zl;\nformModel.mesProductionGongdanList[i].gg=formModel.gg;\nformModel.mesProductionGongdanList[i].zxbz=formModel.zxbz;\nformModel.mesProductionGongdanList[i].sccj=formModel.sccj;\nformModel.mesProductionGongdanList[i].sccx=formModel.sccx;\nformModel.mesProductionGongdanList[i].jsyq=formModel.jsyq;\nformModel.mesProductionGongdanList[i].sfnbdd=formModel.sfnbdd;\n}',
},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: '393152195470452c989d23033a75e13b',
field: 'bom',
label: 'BOM',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择下拉选择BOMBOM',
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: '',
datasourceType: 'api',
params: null,
labelField: 'label',
valueField: 'value',
apiConfig: {
path: '/scgl/wlqd/getAllBomItemList',
method: 'GET',
apiId: '1a6a0c6bab2a4aceaf761b0c2c8d17a0',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select *,id as value,wlmc as label from mes_base_bom_item where delete_mark=0';\r\nreturn db.select(sql)",
},
dicOptions: [],
required: true,
rules: [],
events: { change: 'curRowData.mesProductionGongdanList={}' },
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 6,
list: [
{
key: 'eb29665fc1e3453d9ef8aa88f8dfac0c',
field: 'zzl',
label: '铸造量',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入铸造量',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {
change:
'for(let i=0;i<formModel.mesProductionGongdanList.length;i++){ formModel.mesProductionGongdanList[i].rwbh=formModel.rwbh;\nformModel.mesProductionGongdanList[i].jhbh=formModel.jhbh;\nformModel.mesProductionGongdanList[i].rch=formModel.rch;\nformModel.mesProductionGongdanList[i].zch=formModel.zch;\nformModel.mesProductionGongdanList[i].hjzt=formModel.hjzt;\nformModel.mesProductionGongdanList[i].cpid=formModel.cpid;\nformModel.mesProductionGongdanList[i].cplx=formModel.cplx;\nformModel.mesProductionGongdanList[i].kh=formModel.kh;\nformModel.mesProductionGongdanList[i].zzl=formModel.zzl;\nformModel.mesProductionGongdanList[i].sl=formModel.sl;\nformModel.mesProductionGongdanList[i].zl=formModel.zl;\nformModel.mesProductionGongdanList[i].gg=formModel.gg;\nformModel.mesProductionGongdanList[i].zxbz=formModel.zxbz;\nformModel.mesProductionGongdanList[i].sccj=formModel.sccj;\nformModel.mesProductionGongdanList[i].sccx=formModel.sccx;\nformModel.mesProductionGongdanList[i].jsyq=formModel.jsyq;\nformModel.mesProductionGongdanList[i].sfnbdd=formModel.sfnbdd;\n}',
},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: '4a0ed1a29c0348a1b84c6be48e9ef6dc',
field: 'kh',
label: '客户',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入客户',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {
change:
'for(let i=0;i<formModel.mesProductionGongdanList.length;i++){ formModel.mesProductionGongdanList[i].rwbh=formModel.rwbh;\nformModel.mesProductionGongdanList[i].jhbh=formModel.jhbh;\nformModel.mesProductionGongdanList[i].rch=formModel.rch;\nformModel.mesProductionGongdanList[i].zch=formModel.zch;\nformModel.mesProductionGongdanList[i].hjzt=formModel.hjzt;\nformModel.mesProductionGongdanList[i].cpid=formModel.cpid;\nformModel.mesProductionGongdanList[i].cplx=formModel.cplx;\nformModel.mesProductionGongdanList[i].kh=formModel.kh;\nformModel.mesProductionGongdanList[i].zzl=formModel.zzl;\nformModel.mesProductionGongdanList[i].sl=formModel.sl;\nformModel.mesProductionGongdanList[i].zl=formModel.zl;\nformModel.mesProductionGongdanList[i].gg=formModel.gg;\nformModel.mesProductionGongdanList[i].zxbz=formModel.zxbz;\nformModel.mesProductionGongdanList[i].sccj=formModel.sccj;\nformModel.mesProductionGongdanList[i].sccx=formModel.sccx;\nformModel.mesProductionGongdanList[i].jsyq=formModel.jsyq;\nformModel.mesProductionGongdanList[i].sfnbdd=formModel.sfnbdd;\n}',
},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: '6baebd752fae4267aa0ce0a684aa3a1c',
field: 'gg',
label: '规格',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入规格',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: true,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'e35543642daf4df5b48c636ce8bb3f4c',
field: 'jhksrq,jhjsrq',
label: '任务日期',
type: 'date-range',
component: 'RangePicker',
componentProps: {
span: 7,
defaultValue: [],
width: '100%',
showTime: false,
format: 'YYYY-MM-DD',
startTimePlaceholder: '请选择开始日期',
endTimePlaceholder: '请选择结束日期',
showLabel: true,
disabled: false,
allowClear: true,
required: false,
isShow: true,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
placeholder: ['请选择开始日期', '请选择结束日期'],
},
colProps: { span: 24 },
},
{
key: '21610208f2b8428e84de66979709d296',
field: 'sccj',
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: '2006262512610115585',
datasourceType: 'api',
params: null,
labelField: 'label',
valueField: 'value',
apiConfig: {
path: '/scgl/scrw/getAllChejian',
method: 'GET',
apiId: '59730efb7b4a4439a013cac04926e00e',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql='select *,id as value,cjmc as label from mes_base_chejian where delete_mark=0'\r\nreturn db.select(sql)",
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
{
span: 6,
list: [
{
key: '3c95be972e5b4ebfb6fc32a629199a07',
field: 'rch',
label: '熔次号',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '请输入熔次号',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {
change:
'for(let i=0;i<formModel.mesProductionGongdanList.length;i++){ formModel.mesProductionGongdanList[i].rwbh=formModel.rwbh;\nformModel.mesProductionGongdanList[i].jhbh=formModel.jhbh;\nformModel.mesProductionGongdanList[i].rch=formModel.rch;\nformModel.mesProductionGongdanList[i].zch=formModel.zch;\nformModel.mesProductionGongdanList[i].hjzt=formModel.hjzt;\nformModel.mesProductionGongdanList[i].cpid=formModel.cpid;\nformModel.mesProductionGongdanList[i].cplx=formModel.cplx;\nformModel.mesProductionGongdanList[i].kh=formModel.kh;\nformModel.mesProductionGongdanList[i].zzl=formModel.zzl;\nformModel.mesProductionGongdanList[i].sl=formModel.sl;\nformModel.mesProductionGongdanList[i].zl=formModel.zl;\nformModel.mesProductionGongdanList[i].gg=formModel.gg;\nformModel.mesProductionGongdanList[i].zxbz=formModel.zxbz;\nformModel.mesProductionGongdanList[i].sccj=formModel.sccj;\nformModel.mesProductionGongdanList[i].sccx=formModel.sccx;\nformModel.mesProductionGongdanList[i].jsyq=formModel.jsyq;\nformModel.mesProductionGongdanList[i].sfnbdd=formModel.sfnbdd;\n}',
},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'a5e642899c704810897d4d25a7604b4f',
field: 'jz',
label: '均质',
type: 'radio',
component: 'ApiRadioGroup',
colProps: { span: 24 },
componentProps: {
span: 7,
showLabel: true,
disabled: false,
optionType: 'default',
staticOptions: [
{ key: 2, label: '是', value: '1' },
{ key: 3, label: '否', value: '2' },
],
datasourceType: 'staticData',
labelField: 'label',
valueField: 'value',
defaultSelect: '1',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: null,
style: {},
},
},
{
key: 'fd52ee27396a4a028c80e1f6b883efaf',
field: 'sl',
label: '数量',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: 0,
componentProps: {
width: '100%',
span: 7,
defaultValue: 0,
min: 0,
max: null,
step: 0.1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {
change:
'for(let i=0;i<formModel.mesProductionGongdanList.length;i++){ formModel.mesProductionGongdanList[i].rwbh=formModel.rwbh;\nformModel.mesProductionGongdanList[i].jhbh=formModel.jhbh;\nformModel.mesProductionGongdanList[i].rch=formModel.rch;\nformModel.mesProductionGongdanList[i].zch=formModel.zch;\nformModel.mesProductionGongdanList[i].hjzt=formModel.hjzt;\nformModel.mesProductionGongdanList[i].cpid=formModel.cpid;\nformModel.mesProductionGongdanList[i].cplx=formModel.cplx;\nformModel.mesProductionGongdanList[i].kh=formModel.kh;\nformModel.mesProductionGongdanList[i].zzl=formModel.zzl;\nformModel.mesProductionGongdanList[i].sl=formModel.sl;\nformModel.mesProductionGongdanList[i].zl=formModel.zl;\nformModel.mesProductionGongdanList[i].gg=formModel.gg;\nformModel.mesProductionGongdanList[i].zxbz=formModel.zxbz;\nformModel.mesProductionGongdanList[i].sccj=formModel.sccj;\nformModel.mesProductionGongdanList[i].sccx=formModel.sccx;\nformModel.mesProductionGongdanList[i].jsyq=formModel.jsyq;\nformModel.mesProductionGongdanList[i].sfnbdd=formModel.sfnbdd;\n}',
},
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'd66e5ebfa5d64b829fde596c82155158',
field: 'sfnbdd',
label: '是否内部订单',
type: 'radio',
component: 'ApiRadioGroup',
colProps: { span: 24 },
componentProps: {
span: 7,
showLabel: true,
disabled: false,
optionType: 'default',
staticOptions: [
{ key: 2, label: '是', value: '1' },
{ key: 3, label: '否', value: '2' },
],
datasourceType: 'staticData',
labelField: 'label',
valueField: 'value',
defaultSelect: '2',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: null,
style: {},
},
},
{
key: '427fc55accd744d0a6359faf80e45a1b',
field: 'sccx',
label: '产线',
type: 'associate-select',
component: 'AssociateSelect',
colProps: { span: 24 },
componentProps: {
width: '100%',
span: 7,
placeholder: '请选择产线',
showLabel: true,
showSearch: false,
disabled: false,
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
apiConfig: {
path: '/scgl/scrw/getCxByCjbh',
method: 'GET',
apiId: 'ecbc0291292c49fca50468561b9770e8',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'cjid',
value:
'{"bindField":"sccj","fieldKey":"21610208f2b8428e84de66979709d296"}',
description: null,
required: true,
dataType: null,
type: null,
defaultValue: '0',
validateType: null,
error: null,
expression: null,
children: null,
bindType: 'data',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql='select cx.*,cx.id as value,cx.cxmc as label from mes_base_chanxian cx join mes_base_cj_cx rela on cx.id=rela.cxid where rela.delete_mark=0 and cx.delete_mark=0 and rela.cjid=#{cjid}'\r\nreturn db.select(sql)",
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
],
componentProps: {
gutter: 0,
justify: 'start',
align: 'top',
isShow: true,
showBorder: false,
bordercolor: '#d9d9d9',
bordershowtype: [true, true, true, true],
borderwidth: 1,
padding: '10px',
margin: '10px',
},
},
{
key: 'be5dd9f33feb447c83f8313511feab47',
field: '',
label: '',
type: 'tab',
colProps: { span: 24 },
component: 'Tab',
children: [
{
span: 24,
name: '工单',
prefix: '',
suffix: '',
activeColor: '#1c8dff',
folderId: '',
imageUrl: '',
conFolderId: '',
conImageUrl: '',
list: [
{
key: '29977890304c441bae527eba5f019e46',
label: '',
field: 'mesProductionGongdanList',
type: 'form',
component: 'SubForm',
required: true,
colProps: { span: 24 },
componentProps: {
mainKey: 'mesProductionGongdanList',
columns: [
{
key: '2745856f030c4f4b8488732136060d78',
title: '任务编号',
dataIndex: 'rwbh',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入任务编号任务编号',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: 'e2a2a9437363423b93f280617e27d8d2',
title: '计划编号',
dataIndex: 'jhbh',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入计划编号',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '589c359e5a7e498695fcf5c224a5e557',
title: '熔次号',
dataIndex: 'rch',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入熔次号',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '2957c762b0a3437f872fdab6f46544c2',
title: '铸次号',
dataIndex: 'zch',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入铸次号单行文本',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '7551731ee33d4289b153e8ddc7e4c8dc',
title: '合金状态',
dataIndex: 'hjzt',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入合金状态',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '69da890610284539b4ad26bed8e9c566',
title: '产品ID',
dataIndex: 'cpid',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入产品ID',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: 'dc242ae845f1489a8cc2f47c98b565b8',
title: '产品类型',
dataIndex: 'cplx',
componentType: 'XjrSelect',
componentProps: {
width: '100%',
span: '',
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',
params: { itemId: '2003761375221407745' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2003761375221407745',
listStyle: "return 'border: 0'",
},
},
{
key: 'f9b91195ee9840268e20bddeccdc365c',
title: '客户',
dataIndex: 'kh',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入客户单行文本',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '2f069a67fe784742a2729fa09af94ec4',
title: '工序',
dataIndex: 'gx',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入工序单行文本',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'pid',
},
},
{
key: '16fd1699db7744379edd01b6eb5653f9',
title: '工序名称',
dataIndex: 'gxmc',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入工序名称名称',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
prestrainField: 'pname',
},
},
{
key: 'b0a0abbf874c4059a646b9d454eaaae2',
title: 'zzl',
dataIndex: 'zzl',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入zzl',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '97877128b5014becb5cd6295ead760ff',
title: 'sl',
dataIndex: 'sl',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
span: '',
defaultValue: 0,
min: 0,
max: null,
step: 0.1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: false,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
listStyle: "return 'width:100%'",
},
},
{
key: 'db65c51ffaa7433896ecae60648cca9a',
title: 'zl',
dataIndex: 'zl',
componentType: 'InputNumber',
defaultValue: 0,
componentProps: {
width: '100%',
span: '',
defaultValue: 0,
min: 0,
max: null,
step: 0.1,
maxlength: null,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: false,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
listStyle: "return 'width:100%'",
},
},
{
key: 'd1597b263c85496190e47c5e399f414f',
title: 'gg',
dataIndex: 'gg',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入gg',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: 'c1c1e89a76574351b454defc1fe8d1f6',
title: 'zxbz',
dataIndex: 'zxbz',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入zxbz',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '99b87e4da6584d199204a47cd1a0243d',
title: 'sccj',
dataIndex: 'sccj',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入sccj',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '5f622be3883e4d1eafe68d9e82e5d25d',
title: 'sccx',
dataIndex: 'sccx',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入sccx',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '12382799a03d462587e0f1552eaea581',
title: 'jsyq',
dataIndex: 'jsyq',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入jsyq',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: 'dee34a8120874c6e90992c42bdb9f021',
title: 'sfnbdd',
dataIndex: 'sfnbdd',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入sfnbdd',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '4947868d8b55470192988b50e680114f',
title: 'zt',
dataIndex: 'zt',
componentType: 'Input',
defaultValue: '1',
componentProps: {
width: '100%',
span: '',
defaultValue: '1',
placeholder: '请输入zt',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: false,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
],
span: '24',
preloadType: 'api',
apiConfig: {
path: '/scgl/scrw/getAllGxByGyId',
method: 'GET',
apiId: '47e4e4aaab1c495b89d3f04478fc86ab',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'rid',
value:
'{"bindField":"gylx","fieldKey":"90df3bd996a3469789d4557edf80aca7"}',
description: null,
required: false,
dataType: null,
type: null,
defaultValue: '0',
validateType: null,
error: null,
expression: null,
children: null,
bindType: 'data',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'select r.id,r.name rname,p.id pid,p.name pname from roke_routing r join roke_routing_process rp on r.id=rp.routing_id join roke_process p on rp.process_id=p.id ?{rid,where r.id=#{rid}}';\r\nreturn db.select(sql)",
},
itemId: '',
dicOptions: [],
useSelectButton: false,
buttonName: '选择数据',
showLabel: true,
showComponentBorder: true,
showBorder: false,
bordercolor: '#f0f0f0',
bordershowtype: [true, true, true, true],
borderwidth: 1,
showIndex: false,
isShow: true,
multipleHeads: [],
buttonList: [],
topButtonList: [],
isExport: false,
isImport: false,
isDeleteSelected: false,
isListView: false,
viewList: [],
isShowAdd: false,
isShowDelete: false,
hasCheckedCol: false,
events: {
load: 'for(let i=0;i<formModel.mesProductionGongdanList.length;i++){ formModel.mesProductionGongdanList[i].rwbh=formModel.rwbh;\nformModel.mesProductionGongdanList[i].jhbh=formModel.jhbh;\nformModel.mesProductionGongdanList[i].rch=formModel.rch;\nformModel.mesProductionGongdanList[i].zch=formModel.zch;\nformModel.mesProductionGongdanList[i].hjzt=formModel.hjzt;\nformModel.mesProductionGongdanList[i].cpid=formModel.cpid;\nformModel.mesProductionGongdanList[i].cplx=formModel.cplx;\nformModel.mesProductionGongdanList[i].kh=formModel.kh;\nformModel.mesProductionGongdanList[i].zzl=formModel.zzl;\nformModel.mesProductionGongdanList[i].sl=formModel.sl;\nformModel.mesProductionGongdanList[i].zl=formModel.zl;\nformModel.mesProductionGongdanList[i].gg=formModel.gg;\nformModel.mesProductionGongdanList[i].zxbz=formModel.zxbz;\nformModel.mesProductionGongdanList[i].sccj=formModel.sccj;\nformModel.mesProductionGongdanList[i].sccx=formModel.sccx;\nformModel.mesProductionGongdanList[i].jsyq=formModel.jsyq;\nformModel.mesProductionGongdanList[i].sfnbdd=formModel.sfnbdd;\n}',
},
showPagenation: true,
},
},
],
},
{
span: 24,
name: '物料清单',
prefix: '',
suffix: '',
activeColor: '#1c8dff',
folderId: '',
imageUrl: '',
conFolderId: '',
conImageUrl: '',
list: [],
},
],
componentProps: { tabPosition: 'top', size: 'default', type: 'line', isShow: true },
},
],
showActionButtonGroup: false,
buttonLocation: 'center',
actionColOptions: { span: 24 },
showResetButton: false,
showSubmitButton: false,
hiddenComponent: [],
};
export const permissionList = [
{
required: false,
view: true,
edit: false,
disabled: true,
isSaveTable: false,
tableName: '',
fieldName: '任务编号',
fieldId: 'rwbh',
isSubTable: false,
showChildren: true,
type: 'auto-code',
key: '8c8e1195fac049468aac7e5096b32835',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '铸次号',
fieldId: 'zch',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'b22f0a133613428f84ee08c70c61311b',
children: [],
options: {},
defaultValue: '',
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '生产产品',
fieldId: 'cpid',
isSubTable: false,
showChildren: true,
type: 'associate-popup',
key: 'c1164302d0e34bca96563db3f47700f6',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '重量/KG',
fieldId: 'zl',
isSubTable: false,
showChildren: true,
type: 'number',
key: '25e30bcce47a437fb5674d9dbce3523a',
children: [],
options: {},
defaultValue: 0,
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '工艺路线',
fieldId: 'gylx',
isSubTable: false,
showChildren: true,
type: 'select',
key: '90df3bd996a3469789d4557edf80aca7',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '计划编号',
fieldId: 'jhbh',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'd27a9e1461404e13bfa27c0e8b5b94a8',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '合金状态',
fieldId: 'hjzt',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'd3addcbd077740439873f39f77b4f57f',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产品类别',
fieldId: 'cplx',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'a954da9a8da9429895b9ca947b937c92',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '执行标准',
fieldId: 'zxbz',
isSubTable: false,
showChildren: true,
type: 'input',
key: '8970047af14d421897b19c5dbd0cb216',
children: [],
options: {},
defaultValue: '',
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: 'BOM',
fieldId: 'bom',
isSubTable: false,
showChildren: true,
type: 'select',
key: '393152195470452c989d23033a75e13b',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '铸造量',
fieldId: 'zzl',
isSubTable: false,
showChildren: true,
type: 'input',
key: 'eb29665fc1e3453d9ef8aa88f8dfac0c',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '客户',
fieldId: 'kh',
isSubTable: false,
showChildren: true,
type: 'input',
key: '4a0ed1a29c0348a1b84c6be48e9ef6dc',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: false,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '规格',
fieldId: 'gg',
isSubTable: false,
showChildren: true,
type: 'input',
key: '6baebd752fae4267aa0ce0a684aa3a1c',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '任务日期',
fieldId: 'jhksrq,jhjsrq',
isSubTable: false,
showChildren: true,
type: 'date-range',
key: 'e35543642daf4df5b48c636ce8bb3f4c',
children: [],
options: {},
defaultValue: [],
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车间',
fieldId: 'sccj',
isSubTable: false,
showChildren: true,
type: 'select',
key: '21610208f2b8428e84de66979709d296',
children: [],
options: {},
defaultValue: '2006262512610115585',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '熔次号',
fieldId: 'rch',
isSubTable: false,
showChildren: true,
type: 'input',
key: '3c95be972e5b4ebfb6fc32a629199a07',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '均质',
fieldId: 'jz',
isSubTable: false,
showChildren: true,
type: 'radio',
key: 'a5e642899c704810897d4d25a7604b4f',
children: [],
options: {},
defaultValue: '1',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '数量',
fieldId: 'sl',
isSubTable: false,
showChildren: true,
type: 'number',
key: 'fd52ee27396a4a028c80e1f6b883efaf',
children: [],
options: {},
defaultValue: 0,
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '是否内部订单',
fieldId: 'sfnbdd',
isSubTable: false,
showChildren: true,
type: 'radio',
key: 'd66e5ebfa5d64b829fde596c82155158',
children: [],
options: {},
defaultValue: '2',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '产线',
fieldId: 'sccx',
isSubTable: false,
showChildren: true,
type: 'associate-select',
key: '427fc55accd744d0a6359faf80e45a1b',
children: [],
options: {},
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: true,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: '',
fieldId: 'mesProductionGongdanList',
type: 'form',
key: '29977890304c441bae527eba5f019e46',
children: [
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: '任务编号',
fieldId: 'rwbh',
type: 'Input',
key: '2745856f030c4f4b8488732136060d78',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: '计划编号',
fieldId: 'jhbh',
type: 'Input',
key: 'e2a2a9437363423b93f280617e27d8d2',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: '熔次号',
fieldId: 'rch',
type: 'Input',
key: '589c359e5a7e498695fcf5c224a5e557',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: '铸次号',
fieldId: 'zch',
type: 'Input',
key: '2957c762b0a3437f872fdab6f46544c2',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: '合金状态',
fieldId: 'hjzt',
type: 'Input',
key: '7551731ee33d4289b153e8ddc7e4c8dc',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: '产品ID',
fieldId: 'cpid',
type: 'Input',
key: '69da890610284539b4ad26bed8e9c566',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: '产品类型',
fieldId: 'cplx',
type: 'XjrSelect',
key: 'dc242ae845f1489a8cc2f47c98b565b8',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: '客户',
fieldId: 'kh',
type: 'Input',
key: 'f9b91195ee9840268e20bddeccdc365c',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: '工序',
fieldId: 'gx',
type: 'Input',
key: '2f069a67fe784742a2729fa09af94ec4',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: '工序名称',
fieldId: 'gxmc',
type: 'Input',
key: '16fd1699db7744379edd01b6eb5653f9',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: 'zzl',
fieldId: 'zzl',
type: 'Input',
key: 'b0a0abbf874c4059a646b9d454eaaae2',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: 'sl',
fieldId: 'sl',
type: 'InputNumber',
key: '97877128b5014becb5cd6295ead760ff',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: 'zl',
fieldId: 'zl',
type: 'InputNumber',
key: 'db65c51ffaa7433896ecae60648cca9a',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: 'gg',
fieldId: 'gg',
type: 'Input',
key: 'd1597b263c85496190e47c5e399f414f',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: 'zxbz',
fieldId: 'zxbz',
type: 'Input',
key: 'c1c1e89a76574351b454defc1fe8d1f6',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: 'sccj',
fieldId: 'sccj',
type: 'Input',
key: '99b87e4da6584d199204a47cd1a0243d',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: 'sccx',
fieldId: 'sccx',
type: 'Input',
key: '5f622be3883e4d1eafe68d9e82e5d25d',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: 'jsyq',
fieldId: 'jsyq',
type: 'Input',
key: '12382799a03d462587e0f1552eaea581',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: 'sfnbdd',
fieldId: 'sfnbdd',
type: 'Input',
key: 'dee34a8120874c6e90992c42bdb9f021',
children: [],
},
{
required: true,
view: true,
edit: true,
disabled: false,
isSubTable: false,
isSaveTable: false,
showChildren: false,
tableName: 'mesProductionGongdanList',
fieldName: 'zt',
fieldId: 'zt',
type: 'Input',
key: '4947868d8b55470192988b50e680114f',
children: [],
},
],
},
];
<template>
<ResizePageWrapper :hasLeft="false">
<template #resizeRight>
<BasicTable @register="registerTable" isMenuTable ref="tableRef" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
>
<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>
<ScrwModal @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 { getMesProductionTaskPage, deleteMesProductionTask} from '/@/api/scgl/scrw';
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 ScrwModal from './components/ScrwModal.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 = [{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isEnableLock":true},{"isUse":true,"name":"生成领料单","code":"sclld","icon":"ant-design:file-text-outlined","isDefault":false,"setting":[],"showType":"top","buttonType":"primary"},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":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 selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]);
const [registerModal, { openModal }] = useModal();
const [registerTable, { reload, }] = useTable({
title: 'Scrw列表',
api: getMesProductionTaskPage,
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) => {
selectedKeys.value = [];
selectedRowsData.value = [];
},
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() {
deleteMesProductionTask(ids).then((_) => {
handleSuccess();
notification.success({
message: 'Tip',
description: t('删除成功!'),
});
});
},
onCancel() {},
});
}
function onSelectChange(selectedRowKeys: [], selectedRows) {
selectedKeys.value = selectedRowKeys;
selectedRowsData.value = selectedRows;
}
function customRow(record: Recordable) {
return {
onClick: () => {
let selectedRowKeys = [...selectedKeys.value];
if (selectedRowKeys.indexOf(record.id) >= 0) {
let index = selectedRowKeys.indexOf(record.id);
selectedRowKeys.splice(index, 1);
} else {
selectedRowKeys.push(record.id);
}
selectedKeys.value = selectedRowKeys;
},
ondblclick: () => {
if (record.isCanEdit && hasPermission("scrw:edit")) {
handleEdit(record);
}
},
};
}
function handleSuccess() {
selectedKeys.value = [];
selectedRowsData.value = [];
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: `scrw:${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: `scrw:${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
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