Browse Source

BUG修改

master
parent
commit
d7ddca7051
  1. 10
      src/components/ImportForm/src/ImportForm.vue
  2. 25
      src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts
  3. 128
      src/views/eam/basic/item/item.data.ts
  4. 50
      src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts
  5. 2
      src/views/eam/item/countadjustWork/index.vue
  6. 50
      src/views/eam/item/itemOrderMain/itemOrderMain.data.ts
  7. 3
      src/views/eam/item/replaceItemDes/index.vue
  8. 9
      src/views/eam/item/transaction/transaction.data.ts

10
src/components/ImportForm/src/ImportForm.vue

@ -88,8 +88,8 @@
</el-upload> </el-upload>
<template #footer> <template #footer>
<div class="flex items-center"> <div class="flex items-center">
<div class="flex-1 text-left"> <div class="flex-1 text-left" >
<el-button type="primary" plain @click="importTemplate"> <el-button type="primary" plain @click="importTemplate" v-if="isShow">
<Icon icon="ep:download" /> <Icon icon="ep:download" />
下载模板 下载模板
</el-button> </el-button>
@ -166,6 +166,12 @@ const props = defineProps({
required: false, required: false,
default: false default: false
}, },
//
isShow: {
type: Boolean,
required: false,
default: true
},
outFile: { outFile: {
type: Boolean, type: Boolean,
required: false, required: false,

25
src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts

@ -123,7 +123,6 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Select' component: 'Select'
}, },
}, },
{ {
label: '人数', label: '人数',
field: 'peoples', field: 'peoples',
@ -134,7 +133,11 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
} componentProps: {
min: 1,
precision: 0
}
},
}, },
{ {
label: '保养所需时间(分钟)', label: '保养所需时间(分钟)',
@ -178,16 +181,16 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isForm: false, isForm: false,
table: { table: {
width: 170 width: 170
},
}, },
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

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

@ -3,10 +3,10 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const ItemRules = reactive({ export const ItemRules = reactive({
name: [ name: [
{ required: true, message: '请输入备件名称', trigger: 'blur' }, { required: true, message: '请输入备件名称', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
}) })
export const Item = useCrudSchemas(reactive<CrudSchema[]>([ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
@ -27,7 +27,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {
width:110, width: 110,
}, },
}, },
{ {
@ -44,7 +44,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width:110, width: 110,
}, },
tableForm: { tableForm: {
type: 'Select', type: 'Select',
@ -64,13 +64,21 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
label: '科目', label: '科目',
field: 'subject', field: 'subject',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.ITEM_SUBJECT,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '科目代码',
field: 'subjectCode',
sort: 'custom',
isTable: true,
}, },
{
label: '科目代码',
field: 'subjectCode',
sort: 'custom',
isTable: true,
},
{ {
label: '单位', label: '单位',
field: 'uom', field: 'uom',
@ -83,18 +91,18 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
type: 'Select' type: 'Select'
} }
}, },
{ {
label: '类别', label: '类别',
field: 'category', field: 'category',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.ITEM_CATEGORY, dictType: DICT_TYPE.ITEM_CATEGORY,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
tableForm: { tableForm: {
type: 'Select' type: 'Select'
} }
}, },
{ {
label: '备件分类', label: '备件分类',
field: 'classification', field: 'classification',
@ -129,7 +137,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
field: 'reprocurement', field: 'reprocurement',
sort: 'custom', sort: 'custom',
table: { table: {
width:110, width: 110,
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
@ -141,7 +149,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
field: 'safetyStock', field: 'safetyStock',
sort: 'custom', sort: 'custom',
table: { table: {
width:110, width: 110,
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
@ -153,7 +161,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
field: 'cost', field: 'cost',
sort: 'custom', sort: 'custom',
table: { table: {
width:110, width: 110,
}, },
}, },
{ {
@ -161,7 +169,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
field: 'purchaser', field: 'purchaser',
sort: 'custom', sort: 'custom',
table: { table: {
width:100, width: 100,
}, },
}, },
{ {
@ -194,31 +202,31 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ {
label: '是否框架协议', label: '是否框架协议',
field: 'isFramework', field: 'isFramework',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 140 width: 140
}, },
tableForm: { tableForm: {
type: 'Select', type: 'Select',
inactiveValue: 'FALSE',
disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
disabled: true activeValue: 'TRUE'
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
} }
}, }
},
// { // {
// label: '是否可用', // label: '是否可用',
// field: 'available', // field: 'available',
@ -244,16 +252,16 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
// } // }
// } // }
// }, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isForm: false, isForm: false,
table: { table: {
width: 170 width: 170
},
}, },
},
{ {
label: '描述', label: '描述',
field: 'describes', field: 'describes',

50
src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts

@ -122,6 +122,38 @@ export const MoldMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Select' component: 'Select'
}, },
}, },
{
label: '人数',
field: 'peoples',
sort: 'custom',
isSearch: false,
table: {
width: 150,
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 0
}
},
},
{
label: '保养所需时间(分钟)',
field: 'estimatedMinutes',
sort: 'custom',
isSearch: false,
table: {
width: 170,
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 0
}
},
},
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
@ -147,16 +179,16 @@ export const MoldMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isForm: false, isForm: false,
table: { table: {
width: 170 width: 170
},
}, },
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

2
src/views/eam/item/countadjustWork/index.vue

@ -42,7 +42,7 @@
:detailButtonIsShow="true"/> :detailButtonIsShow="true"/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/countJobDetail/import" :importTemplateData="importTemplateData" <ImportForm ref="importFormRef" url="/eam/countJobDetail/import" :importTemplateData="importTemplateData"
@success="importSuccess" /> @success="importSuccess" :isShow="false"/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

50
src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

@ -98,31 +98,31 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'dutyParagraph', field: 'dutyParagraph',
sort: 'custom', sort: 'custom',
}, },
{ // {
label: '是否关闭', // label: '是否关闭',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'FALSE', // value: 'FALSE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '状态', label: '状态',
field: 'status', field: 'status',

3
src/views/eam/item/replaceItemDes/index.vue

@ -138,11 +138,12 @@
// form // form
const formsSuccess = async (formType, data) => { const formsSuccess = async (formType, data) => {
data.filePathList = data.filePathListView.map(item=>item.url) data.filePathList = data.filePathListView.map(item=>item.url)
console.log(formType)
if (formType === 'create') { if (formType === 'create') {
await ReplaceItemDesApi.createReplaceItemDes(data) await ReplaceItemDesApi.createReplaceItemDes(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
await ReplaceItemDesApi.createReplaceItemDes(data) await ReplaceItemDesApi.updateReplaceItemDes(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false

9
src/views/eam/item/transaction/transaction.data.ts

@ -61,6 +61,15 @@ export const Transaction = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Radio' component: 'Radio'
}, },
}, },
{
label: '关联单号',
field: 'associatedNumber',
sort: 'custom',
isSearch: false,
form: {
component: 'Radio'
},
},
{ {
label: '计量单位', label: '计量单位',
field: 'uom', field: 'uom',

Loading…
Cancel
Save