Browse Source

报废拆解工单主子工单联动刷新状态

master_hella_20240701
gaojs 7 months ago
parent
commit
9289aa81fa
  1. 3
      src/components/Detail/src/Detail.vue
  2. 14
      src/views/mes/dismantlingMain/dismantlingMain.data.ts
  3. 21
      src/views/mes/dismantlingMain/index.vue
  4. 13
      src/views/mes/qualityform/index.vue

3
src/components/Detail/src/Detail.vue

@ -713,7 +713,6 @@ const opensearchTable = (
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
debugger
if (val == 'edit') { if (val == 'edit') {
// //
if(props.isOpenSearchTable){ if(props.isOpenSearchTable){
@ -759,6 +758,7 @@ const submitForm = async (formType, data) => {
await props.apiUpdate(data) await props.apiUpdate(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
emit('handleMainFefresh')
formRef.value.dialogVisible = false formRef.value.dialogVisible = false
// //
await getList() await getList()
@ -802,6 +802,7 @@ const handleDelete = async (id: number) => {
await props.apiDelete(id) await props.apiDelete(id)
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
emit('handleMainFefresh')
// //
await getList() await getList()
updateKey.value += 1 updateKey.value += 1

14
src/views/mes/dismantlingMain/dismantlingMain.data.ts

@ -143,13 +143,21 @@ export const DismantlingMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '工单状态', label: '工单状态',
field: 'workbillStatus',
sort: 'custom',
dictType: DICT_TYPE.DISMANTLING_MATERIAL_HANDLE_STATUS,
dictClass: 'string',
isSearch: true,
},
{
label: '是否可用',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QUALIFY_STATUS, dictType: DICT_TYPE.QUALIFY_STATUS,
dictClass: 'string', dictClass: 'string',
isForm: true, isForm: false,
isSearch: true, isSearch: false,
isTable: true, isTable: false,
form: { form: {
component: 'Switch', component: 'Switch',
value: '2', value: '2',

21
src/views/mes/dismantlingMain/index.vue

@ -63,6 +63,7 @@
:detailButtonIsShowAdd="true" :detailButtonIsShowAdd="true"
:detailButtonIsShowEdit="true" :detailButtonIsShowEdit="true"
:detailButtonIsShowDelete="true" :detailButtonIsShowDelete="true"
@handleMainFefresh="handleMainFefresh"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:key="count" :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 basicFormRef = ref()
const openForm = (type: string, row?: any) => { 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) basicFormRef.value.open(type, row)
} }

13
src/views/mes/qualityform/index.vue

@ -63,8 +63,7 @@
:detailButtonIsShowAdd="true" :detailButtonIsShowAdd="true"
:detailButtonIsShowEdit="true" :detailButtonIsShowEdit="true"
:detailButtonIsShowDelete="true" :detailButtonIsShowDelete="true"
@handleDeleteDetail="handleDeleteDetail" @handleMainFefresh="handleMainFefresh"
@handleCreateDetail="handleCreateDetail"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:key="count" :key="count"
/> />
@ -188,15 +187,13 @@ const buttonTableClick = async (val, row) => {
handleDelete(row.id) handleDelete(row.id)
} }
} }
const handleDeleteDetail = async()=>{ // const handleDeleteDetail = async()=>{
getList() // getList()
// }
}
let count = ref(0) let count = ref(0)
const handleCreateDetail = async()=>{ const handleMainFefresh = async()=>{
count.value++ count.value++
getList() getList()
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()

Loading…
Cancel
Save