diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 9e52eb979..0f0132a20 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -716,7 +716,6 @@ const opensearchTable = ( // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { - debugger if (val == 'edit') { // 编辑 if(props.isOpenSearchTable){ @@ -762,6 +761,7 @@ const submitForm = async (formType, data) => { await props.apiUpdate(data) message.success(t('common.updateSuccess')) } + emit('handleMainFefresh') formRef.value.dialogVisible = false // 刷新当前列表 await getList() @@ -805,6 +805,7 @@ const handleDelete = async (id: number) => { await props.apiDelete(id) tableObject.loading = false message.success(t('common.delSuccess')) + emit('handleMainFefresh') // 刷新列表 await getList() updateKey.value += 1 diff --git a/src/views/mes/dismantlingMain/dismantlingMain.data.ts b/src/views/mes/dismantlingMain/dismantlingMain.data.ts index 7de151710..0df99a562 100644 --- a/src/views/mes/dismantlingMain/dismantlingMain.data.ts +++ b/src/views/mes/dismantlingMain/dismantlingMain.data.ts @@ -143,13 +143,21 @@ export const DismantlingMain = useCrudSchemas(reactive([ }, { label: '工单状态', + field: 'workbillStatus', + sort: 'custom', + dictType: DICT_TYPE.DISMANTLING_MATERIAL_HANDLE_STATUS, + dictClass: 'string', + isSearch: true, + }, + { + label: '是否可用', field: 'status', sort: 'custom', dictType: DICT_TYPE.QUALIFY_STATUS, dictClass: 'string', - isForm: true, - isSearch: true, - isTable: true, + isForm: false, + isSearch: false, + isTable: false, form: { component: 'Switch', value: '2', diff --git a/src/views/mes/dismantlingMain/index.vue b/src/views/mes/dismantlingMain/index.vue index d617b45e1..b41931c64 100644 --- a/src/views/mes/dismantlingMain/index.vue +++ b/src/views/mes/dismantlingMain/index.vue @@ -63,6 +63,7 @@ :detailButtonIsShowAdd="true" :detailButtonIsShowEdit="true" :detailButtonIsShowDelete="true" + @handleMainFefresh="handleMainFefresh" @searchTableSuccessDetail="searchTableSuccessDetail" :key="count" /> @@ -170,9 +171,29 @@ const buttonTableClick = async (val, row) => { } } +let count = ref(0) +const handleMainFefresh = async()=>{ + count.value++; + await getList() +} + /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if(type == "create"){ + DismantlingMain.allSchemas.formSchema.forEach((item) => { + if(item.field == 'workbillStatus'){ + item.value = '2'; + item.componentProps.disabled = true + } + }) + }else{ + DismantlingMain.allSchemas.formSchema.forEach((item) => { + if(item.field == 'workbillStatus'){ + item.componentProps.disabled = true + } + }) + } basicFormRef.value.open(type, row) } diff --git a/src/views/mes/qualityform/index.vue b/src/views/mes/qualityform/index.vue index fafd85101..d8b5c40dd 100644 --- a/src/views/mes/qualityform/index.vue +++ b/src/views/mes/qualityform/index.vue @@ -63,8 +63,7 @@ :detailButtonIsShowAdd="true" :detailButtonIsShowEdit="true" :detailButtonIsShowDelete="true" - @handleDeleteDetail="handleDeleteDetail" - @handleCreateDetail="handleCreateDetail" + @handleMainFefresh="handleMainFefresh" @searchTableSuccessDetail="searchTableSuccessDetail" :key="count" /> @@ -188,15 +187,13 @@ const buttonTableClick = async (val, row) => { handleDelete(row.id) } } -const handleDeleteDetail = async()=>{ - getList() - -} +// const handleDeleteDetail = async()=>{ +// getList() +// } let count = ref(0) -const handleCreateDetail = async()=>{ +const handleMainFefresh = async()=>{ count.value++ getList() - } /** 添加/修改操作 */ const basicFormRef = ref() diff --git a/src/views/qms/aql/aql.data.ts b/src/views/qms/aql/aql.data.ts index 8b04deda5..1a6d29a40 100644 --- a/src/views/qms/aql/aql.data.ts +++ b/src/views/qms/aql/aql.data.ts @@ -64,13 +64,6 @@ export const AqlRules = reactive({ }) const samplingSchemeList = await getSamplingScheme() export const Aql = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isTable: false, - isForm: false, - }, { label: '采样方案编码', field: 'code', diff --git a/src/views/qms/inspectionMethod/inspectionMethod.data.ts b/src/views/qms/inspectionMethod/inspectionMethod.data.ts index efb10478a..c5859f165 100644 --- a/src/views/qms/inspectionMethod/inspectionMethod.data.ts +++ b/src/views/qms/inspectionMethod/inspectionMethod.data.ts @@ -3,18 +3,10 @@ import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const InspectionMethodRules = reactive({ - // available: [required], description: [required], }) export const InspectionMethod = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isTable: false, - isForm: false, - }, { label: '编码', field: 'code', diff --git a/src/views/qms/sampleCode/sampleCode.data.ts b/src/views/qms/sampleCode/sampleCode.data.ts index cfdc96795..986c7848f 100644 --- a/src/views/qms/sampleCode/sampleCode.data.ts +++ b/src/views/qms/sampleCode/sampleCode.data.ts @@ -13,13 +13,6 @@ export const SampleCodeRules = reactive({ }) const samplingSchemeList = await getSamplingScheme() export const SampleCode = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isTable: false, - isForm: false, - }, { label: '采样方案编码', field: 'code', diff --git a/src/views/qms/samplingProcess/samplingProcess.data.ts b/src/views/qms/samplingProcess/samplingProcess.data.ts index 5440362ac..02c4b6b32 100644 --- a/src/views/qms/samplingProcess/samplingProcess.data.ts +++ b/src/views/qms/samplingProcess/samplingProcess.data.ts @@ -5,18 +5,10 @@ import { dateFormatter } from '@/utils/formatTime' export const SamplingProcessRules = reactive({ sampleType: [required], evaluationMode: [required], - // available: [required], description: [required], }) export const SamplingProcess = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isTable: false, - isForm: false, - }, { label: '编码', field: 'code', diff --git a/src/views/qms/samplingScheme/samplingScheme.data.ts b/src/views/qms/samplingScheme/samplingScheme.data.ts index 22150b72b..abd0f5b53 100644 --- a/src/views/qms/samplingScheme/samplingScheme.data.ts +++ b/src/views/qms/samplingScheme/samplingScheme.data.ts @@ -3,18 +3,10 @@ import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const SamplingSchemeRules = reactive({ - // available: [required], description: [required], }) export const SamplingScheme = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isTable: false, - isForm: false, - }, { label: '编码', field: 'code', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index c1aba1df6..9e86245c7 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -125,8 +125,6 @@ if(formField == 'supplierCode'){ setV['supplierCode'] = val[0]['code'] - setV['contacts'] = val[0]['contacts'] - setV['phone'] = val[0]['phone'] await PurchasePlanMainApi.queryPurchasePlan(val[0]['code']).then(res => { let beginTime = res.beginTime var ms = beginTime.substring(0, 2) @@ -136,6 +134,8 @@ var ms = endTime.substring(0, 2) var me = endTime.substring(3) setV['endTime'] = new Date(2024, 1, 1, Number(ms), Number(me)) + setV['contacts'] = res.contacts + setV['phone'] = res.phone }) tableData.value = [] }