Browse Source

BUG修改

master
parent
commit
45483533a8
  1. 5
      src/utils/dict.ts
  2. 47
      src/views/eam/basic/item/item.data.ts
  3. 50
      src/views/eam/basic/location/index.vue
  4. 6
      src/views/eam/basic/location/location.data.ts
  5. 6
      src/views/eam/basic/supplier/supplier.data.ts

5
src/utils/dict.ts

@ -298,7 +298,6 @@ export enum DICT_TYPE {
POWER_RANGE = 'power_range', //功率范围 POWER_RANGE = 'power_range', //功率范围
ADJUST_STATUS = 'adjust_status', //盘点调整状态 ADJUST_STATUS = 'adjust_status', //盘点调整状态
APP_DEVICE_MOLD_TYPE = 'app_device_mold_type', //设备/模具/工艺:类型 APP_DEVICE_MOLD_TYPE = 'app_device_mold_type', //设备/模具/工艺:类型
ITEM_SUBJECT = 'item_subject', //备件的科目
ITEM_CATEGOR = 'item_categor', //备件的类别
} }

47
src/views/eam/basic/item/item.data.ts

@ -35,7 +35,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
}, },
{ {
label: '是否储', label: '是否储',
field: 'isConstant', field: 'isConstant',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
@ -64,6 +64,12 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
field: 'subject', field: 'subject',
sort: 'custom', sort: 'custom',
}, },
{
label: '科目代码',
field: 'subjectCode',
sort: 'custom',
isTable: true,
},
{ {
label: '单位', label: '单位',
field: 'uom', field: 'uom',
@ -76,6 +82,18 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
type: 'Select' type: 'Select'
} }
}, },
{
label: '类别',
field: 'category',
sort: 'custom',
dictType: DICT_TYPE.ITEM_CATEGOR,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{ {
label: '备件分类', label: '备件分类',
field: 'classification', field: 'classification',
@ -94,7 +112,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
}, },
{ {
label: '重采购', label: '重采购',
field: 'reprocurement', field: 'reprocurement',
sort: 'custom', sort: 'custom',
table: { table: {
@ -163,6 +181,31 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '是否框架协议',
field: 'isFramework',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
sort: 'custom',
table: {
width: 140
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE',
disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',

50
src/views/eam/basic/location/index.vue

@ -5,28 +5,15 @@
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
:HeadButttondata="HeadButttondata" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :allSchemas="Location.allSchemas" />
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Location.allSchemas"
/>
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table <Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total total: tableObject.total
}" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:pageSize="tableObject.pageSize" v-model:sort="tableObject.sort">
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}"> <template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span> <span>{{ row.code }}</span>
@ -39,22 +26,16 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm ref="basicFormRef" @success="formsSuccess" :rules="LocationRules" :formAllSchemas="Location.allSchemas"
ref="basicFormRef" :apiUpdate="LocationApi.updateLocation" :apiCreate="LocationApi.createLocation"
@success="formsSuccess" @searchTableSuccess="searchTableSuccess" :isBusiness="false" />
:rules="LocationRules"
:formAllSchemas="Location.allSchemas"
:apiUpdate="LocationApi.updateLocation"
:apiCreate="LocationApi.createLocation"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Location.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="Location.allSchemas" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/location/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/eam/location/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -77,11 +58,19 @@ routeName.value = route.name
const tableColumns = ref(Location.allSchemas.tableColumns) const tableColumns = ref(Location.allSchemas.tableColumns)
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
if (formField == 'areaNumber') {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
setV['areaNumber'] = val[0]['number']
setV['type'] = val[0]['type']
formRef.setValues(setV) formRef.setValues(setV)
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
}) })
} }
@ -221,5 +210,4 @@ const searchFormClick = (searchData) => {
onMounted(async () => { onMounted(async () => {
getList() getList()
}) })
</script> </script>

6
src/views/eam/basic/location/location.data.ts

@ -5,6 +5,10 @@ import { LocationArea } from '../locationArea/locationArea.data'
// 表单校验 // 表单校验
export const LocationRules = reactive({ export const LocationRules = reactive({
number: [
{ required: true, message: '请输入库位编号', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
name: [ name: [
{ required: true, message: '请输入库位名称', trigger: 'blur' }, { required: true, message: '请输入库位名称', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
@ -21,7 +25,7 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: true,
table: { table: {
width: 180, width: 180,
fixed: 'left' fixed: 'left'

6
src/views/eam/basic/supplier/supplier.data.ts

@ -3,6 +3,10 @@ import {validateHanset,validateFax,validatePostCode,validateYS} from '@/utils/va
// 表单校验 // 表单校验
export const SupplierRules = reactive({ export const SupplierRules = reactive({
number: [
{ required: true, message: '请输入供应商编号', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
name: [ name: [
{ required: true, message: '请输入供应商名称', trigger: 'blur' }, { required: true, message: '请输入供应商名称', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
@ -19,7 +23,7 @@ export const Supplier = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: true,
table: { table: {
width: 180, width: 180,
fixed: 'left' fixed: 'left'

Loading…
Cancel
Save