Browse Source

1、订单月计划增删改查

master_hella_20240701
bjang03 8 months ago
parent
commit
3ae9655ccf
  1. 40
      src/views/mes/ordermonthplan/index.vue
  2. 66
      src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts

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

@ -4,15 +4,15 @@
<Search :schema="MesOrderMonthMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="MesOrderMonthMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick" @button-base-click="buttonBaseClick"
:routeName="routeName" :routeName="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="MesOrderMonthMain.allSchemas" :allSchemas="MesOrderMonthMain.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
@ -51,15 +51,19 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="MesOrderMonthMain.allSchemas" /> <Detail ref="detailRef"
:isBasic="false"
:detailAllSchemasRules="MesOrderMonthMainRules"
:allSchemas="MesOrderMonthMain.allSchemas"
/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/plan/mes-order-month-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/plan/mes-order-month-main/import"
:importTemplateData="importTemplateData" @success="importSuccess"/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { MesOrderMonthMain,MesOrderMonthMainRules } from './mesOrderMonthMain.data' import {MesOrderMonthMain, MesOrderMonthMainRules} from './mesOrderMonthMain.data'
import * as MesOrderMonthMainApi from '@/api/mes/ordermonthplan' import * as MesOrderMonthMainApi from '@/api/mes/ordermonthplan'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
@ -99,9 +103,9 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:mesOrderMonthMain:create'}), // defaultButtons.defaultAddBtn({hasPermi: 'mes:ordermonthplan:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:mesOrderMonthMain:import'}), // defaultButtons.defaultImportBtn({hasPermi: 'mes:ordermonthplan:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:mesOrderMonthMain:export'}), // // defaultButtons.defaultExportBtn({hasPermi:'mes:ordermonthplan:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -133,8 +137,8 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:mesOrderMonthMain:update'}), // defaultButtons.mainListEditBtn({hasPermi: 'mes:ordermonthplan:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:mesOrderMonthMain:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi: 'mes:ordermonthplan:delete'}), //
] ]
// - // -

66
src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts

@ -3,9 +3,39 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const MesOrderMonthMainRules = reactive({ export const MesOrderMonthMainRules = reactive({
planMasterCode: [required],
planSubCode:[required],
planType:[required],
factoryCode:[required]
}) })
export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '计划类型',
field: 'planType',
sort: 'custom',
isSearch: true
},
{
label: '工厂编码',
field: 'factoryCode',
sort: 'custom',
isTable: false
},
{
label: '主计划编码',
field: 'planMasterCode',
sort: 'custom',
isTable: false,
isSearch: true
},
{
label: '计划辅助编码',
field: 'planSubCode',
sort: 'custom',
isTable: true,
isSearch: true
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -35,44 +65,12 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
isForm: false isForm: false
}, },
{
label: '主计划编码',
field: 'planMasterCode',
sort: 'custom',
isSearch: true
},
{
label: '计划辅助编码',
field: 'planSubCode',
sort: 'custom',
isSearch: true
},
{
label: '计划类型',
field: 'planType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '审核人',
field: 'checker',
sort: 'custom',
isSearch: true
},
{
label: '工厂编码',
field: 'factoryCode',
sort: 'custom',
isSearch: true
},
{ {
label: '工厂名称', label: '工厂名称',
field: 'factoryName', field: 'factoryName',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true,
isForm: false
}, },
{ {
label: '操作', label: '操作',

Loading…
Cancel
Save