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" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="MesOrderMonthMain.allSchemas"
/>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="MesOrderMonthMain.allSchemas"
/>
<!-- 列表 -->
<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>
<script setup lang="ts">
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 defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
@ -99,9 +103,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:mesOrderMonthMain:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:mesOrderMonthMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:mesOrderMonthMain:export'}), //
defaultButtons.defaultAddBtn({hasPermi: 'mes:ordermonthplan:create'}), //
defaultButtons.defaultImportBtn({hasPermi: 'mes:ordermonthplan:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'mes:ordermonthplan:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -133,8 +137,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:mesOrderMonthMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:mesOrderMonthMain:delete'}), //
defaultButtons.mainListEditBtn({hasPermi: 'mes:ordermonthplan:update'}), //
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({
planMasterCode: [required],
planSubCode:[required],
planType:[required],
factoryCode:[required]
})
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: '备注',
field: 'remark',
@ -35,44 +65,12 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
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: '工厂名称',
field: 'factoryName',
sort: 'custom',
isSearch: true
isSearch: true,
isForm: false
},
{
label: '操作',

Loading…
Cancel
Save