Browse Source

默认开关关闭状态

master_hella_20240701
TengXF 6 months ago
parent
commit
0fbad131d3
  1. 35
      src/views/mes/item/index.vue

35
src/views/mes/item/index.vue

@ -152,7 +152,7 @@ const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
if(type == "update"){ if(type == "update"){
Item.allSchemas.formSchema.forEach((item) => { Item.allSchemas.formSchema.forEach((item) => {
if (item.field == 'itemCode') { if (item.field == 'itemCode') {
item.componentProps.disabled = true item.componentProps.disabled = true
} }
@ -168,7 +168,7 @@ const openForm = (type: string, row?: any) => {
item.componentProps.disabled = false item.componentProps.disabled = false
} }
} }
if(row.dataType == 'SWITCH'){ if(row.dataType == 'SWITCH'){
if (item.field == 'dataVerify') { if (item.field == 'dataVerify') {
item.componentProps.disabled = true item.componentProps.disabled = true
@ -177,7 +177,7 @@ const openForm = (type: string, row?: any) => {
item.componentProps.disabled = true item.componentProps.disabled = true
} }
} }
if(row.dataType == 'TEXT'){ if(row.dataType == 'TEXT'){
if (item.field == 'dataVerify') { if (item.field == 'dataVerify') {
item.componentProps.disabled = true item.componentProps.disabled = true
@ -186,8 +186,8 @@ const openForm = (type: string, row?: any) => {
item.componentProps.disabled = true item.componentProps.disabled = true
} }
} }
}) })
}else{ }else{
Item.allSchemas.formSchema.forEach((item) => { Item.allSchemas.formSchema.forEach((item) => {
if (item.field == 'itemCode') { if (item.field == 'itemCode') {
@ -202,9 +202,12 @@ const openForm = (type: string, row?: any) => {
if (item.field == 'dataStandvalue') { if (item.field == 'dataStandvalue') {
item.componentProps.disabled = false item.componentProps.disabled = false
} }
if (item.field == 'status') {
item.componentProps.disabled = true
}
}) })
} }
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
@ -293,9 +296,9 @@ const searchFormClick = (searchData) => {
// //
const onChangeQG = (field, cur, item) => { const onChangeQG = (field, cur, item) => {
console.log('cur'+cur) console.log('cur'+cur)
Item.allSchemas.formSchema.forEach((item) => { Item.allSchemas.formSchema.forEach((item) => {
if(cur == 'SWITCH'){ if(cur == 'SWITCH'){
if (item.field == 'dataVerify') { if (item.field == 'dataVerify') {
@ -306,8 +309,8 @@ const onChangeQG = (field, cur, item) => {
} }
if (item.field == 'status') { if (item.field == 'status') {
item.componentProps.disabled = false item.componentProps.disabled = false
} }
} }
if(cur == 'TEXT'){ if(cur == 'TEXT'){
if (item.field == 'dataVerify') { if (item.field == 'dataVerify') {
item.componentProps.disabled = true item.componentProps.disabled = true
@ -317,7 +320,7 @@ const onChangeQG = (field, cur, item) => {
} }
if (item.field == 'status') { if (item.field == 'status') {
item.componentProps.disabled = true item.componentProps.disabled = true
} }
} }
if(cur == 'NUMBER'){ if(cur == 'NUMBER'){
if (item.field == 'dataVerify') { if (item.field == 'dataVerify') {
@ -328,13 +331,13 @@ const onChangeQG = (field, cur, item) => {
} }
if (item.field == 'status') { if (item.field == 'status') {
item.componentProps.disabled = true item.componentProps.disabled = true
} }
} }
}) })
} }
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {

Loading…
Cancel
Save