Browse Source

BUG修改

hella_online_20240816
parent
commit
37333b4ce9
  1. 26
      src/views/qms/inspectionQ3/index.vue
  2. 36
      src/views/qms/inspectionQ3/inspectionQ3.data.ts

26
src/views/qms/inspectionQ3/index.vue

@ -71,7 +71,6 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@inputNumberChange="inputNumberChange" @inputNumberChange="inputNumberChange"
@clearSearchInput="onChange"
:sumFormDataByTableCustom=" :sumFormDataByTableCustom="
(formRef, formModel, tableData) => { (formRef, formModel, tableData) => {
tableData.forEach((item) => { tableData.forEach((item) => {
@ -360,26 +359,15 @@ const handleFinish = async (id: number) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm = async (type: string, row?: any) => { const openForm = async (type: string, row?: any) => {
tableData.value = [] // formRef.value.open(type, row)
// if (type == 'create') {
if (type == 'update') { nextTick(() => {
// tableform formRef.value.formRef.setValues({
InspectionQ3Main.allSchemas.formSchema.map((itemColumns) => { handleTime: new Date().getTime(),
if (itemColumns.field == 'workshopCode') { priority: '3'
itemColumns.componentProps.isSearchList = false
itemColumns.componentProps.disabled = true
}
}) })
} else {
// tableform
InspectionQ3Main.allSchemas.formSchema.map((itemColumns) => {
if (itemColumns.field == 'workshopCode') {
itemColumns.componentProps.isSearchList = true
itemColumns.componentProps.disabled = false
}
}) })
} }
formRef.value.open(type, row)
} }
// //
@ -391,7 +379,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
.get(CACHE_KEY.DEPT) .get(CACHE_KEY.DEPT)
.find((account) => account.id == row.departmentCode)?.name .find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue, 'requestIssueMain') detailRef.value.openDetail(row, titleName, titleValue, 'inspectionQ3Main')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */

36
src/views/qms/inspectionQ3/inspectionQ3.data.ts

@ -10,7 +10,6 @@ import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/item
import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre' import * as QadCostcentreApi from '@/api/wms/qadCostcentre'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
@ -115,7 +114,7 @@ export const InspectionQ3Main = useCrudSchemas(
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY, dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: false, isTable: true,
tableForm: { tableForm: {
type: 'Select' type: 'Select'
} }
@ -153,7 +152,8 @@ export const InspectionQ3Main = useCrudSchemas(
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 0, min: 0,
precision: 6 precision: 6,
disabled: true
} }
} }
}, },
@ -208,7 +208,7 @@ export const InspectionQ3Main = useCrudSchemas(
field: 'costCode', field: 'costCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false, isTable: true,
isForm: false, isForm: false,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
@ -245,8 +245,17 @@ export const InspectionQ3Main = useCrudSchemas(
label: '缺陷编码', label: '缺陷编码',
field: 'defectCode', field: 'defectCode',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QMS_Q3_CODE,
dictClass: 'string',
isSearch: false, isSearch: false,
isForm: false isForm: false,
isTable: true,
table: {
width: 180
},
tableForm: {
type: 'Select'
}
}, },
{ {
label: '缺陷位置', label: '缺陷位置',
@ -360,15 +369,9 @@ export const InspectionQ3Main = useCrudSchemas(
) )
export const InspectionQ3MainRules = reactive({ export const InspectionQ3MainRules = reactive({
workshopCode: [{ required: true, message: '请选择车间代码', trigger: 'change' }], priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
productionLineCode: [{ required: true, message: '请选择生产线代码', trigger: 'change' }], handleTime: [{ required: true, message: '请选择处理时间', trigger: 'change' }],
// fromWarehouseCode: [ desc: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }]
// { required: true, message: '请选择从仓库代码', trigger: 'change' }
// ],
// dueTime: [
// { required: true, message: '请选择截止时间', trigger: 'change' }
// ],
remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }]
}) })
/** /**
@ -389,6 +392,7 @@ export const InspectionQ3Detail = useCrudSchemas(
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
isDetail: true,
isSearch: false, isSearch: false,
table: { table: {
width: 150 width: 150
@ -553,7 +557,7 @@ export const InspectionQ3Detail = useCrudSchemas(
dictType: DICT_TYPE.QMS_Q3_CODE, dictType: DICT_TYPE.QMS_Q3_CODE,
dictClass: 'string', dictClass: 'string',
isSearch: true, isSearch: true,
isTable: true, isTable: false,
tableForm: { tableForm: {
type: 'Select' type: 'Select'
} }
@ -580,7 +584,6 @@ export const InspectionQ3Detail = useCrudSchemas(
type: 'Select', type: 'Select',
valueField: 'productionLineName', valueField: 'productionLineName',
labelField: 'productionLineCode' labelField: 'productionLineCode'
} }
}, },
{ {
@ -596,6 +599,7 @@ export const InspectionQ3Detail = useCrudSchemas(
{ {
label: '问题原因', label: '问题原因',
field: 'problemReason', field: 'problemReason',
hiddenInMain: true,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false, isTable: false,

Loading…
Cancel
Save