From edf5c654d135e3df15fe743fdb2c96e518155109 Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Tue, 21 Nov 2023 08:48:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/spc/itembasic/index.vue | 1 + src/views/spc/itembasic/itembasic.data.ts | 154 ++-------------------- 2 files changed, 15 insertions(+), 140 deletions(-) diff --git a/src/views/spc/itembasic/index.vue b/src/views/spc/itembasic/index.vue index 92cfd25..61f85c0 100644 --- a/src/views/spc/itembasic/index.vue +++ b/src/views/spc/itembasic/index.vue @@ -140,6 +140,7 @@ const butttondata = [ const buttonTableClick = async (val, row) => { console.info(row) if (val == 'edit') { // 编辑 + console.info("编辑",row) openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) diff --git a/src/views/spc/itembasic/itembasic.data.ts b/src/views/spc/itembasic/itembasic.data.ts index 75570cd..538e6f8 100644 --- a/src/views/spc/itembasic/itembasic.data.ts +++ b/src/views/spc/itembasic/itembasic.data.ts @@ -54,10 +54,11 @@ export const Itembasic = useCrudSchemas(reactive([ }, }, { - label: '名称', + label: '物料名称', field: 'name', sort: 'custom', isSearch: true, + isTable:true, }, { label: '颜色', @@ -66,86 +67,19 @@ export const Itembasic = useCrudSchemas(reactive([ dictType: DICT_TYPE.ITEM_COLOR, dictClass: 'string', isTable: true, - // table: { - // width: 100 - // } , + table: { + width: 100 + } , - form: { - component: 'Select', - componentProps: { - // inactiveValue: 'DISABLE', - // activeValue: 'ENABLE', - } - }, + // form: { + // component: 'Select', + // componentProps: { + // // inactiveValue: 'DISABLE', + // // activeValue: 'ENABLE', + // } + // }, }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: true, - table: { - width: 120 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, -}, - // { - // label: '生效时间', - // field: 'activeTime', - // sort: 'custom', - // isTable: true, - // formatter: dateFormatter, - // detail: { - // dateFormat: 'YYYY-MM-DD HH:mm:ss' - // }, - // table: { - // width: 180 - // } , - // form: { - // component: 'DatePicker', - // componentProps: { - // style: {width:'100%'}, - // type: 'datetime', - // dateFormat: 'YYYY-MM-DD HH:mm:ss', - // valueFormat: 'x', - // } - // }, - // // tableForm:{ - // // width: 200, - // // type:'FormDateTime', - // // } - // }, - // { - // label: '失效时间', - // field: 'expireTime', - // sort: 'custom', - // isTable: true, - // formatter: dateFormatter, - // detail: { - // dateFormat: 'YYYY-MM-DD HH:mm:ss' - // }, - // table: { - // width: 180 - // } , - // form: { - // component: 'DatePicker', - // componentProps: { - // style: {width:'100%'}, - // type: 'datetime', - // dateFormat: 'YYYY-MM-DD HH:mm:ss', - // valueFormat: 'x', - // } - // }, - // }, { label: '创建时间', field: 'createTime', @@ -190,73 +124,13 @@ export const Itembasic = useCrudSchemas(reactive([ // 表单校验 export const rules = reactive({ code: [ - { required: true, message: '请输入代码', trigger: 'blur' } + { required: true, message: '请输入物料', trigger: 'blur' } ], name: [ - { required: true, message: '请输入名称', trigger: 'blur' } + { required: true, message: '请输入物料', trigger: 'blur' } ], projcetCode: [ { required: true, message: '请选择项目编码', trigger: 'change' } ], - // uom: [ - // { required: true, message: '请选择计量单位', trigger: 'change' } - // ], - // altUom: [ - // { required: true, message: '请选择替代计量单位', trigger: 'change' } - // ], - // isStdPack: [ - // { required: true, message: '请选择是否标包', trigger: 'change' } - // ], - // enableBuy: [ - // { required: true, message: '请选择是否可采购', trigger: 'change' } - // ], - // enableMake: [ - // { required: true, message: '请选择是否可制造', trigger: 'change' } - // ], - // enableOutsourcing: [ - // { required: true, message: '请选择是否可委外加工', trigger: 'change' } - // ], - // isRecycled: [ - // { required: true, message: '请选择回收件', trigger: 'change' } - // ], - // isPhantom: [ - // { required: true, message: '请选择虚零件', trigger: 'change' } - // ], - // abcClass: [ - // { required: true, message: '请选择ABC类', trigger: 'change' } - // ], - // type: [ - // { required: true, message: '请选择类型', trigger: 'change' } - // ], - // category: [ - // { required: true, message: '请选择种类', trigger: 'change' } - // ], - // itemGroup: [ - // { required: true, message: '请选择分组', trigger: 'change' } - // ], - // color: [ - // { required: true, message: '请选择颜色', trigger: 'change' } - // ], - // configuration: [ - // { required: true, message: '请选择配置', trigger: 'change' } - // ], - // project: [ - // { required: true, message: '请输入项目', trigger: 'blur' } - // ], - // eqLevel: [ - // { required: true, message: '请选择质量等级', trigger: 'change' } - // ], - // validityDays: [ - // { required: true, message: '请输入有效天数', trigger: 'change' } - // ], - // available: [ - // { required: true, message: '请选择是否可用', trigger: 'change' } - // ], - // activeTime: [ - // { required: true, message: '请输入生效时间', trigger: 'change' } - // ], - // expireTime: [ - // { required: true, message: '请输入失效时间', trigger: 'change' } - }) \ No newline at end of file