祖安之光
2025-11-27 0190c057e1d818b580ac7977b14b967fea231cd9
src/views/work/qualityManage/productAndServe/processInspecte/components/editDialog.vue
@@ -83,7 +83,8 @@
    format: '',
    companyId: null,
    deptId:null,
    type: 1
    type: 1,
    itemId: null
  },
  formRules:{
    companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }],
@@ -105,13 +106,14 @@
});
const openDialog = async (type, value,companyId, isAdmin, companyList) => {
const openDialog = async (type, value,companyId, isAdmin, companyList,itemId) => {
  state.isAdmin = isAdmin
  if(isAdmin){
    state.companyList = companyList
  }
  state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看'
  state.form.companyId = companyId
  state.form.itemId = itemId
  if(state.title == '编辑'||state.title == '查看'){
    Object.keys(state.form).forEach(key => {
      if (key in value) {
@@ -125,6 +127,7 @@
      }
      state.fileList = [obj]
    }
    state.form.itemId = state.form.itemId == 0 ? null : state.form.itemId
  }
  await getDeptList()
  dialogVisible.value = true
@@ -229,7 +232,8 @@
    format: '',
    companyId: null,
    deptId:null,
    type: 1
    type: 1,
    itemId: null
  }
  state.fileList = []
  superRef.value.clearValidate();