Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
yufei0306 6 months ago
parent
commit
3fd0b41afa
  1. 4
      src/views/mes/holiday/holiday.data.ts
  2. 4
      src/views/mes/item/index.vue
  3. 57
      src/views/mes/item/item.data.ts
  4. 31
      src/views/mes/qualityclass/qualityclass.data.ts
  5. 21
      src/views/mes/qualitygroup/qualitygroup.data.ts
  6. 4
      src/views/mes/workstation/workstation.data.ts

4
src/views/mes/holiday/holiday.data.ts

@ -89,7 +89,7 @@ export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
label: '状态', label: '状态',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QUALIFY_STATUS, dictType: DICT_TYPE.COMMON_STATUS,
dictClass: 'string', dictClass: 'string',
isForm: true, isForm: true,
isSearch: false, isSearch: false,
@ -98,7 +98,7 @@ export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Switch', component: 'Switch',
value: '1', value: '1',
componentProps: { componentProps: {
inactiveValue: '2', inactiveValue: '0',
activeValue: '1' activeValue: '1'
} }
}, },

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

@ -81,7 +81,11 @@ const tableColumns = ref(Item.allSchemas.tableColumns)
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
console.log("item-search-success-84-val",val)
console.log("item-search-success-84-formField",formField)
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
setV["itemType"] = val[0]["groupCode"]
//setV[] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }

57
src/views/mes/item/item.data.ts

@ -1,14 +1,15 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as QualitygroupApi from '@/api/mes/qualitygroup' import * as QualityclassApi from '@/api/mes/qualityclass'
import { Qualitygroup } from '../qualitygroup/qualitygroup.data' import { Qualityclass } from '@/views/mes/qualityclass/qualityclass.data'
// import * as QualitygroupApi from '@/api/mes/qualitygroup'
// import { Qualitygroup } from '@/views/mes/qualitygroup/qualitygroup.data'
// 表单校验 // 表单校验
export const ItemRules = reactive({ export const ItemRules = reactive({
concurrencyStamp: [required], itemCode: [{ required: true, message: '请输入项目编码', trigger: 'blur' }],
itemCode: [{ required: true, message: '请输入编码', trigger: 'blur' }], itemName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
itemType: [required], qmsClass: [{ required: true, message: '请选择一个质检类别', trigger: 'blur' }],
dataType: [required] dataType:[{ required: true, message: '请选择一个数据类型!', trigger: 'blur' }],
}) })
export const Item = useCrudSchemas(reactive<CrudSchema[]>([ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
@ -111,19 +112,40 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
// {
// label: '分组编码',
// field: 'itemType',
// sort: 'custom',
// isSearch: true,
// // form: {
// // componentProps: {
// // isSearchList: true, // 开启查询弹窗
// // searchTitle: '质检分组', // 查询弹窗标题
// // searchListPlaceholder: '请选择质检分组', // 输入框占位文本
// // searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类
// // searchField: 'code', // 查询弹窗赋值字段
// // searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法
// // searchCondition: [{
// // key: 'status',
// // value: '1',
// // action: '=='
// // }]
// // }
// // }
// },
{ {
label: '类别编码', label: '质检科目编码',
field: 'itemType', field: 'qmsClass',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: { form: {
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchTitle: '质检科目信息', // 查询弹窗标题 searchTitle: '质检分组', // 查询弹窗标题
searchListPlaceholder: '请选择 类别编码', // 输入框占位文本 searchListPlaceholder: '请选择质检分组', // 输入框占位文本
searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类 searchAllSchemas: Qualityclass.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法 searchPage: QualityclassApi.getQualityclassPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'status', key: 'status',
value: '1', value: '1',
@ -132,13 +154,6 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '质检科目编码',
field: 'qmsClass',
sort: 'custom',
isSearch: true,
},
{ {
label: '数据类型', label: '数据类型',
field: 'dataType', field: 'dataType',
@ -187,7 +202,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
isForm: true, isForm: true,
form: { form: {
component: 'Switch', component: 'Switch',
value: '2', value: '1',
componentProps: { componentProps: {
inactiveValue: '2', inactiveValue: '2',
activeValue: '1' activeValue: '1'

31
src/views/mes/qualityclass/qualityclass.data.ts

@ -1,11 +1,13 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as QualitygroupApi from '@/api/mes/qualitygroup'
import { Qualitygroup } from '@/views/mes/qualitygroup/qualitygroup.data'
// 表单校验 // 表单校验
export const QualityclassRules = reactive({ export const QualityclassRules = reactive({
concurrencyStamp: [required],
code: [{ required: true, message: '请输入代码', trigger: 'blur' }], code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
name: [required], name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
groupCode: [{ required: true, message: '请选择一个分组', trigger: 'blur' }],
}) })
export const Qualityclass = useCrudSchemas(reactive<CrudSchema[]>([ export const Qualityclass = useCrudSchemas(reactive<CrudSchema[]>([
@ -108,10 +110,27 @@ export const Qualityclass = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
}, },
{ {
label: '分组类别', label: '分组',
field: 'groupCode', field: 'groupCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择一个分组', // 输入框占位文本
multiple:false,
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '分组编码', // 查询弹窗标题
searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类
searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'status',
value: '1',
isMainValue: false
}]
}
}
}, },
{ {
label: '状态', label: '状态',
@ -124,7 +143,7 @@ export const Qualityclass = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true, isTable: true,
form: { form: {
component: 'Switch', component: 'Switch',
value: '2', value: '1',
componentProps: { componentProps: {
inactiveValue: '2', inactiveValue: '2',
activeValue: '1' activeValue: '1'

21
src/views/mes/qualitygroup/qualitygroup.data.ts

@ -3,9 +3,8 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const QualitygroupRules = reactive({ export const QualitygroupRules = reactive({
concurrencyStamp: [required], code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
code: [required], name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
name: [required],
}) })
export const Qualitygroup = useCrudSchemas(reactive<CrudSchema[]>([ export const Qualitygroup = useCrudSchemas(reactive<CrudSchema[]>([
@ -102,17 +101,17 @@ export const Qualitygroup = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
}, },
{ {
label: '编码名称', label: '分组名称',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ // {
label: '分组类别', // label: '分组类别',
field: 'groupCode', // field: 'groupCode',
sort: 'custom', // sort: 'custom',
isSearch: true, // isSearch: true,
}, // },
{ {
label: '状态', label: '状态',
field: 'status', field: 'status',
@ -124,7 +123,7 @@ export const Qualitygroup = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true, isTable: true,
form: { form: {
component: 'Switch', component: 'Switch',
value: '2', value: '1',
componentProps: { componentProps: {
inactiveValue: '2', inactiveValue: '2',
activeValue: '1' activeValue: '1'

4
src/views/mes/workstation/workstation.data.ts

@ -319,8 +319,8 @@ export const abilityPopList = useCrudSchemas(reactive<CrudSchema[]>([
searchAllSchemas: AbilityInfo.allSchemas, // 查询弹窗所需类 searchAllSchemas: AbilityInfo.allSchemas, // 查询弹窗所需类
searchPage: AbilityInfoApi.getAbilityInfoPage, // 查询弹窗所需分页方法 searchPage: AbilityInfoApi.getAbilityInfoPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'status',
value: 'TRUE', value: '1',
isMainValue: false isMainValue: false
}] }]
} }

Loading…
Cancel
Save