Browse Source

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

master_hella_20240701
gaojs 5 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) => {
debugger
if (val == 'edit') {
//
if(props.isOpenSearchTable){
@ -759,6 +758,7 @@ const submitForm = async (formType, data) => {
await props.apiUpdate(data)
message.success(t('common.updateSuccess'))
}
emit('handleMainFefresh')
formRef.value.dialogVisible = false
//
await getList()
@ -802,6 +802,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

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

@ -143,13 +143,21 @@ export const DismantlingMain = useCrudSchemas(reactive<CrudSchema[]>([
},
{
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',

21
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)
}

13
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()

Loading…
Cancel
Save