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) => {
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) => {
debugger
if (val == 'edit') {
//
if(props.isOpenSearchTable){

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

@ -65,6 +65,29 @@
:detailButtonIsShowEdit="true"
:detailButtonIsShowAdd="true"
@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"
@ -83,7 +106,7 @@ import {
MesOrderMonthSubRules
} from "@/views/mes/ordermonthplan/mesOrderMonthSub.data";
import * as OrderDayApi from "@/api/mes/orderDay";
import {MesOrderMonthSubVO} from "@/api/mes/ordermonthplan";
import {breakdown, MesOrderMonthSubVO} from "@/api/mes/ordermonthplan";
defineOptions({ name: 'MesOrderMonthMain' })
@ -188,7 +211,9 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */
const detailRef = ref()
let mainPlanId
const openDetail = (row: any, titleName: any, titleValue: any) => {
mainPlanId = row.id
detailRef.value.openDetail(row, titleName, titleValue, 'basicMesOrderMonthMain')
}
@ -287,4 +312,21 @@ const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
data.productName = productName
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>

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: '入库仓库编码',
field: 'inStoreCode',
sort: 'custom',
isSearch: true,
table: {
width: 140,
fixed: 'left'
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
@ -108,20 +164,36 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
table: {
width: 120,
fixed: 'left'
width: 120
},
},
{
label: '状态',
field: 'status',
label: '实际开工日期',
field: 'realStart',
sort: 'custom',
isSearch: true,
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 100,
fixed: 'left'
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: '是否回冲',
@ -130,8 +202,7 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
isForm: false,
table: {
width: 120,
fixed: 'left'
width: 120
},
},
{
@ -198,78 +269,6 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
},
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: '备注',
field: 'remark',
@ -281,7 +280,7 @@ export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isForm: false,
table: {
width: 150,
width: 160,
fixed: 'right'
}
}

Loading…
Cancel
Save