123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788 |
- import { useDictionaryStore } from "@/store";
- const { dicts } = useDictionaryStore();
- import dictDataUtil from "@/common/configs/dictDataUtil";
- export const tableConfig = {
- MARTERIAL: {
- url: "/api/v1/base/material",
- column: [
- { label: "物料编码", prop: "materialCode", search: true },
- { label: "物料名称", prop: "materialName", search: true },
- { label: "保质期", prop: "qualityGuaranteePeriod" },
- { label: "物料规格", prop: "spec" },
- {
- label: "物料属性",
- prop: "attributeDictValue",
- search: true,
- filterable: true,
- type: "select",
- dataType: "string",
- dicData: dicts.material_properties,
- props: { label: "dictLabel", value: "dictValue" },
- },
- {
- label: "是否工装",
- prop: "frock",
- filterable: true,
- type: "radio", //类型为单选框
- dicData: [
- {
- label: "否",
- value: 0,
- },
- {
- label: "是",
- value: 1,
- },
- ],
- value: 0,
- },
- {
- label: "质检方案",
- prop: "inspectDictValue",
- search: true,
- filterable: true,
- type: "select",
- dataType: "string",
- dicData: dicts.quality_testing_plan,
- props: { label: "dictLabel", value: "dictValue" },
- },
- {
- label: "物料级别",
- prop: "levelDictValue",
- search: true,
- filterable: true,
- type: "select",
- dataType: "string",
- dicData: dicts.material_level,
- props: { label: "dictLabel", value: "dictValue" },
- },
- {
- label: "封装方法",
- prop: "packageDictValue",
- search: true,
- filterable: true,
- type: "select",
- dataType: "string",
- dicData: dicts.packaging_method,
- props: { label: "dictLabel", value: "dictValue" },
- },
- {
- label: "质量等级",
- prop: "qualityLevelDictValue",
- search: true,
- filterable: true,
- type: "select",
- dataType: "string",
- dicData: dicts.quality_grade,
- props: { label: "dictLabel", value: "dictValue" },
- },
- {
- label: "选用类型",
- prop: "selectionDictValue",
- search: true,
- filterable: true,
- type: "select",
- dataType: "string",
- dicData: dicts.selection_type,
- props: { label: "dictLabel", value: "dictValue" },
- },
- {
- label: "阶段",
- prop: "stageDictValue",
- search: true,
- filterable: true,
- type: "select",
- dataType: "string",
- dicData: dicts.stage,
- props: { label: "dictLabel", value: "dictValue" },
- },
- {
- label: "物料单位",
- prop: "unitDictValue",
- search: true,
- filterable: true,
- type: "select",
- dataType: "string",
- dicData: dicts.danwei_type,
- props: { label: "dictLabel", value: "dictValue" },
- },
- { label: "备注", prop: "remark", type: "textarea" },
- ],
- },
- FACTORY: {
- url: "/api/v1/base/workShop",
- column: [
- {
- label: "车间名称",
- prop: "name",
- search: true,
- },
- {
- label: "车间负责人",
- prop: "manager",
- rules: [
- {
- required: true,
- message: "请选择厂区负责人",
- trigger: "blur",
- },
- ],
- type: "select",
- dicUrl: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/user/list",
- dicMethod: "post",
- props: {
- label: "userName", // 下拉菜单显示的字段
- value: "userName", // 下拉菜单值的字段
- },
- },
- {
- label: "车间位置",
- prop: "position",
- },
- {
- label: "所属工厂",
- prop: "factoryName",
- display: false,
- },
- {
- label: "车间描述",
- prop: "remark",
- },
- {
- label: "创建人",
- prop: "creator",
- display: false,
- },
- {
- label: "创建时间",
- prop: "created",
- display: false,
- },
- ],
- },
- PRODUCTIONLINE: {
- url: "/api/v1/base/productionLine/list",
- column: [
- {
- label: "产线名称",
- prop: "name",
- search: true,
- rules: [
- {
- required: true,
- message: "请填写产线名称",
- trigger: "blur",
- },
- ],
- },
- {
- label: "产线负责人",
- prop: "manager",
- rules: [
- {
- required: true,
- message: "请选择产线负责人",
- trigger: "blur",
- },
- ],
- type: "select",
- dicUrl: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/user/list",
- dicMethod: "post",
- props: {
- label: "userName", // 下拉菜单显示的字段
- value: "userName", // 下拉菜单值的字段
- },
- },
- {
- label: "产线位置",
- prop: "position",
- },
- {
- label: "所属车间",
- prop: "workShopName",
- display: false,
- },
- {
- label: "产线描述",
- prop: "remark",
- },
- {
- label: "创建人",
- prop: "creator",
- display: false,
- },
- {
- label: "创建时间",
- prop: "created",
- display: false,
- },
- ],
- },
- STATION: {
- url: "/api/v1/base/station",
- column: [
- {
- label: "工位编号",
- prop: "stationCode",
- search: true,
- rules: [
- {
- required: true,
- message: "请填写工位编号",
- trigger: "blur",
- },
- ],
- },
- {
- label: "工位名称",
- prop: "name",
- search: true,
- rules: [
- {
- required: true,
- message: "请填写工位名称",
- trigger: "blur",
- },
- ],
- },
- {
- label: "工位类型",
- prop: "stationDictValue",
- search: true,
- rules: [
- {
- required: true,
- message: "请选择工位类型",
- trigger: "blur",
- },
- ],
- type: "select",
- dicData: dicts.station_type,
- searchClearable: false, //可清空的输入框,默认为true
- filterable: true, //添加filterable属性即可启用搜索功能
- props: {
- label: "dictLabel", // 下拉菜单显示的字段
- value: "dictValue", // 下拉菜单值的字段
- },
- },
- {
- label: "工位操作方式",
- prop: "operateDictValue",
- rules: [
- {
- required: true,
- message: "请选择工位方式",
- trigger: "blur",
- },
- ],
- type: "select",
- dicData: dicts.station_operate_type,
- props: {
- label: "dictLabel", // 下拉菜单显示的字段
- value: "dictValue", // 下拉菜单值的字
- },
- },
- {
- label: "工位负责人",
- prop: "manager",
- rules: [
- {
- required: true,
- message: "请选择工位负责人",
- trigger: "blur",
- },
- ],
- type: "select",
- dicUrl: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/user/list",
- dicMethod: "post",
- props: {
- label: "userName", // 下拉菜单显示的字段
- value: "userName", // 下拉菜单值的字段
- },
- },
- {
- label: "所属产线",
- prop: "productionLineName",
- display: false,
- },
- {
- label: "工位地址",
- prop: "position",
- rules: [
- {
- required: true,
- message: "请填写工位地址",
- trigger: "blur",
- },
- ],
- },
- {
- label: "工位IP地址",
- prop: "stationIp",
- rules: [
- {
- required: true,
- message: "请填写工位IP地址",
- trigger: "blur",
- },
- ],
- },
- {
- label: "工位描述",
- prop: "remark",
- type: "textarea",
- span: 24,
- },
- {
- label: "创建人",
- prop: "creator",
- display: false,
- },
- {
- label: "创建时间",
- prop: "created",
- display: false,
- },
- ],
- },
- DEVICE: {
- url: "/api/v1/device",
- column: [
- {
- label: "资产编号",
- prop: "deviceNo",
- search: true,
- rules: [
- {
- required: true,
- message: "设备编号不能为空",
- trigger: "trigger",
- },
- ],
- },
- {
- label: "设备名称",
- prop: "deviceName",
- search: true,
- rules: [
- {
- required: true,
- message: "设备名称不能为空",
- trigger: "trigger",
- },
- ],
- },
- {
- label: "设备类型",
- prop: "deviceType",
- type: "select",
- search: true,
- hide: true,
- dicData: dicts.device_type,
- props: {
- label: "dictLabel",
- value: "dictValue",
- },
- },
- {
- label: "负责人",
- prop: "head",
- },
- {
- label: "存放位置",
- prop: "devicePosition",
- },
- {
- label: "型号",
- prop: "specifications",
- },
- {
- label: "制造厂",
- prop: "brand",
- },
- {
- label: "所属部门",
- prop: "deptId",
- width: 100,
- overHidden: true,
- type: "tree",
- dicUrl: dictDataUtil.dept_tree_url,
- props: {
- label: "deptName",
- value: "id",
- },
- rules: [
- {
- required: true,
- message: "所属部门不能为空",
- trigger: "trigger",
- },
- ],
- },
- {
- label: "设备状态",
- prop: "state",
- type: "select",
- dicData: [
- {
- label: "启用",
- value: "0",
- },
- {
- label: "停用",
- value: "1",
- },
- ],
- },
- ],
- },
- MARTERIAL_BOM: {
- url: "/api/v1/base/materialBom",
- column: [
- {
- label: "物料版本",
- prop: "bomVersion",
- type: "select",
- // search: true, 先选择版本代替了
- },
- {
- label: "物料编码",
- search: true,
- prop: "bomMaterialCode",
- },
- {
- label: "物料编码",
- prop: "materialCode",
- hide: true,
- },
- {
- label: "物料名称",
- prop: "materialName",
- overHidden: true,
- hide: true,
- },
- {
- label: "物料名称",
- prop: "bomMaterialName",
- overHidden: true,
- },
- {
- label: "物料属性",
- prop: "bomMaterialAttribute",
- type: "select",
- dicData: dicts.material_properties,
- props: { label: "dictLabel", value: "dictValue" },
- },
- {
- label: "物料数量",
- prop: "bomMaterialNumber",
- min: 0,
- slot: true,
- cell: true,
- type: "number",
- precision: 2,
- },
- { label: "物料规格", prop: "spec" },
- ],
- },
- OP_CHECK: {
- url: "/api/v1/op/base/check",
- column: [
- {
- label: "点检项名称",
- prop: "checkName",
- span: 12,
- labelWidth: "150",
- search: true,
- editDisabled: true,
- },
- {
- label: "点检项编码",
- prop: "checkCode",
- labelWidth: "150",
- editDisabled: true,
- span: 12,
- search: true,
- },
- {
- label: "内容",
- prop: "content",
- span: 12,
- search: false,
- },
- ],
- },
- ESOP: {
- url: "/api/v1/base/drawing",
- column: [
- {
- label: "图纸编码",
- prop: "drawingCode",
- span: 12,
- labelWidth: "150",
- search: true,
- editDisabled: true,
- },
- {
- label: "标题",
- prop: "drawingTitle",
- labelWidth: "150",
- editDisabled: true,
- span: 12,
- search: false,
- },
- {
- label: "版本号",
- prop: "drawingVersion",
- span: 12,
- search: false,
- },
- /*{
- label: "图纸",
- prop: "drawingPath",
- span: 24,
- display: false,
- slot: true,
- // formatter: (row, column, cellValue, index) => {
- // return `${row.drawingPath}`;
- // },
- }*/
- ],
- },
- USERS: {
- url: "/api/v1/sys/employeeSkill/users",
- column: [
- {
- label: "用户名",
- prop: "userName",
- search: true,
- width: "120",
- },
- {
- label: "员工编码",
- prop: "employeeCode",
- search: true,
- },
- {
- label: "用户id",
- prop: "id",
- hide: true,
- /*display:false,*/
- },
- {
- label: "用户电话",
- prop: "phone",
- search: true,
- },
- {
- label: "部门",
- prop: "deptName",
- overHidden: true,
- disabled: true,
- },
- /*{
- label: "所属机构",
- prop: "deptName",
- filterable: true,
- type: "select",
- width: 100,
- overHidden: true,
- dicUrl: dictDataUtil.dept_list_url,
- dicMethod: "post",
- props: { label: "deptName", value: "id" },
- disabled: true,
- },*/
- ],
- },
- FAULT: {
- url: "/api/v1/process/escalationFault/order",
- column: [
- {
- label: "不合格审理单号",
- prop: "trackingNumber",
- search: true,
- width: 120,
- overHidden: true,
- },
- {
- label: "工单号",
- prop: "workOrderCode",
- width: 120,
- overHidden: true,
- search: true,
- },
- {
- label: "订单号",
- prop: "orderCode",
- width: 120,
- overHidden: true,
- search: true,
- },
- {
- label: "不合格数量",
- prop: "unqualifiedNum",
- width: 100,
- overHidden: true,
- },
- {
- label: "序列号",
- prop: "seqNo",
- overHidden: true,
- },
- {
- label: "报故人",
- prop: "creator",
- width: 100,
- },
- {
- label: "产品编码",
- prop: "materialCode",
- width: 120,
- overHidden: true,
- },
- {
- label: "产品名称",
- prop: "materialName",
- width: 100,
- overHidden: true,
- },
- {
- label: "规格",
- prop: "spec",
- width: 150,
- overHidden: true,
- },
- ],
- },
- ROUTE_COMMON: {
- url: "/api/v1/op/route/common",
- column: [
- {
- label: "工艺编号",
- prop: "processRouteCode",
- search: true,
- width: 150,
- addDisplay: true,
- editDisabled: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: "工艺路线名称不能为空",
- trigger: "blur",
- },
- ],
- },
- {
- label: "工艺名称",
- prop: "processRouteName",
- width: 150,
- search: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: "工艺路线名称不能为空",
- trigger: "blur",
- },
- ],
- },
- {
- label: "工艺类型",
- prop: "processRouteType",
- minWidth: 120,
- search: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: "工艺路线类型不能为空",
- trigger: "change",
- },
- ],
- type: "select",
- dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.routing_type,
- props: {
- label: "dictLabel",
- value: "dictValue",
- },
- },
- {
- label: "启用状态",
- prop: "enabled",
- addDisplay: false,
- // editDisplay: false,
- slot: true,
- width: 100,
- type: "radio",
- dicData: [
- {
- label: "未启用",
- value: 1,
- },
- {
- label: "启用",
- value: 0,
- },
- ],
- value: 0,
- },
- // 只有绑定了工序才可以复制。
- {
- label: "是否可复制",
- prop: "usable2",
- slot: true,
- width: 100,
- search: false,
- filterable: true,
- hide: true,
- addDisplay: false,
- editDisplay: false,
- type: "radio",
- dicData: [
- {
- label: "否",
- value: 0,
- },
- {
- label: "是",
- value: 1,
- },
- ],
- value: 0,
- },
- {
- label: "创建人",
- prop: "creator",
- addDisplay: false,
- editDisplay: false,
- overHidden: true,
- },
- {
- label: "创建时间",
- prop: "created",
- addDisplay: false,
- editDisplay: false,
- width: 150,
- overHidden: true,
- },
- ],
- },
- };
|