Browse Source

生产工单 刷新问题bug修复

master_hella_20240701
TengXF 6 months ago
parent
commit
47b9c5b3d2
  1. 33
      src/views/mes/orderDay/components/schedule.vue
  2. 38
      src/views/mes/orderDay/index.vue
  3. 3
      src/views/mes/orderDay/orderDay.data.ts

33
src/views/mes/orderDay/components/schedule.vue

@ -201,7 +201,7 @@
</el-dialog>
</ContentWrap>
<template #footer>
<el-button @click="handleClose" >关闭</el-button>
<el-button @click="handleClose('dddddd')" >关闭</el-button>
<el-button type="primary" @click="publishPlan" >发布计划</el-button>
</template>
<SearchTable ref="searchTableRef" @search-table-success="searchTableSuccess" />
@ -471,18 +471,21 @@ const opensearchTable = (
)
}
const handleClose=()=>{
dialogVisible.value = false,
emit('close')
const handleClose=(val)=>{
dialogVisible.value = false
emit('close',val)
}
const publishPlan=()=>{
message.confirm("确认发布当前计划?","question").then(async () => {
message.confirm("确认发布当前计划?","提示").then( () => {
//isPublish.value=true
//loading.value = true,
try{formLoading.value=true
doPublishPlan() }finally{
try{
formLoading.value=true
let promise = doPublishPlan();
handleClose(promise)
}finally{
formLoading.value=false;
handleClose()
}
}).catch(() => {
@ -517,12 +520,14 @@ const doPublishPlan= ()=>{
let res = OrderDayApi.publishPlan(data)
res.then(()=>{
message.success("计划发布成功")
}).catch(()=>{
//console.log("---doPublishPlan-- 458--",res.msg)
message.error("计划发布失败!")
})
return res
// res.then(()=>{
// message.success("")
// }).catch(()=>{
// //console.log("---doPublishPlan-- 458--",res.msg)
// message.error("")
// })
}

38
src/views/mes/orderDay/index.vue

@ -199,9 +199,11 @@ const buttonBaseClick = (val, item) => {
console.log('其他按钮', item)
}
}
const publishClosed=()=>{
//console.log('orderday-publishClosed-200')
getList()
const publishClosed=(val)=>{
console.log('orderday-publishClosed-200',val)
nextTick?.(()=>{
getList()
})
}
//
@ -270,23 +272,22 @@ const openForm = (type: string, row?: any) => {
const formsSuccess = async (formType,data) => {
if (formType === 'create') {
let ret= OrderDayApi.createOrderDay(data)
if(ret===undefined || ret===null){
message.error(t('common.networkError'))
}else{
message.success(t('common.createSuccess'))
}
await OrderDayApi.createOrderDay(data)
// if(ret===undefined || ret===null){
// message.error(t('common.networkError'))
// }else{
// message.success(t('common.createSuccess'))
// }
} else {
let ret= OrderDayApi.updateOrderDay(data)
if(ret.code==0){
message.success(t('common.updateSuccess'))
}else{
message.error(t('common.networkError'))
}
await OrderDayApi.updateOrderDay(data)
// if(ret.code==0){
// message.success(t('common.updateSuccess'))
// }else{
// message.error(t('common.networkError'))
// }
}
basicFormRef.value.dialogVisible = false
await getList()
}
@ -336,8 +337,9 @@ const handleExport = async () => {
exportLoading.value = false
}
}
const stopPlan = (id) => {
OrderDayApi.stopPlan(id)
const stopPlan = async (id) => {
await OrderDayApi.stopPlan(id)
getList()
}
/** 导入 */

3
src/views/mes/orderDay/orderDay.data.ts

@ -49,6 +49,7 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
field: 'id',
sort: 'custom',
isForm: false,
isTable: false,
width: '60px',
},
{
@ -365,7 +366,7 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark',
sort: 'custom',
isSearch: false,
isTable:false,
// isTable:false,
},
{
label: '操作',

Loading…
Cancel
Save