Browse Source

1、订单月计划拆解日计划

master_hella_20240701
bjang03 8 months ago
parent
commit
3c45ccaa0e
  1. 8
      src/api/mes/ordermonthplan/index.ts
  2. 1
      src/components/Detail/src/Detail.vue
  3. 44
      src/views/mes/ordermonthplan/index.vue
  4. 165
      src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts

8
src/api/mes/ordermonthplan/index.ts

@ -108,3 +108,11 @@ export const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
export const deleteMesOrderMonthSub = async (id: number) => { export const deleteMesOrderMonthSub = async (id: number) => {
return await request.delete({ url: `/plan/mes-order-month-sub/delete?id=` + id }) return await request.delete({ url: `/plan/mes-order-month-sub/delete?id=` + id })
} }
export interface MesOrderMonthSubBreakdownReqVO{
planMasterId: string
id: number
}
// 拆解为日计划
export const breakdown = async (data: MesOrderMonthSubBreakdownReqVO) => {
return await request.post({ url: `/plan/mes-order-month-sub/breakdown`,data})
}

1
src/components/Detail/src/Detail.vue

@ -713,6 +713,7 @@ 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){

44
src/views/mes/ordermonthplan/index.vue

@ -65,6 +65,29 @@
:detailButtonIsShowEdit="true" :detailButtonIsShowEdit="true"
:detailButtonIsShowAdd="true" :detailButtonIsShowAdd="true"
@searchTableSuccessDetail="searchTableSuccess" @searchTableSuccessDetail="searchTableSuccess"
:otherHeadButttonData = "[{
label: '全部拆解',
name: 'splitAll',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float:'left',
hasPermi: ''
}]"
:buttondataTable = "[{
label: '拆解',
name: 'split',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float:'left',
link: true, //
hasPermi: ''
}]"
@buttonBaseClick="detailButtonBaseClick"
@buttondataTable="detailButtonBaseClick"
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/plan/mes-order-month-main/import" <ImportForm ref="importFormRef" url="/plan/mes-order-month-main/import"
@ -83,7 +106,7 @@ import {
MesOrderMonthSubRules MesOrderMonthSubRules
} from "@/views/mes/ordermonthplan/mesOrderMonthSub.data"; } from "@/views/mes/ordermonthplan/mesOrderMonthSub.data";
import * as OrderDayApi from "@/api/mes/orderDay"; import * as OrderDayApi from "@/api/mes/orderDay";
import {MesOrderMonthSubVO} from "@/api/mes/ordermonthplan"; import {breakdown, MesOrderMonthSubVO} from "@/api/mes/ordermonthplan";
defineOptions({ name: 'MesOrderMonthMain' }) defineOptions({ name: 'MesOrderMonthMain' })
@ -188,7 +211,9 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
let mainPlanId
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
mainPlanId = row.id
detailRef.value.openDetail(row, titleName, titleValue, 'basicMesOrderMonthMain') detailRef.value.openDetail(row, titleName, titleValue, 'basicMesOrderMonthMain')
} }
@ -287,4 +312,21 @@ const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
data.productName = productName data.productName = productName
return await MesOrderMonthApi.updateMesOrderMonthSub(data) return await MesOrderMonthApi.updateMesOrderMonthSub(data)
} }
// --
const detailButtonBaseClick = async (val, item) => {
debugger
try {
//
await message.confirm('确定要拆解成日计划吗?')
//
await MesOrderMonthApi.breakdown({
id : item.id,
planMasterId: mainPlanId
})
message.success(t('common.delSuccess'))
//
await getList()
} catch {
}
}
</script> </script>

165
src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts

@ -74,14 +74,70 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '计划开始日期',
field: 'planBegin',
sort: 'custom',
isSearch: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180,
fixed: 'left'
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '计划结束日期',
field: 'planEnd',
sort: 'custom',
isSearch: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180,
fixed: 'left'
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 100,
fixed: 'left'
},
},
{ {
label: '入库仓库编码', label: '入库仓库编码',
field: 'inStoreCode', field: 'inStoreCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {
width: 140, width: 150
fixed: 'left'
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
@ -108,20 +164,36 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {
width: 120, width: 120
fixed: 'left'
}, },
}, },
{ {
label: '状态', label: '实际开工日期',
field: 'status', field: 'realStart',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 100, width: 180
fixed: 'left' }
}, },
{
label: '实际完工日期',
field: 'realFinish',
sort: 'custom',
isSearch: true,
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
}, },
{ {
label: '是否回冲', label: '是否回冲',
@ -130,8 +202,7 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
isForm: false, isForm: false,
table: { table: {
width: 120, width: 120
fixed: 'left'
}, },
}, },
{ {
@ -198,78 +269,6 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isForm: false isForm: false
}, },
{
label: '计划开始日期',
field: 'planBegin',
sort: 'custom',
isSearch: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '计划结束日期',
field: 'planEnd',
sort: 'custom',
isSearch: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '实际开工日期',
field: 'realStart',
sort: 'custom',
isSearch: true,
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
},
{
label: '实际完工日期',
field: 'realFinish',
sort: 'custom',
isSearch: true,
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -281,7 +280,7 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
width: 150, width: 160,
fixed: 'right' fixed: 'right'
} }
} }

Loading…
Cancel
Save