添加主数据代码
This commit is contained in:
255
src/views/mdm/material/Detail.vue
Normal file
255
src/views/mdm/material/Detail.vue
Normal file
@@ -0,0 +1,255 @@
|
||||
<template>
|
||||
<BasicDrawer v-bind="$attrs" @register="registerDrawer" :title="title" width="800px" showFooter
|
||||
:showOkBtn="false">
|
||||
<template #insertFooter>
|
||||
</template>
|
||||
<a-row class="p-10px dynamic-form ">
|
||||
<!-- 表单 -->
|
||||
<a-form :colon="false" size="middle" layout= "horizontal"
|
||||
labelAlign= "right"
|
||||
:labelCol="{ style: { width: '100px' } }" :model="dataForm" ref="formRef" >
|
||||
<a-row :gutter="15">
|
||||
<!-- 具体表单 -->
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="material_code" >
|
||||
<template #label>物料编码
|
||||
</template> <p>{{dataForm.material_code}}</p>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="material_name" >
|
||||
<template #label>物料名称
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.material_name"
|
||||
placeholder="请输入" disabled
|
||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.material_name" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="material_category" >
|
||||
<template #label>物料分类
|
||||
</template> <p>{{dataForm.material_category}}</p>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="material_model" >
|
||||
<template #label>规格型号
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.material_model"
|
||||
placeholder="请输入" disabled
|
||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.material_model" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="unit_name" >
|
||||
<template #label>单位名称
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.unit_name"
|
||||
placeholder="请输入" disabled
|
||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.unit_name" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="brand" >
|
||||
<template #label>品牌
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.brand"
|
||||
placeholder="请输入" disabled
|
||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.brand" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="tax_rate" >
|
||||
<template #label>税率
|
||||
</template> <p>{{dataForm.tax_rate}}</p>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="tax_code" >
|
||||
<template #label>税收分类
|
||||
</template> <p>{{dataForm.tax_code}}</p>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="texture" >
|
||||
<template #label>材质/纹理
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.texture"
|
||||
placeholder="请输入" disabled
|
||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.texture" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="quality_standard" >
|
||||
<template #label>质量标准
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.quality_standard"
|
||||
placeholder="请输入" disabled
|
||||
detailed allowClear :style='{"width":"100%"}' :maskConfig = "maskConfig.quality_standard" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="technical_standard" >
|
||||
<template #label>技术标准
|
||||
</template> <p>{{dataForm.technical_standard}}</p>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="acceptance_criteria" >
|
||||
<template #label>验收标准
|
||||
</template> <p>{{dataForm.acceptance_criteria}}</p>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="delivery_requirements" >
|
||||
<template #label>交付要求
|
||||
</template> <p>{{dataForm.delivery_requirements}}</p>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="storage_conditions" >
|
||||
<template #label>储存条件
|
||||
</template> <p>{{dataForm.storage_conditions}}</p>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 表单结束 -->
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-row>
|
||||
</BasicDrawer>
|
||||
<!-- 有关联表单详情:开始 -->
|
||||
<RelationDetail ref="relationDetailRef" />
|
||||
<!-- 有关联表单详情:结束 -->
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { getDetailInfo } from './helper/api';
|
||||
import { getConfigData } from '@/api/onlineDev/visualDev';
|
||||
import { reactive, toRefs, nextTick, ref, computed, unref ,toRaw} from 'vue';
|
||||
import { BasicModal, useModal } from '@/components/Modal';
|
||||
import { BasicDrawer, useDrawer } from '@/components/Drawer';
|
||||
// 有关联表单详情
|
||||
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
||||
// 表单权限
|
||||
import { usePermission } from '@/hooks/web/usePermission';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
||||
import { buildUUID } from '@/utils/uuid';
|
||||
import { useI18n } from '@/hooks/web/useI18n';
|
||||
import { getDataChange } from '@/api/onlineDev/visualDev';
|
||||
import { getDataInterfaceDataInfoByIds } from '@/api/systemData/dataInterface';
|
||||
import ExtraRelationInfo from '@/components/yunzhupaas/RelationForm/src/ExtraRelationInfo.vue';
|
||||
|
||||
interface State {
|
||||
dataForm: any;
|
||||
title: string;
|
||||
maskConfig: any;
|
||||
interfaceRes: any;
|
||||
locationScope: any;
|
||||
extraOptions: any;
|
||||
extraData: any;
|
||||
|
||||
}
|
||||
|
||||
defineOptions({ name: 'Detail' });
|
||||
const { createMessage, createConfirm } = useMessage();
|
||||
const [registerDrawer, { openDrawer, setDrawerProps, closeDrawer }] = useDrawer();
|
||||
|
||||
const { t } = useI18n();
|
||||
const relationDetailRef = ref<any>(null);
|
||||
const state = reactive<State>({
|
||||
dataForm:{},
|
||||
title: t('common.detailText','详情'),
|
||||
maskConfig:{
|
||||
material_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
material_model: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
unit_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
brand: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
texture: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
quality_standard: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
}
|
||||
,
|
||||
interfaceRes: {"material_model":[],"texture":[],"quality_standard":[],"tax_rate":[],"material_category":[],"unit_name":[],"technical_standard":[],"tax_code":[],"storage_conditions":[],"material_name":[],"brand":[],"acceptance_criteria":[],"delivery_requirements":[],"material_code":[]},
|
||||
locationScope:{
|
||||
}
|
||||
,
|
||||
extraOptions: {
|
||||
}
|
||||
,
|
||||
extraData: {
|
||||
}
|
||||
,
|
||||
});
|
||||
const { title, dataForm, maskConfig } = toRefs(state);
|
||||
// 表单权限
|
||||
const { hasFormP } = usePermission();
|
||||
|
||||
defineExpose({ init });
|
||||
|
||||
function init(data) {
|
||||
state.dataForm.id = data.id;
|
||||
openDrawer();
|
||||
nextTick(() => {
|
||||
setTimeout(initData, 0);
|
||||
});
|
||||
}
|
||||
function initData() {
|
||||
changeLoading(true);
|
||||
if (state.dataForm.id) {
|
||||
getData(state.dataForm.id);
|
||||
} else {
|
||||
closeDrawer();
|
||||
}
|
||||
}
|
||||
function getData(id) {
|
||||
getDetailInfo(id).then((res) => {
|
||||
state.dataForm = res.data || {};
|
||||
nextTick(() => {
|
||||
changeLoading(false);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function toDetail(modelId, id, propsValue) {
|
||||
if (!id) return;
|
||||
getConfigData(modelId).then((res) => {
|
||||
if (!res.data || !res.data.formData) return;
|
||||
const formConf = JSON.parse(res.data.formData);
|
||||
formConf.popupType = 'general';
|
||||
formConf.hasPrintBtn = false;
|
||||
formConf.customBtns = [];
|
||||
const data = { id, formConf, modelId, propsValue};
|
||||
relationDetailRef.value?.init(data);
|
||||
});
|
||||
}
|
||||
function setFormProps(data) {
|
||||
setDrawerProps(data);
|
||||
}
|
||||
function changeLoading(loading) {
|
||||
setFormProps({ loading });
|
||||
}
|
||||
|
||||
function getParamList(key) {
|
||||
let templateJson: any[] = state.interfaceRes[key];
|
||||
if (!templateJson || !templateJson.length || !state.dataForm) return templateJson;
|
||||
for (let i = 0; i < templateJson.length; i++) {
|
||||
if (templateJson[i].relationField && templateJson[i].sourceType == 1) {
|
||||
templateJson[i].defaultValue = state.dataForm[templateJson[i].relationField + '_id'] || '';
|
||||
}
|
||||
}
|
||||
return templateJson;
|
||||
}
|
||||
</script>
|
||||
498
src/views/mdm/material/Form.vue
Normal file
498
src/views/mdm/material/Form.vue
Normal file
@@ -0,0 +1,498 @@
|
||||
<template>
|
||||
<BasicDrawer v-bind="$attrs" @register="registerDrawer" width="800px" showFooter
|
||||
:cancelText="t('common.cancelText','取消')"
|
||||
:okText="t('common.okText','确定')"
|
||||
@ok="handleSubmit" :closeFunc="onClose">
|
||||
<template #title>
|
||||
<a-space :size="10">
|
||||
<div class="text-16px font-medium">{{ title }}</div>
|
||||
<a-space-compact size="small" block v-if="dataForm.id">
|
||||
<a-tooltip :title="t('common.prevRecord')">
|
||||
<a-button size="small" :disabled="getPrevDisabled" @click="handlePrev">
|
||||
<i class="icon-ym icon-ym-caret-left text-10px"></i>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip :title="t('common.nextRecord')">
|
||||
<a-button size="small" :disabled="getNextDisabled" @click="handleNext">
|
||||
<i class="icon-ym icon-ym-caret-right text-10px"></i>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
</a-space-compact>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #insertFooter>
|
||||
<div class="float-left mt-5px">
|
||||
<yunzhupaasCheckboxSingle v-model:value="submitType" :label="continueText" />
|
||||
</div>
|
||||
</template>
|
||||
<a-row class="p-10px dynamic-form ">
|
||||
<!-- 表单 -->
|
||||
<a-form :colon="false" size="middle" layout= "horizontal"
|
||||
labelAlign= "right"
|
||||
:labelCol="{ style: { width: '100px' } }" :model="dataForm" :rules="dataRule" ref="formRef" >
|
||||
<a-row :gutter="15">
|
||||
<!-- 具体表单 -->
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="material_code" >
|
||||
<template #label>物料编码
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.material_code" @change="changeData('material_code',-1)"
|
||||
placeholder="系统自动生成" readonly :style='{"width":"100%"}' >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="material_name" >
|
||||
<template #label>物料名称
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.material_name" @change="changeData('material_name',-1)"
|
||||
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.material_name" :showCount = "false" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="material_category" >
|
||||
<template #label>物料分类
|
||||
</template> <YunzhupaasCascader v-model:value="dataForm.material_category" @change="changeData('material_category',-1)"
|
||||
placeholder="请选择" :templateJson="state.interfaceRes.material_category" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' :options="optionsObj.material_categoryOptions" :fieldNames="optionsObj.material_categoryProps"
|
||||
>
|
||||
</YunzhupaasCascader>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="material_model" >
|
||||
<template #label>规格型号
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.material_model" @change="changeData('material_model',-1)"
|
||||
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.material_model" :showCount = "false" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="unit_name" >
|
||||
<template #label>单位名称
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.unit_name" @change="changeData('unit_name',-1)"
|
||||
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.unit_name" :showCount = "false" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="brand" >
|
||||
<template #label>品牌
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.brand" @change="changeData('brand',-1)"
|
||||
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.brand" :showCount = "false" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="tax_rate" >
|
||||
<template #label>税率
|
||||
</template> <YunzhupaasInputNumber v-model:value="dataForm.tax_rate" @change="changeData('tax_rate',-1)"
|
||||
placeholder="请输入" :style='{"width":"100%"}' :step="1" :precision="2" addonAfter="%" :controls="false" >
|
||||
</YunzhupaasInputNumber>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="tax_code" >
|
||||
<template #label>税收分类
|
||||
</template> <YunzhupaasCascader v-model:value="dataForm.tax_code" @change="changeData('tax_code',-1)"
|
||||
placeholder="请选择" :templateJson="state.interfaceRes.tax_code" :allowClear='true' :style='{"width":"100%"}' :showSearch='false' :options="optionsObj.tax_codeOptions" :fieldNames="optionsObj.tax_codeProps"
|
||||
>
|
||||
</YunzhupaasCascader>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="texture" >
|
||||
<template #label>材质/纹理
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.texture" @change="changeData('texture',-1)"
|
||||
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.texture" :showCount = "false" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="quality_standard" >
|
||||
<template #label>质量标准
|
||||
</template> <YunzhupaasInput v-model:value="dataForm.quality_standard" @change="changeData('quality_standard',-1)"
|
||||
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :maskConfig = "maskConfig.quality_standard" :showCount = "false" >
|
||||
</YunzhupaasInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="technical_standard" >
|
||||
<template #label>技术标准
|
||||
</template> <YunzhupaasTextarea v-model:value="dataForm.technical_standard" @change="changeData('technical_standard',-1)"
|
||||
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":2,"maxRows":3}' :showCount = "false" >
|
||||
</YunzhupaasTextarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="acceptance_criteria" >
|
||||
<template #label>验收标准
|
||||
</template> <YunzhupaasTextarea v-model:value="dataForm.acceptance_criteria" @change="changeData('acceptance_criteria',-1)"
|
||||
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":2,"maxRows":3}' :showCount = "false" >
|
||||
</YunzhupaasTextarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="delivery_requirements" >
|
||||
<template #label>交付要求
|
||||
</template> <YunzhupaasTextarea v-model:value="dataForm.delivery_requirements" @change="changeData('delivery_requirements',-1)"
|
||||
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":2,"maxRows":3}' :showCount = "false" >
|
||||
</YunzhupaasTextarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="storage_conditions" >
|
||||
<template #label>储存条件
|
||||
</template> <YunzhupaasTextarea v-model:value="dataForm.storage_conditions" @change="changeData('storage_conditions',-1)"
|
||||
placeholder="请输入" :allowClear='true' :style='{"width":"100%"}' :autoSize='{"minRows":2,"maxRows":3}' :showCount = "false" >
|
||||
</YunzhupaasTextarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 表单结束 -->
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-row>
|
||||
</BasicDrawer>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { create, update, getInfo } from './helper/api';
|
||||
import { reactive, toRefs, nextTick, ref, unref, computed,toRaw, inject } from 'vue';
|
||||
import { BasicDrawer, useDrawer } from '@/components/Drawer';
|
||||
import { yunzhupaasRelationForm } from '@/components/yunzhupaas';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
import { useI18n } from '@/hooks/web/useI18n';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import { thousandsFormat , getDateTimeUnit, getTimeUnit} from '@/utils/yunzhupaas';
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary';
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
||||
import dayjs from 'dayjs';
|
||||
// 表单权限
|
||||
import { usePermission } from '@/hooks/web/usePermission';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { buildUUID } from '@/utils/uuid';
|
||||
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
|
||||
interface State {
|
||||
dataForm: any;
|
||||
tableRows: any;
|
||||
dataRule: any;
|
||||
optionsObj: any;
|
||||
childIndex: any;
|
||||
isEdit: any;
|
||||
interfaceRes: any;
|
||||
//可选范围默认值
|
||||
ableAll: any;
|
||||
//掩码配置
|
||||
maskConfig:any;
|
||||
//定位属性
|
||||
locationScope:any;
|
||||
extraOptions: any;
|
||||
title: string;
|
||||
continueText: string; allList: any[];
|
||||
currIndex: number;
|
||||
isContinue: boolean;
|
||||
submitType: number;
|
||||
showContinueBtn: boolean;
|
||||
}
|
||||
|
||||
const emit = defineEmits(['reload']);
|
||||
const getLeftTreeActiveInfo: (() => any) | null = inject('getLeftTreeActiveInfo', null);
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
const { createMessage, createConfirm } = useMessage();
|
||||
const { t } = useI18n();
|
||||
const [registerDrawer, { openDrawer, setDrawerProps }] = useDrawer();
|
||||
const formRef = ref<FormInstance>();
|
||||
const state = reactive<State>({
|
||||
dataForm: {
|
||||
material_code:undefined,
|
||||
material_name:undefined,
|
||||
material_category:[],
|
||||
material_model:undefined,
|
||||
unit_name:undefined,
|
||||
brand:undefined,
|
||||
tax_rate:0.01,
|
||||
tax_code:[],
|
||||
texture:undefined,
|
||||
quality_standard:undefined,
|
||||
technical_standard:undefined,
|
||||
acceptance_criteria:undefined,
|
||||
delivery_requirements:undefined,
|
||||
storage_conditions:undefined,
|
||||
version: 0,
|
||||
},
|
||||
|
||||
tableRows:{
|
||||
},
|
||||
|
||||
dataRule: {
|
||||
},
|
||||
|
||||
optionsObj:{
|
||||
material_categoryOptions:[],
|
||||
material_categoryProps:{"label":"fullName","value":"enCode" ,"children":"children" },
|
||||
tax_codeOptions:[],
|
||||
tax_codeProps:{"label":"fullName","value":"enCode" ,"children":"children" },
|
||||
},
|
||||
|
||||
childIndex: -1,
|
||||
isEdit: false,
|
||||
interfaceRes: {"material_model":[],"texture":[],"quality_standard":[],"tax_rate":[],"material_category":[],"unit_name":[],"technical_standard":[],"tax_code":[],"storage_conditions":[],"material_name":[],"brand":[],"acceptance_criteria":[],"delivery_requirements":[],"material_code":[]},
|
||||
//可选范围默认值
|
||||
ableAll:{
|
||||
},
|
||||
|
||||
//掩码配置
|
||||
maskConfig:{
|
||||
material_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
material_model: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
unit_name: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
brand: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
texture: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
quality_standard: {"prefixType":1,"useUnrealMask":false,"maskType":1,"unrealMaskLength":1,"prefixLimit":0,"suffixLimit":0,"filler":"*","prefixSpecifyChar":"","suffixType":1,"ignoreChar":"","suffixSpecifyChar":""} ,
|
||||
},
|
||||
|
||||
//定位属性
|
||||
locationScope:{
|
||||
},
|
||||
|
||||
extraOptions:{
|
||||
},
|
||||
|
||||
title: "",
|
||||
continueText: "", allList: [],
|
||||
currIndex: 0,
|
||||
isContinue: false,
|
||||
submitType: 0,
|
||||
showContinueBtn: true ,
|
||||
});
|
||||
const { title, continueText, showContinueBtn, dataRule, dataForm, optionsObj, ableAll, maskConfig,submitType } = toRefs(state);
|
||||
|
||||
const getPrevDisabled = computed(() => state.currIndex === 0);
|
||||
const getNextDisabled = computed(() => state.currIndex === state.allList.length - 1);
|
||||
// 表单权限
|
||||
const { hasFormP } = usePermission();
|
||||
|
||||
defineExpose({ init });
|
||||
|
||||
function init(data) {
|
||||
state.submitType = 0;
|
||||
state.isContinue = false;
|
||||
state.title = !data.id ? t('common.add2Text','新增') : t('common.editText','编辑');
|
||||
state.continueText = !data.id ? t('common.continueAndAddText','确定并新增') : t('common.continueText','确定并继续'); setFormProps({ continueLoading: false });
|
||||
state.dataForm.id = data.id;
|
||||
openDrawer();
|
||||
state.allList = data.allList;
|
||||
state.currIndex = state.allList.length && data.id ? state.allList.findIndex((item) => item.id === data.id) : 0;
|
||||
nextTick(() => {
|
||||
getForm().resetFields();
|
||||
setTimeout(initData, 0);
|
||||
});
|
||||
}
|
||||
function initData() {
|
||||
changeLoading(true);
|
||||
if (state.dataForm.id) {
|
||||
getData(state.dataForm.id);
|
||||
} else {
|
||||
//初始化options
|
||||
getmaterial_categoryOptions();
|
||||
gettax_codeOptions();
|
||||
|
||||
// 设置默认值
|
||||
state.dataForm={
|
||||
material_code:undefined,
|
||||
material_name:undefined,
|
||||
material_category:[],
|
||||
material_model:undefined,
|
||||
unit_name:undefined,
|
||||
brand:undefined,
|
||||
tax_rate:0.01,
|
||||
tax_code:[],
|
||||
texture:undefined,
|
||||
quality_standard:undefined,
|
||||
technical_standard:undefined,
|
||||
acceptance_criteria:undefined,
|
||||
delivery_requirements:undefined,
|
||||
storage_conditions:undefined,
|
||||
version: 0,
|
||||
};
|
||||
if (getLeftTreeActiveInfo) state.dataForm = {...state.dataForm, ...(getLeftTreeActiveInfo() || {}) };
|
||||
state.childIndex = -1;
|
||||
changeLoading(false);
|
||||
}
|
||||
}
|
||||
function getForm() {
|
||||
const form = unref(formRef);
|
||||
if (!form) {
|
||||
throw new Error('form is null!');
|
||||
}
|
||||
return form;
|
||||
}
|
||||
function getData(id) {
|
||||
getInfo(id).then((res) => {
|
||||
state.dataForm = res.data || {};
|
||||
getmaterial_categoryOptions();
|
||||
gettax_codeOptions();
|
||||
|
||||
state.childIndex = -1;
|
||||
changeLoading(false);
|
||||
});
|
||||
}
|
||||
async function handleSubmit(type) {
|
||||
try {
|
||||
const values = await getForm()?.validate();
|
||||
if (!values) return;
|
||||
|
||||
|
||||
setFormProps({ confirmLoading: true });
|
||||
const formMethod = state.dataForm.id ? update : create;
|
||||
formMethod(state.dataForm)
|
||||
.then((res) => {
|
||||
createMessage.success(res.msg);
|
||||
setFormProps({ confirmLoading: false });
|
||||
if (state.submitType == 1) {
|
||||
initData();
|
||||
state.isContinue = true;
|
||||
} else {
|
||||
setFormProps({ open: false });
|
||||
emit('reload');
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
setFormProps({ confirmLoading: false });
|
||||
});
|
||||
} catch (_) {}
|
||||
}
|
||||
function handlePrev() {
|
||||
state.currIndex--;
|
||||
handleGetNewInfo();
|
||||
}
|
||||
function handleNext() {
|
||||
state.currIndex++;
|
||||
handleGetNewInfo();
|
||||
}
|
||||
function handleGetNewInfo() {
|
||||
changeLoading(true);
|
||||
getForm().resetFields();
|
||||
const id = state.allList[state.currIndex].id;
|
||||
getData(id);
|
||||
}
|
||||
function setFormProps(data) {
|
||||
setDrawerProps(data);
|
||||
}
|
||||
function changeLoading(loading) {
|
||||
setDrawerProps({ loading });
|
||||
}
|
||||
async function onClose() {
|
||||
if (state.isContinue) emit('reload');
|
||||
return true;
|
||||
}
|
||||
|
||||
function changeData(model, index) {
|
||||
state.isEdit = false
|
||||
state.childIndex = index
|
||||
for (let key in state.interfaceRes) {
|
||||
if (key != model) {
|
||||
let faceReList = state.interfaceRes[key]
|
||||
for (let i = 0; i < faceReList.length; i++) {
|
||||
let relationField = faceReList[i].relationField;
|
||||
if(relationField){
|
||||
let modelAll = relationField.split('-');
|
||||
let faceMode = '';
|
||||
let faceMode2 = modelAll.length == 2?modelAll[0].substring(0, modelAll[0].length-4) +modelAll[1]:""
|
||||
for (let i = 0; i < modelAll.length; i++) {
|
||||
faceMode += modelAll[i];
|
||||
}
|
||||
if (faceMode == model || faceMode2 == model ) {
|
||||
let options = 'get' + key + 'Options';
|
||||
eval(options)(true);
|
||||
changeData(key, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function changeDataFormData(type, data, model,index,defaultValue) {
|
||||
if(!state.isEdit) {
|
||||
if (type == 2) {
|
||||
for (let i = 0; i < state.dataForm[data].length; i++) {
|
||||
if (index == -1) {
|
||||
state.dataForm[data][i][model] = defaultValue
|
||||
} else if (index == i) {
|
||||
state.dataForm[data][i][model] = defaultValue
|
||||
}
|
||||
}
|
||||
} else {
|
||||
state.dataForm[data] = defaultValue
|
||||
}
|
||||
}
|
||||
}
|
||||
//数据选项--数据字典初始化方法
|
||||
function getmaterial_categoryOptions() {
|
||||
getDictionaryDataSelector('materialCategory').then(res => {
|
||||
state.optionsObj.material_categoryOptions = res.data.list
|
||||
})
|
||||
}
|
||||
//数据选项--数据字典初始化方法
|
||||
function gettax_codeOptions() {
|
||||
getDictionaryDataSelector('taxCode').then(res => {
|
||||
state.optionsObj.tax_codeOptions = res.data.list
|
||||
})
|
||||
}
|
||||
function getRelationDate(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
||||
let timeDataValue: any = null;
|
||||
let timeValue = Number(timeValueData);
|
||||
if (timeRule) {
|
||||
if (timeType == 1) {
|
||||
timeDataValue = timeValue;
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue;
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = new Date().getTime();
|
||||
} else if (timeType == 4 || timeType == 5) {
|
||||
const type = getTimeUnit(timeTarget);
|
||||
const method = timeType == 4 ? 'subtract' : 'add';
|
||||
timeDataValue = dayjs()[method](timeValue, type).valueOf();
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
}
|
||||
function getRelationTime(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
||||
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType;
|
||||
let timeDataValue: any = null;
|
||||
if (timeRule) {
|
||||
if (timeType == 1) {
|
||||
timeDataValue = timeValue || '00:00:00';
|
||||
if (timeDataValue.split(':').length == 3) {
|
||||
timeDataValue = timeDataValue;
|
||||
} else {
|
||||
timeDataValue = timeDataValue + ':00';
|
||||
}
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue;
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = dayjs().format(format);
|
||||
} else if (timeType == 4 || timeType == 5) {
|
||||
const type = getTimeUnit(timeTarget + 3);
|
||||
const method = timeType == 4 ? 'subtract' : 'add';
|
||||
timeDataValue = dayjs()[method](timeValue, type).format(format);
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
}
|
||||
</script>
|
||||
34
src/views/mdm/material/helper/api.ts
Normal file
34
src/views/mdm/material/helper/api.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { defHttp } from '@/utils/http/axios';
|
||||
|
||||
// 获取列表
|
||||
export function getList(data) {
|
||||
return defHttp.post({ url: '/api/bcm/Material/getList', data });
|
||||
}
|
||||
// 新建
|
||||
export function create(data) {
|
||||
return defHttp.post({ url:'/api/bcm/Material', data });
|
||||
}
|
||||
// 修改
|
||||
export function update(data) {
|
||||
return defHttp.put({ url: '/api/bcm/Material/'+ data.id, data });
|
||||
}
|
||||
// 详情(无转换数据)
|
||||
export function getInfo(id) {
|
||||
return defHttp.get({ url: '/api/bcm/Material/' + id });
|
||||
}
|
||||
// 获取(转换数据)
|
||||
export function getDetailInfo(id) {
|
||||
return defHttp.get({ url: '/api/bcm/Material/detail/' + id });
|
||||
}
|
||||
// 删除
|
||||
export function del(id) {
|
||||
return defHttp.delete({ url: '/api/bcm/Material/' + id });
|
||||
}
|
||||
// 批量删除数据
|
||||
export function batchDelete(data) {
|
||||
return defHttp.delete({ url: '/api/bcm/Material/batchRemove', data });
|
||||
}
|
||||
// 导出
|
||||
export function exportData(data) {
|
||||
return defHttp.post({ url: '/api/bcm/Material/Actions/Export', data });
|
||||
}
|
||||
628
src/views/mdm/material/helper/columnList.ts
Normal file
628
src/views/mdm/material/helper/columnList.ts
Normal file
@@ -0,0 +1,628 @@
|
||||
const columnList = [
|
||||
{
|
||||
"yunzhupaasKey":"billRule",
|
||||
"resizable":true,
|
||||
"fullName":"物料编码",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"label":"物料编码",
|
||||
"sortable":false,
|
||||
"align":"left",
|
||||
"__config__":{
|
||||
"formId":"formItem8ccf90",
|
||||
"yunzhupaasKey":"billRule",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"defaultValue":null,
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"rule":"materialCode",
|
||||
"className":[],
|
||||
"label":"物料编码",
|
||||
"trigger":"change",
|
||||
"ruleConfig":{},
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013211756,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-documents",
|
||||
"ruleType":1,
|
||||
"ruleName":"物料编码",
|
||||
"tag":"YunzhupaasInput",
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":true,
|
||||
"prop":"material_code",
|
||||
"width":null,
|
||||
"__vModel__":"material_code",
|
||||
"fixed":"none",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"id":"material_code",
|
||||
"placeholder":"系统自动生成",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"yunzhupaasKey":"input",
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItem83c40d",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"物料名称",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777008057645,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"material_name",
|
||||
"__vModel__":"material_name",
|
||||
"disabled":false,
|
||||
"id":"material_name",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
},
|
||||
"clearable":true,
|
||||
"resizable":true,
|
||||
"maxlength":null,
|
||||
"fullName":"物料名称",
|
||||
"label":"物料名称",
|
||||
"sortable":true,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"fixed":"none",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"yunzhupaasKey":"cascader",
|
||||
"filterable":false,
|
||||
"clearable":true,
|
||||
"resizable":true,
|
||||
"multiple":false,
|
||||
"fullName":"物料分类",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"label":"物料分类",
|
||||
"sortable":true,
|
||||
"align":"left",
|
||||
"props":{
|
||||
"children":"children",
|
||||
"label":"fullName",
|
||||
"value":"enCode"
|
||||
},
|
||||
"__config__":{
|
||||
"yunzhupaasKey":"cascader",
|
||||
"defaultValue":[],
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"propsUrl":"",
|
||||
"templateJson":[],
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013275790,
|
||||
"tagIcon":"icon-ym icon-ym-generator-cascader",
|
||||
"tag":"YunzhupaasCascader",
|
||||
"formId":"formItem493db2",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"dataType":"dictionary",
|
||||
"dictionaryType":"materialCategory",
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"label":"物料分类",
|
||||
"trigger":"change",
|
||||
"layout":"colFormItem",
|
||||
"useCache":true,
|
||||
"propsName":"",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"prop":"material_category",
|
||||
"width":null,
|
||||
"options":[],
|
||||
"__vModel__":"material_category",
|
||||
"fixed":"none",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"material_category",
|
||||
"placeholder":"请选择",
|
||||
"labelI18nCode":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"yunzhupaasKey":"input",
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItemb35646",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"单位名称",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013263798,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"unit_name",
|
||||
"__vModel__":"unit_name",
|
||||
"disabled":false,
|
||||
"id":"unit_name",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
},
|
||||
"clearable":true,
|
||||
"resizable":true,
|
||||
"maxlength":null,
|
||||
"fullName":"单位名称",
|
||||
"label":"单位名称",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"fixed":"none",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"yunzhupaasKey":"input",
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItemb369a1",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"材质/纹理",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013303007,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":24
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"texture",
|
||||
"__vModel__":"texture",
|
||||
"disabled":false,
|
||||
"id":"texture",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
},
|
||||
"clearable":true,
|
||||
"resizable":true,
|
||||
"maxlength":null,
|
||||
"fullName":"材质/纹理",
|
||||
"label":"材质/纹理",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"fixed":"none",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"yunzhupaasKey":"input",
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItembbc1a2",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"规格型号",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777014869849,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"material_model",
|
||||
"__vModel__":"material_model",
|
||||
"disabled":false,
|
||||
"id":"material_model",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
},
|
||||
"clearable":true,
|
||||
"resizable":true,
|
||||
"maxlength":null,
|
||||
"fullName":"规格型号",
|
||||
"label":"规格型号",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"fixed":"none",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"yunzhupaasKey":"input",
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItem8c9279",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"品牌",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013311315,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"brand",
|
||||
"__vModel__":"brand",
|
||||
"disabled":false,
|
||||
"id":"brand",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
},
|
||||
"clearable":true,
|
||||
"resizable":true,
|
||||
"maxlength":null,
|
||||
"fullName":"品牌",
|
||||
"label":"品牌",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"fixed":"none",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"yunzhupaasKey":"select",
|
||||
"filterable":false,
|
||||
"clearable":true,
|
||||
"resizable":true,
|
||||
"multiple":false,
|
||||
"fullName":"税率",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"label":"税率",
|
||||
"sortable":false,
|
||||
"align":"left",
|
||||
"props":{
|
||||
"label":"fullName",
|
||||
"value":"enCode"
|
||||
},
|
||||
"__config__":{
|
||||
"yunzhupaasKey":"select",
|
||||
"defaultValue":"",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"propsUrl":"",
|
||||
"templateJson":[],
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777014805432,
|
||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
||||
"tag":"YunzhupaasSelect",
|
||||
"formId":"formItemd0f934",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"dataType":"dictionary",
|
||||
"dictionaryType":"817378654752342789",
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"label":"税率",
|
||||
"trigger":"change",
|
||||
"layout":"colFormItem",
|
||||
"useCache":true,
|
||||
"propsName":"",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"prop":"tax_rate",
|
||||
"width":null,
|
||||
"options":[],
|
||||
"__vModel__":"tax_rate",
|
||||
"fixed":"none",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"tax_rate",
|
||||
"placeholder":"请选择",
|
||||
"labelI18nCode":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"yunzhupaasKey":"cascader",
|
||||
"filterable":false,
|
||||
"clearable":true,
|
||||
"resizable":true,
|
||||
"multiple":false,
|
||||
"fullName":"税收分类",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"label":"税收分类",
|
||||
"sortable":false,
|
||||
"align":"left",
|
||||
"props":{
|
||||
"children":"children",
|
||||
"label":"fullName",
|
||||
"value":"enCode"
|
||||
},
|
||||
"__config__":{
|
||||
"yunzhupaasKey":"cascader",
|
||||
"defaultValue":[],
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"propsUrl":"",
|
||||
"templateJson":[],
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777014893882,
|
||||
"tagIcon":"icon-ym icon-ym-generator-cascader",
|
||||
"tag":"YunzhupaasCascader",
|
||||
"formId":"formItem0b34b4",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"dataType":"dictionary",
|
||||
"dictionaryType":"taxCode",
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"label":"税收分类",
|
||||
"trigger":"change",
|
||||
"layout":"colFormItem",
|
||||
"useCache":true,
|
||||
"propsName":"",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"prop":"tax_code",
|
||||
"width":null,
|
||||
"options":[],
|
||||
"__vModel__":"tax_code",
|
||||
"fixed":"none",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"tax_code",
|
||||
"placeholder":"请选择",
|
||||
"labelI18nCode":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
}
|
||||
]
|
||||
export default columnList
|
||||
149
src/views/mdm/material/helper/searchList.ts
Normal file
149
src/views/mdm/material/helper/searchList.ts
Normal file
@@ -0,0 +1,149 @@
|
||||
const searchList = [
|
||||
{
|
||||
"yunzhupaasKey":"input",
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItem83c40d",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"物料名称",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777008057645,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"material_name",
|
||||
"__vModel__":"material_name",
|
||||
"searchMultiple":false,
|
||||
"disabled":false,
|
||||
"id":"material_name",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
},
|
||||
"clearable":true,
|
||||
"searchType":2,
|
||||
"maxlength":null,
|
||||
"fullName":"物料名称",
|
||||
"label":"物料名称",
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"isKeyword":false,
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"yunzhupaasKey":"input",
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItembbc1a2",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"规格型号",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777014869849,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"material_model",
|
||||
"__vModel__":"material_model",
|
||||
"searchMultiple":false,
|
||||
"disabled":false,
|
||||
"id":"material_model",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
},
|
||||
"clearable":true,
|
||||
"searchType":2,
|
||||
"maxlength":null,
|
||||
"fullName":"规格型号",
|
||||
"label":"规格型号",
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"isKeyword":false,
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
}
|
||||
]
|
||||
export default searchList
|
||||
813
src/views/mdm/material/helper/superQueryJson.ts
Normal file
813
src/views/mdm/material/helper/superQueryJson.ts
Normal file
@@ -0,0 +1,813 @@
|
||||
const superQueryJson = [
|
||||
{
|
||||
"__config__":{
|
||||
"formId":"formItem8ccf90",
|
||||
"yunzhupaasKey":"billRule",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"defaultValue":null,
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"rule":"materialCode",
|
||||
"className":[],
|
||||
"label":"物料编码",
|
||||
"trigger":"change",
|
||||
"ruleConfig":{},
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013211756,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-documents",
|
||||
"ruleType":1,
|
||||
"ruleName":"物料编码",
|
||||
"tag":"YunzhupaasInput",
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":true,
|
||||
"__vModel__":"material_code",
|
||||
"fullName":"物料编码",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"id":"material_code",
|
||||
"placeholder":"系统自动生成"
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"maxlength":null,
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"物料名称",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"addonAfter":"",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItem83c40d",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"物料名称",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777008057645,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":false,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"__vModel__":"material_name",
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"material_name",
|
||||
"placeholder":"请输入",
|
||||
"prefixIcon":"",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"filterable":false,
|
||||
"clearable":true,
|
||||
"multiple":false,
|
||||
"fullName":"物料分类",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"props":{
|
||||
"children":"children",
|
||||
"label":"fullName",
|
||||
"value":"enCode"
|
||||
},
|
||||
"__config__":{
|
||||
"yunzhupaasKey":"cascader",
|
||||
"defaultValue":[],
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"propsUrl":"",
|
||||
"templateJson":[],
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013275790,
|
||||
"tagIcon":"icon-ym icon-ym-generator-cascader",
|
||||
"tag":"YunzhupaasCascader",
|
||||
"formId":"formItem493db2",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"dataType":"dictionary",
|
||||
"dictionaryType":"materialCategory",
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"label":"物料分类",
|
||||
"trigger":"change",
|
||||
"layout":"colFormItem",
|
||||
"useCache":true,
|
||||
"propsName":"",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"options":[],
|
||||
"__vModel__":"material_category",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"material_category",
|
||||
"placeholder":"请选择",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"maxlength":null,
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"规格型号",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"addonAfter":"",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItembbc1a2",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"规格型号",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777014869849,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":false,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"__vModel__":"material_model",
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"material_model",
|
||||
"placeholder":"请输入",
|
||||
"prefixIcon":"",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"maxlength":null,
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"单位名称",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"addonAfter":"",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItemb35646",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"单位名称",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013263798,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":false,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"__vModel__":"unit_name",
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"unit_name",
|
||||
"placeholder":"请输入",
|
||||
"prefixIcon":"",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"maxlength":null,
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"品牌",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"addonAfter":"",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItem8c9279",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"品牌",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013311315,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"readonly":false,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"__vModel__":"brand",
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"brand",
|
||||
"placeholder":"请输入",
|
||||
"prefixIcon":"",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"filterable":false,
|
||||
"clearable":true,
|
||||
"multiple":false,
|
||||
"fullName":"税率",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"props":{
|
||||
"label":"fullName",
|
||||
"value":"enCode"
|
||||
},
|
||||
"__config__":{
|
||||
"yunzhupaasKey":"select",
|
||||
"defaultValue":"",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"propsUrl":"",
|
||||
"templateJson":[],
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777014805432,
|
||||
"tagIcon":"icon-ym icon-ym-generator-select",
|
||||
"tag":"YunzhupaasSelect",
|
||||
"formId":"formItemd0f934",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"dataType":"dictionary",
|
||||
"dictionaryType":"817378654752342789",
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"label":"税率",
|
||||
"trigger":"change",
|
||||
"layout":"colFormItem",
|
||||
"useCache":true,
|
||||
"propsName":"",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"options":[],
|
||||
"__vModel__":"tax_rate",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"tax_rate",
|
||||
"placeholder":"请选择",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"filterable":false,
|
||||
"clearable":true,
|
||||
"multiple":false,
|
||||
"fullName":"税收分类",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"props":{
|
||||
"children":"children",
|
||||
"label":"fullName",
|
||||
"value":"enCode"
|
||||
},
|
||||
"__config__":{
|
||||
"yunzhupaasKey":"cascader",
|
||||
"defaultValue":[],
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"propsUrl":"",
|
||||
"templateJson":[],
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777014893882,
|
||||
"tagIcon":"icon-ym icon-ym-generator-cascader",
|
||||
"tag":"YunzhupaasCascader",
|
||||
"formId":"formItem0b34b4",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"dataType":"dictionary",
|
||||
"dictionaryType":"taxCode",
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"label":"税收分类",
|
||||
"trigger":"change",
|
||||
"layout":"colFormItem",
|
||||
"useCache":true,
|
||||
"propsName":"",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":12
|
||||
},
|
||||
"options":[],
|
||||
"__vModel__":"tax_code",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"tax_code",
|
||||
"placeholder":"请选择",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"maxlength":null,
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"材质/纹理",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"addonAfter":"",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItemb369a1",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"材质/纹理",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013303007,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":24
|
||||
},
|
||||
"readonly":false,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"__vModel__":"texture",
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"texture",
|
||||
"placeholder":"请输入",
|
||||
"prefixIcon":"",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"maxlength":null,
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"质量标准",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"addonAfter":"",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItem5b262b",
|
||||
"yunzhupaasKey":"input",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"质量标准",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013318024,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-input",
|
||||
"tag":"YunzhupaasInput",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":24
|
||||
},
|
||||
"readonly":false,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"__vModel__":"quality_standard",
|
||||
"useMask":false,
|
||||
"showPassword":false,
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"quality_standard",
|
||||
"placeholder":"请输入",
|
||||
"prefixIcon":"",
|
||||
"addonBefore":"",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"maxlength":null,
|
||||
"fullName":"技术标准",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"autoSize":{
|
||||
"minRows":2,
|
||||
"maxRows":3
|
||||
},
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItem8f3df1",
|
||||
"yunzhupaasKey":"textarea",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"技术标准",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013366266,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-textarea",
|
||||
"tag":"YunzhupaasTextarea",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":24
|
||||
},
|
||||
"readonly":false,
|
||||
"__vModel__":"technical_standard",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"technical_standard",
|
||||
"placeholder":"请输入",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"maxlength":null,
|
||||
"fullName":"验收标准",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"autoSize":{
|
||||
"minRows":2,
|
||||
"maxRows":3
|
||||
},
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItemb1305e",
|
||||
"yunzhupaasKey":"textarea",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"验收标准",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013375099,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-textarea",
|
||||
"tag":"YunzhupaasTextarea",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":24
|
||||
},
|
||||
"readonly":false,
|
||||
"__vModel__":"acceptance_criteria",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"acceptance_criteria",
|
||||
"placeholder":"请输入",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"maxlength":null,
|
||||
"fullName":"交付要求",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"autoSize":{
|
||||
"minRows":2,
|
||||
"maxRows":3
|
||||
},
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItemf44c38",
|
||||
"yunzhupaasKey":"textarea",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"交付要求",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013396926,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-textarea",
|
||||
"tag":"YunzhupaasTextarea",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":24
|
||||
},
|
||||
"readonly":false,
|
||||
"__vModel__":"delivery_requirements",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"delivery_requirements",
|
||||
"placeholder":"请输入",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"maxlength":null,
|
||||
"fullName":"储存条件",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"autoSize":{
|
||||
"minRows":2,
|
||||
"maxRows":3
|
||||
},
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"formId":"formItem4fad6e",
|
||||
"yunzhupaasKey":"textarea",
|
||||
"visibility":[
|
||||
"pc",
|
||||
"app"
|
||||
],
|
||||
"noShow":false,
|
||||
"tipLabel":"",
|
||||
"tableFixed":"none",
|
||||
"dragDisabled":false,
|
||||
"className":[],
|
||||
"label":"储存条件",
|
||||
"trigger":"blur",
|
||||
"showLabel":true,
|
||||
"required":false,
|
||||
"tableName":"mdm_material",
|
||||
"renderKey":1777013402484,
|
||||
"layout":"colFormItem",
|
||||
"tagIcon":"icon-ym icon-ym-generator-textarea",
|
||||
"tag":"YunzhupaasTextarea",
|
||||
"regList":[],
|
||||
"tableAlign":"left",
|
||||
"span":24
|
||||
},
|
||||
"readonly":false,
|
||||
"__vModel__":"storage_conditions",
|
||||
"style":{
|
||||
"width":"100%"
|
||||
},
|
||||
"disabled":false,
|
||||
"id":"storage_conditions",
|
||||
"placeholder":"请输入",
|
||||
"on":{
|
||||
"change":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}",
|
||||
"blur":"({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}"
|
||||
}
|
||||
}
|
||||
]
|
||||
export default superQueryJson
|
||||
726
src/views/mdm/material/index.vue
Normal file
726
src/views/mdm/material/index.vue
Normal file
@@ -0,0 +1,726 @@
|
||||
<template>
|
||||
<div class="yunzhupaas-content-wrapper">
|
||||
<div class="yunzhupaas-content-wrapper-left">
|
||||
<BasicLeftTree v-bind="getLeftTreeBindValue" ref="leftTreeRef" @reload="getTreeView()"
|
||||
@select="handleLeftTreeSelect" />
|
||||
</div>
|
||||
<div class="yunzhupaas-content-wrapper-center">
|
||||
<div class="yunzhupaas-content-wrapper-search-box" v-if="getSearchList.length">
|
||||
<BasicForm @register="registerSearchForm" :schemas="getSearchList"
|
||||
@advanced-change="redoHeight" @submit="handleSearchSubmit" @reset="handleSearchReset"
|
||||
class="search-form">
|
||||
</BasicForm>
|
||||
</div>
|
||||
<div class="yunzhupaas-content-wrapper-content bg-white">
|
||||
<BasicTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
||||
@columns-change="handleColumnChange">
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add" v-auth="'btn_add'"
|
||||
@click="addHandle()"> {{t('common.add2Text','新增')}}</a-button>
|
||||
<a-button type="link" preIcon="icon-ym icon-ym-btn-download" v-auth="'btn_download'"
|
||||
@click="openExportModal(true, { columnList: state.exportList, selectIds: getSelectRowKeys(), showExportSelected: true })"> {{t('common.exportText','导出')}}</a-button>
|
||||
<a-button type="link" preIcon="icon-ym icon-ym-btn-upload" v-auth="'btn_upload'"
|
||||
@click="openImportModal(true, { url: 'bcm/Material', menuId: searchInfo.menuId })"> {{t('common.importText','导入')}}</a-button>
|
||||
</template>
|
||||
<template #toolbar>
|
||||
<a-tooltip placement="top">
|
||||
<template #title>
|
||||
<span>{{ t('common.superQuery') }}</span>
|
||||
</template>
|
||||
<filter-outlined @click="openSuperQuery(true, { columnOptions: superQueryJson })" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template #toolbarAfter>
|
||||
<ViewList :menuId="route.meta.modelId" :viewList="viewList" @itemClick="handleViewClick" @reload="initViewList" />
|
||||
<ViewSetting :menuId="route.meta.modelId" :viewList="viewList" :currentView="currentView" @reload="initViewList" />
|
||||
</template>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-for="(item, index) in childColumnList" v-if="childColumnList.length">
|
||||
<template
|
||||
v-if="column?.id?.includes('-') && item.children && item.children[0] && column.key === item.children[0]?.dataIndex">
|
||||
<ChildTableColumn :data="record[item.prop]" :head="item.children"
|
||||
@toggleExpand="toggleExpand(record, item.prop+`Expand`)" @toDetail="toDetail"
|
||||
:expand="record[item.prop+`Expand`]" :key="index" :showOverflow="true "/>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="!(record.top || column.id?.includes('-'))">
|
||||
<template v-if="column.yunzhupaasKey === 'relationForm'">
|
||||
<p class="link-text"
|
||||
@click="toDetail(column.modelId, record[column.dataIndex+`_id`], column.propsValue)">
|
||||
{{ record[column.dataIndex] }}</p>
|
||||
</template>
|
||||
<template v-if="column.yunzhupaasKey === 'inputNumber'">
|
||||
<yunzhupaas-input-number v-model:value="record[column.prop]" :precision="column.precision" :thousands="column.thousands" disabled detailed />
|
||||
</template>
|
||||
<template v-if="column.yunzhupaasKey === 'calculate'">
|
||||
<yunzhupaas-calculate
|
||||
v-model:value="record[column.prop]"
|
||||
:isStorage="column.isStorage"
|
||||
:precision="column.precision"
|
||||
:thousands="column.thousands"
|
||||
detailed />
|
||||
</template>
|
||||
<template v-if="column.yunzhupaasKey === 'sign'">
|
||||
<yunzhupaas-sign v-model:value="record[column.prop]" detailed />
|
||||
</template>
|
||||
<template v-if="column.yunzhupaasKey === 'signature'">
|
||||
<yunzhupaas-signature v-model:value="record[column.prop]" detailed />
|
||||
</template>
|
||||
<template v-if="column.yunzhupaasKey === 'rate'">
|
||||
<yunzhupaas-rate v-model:value="record[column.prop]" :count="column.count" :allowHalf="column.allowHalf" disabled />
|
||||
</template>
|
||||
<template v-if="column.yunzhupaasKey === 'slider'">
|
||||
<yunzhupaas-slider v-model:value="record[column.prop]" :min="column.min" :max="column.max" :step="column.step" disabled />
|
||||
</template>
|
||||
<template v-if="column.yunzhupaasKey === 'uploadImg'">
|
||||
<yunzhupaas-upload-img v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
||||
</template>
|
||||
<template v-if="column.yunzhupaasKey === 'uploadFile'">
|
||||
<yunzhupaas-upload-file v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
||||
</template>
|
||||
<template v-if="column.yunzhupaasKey === 'input'">
|
||||
<yunzhupaas-input
|
||||
v-model:value="record[column.prop]"
|
||||
:useMask="column.useMask"
|
||||
:maskConfig="column.maskConfig"
|
||||
:showOverflow="true"
|
||||
detailed />
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="column.key === 'action' && !record.top">
|
||||
<TableAction :actions="getTableActions(record)" />
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</div>
|
||||
<Form ref="formRef" @reload="reload" />
|
||||
<Detail ref="detailRef" />
|
||||
<ExportModal @register="registerExportModal" @download="handleDownload" />
|
||||
<ImportModal @register="registerImportModal" @reload="reload" />
|
||||
<PrintSelect @register="registerPrintSelect" @change="handleShowBrowse" />
|
||||
<PrintBrowse @register="registerPrintBrowse" />
|
||||
<RelationDetail ref="relationDetailRef" />
|
||||
<SuperQueryModal @register="registerSuperQueryModal" @superQuery="handleSuperQuery" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
import { getList, del, exportData, batchDelete } from './helper/api';
|
||||
import { getConfigData,getViewList } from '@/api/onlineDev/visualDev';
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary';
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface';
|
||||
import { getOrgByOrganizeCondition,getDepartmentSelectAsyncList } from '@/api/permission/organize';
|
||||
import { ref, reactive, onMounted, toRefs, computed, unref, nextTick, toRaw, provide } from 'vue';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
import { useI18n } from '@/hooks/web/useI18n';
|
||||
import { useOrganizeStore } from '@/store/modules/organize';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import { BasicModal, useModal } from '@/components/Modal';
|
||||
import { usePopup } from '@/components/Popup';
|
||||
import { ScrollContainer } from '@/components/Container';
|
||||
import { BasicLeftTree, TreeActionType } from '@/components/Tree';
|
||||
import { BasicForm, useForm } from '@/components/Form';
|
||||
import { BasicTable, useTable, TableAction, ActionItem, TableActionType, SorterResult } from '@/components/Table';
|
||||
import { SuperQueryModal } from '@/components/CommonModal';
|
||||
import Form from './Form.vue';
|
||||
import Detail from './Detail.vue';
|
||||
// 有关联表单详情:开始
|
||||
import RelationDetail from '@/views/common/dynamicModel/list/detail/index.vue';
|
||||
// 有关联表单详情:结束
|
||||
import ChildTableColumn from '@/views/common/dynamicModel/list/ChildTableColumn.vue';
|
||||
import { ExportModal } from '@/components/CommonModal';
|
||||
import { downloadByUrl } from '@/utils/file/download';
|
||||
import { ImportModal} from '@/components/CommonModal';
|
||||
// 打印模板多条生成PrintSelect
|
||||
import PrintSelect from '@/components/PrintDesign/printSelect/index.vue';
|
||||
import PrintBrowse from '@/components/PrintDesign/printBrowse/index.vue';
|
||||
import { useRoute,useRouter } from 'vue-router';
|
||||
import { FilterOutlined } from '@ant-design/icons-vue';
|
||||
import { getSearchFormSchemas } from '@/components/FormGenerator/src/helper/transform';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import columnList from './helper/columnList';
|
||||
import searchList from './helper/searchList';
|
||||
import superQueryJson from './helper/superQueryJson';
|
||||
import { dyOptionsList, systemComponentsList } from '@/components/FormGenerator/src/helper/config';
|
||||
import { thousandsFormat, getParamList} from '@/utils/yunzhupaas';
|
||||
import { usePermission } from '@/hooks/web/usePermission';
|
||||
|
||||
import ViewSetting from '@/views/common/dynamicModel/list/components/ViewSetting.vue';
|
||||
import ViewList from '@/views/common/dynamicModel/list/components/ViewList.vue';
|
||||
|
||||
interface State {
|
||||
config: any;
|
||||
columnList: any[];
|
||||
printListOptions: any[];
|
||||
columnBtnsList: any[];
|
||||
customBtnsList: any[];
|
||||
treeFieldNames: any;
|
||||
leftTreeData: any[];
|
||||
leftTreeLoading: boolean;
|
||||
treeActiveId: string;
|
||||
treeActiveNodePath: any;
|
||||
columns: any[];
|
||||
complexColumns: any[];
|
||||
childColumnList: any[];
|
||||
exportList: any[];
|
||||
cacheList: any[];
|
||||
currFlow: any;
|
||||
isCustomCopy: boolean;
|
||||
candidateType: number;
|
||||
currRow: any;
|
||||
workFlowFormData: any;
|
||||
expandObj: any;
|
||||
columnSettingList: any[];
|
||||
searchSchemas: any[];
|
||||
treeRelationObj: any;
|
||||
treeQueryJson: any;
|
||||
leftTreeActiveInfo: any;
|
||||
keyword: string;
|
||||
viewList: any[];
|
||||
currentView: any;
|
||||
}
|
||||
|
||||
const route = useRoute();
|
||||
const { hasBtnP } = usePermission();
|
||||
const { createMessage, createConfirm } = useMessage();
|
||||
const { t } = useI18n();
|
||||
const organizeStore = useOrganizeStore();
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
|
||||
const [registerExportModal, { openModal: openExportModal, closeModal: closeExportModal, setModalProps: setExportModalProps }] = useModal();
|
||||
const [registerImportModal, { openModal: openImportModal }] = useModal();
|
||||
const [registerSuperQueryModal, { openModal: openSuperQuery }] = useModal();
|
||||
const leftTreeRef = ref<Nullable<TreeActionType>>(null);
|
||||
const formRef = ref<any>(null);
|
||||
const tableRef = ref<Nullable<TableActionType>>(null);
|
||||
const detailRef = ref<any>(null);
|
||||
const relationDetailRef = ref<any>(null);
|
||||
|
||||
const state = reactive<State>({
|
||||
config: {},
|
||||
columnList: [],
|
||||
printListOptions: [],
|
||||
columnBtnsList: [],
|
||||
customBtnsList: [],
|
||||
treeFieldNames: {
|
||||
children: 'children' ,
|
||||
title: 'fullName' ,
|
||||
key: 'id' ,
|
||||
isLeaf: 'isLeaf',
|
||||
},
|
||||
leftTreeData: [],
|
||||
leftTreeLoading: false,
|
||||
treeActiveId: '',
|
||||
treeActiveNodePath: [],
|
||||
columns: [],
|
||||
complexColumns: [], // 复杂表头
|
||||
childColumnList: [],
|
||||
exportList: [],
|
||||
cacheList: [],
|
||||
currFlow: {},
|
||||
isCustomCopy: false,
|
||||
candidateType: 1,
|
||||
currRow: {},
|
||||
workFlowFormData: {},
|
||||
expandObj: {},
|
||||
columnSettingList: [],
|
||||
searchSchemas: [],
|
||||
treeRelationObj: null,
|
||||
treeQueryJson: {},
|
||||
leftTreeActiveInfo: {},
|
||||
keyword: '',
|
||||
viewList: [],
|
||||
currentView: {},
|
||||
});
|
||||
const defaultSearchInfo = {
|
||||
menuId: route.meta.modelId as string,
|
||||
moduleId:'818749781147910917',
|
||||
superQueryJson: '',
|
||||
dataType:0,
|
||||
};
|
||||
const searchInfo = reactive({
|
||||
...cloneDeep(defaultSearchInfo),
|
||||
});
|
||||
const { childColumnList, searchSchemas, viewList, currentView} = toRefs(state);
|
||||
const [registerSearchForm, { updateSchema, resetFields, submit: searchFormSubmit, setFieldsValue}] = useForm({
|
||||
baseColProps: { span: 6 },
|
||||
showActionButtonGroup: true,
|
||||
showAdvancedButton: true,
|
||||
compact: true,
|
||||
});
|
||||
const [registerTable, { reload, setLoading, getFetchParams, getSelectRows, getSelectRowKeys, redoHeight,clearSelectedRowKeys }] = useTable({
|
||||
api: getList,
|
||||
immediate: false,
|
||||
clickToRowSelect: false,
|
||||
tableSetting: { setting: false },
|
||||
afterFetch: (data) => {
|
||||
const list = data.map((o) => ({
|
||||
...o,
|
||||
...state.expandObj,
|
||||
}));
|
||||
state.cacheList = cloneDeep(list);
|
||||
return list;
|
||||
},
|
||||
});
|
||||
const [registerChildTable] = useTable({
|
||||
pagination: false,
|
||||
canResize: false,
|
||||
showTableSetting: false,
|
||||
});
|
||||
|
||||
provide('getLeftTreeActiveInfo', () => state.leftTreeActiveInfo);
|
||||
|
||||
const getHasBatchBtn = computed(() => {
|
||||
let btnsList =[]
|
||||
btnsList.push('download')
|
||||
btnsList=btnsList.filter(o => hasBtnP('btn_' + o))
|
||||
return !!btnsList.length
|
||||
});
|
||||
|
||||
const getLeftTreeBindValue = computed(() => {
|
||||
const key = +new Date();
|
||||
const data: any = {
|
||||
title: '物料分类',
|
||||
showSearch: true, //异步的时候为false
|
||||
fieldNames: state.treeFieldNames,
|
||||
defaultExpandAll: true, //异步的时候为false
|
||||
treeData: state.leftTreeData,
|
||||
loading: state.leftTreeLoading,
|
||||
key,
|
||||
};
|
||||
return data;
|
||||
});
|
||||
|
||||
const getColumns = computed(() => {
|
||||
const columns = state.complexColumns;
|
||||
return setListValue(state.currentView?.columnList, columns, 'prop');
|
||||
});
|
||||
const getSearchList = computed(() => {
|
||||
const searchSchemas = cloneDeep(state.searchSchemas).map(o => ({ ...o, show: true }));
|
||||
return setListValue(state.currentView?.searchList, searchSchemas, 'field');
|
||||
});
|
||||
const getTableBindValue = computed(() => {
|
||||
let columns = unref(getColumns);
|
||||
const defaultSortConfig= [];
|
||||
const sortField = defaultSortConfig.map(o => (o.sort === 'desc' ? '-' : '') + o.field);
|
||||
const data: any = {
|
||||
pagination: { pageSize: 20 }, //有分页
|
||||
searchInfo: unref(searchInfo),
|
||||
defSort: { sidx: sortField.join(',') },
|
||||
sortFn: (sortInfo: SorterResult | SorterResult[]) => {
|
||||
if (Array.isArray(sortInfo)) {
|
||||
const sortList = sortInfo.map(o => (o.order === 'descend' ? '-' : '') + o.field);
|
||||
return { sidx: sortList.join(',') };
|
||||
} else {
|
||||
const { field, order } = sortInfo;
|
||||
if (field && order) {
|
||||
// 排序字段
|
||||
return { sidx: (order === 'descend' ? '-' : '') + field };
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
},
|
||||
ellipsis:true ,
|
||||
columns,
|
||||
bordered: true,
|
||||
actionColumn: {
|
||||
width: 150,
|
||||
title: t('component.table.action'),
|
||||
dataIndex: 'action',
|
||||
},
|
||||
};
|
||||
if (unref(getHasBatchBtn)) {
|
||||
const rowSelection: any = { type: 'checkbox' };
|
||||
data.rowSelection = rowSelection;
|
||||
}
|
||||
return data;
|
||||
});
|
||||
|
||||
function init() {
|
||||
state.config = {};
|
||||
searchInfo.menuId = route.meta.modelId as string;
|
||||
state.columnList = columnList;
|
||||
setLoading(true);
|
||||
getSearchSchemas();
|
||||
getColumnList();
|
||||
initViewList();
|
||||
// 有左侧树
|
||||
getTreeView(true);
|
||||
}
|
||||
// 有左侧树
|
||||
async function getTreeView(isInit = false) {
|
||||
state.leftTreeLoading = true;
|
||||
state.leftTreeData = [];
|
||||
// 左侧数据字典
|
||||
getDictionaryDataSelector('materialCategory').then(res => {
|
||||
state.leftTreeData = res.data.list;
|
||||
state.leftTreeLoading = false;
|
||||
nextTick(() => {
|
||||
if(isInit){
|
||||
unref(getSearchList)?.length? searchFormSubmit() : reload({ page: 1 });
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function getSearchSchemas() {
|
||||
// 有左侧树,有关联字段
|
||||
if (!state.treeRelationObj) {
|
||||
for (let i = 0; i < superQueryJson.length; i++) {
|
||||
const e = superQueryJson[i];
|
||||
if (e.id === 'material_category') {
|
||||
state.treeRelationObj = { ...e, searchMultiple: false, yunzhupaasKey: e.__config__.yunzhupaasKey };
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const schemas = getSearchFormSchemas(searchList);
|
||||
state.searchSchemas = schemas;
|
||||
schemas.forEach((cur) => {
|
||||
const config = cur.__config__;
|
||||
if (dyOptionsList.includes(config.yunzhupaasKey)) {
|
||||
if (config.dataType === 'dictionary') {
|
||||
if (!config.dictionaryType) return;
|
||||
getDictionaryDataSelector(config.dictionaryType).then((res) => {
|
||||
updateSchema([{ field: cur.field, componentProps: { options: res.data.list } }]);
|
||||
});
|
||||
}
|
||||
if (config.dataType === 'dynamic') {
|
||||
if (!config.propsUrl) return;
|
||||
const query = { paramList: getParamList(config.templateJson) };
|
||||
getDataInterfaceRes(config.propsUrl, query).then((res) => {
|
||||
const data = Array.isArray(res.data) ? res.data : [];
|
||||
updateSchema([{ field: cur.field, componentProps: { options: data } }]);
|
||||
});
|
||||
}
|
||||
}
|
||||
cur.defaultValue = cur.value;
|
||||
});
|
||||
}
|
||||
function getColumnList() {
|
||||
// 没有开启列表权限
|
||||
let columnList = state.columnList;
|
||||
state.exportList = columnList;
|
||||
let columns = columnList.map((o) => ({
|
||||
...o,
|
||||
title: o.labelI18nCode ? t(o.labelI18nCode, o.label) : o.label,
|
||||
dataIndex: o.prop,
|
||||
align: o.align,
|
||||
fixed: o.fixed == 'none' ? false : o.fixed,
|
||||
sorter: o.sortable ? { multiple: 1 } : o.sortable,
|
||||
width: o.width || 100,
|
||||
}));
|
||||
//添加复杂表头
|
||||
columns = getComplexColumns(columns);
|
||||
state.columns = columns.filter((o) => o.prop.indexOf('-') < 0);
|
||||
//子表表头
|
||||
getChildComplexColumns(columns);
|
||||
}
|
||||
|
||||
|
||||
//复杂表头
|
||||
function getComplexColumns(columns) {
|
||||
//这里生成复杂表头的配置
|
||||
let complexHeaderList: any[] = [];
|
||||
if (!complexHeaderList.length) return columns;
|
||||
let childColumns: any[] = [];
|
||||
let firstChildColumns: string[] = [];
|
||||
for (let i = 0; i < complexHeaderList.length; i++) {
|
||||
const e = complexHeaderList[i];
|
||||
e.label = e.fullName;
|
||||
e.labelI18nCode = e.fullNameI18nCode;
|
||||
e.title = e.fullNameI18nCode ? t(e.fullNameI18nCode, e.fullName) : e.fullName;
|
||||
e.align = e.align;
|
||||
e.dataIndex = e.id;
|
||||
e.prop = e.id;
|
||||
e.children = [];
|
||||
e.yunzhupaasKey = 'complexHeader';
|
||||
if (e.childColumns?.length) {
|
||||
childColumns.push(...e.childColumns);
|
||||
for (let k = 0; k < e.childColumns.length; k++) {
|
||||
const item = e.childColumns[k];
|
||||
for (let j = 0; j < columns.length; j++) {
|
||||
const o = columns[j];
|
||||
if (o.prop == item && o.fixed !== 'left' && o.fixed !== 'right') e.children.push({ ...o });
|
||||
}
|
||||
}
|
||||
}
|
||||
if (e.children.length) firstChildColumns.push(e.children[0].prop);
|
||||
}
|
||||
complexHeaderList = complexHeaderList.filter(o => o.children.length);
|
||||
let list: any[] = [];
|
||||
for (let i = 0; i < columns.length; i++) {
|
||||
const e = columns[i];
|
||||
if (!childColumns.includes(e.prop)) {
|
||||
list.push(e);
|
||||
} else {
|
||||
if (firstChildColumns.includes(e.prop)) {
|
||||
const item = complexHeaderList.find(o => o.childColumns.includes(e.prop));
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
//子表表头
|
||||
function getChildComplexColumns(columnList) {
|
||||
let list: any[] = [];
|
||||
for (let i = 0; i < columnList.length; i++) {
|
||||
const e = columnList[i];
|
||||
if (!e.prop.includes('-')) {
|
||||
list.push(e);
|
||||
} else {
|
||||
let prop = e.prop.split('-')[0];
|
||||
let vModel = e.prop.split('-')[1];
|
||||
let label = e.label.split('-')[0];
|
||||
let childLabel = e.label.replace(label + '-', '');
|
||||
if (e.fullNameI18nCode && Array.isArray(e.fullNameI18nCode) && e.fullNameI18nCode[0]) label = t(e.fullNameI18nCode[0], label);
|
||||
let newItem = {
|
||||
align: 'center',
|
||||
yunzhupaasKey: 'table',
|
||||
prop,
|
||||
label,
|
||||
title: label,
|
||||
dataIndex: prop,
|
||||
children: [],
|
||||
};
|
||||
e.dataIndex = vModel;
|
||||
e.title = e.labelI18nCode ? t(e.labelI18nCode, childLabel) : childLabel;
|
||||
if (!state.expandObj.hasOwnProperty(prop+`Expand`)) state.expandObj[prop+`Expand`] = false;
|
||||
if (!list.some((o) => o.prop === prop)) list.push(newItem);
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].prop === prop) {
|
||||
list[i].children.push(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 行内分组展示
|
||||
getMergeList(list);
|
||||
|
||||
state.complexColumns = list;
|
||||
state.childColumnList = list.filter((o) => o.yunzhupaasKey === 'table');
|
||||
|
||||
// 子表分组展示宽度取100
|
||||
for (let i = 0; i < state.childColumnList.length; i++) {
|
||||
const e = state.childColumnList[i];
|
||||
if (e.children?.length) e.children = e.children.map(o => ({ ...o, width: 100 }));
|
||||
}
|
||||
}
|
||||
function getMergeList(list) {
|
||||
list.forEach((item) => {
|
||||
if (item.yunzhupaasKey === 'table' && item.children && item.children.length) {
|
||||
item.children.forEach((child, index) => {
|
||||
if (index == 0) {
|
||||
child.customCell = () => ({
|
||||
rowspan: 1,
|
||||
colspan: item.children.length,
|
||||
class: 'child-table-box',
|
||||
});
|
||||
} else {
|
||||
child.customCell = () => ({
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function toggleExpand(row, field) {
|
||||
row[field] = !row[field];
|
||||
}
|
||||
// 关联表单查看详情
|
||||
function toDetail(modelId, id, propsValue) {
|
||||
if (!id) return;
|
||||
getConfigData(modelId).then((res) => {
|
||||
if (!res.data || !res.data.formData) return;
|
||||
const formConf = JSON.parse(res.data.formData);
|
||||
formConf.popupType = 'general';
|
||||
formConf.hasPrintBtn = false;
|
||||
formConf.customBtns = [];
|
||||
const data = { id, formConf, modelId, propsValue};
|
||||
relationDetailRef.value?.init(data);
|
||||
});
|
||||
}
|
||||
function handleColumnChange(data) {
|
||||
state.columnSettingList = data;
|
||||
}
|
||||
function getTableActions(record): ActionItem[] {
|
||||
return [
|
||||
{
|
||||
label: t('common.editText','编辑') ,
|
||||
onClick: updateHandle.bind(null, record),
|
||||
auth: 'btn_edit', //有按钮权限
|
||||
},
|
||||
{
|
||||
label: t('common.delText','删除') ,
|
||||
color: 'error',
|
||||
modelConfirm: {
|
||||
onOk: handleDelete.bind(null, record.id),
|
||||
},
|
||||
auth: 'btn_remove', //有按钮权限
|
||||
},
|
||||
{
|
||||
label: t('common.detailText','详情') ,
|
||||
onClick: goDetail.bind(null, record),
|
||||
auth: 'btn_detail', //有按钮权限
|
||||
},
|
||||
];
|
||||
}
|
||||
// 编辑
|
||||
function updateHandle(record) {
|
||||
// 不带工作流
|
||||
const data = {
|
||||
id: record.id,
|
||||
menuId: searchInfo.menuId,
|
||||
allList: state.cacheList,
|
||||
};
|
||||
formRef.value?.init(data);
|
||||
}
|
||||
// 删除
|
||||
function handleDelete(id) {
|
||||
const query={ids:[id] }
|
||||
batchDelete(query).then((res) => {
|
||||
createMessage.success(res.msg);
|
||||
clearSelectedRowKeys();
|
||||
reload();
|
||||
});
|
||||
}
|
||||
// 查看详情
|
||||
function goDetail(record) {
|
||||
// 不带流程
|
||||
const data = {
|
||||
id: record.id,
|
||||
};
|
||||
detailRef.value?.init(data);
|
||||
}
|
||||
// 新增
|
||||
function addHandle() {
|
||||
// 不带流程新增
|
||||
const data = {
|
||||
id: '',
|
||||
menuId: searchInfo.menuId,
|
||||
allList: state.cacheList,
|
||||
};
|
||||
formRef.value?.init(data);
|
||||
}
|
||||
// 导出
|
||||
function handleDownload(data) {
|
||||
let query = { ...getFetchParams(), ...data };
|
||||
exportData(query)
|
||||
.then((res) => {
|
||||
setExportModalProps({ confirmLoading: false });
|
||||
if (!res.data.url) return;
|
||||
downloadByUrl({ url: res.data.url });
|
||||
closeExportModal();
|
||||
})
|
||||
.catch(() => {
|
||||
setExportModalProps({ confirmLoading: false });
|
||||
});
|
||||
}
|
||||
function handleLeftTreeSelect(id, _node, nodePath) {
|
||||
if (state.treeActiveId == id) return;
|
||||
state.treeActiveId = id;
|
||||
state.treeActiveNodePath = nodePath;
|
||||
// 有搜索
|
||||
state.resetFromTree = true;
|
||||
resetFields();
|
||||
updateSearchFormValue();
|
||||
}
|
||||
// 高级查询
|
||||
function handleSuperQuery(superQueryJson) {
|
||||
searchInfo.superQueryJson = superQueryJson;
|
||||
reload({ page: 1 });
|
||||
}
|
||||
|
||||
function handleSearchReset() {
|
||||
clearSelectedRowKeys();
|
||||
if (!state.resetFromTree) updateSearchFormValue();
|
||||
if (state.resetFromTree) state.resetFromTree = false;
|
||||
}
|
||||
|
||||
function handleSearchSubmit(data) {
|
||||
clearSelectedRowKeys();
|
||||
let obj = {
|
||||
...defaultSearchInfo,
|
||||
superQueryJson: searchInfo.superQueryJson,
|
||||
...data,
|
||||
};
|
||||
Object.keys(searchInfo).map(key => {
|
||||
delete searchInfo[key];
|
||||
});
|
||||
for (let [key, value] of Object.entries(obj)) {
|
||||
searchInfo[key.replaceAll('-', '_')] = value;
|
||||
}
|
||||
console.log(searchInfo);
|
||||
reload({ page: 1 });
|
||||
}
|
||||
|
||||
function updateSearchFormValue() {
|
||||
if (!state.treeActiveId) return searchFormSubmit();
|
||||
let queryJson: any = {};
|
||||
let leftTreeActiveInfo: any = {};
|
||||
const isMultiple = !state.treeRelationObj ? false : state.treeRelationObj.searchMultiple;
|
||||
//多级左侧树,需要拼父级->转为查询参数
|
||||
if (state.treeRelationObj && state.treeRelationObj.yunzhupaasKey && ['organizeSelect', 'cascader', 'areaSelect'].includes(state.treeRelationObj.yunzhupaasKey)) {
|
||||
let currValue = [];
|
||||
currValue = state.treeActiveNodePath.map(o => o[state.treeFieldNames.key]);
|
||||
queryJson = { 'material_category': isMultiple ? [currValue] : currValue };
|
||||
leftTreeActiveInfo = { 'material_category': state.treeRelationObj.multiple ? [currValue] : currValue };
|
||||
} else {
|
||||
queryJson = { 'material_category': isMultiple ? [state.treeActiveId] : state.treeActiveId };
|
||||
leftTreeActiveInfo = { 'material_category': state.treeRelationObj.multiple ? [state.treeActiveId] : state.treeActiveId };
|
||||
}
|
||||
state.leftTreeActiveInfo = leftTreeActiveInfo;
|
||||
if(unref(getSearchList)?.length){
|
||||
// 有搜索列表
|
||||
setFieldsValue(queryJson);
|
||||
searchFormSubmit();
|
||||
}else{
|
||||
// 无搜索列表
|
||||
handleSearchSubmit(queryJson);
|
||||
}
|
||||
}
|
||||
function initViewList(currentId = '') {
|
||||
const query = {
|
||||
menuId: route.meta.modelId,
|
||||
};
|
||||
getViewList(query).then(res => {
|
||||
const columns : any[]= state.complexColumns;
|
||||
const searchList: any[] = state.searchSchemas.map(o => ({ label: o.label, id: o.field, show: o.show, labelI18nCode: o.labelI18nCode }));
|
||||
const columnList: any[] = columns.map(o => ({ label: o.label, id: o.prop, show: true, fixed: o.fixed || 'none', labelI18nCode: o.labelI18nCode }));
|
||||
state.viewList = (res.data || []).map(o => {
|
||||
if (o.type == 0) return { ...o, searchList, columnList };
|
||||
return { ...o, searchList: o.searchList ? JSON.parse(o.searchList) : [], columnList: o.columnList ? JSON.parse(o.columnList) : [] };
|
||||
});
|
||||
if (currentId) {
|
||||
state.currentView = state.viewList.filter(o => o.id === currentId)[0] || state.viewList[0];
|
||||
} else {
|
||||
state.currentView = state.viewList.filter(o => o.status === 1)[0] || state.viewList[0];
|
||||
}
|
||||
});
|
||||
}
|
||||
function handleViewClick(item) {
|
||||
state.currentView = item;
|
||||
}
|
||||
|
||||
function setListValue(data: any[] = [], defaultData: any[] = [], key) {
|
||||
let list: any[] = [];
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
for (let j = 0; j < defaultData.length; j++) {
|
||||
if (data[i].show && data[i].id == defaultData[j][key]) list.push(defaultData[j]);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init();
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user