diff --git a/src/views/mes/orderDay/components/schedule.vue b/src/views/mes/orderDay/components/schedule.vue
index 9ac9b269e..eccbefcd7 100644
--- a/src/views/mes/orderDay/components/schedule.vue
+++ b/src/views/mes/orderDay/components/schedule.vue
@@ -201,7 +201,7 @@
- 关闭
+ 关闭
发布计划
@@ -471,20 +471,23 @@ 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(() => {
message.info("已取消发布")
})
@@ -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("计划发布失败!")
+ // })
}
diff --git a/src/views/mes/orderDay/index.vue b/src/views/mes/orderDay/index.vue
index edcb14390..98a405c6f 100644
--- a/src/views/mes/orderDay/index.vue
+++ b/src/views/mes/orderDay/index.vue
@@ -57,7 +57,7 @@
:isBusiness="false"
:isSearchFilterButtonHide="true"
@onChange="valueChange"
-
+
/>
@@ -142,7 +142,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
if(formField=='workroomCode'){
getProductlines(val[0][searchField])
}
-
+
})
}
@@ -156,9 +156,9 @@ const valueChange=(filed,cur)=>{
//item.componentProps.required = cur==='ENABLE'?false:true
}
})
-
+
}
-
+
}
// 字段设置 更新主列表字段
@@ -199,10 +199,12 @@ 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()
+ })
+
}
// 根据状态返回该按钮是否显示
const isShowMainButton = (row,val) => {
@@ -227,7 +229,7 @@ const butttondata = (row) => {
type: 'warning',
icon: '',
color: '',
- hasPermi: 'mes:orderDay:update'}), //
+ hasPermi: 'mes:orderDay:update'}), //
// defaultButtons.mainListHandleBtn({label: '发布',
// name: 'publish',
// hide: isShowMainButton(row,['2']),
@@ -268,25 +270,24 @@ const openForm = (type: string, row?: any) => {
// form表单提交
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()
}
@@ -301,7 +302,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
//console.log('orderDay-openDetail-303',row)
sDetailRef.value.open(row, titleName)
}
-
+
}
/** 发布操作 */
const scheduleDetailRef = ref()
@@ -336,9 +337,10 @@ const handleExport = async () => {
exportLoading.value = false
}
}
-const stopPlan = (id) => {
- OrderDayApi.stopPlan(id)
-
+const stopPlan = async (id) => {
+ await OrderDayApi.stopPlan(id)
+ getList()
+
}
/** 导入 */
const importFormRef = ref()
diff --git a/src/views/mes/orderDay/orderDay.data.ts b/src/views/mes/orderDay/orderDay.data.ts
index 43bed9d1e..d2d6a1109 100644
--- a/src/views/mes/orderDay/orderDay.data.ts
+++ b/src/views/mes/orderDay/orderDay.data.ts
@@ -49,6 +49,7 @@ export const OrderDay = useCrudSchemas(reactive([
field: 'id',
sort: 'custom',
isForm: false,
+ isTable: false,
width: '60px',
},
{
@@ -365,7 +366,7 @@ export const OrderDay = useCrudSchemas(reactive([
field: 'remark',
sort: 'custom',
isSearch: false,
- isTable:false,
+ // isTable:false,
},
{
label: '操作',