ljlong_2630 8 months ago
parent
commit
11cab51be3
  1. 2
      src/components/Detail/src/Detail.vue
  2. 10
      src/components/ImportForm/src/ImportForm.vue
  3. 25
      src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts
  4. 130
      src/views/eam/basic/item/item.data.ts
  5. 50
      src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts
  6. 86
      src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts
  7. 5
      src/views/eam/device/devicemaintenancejob/index.vue
  8. 2
      src/views/eam/item/countadjustWork/index.vue
  9. 5
      src/views/eam/item/itemAccounts/itemAccounts.data.ts
  10. 16
      src/views/eam/item/itemApplyMain/index.vue
  11. 50
      src/views/eam/item/itemOrderMain/itemOrderMain.data.ts
  12. 3
      src/views/eam/item/replaceItemDes/index.vue
  13. 9
      src/views/eam/item/transaction/transaction.data.ts
  14. 4
      src/views/eam/mold/moldmaintenancejob/index.vue
  15. 48
      src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

2
src/components/Detail/src/Detail.vue

@ -460,7 +460,7 @@ const buttonTableClick = async (val, row) => {
if (val == 'edit') {
//
openForm('update', row)
// emit('detailOpenForm',val, row)
emit('detailOpenForm',val, row)
} else if (val == 'delete') {
//
handleDelete(row.id)

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

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

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

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

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

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

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

@ -122,6 +122,38 @@ export const MoldMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
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: '是否可用',
field: 'available',
@ -147,16 +179,16 @@ export const MoldMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{
label: '操作',
field: 'action',

86
src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts

@ -25,7 +25,7 @@ export const DeviceMaintenanceMainRules = reactive({
type: [required],
classes: [required],
faultType: [required],
describes : [
describes: [
required,
{ max: 200, message: '不得超过200个字符', trigger: 'blur' },
],
@ -159,13 +159,13 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
placeholder: "请先选择设备"
},
},
isSearch:true,
search:{
isSearch: true,
search: {
component: 'Select',
api: () => userListAll,
componentProps: {
collapseTags:true,
collapseTagsTooltip:true,
collapseTags: true,
collapseTagsTooltip: true,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
@ -259,7 +259,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'textarea',
}
},
},
{
@ -295,7 +295,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 300,
fixed: 'right'
},
isDetail:false
isDetail: false
}
]))
@ -324,7 +324,7 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'textarea',
}
},
},
{
@ -339,7 +339,7 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'textarea',
}
},
},
{
@ -354,7 +354,7 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'textarea',
}
},
},
{
@ -362,31 +362,38 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'maintenances',
sort: 'custom',
isDetail: false,
formatter: (_: Recordable, __: TableColumn, cellValue) => {
const cellValueList = cellValue ? cellValue.split(',') : [];
return userListAll
.filter(item => cellValueList.includes(item.id.toString()))
.map(item => item.nickname)
.join(',');
},
// formatter: (_: Recordable, __: TableColumn, cellValue) => {
// let cellValueList = []
// if (Array.isArray(cellValue)) {
// cellValueList = cellValue
// } else {
// cellValueList = cellValue ? cellValue.split(',') : [];
// }
// // const cellValueList = cellValue ? cellValue.split(',') : [];
// return userListAll
// .filter(item => cellValueList.includes(item.id.toString()))
// .map(item => item.nickname)
// .join(',');
// },
isTable:false,
tableForm: {
type: 'Select',
initOptions: userListAll,
multiple:true,
collapseTags:true,
collapseTagsTooltip:true,
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
}
},
form:{
form: {
component: 'Select',
// api: () => dutyUserList,
componentProps: {
multiple:true,
collapseTags:true,
collapseTagsTooltip:true,
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
optionsAlias: {
labelField: 'name',
valueField: 'id'
@ -394,18 +401,27 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '维修人',
field: 'maintenancesName',
sort: 'custom',
isForm:false,
isDetail:true,
isTable:true,
isTableForm:false
},
{
label: '备件',
field: 'itemNumbers1',
sort: 'custom',
table: {
},
tableForm:{
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择备件',
searchField: 'itemNumbers1',
searchTitle: '备件',
multiple:true,
multiple: true,
searchAllSchemas: ItemSearchTable.allSchemas,
searchPage: ItemApi.getItemList,
searchCondition: [{
@ -422,9 +438,9 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择备件', // 输入框占位文本
searchField: 'itemNumbers1', // 查询弹窗赋值字段
searchTitle: '备件', // 查询弹窗标题
multiple:true,
searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类
searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法
multiple: true,
searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类
searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法
searchCondition: [{
key: 'number',
value: 'deviceNumber',
@ -441,9 +457,9 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
},
isForm:false,
isDetail:false,
isTable:false,
isForm: false,
isDetail: false,
isTable: false,
isSearch: false,
isTableForm: false,
},
@ -489,7 +505,7 @@ export const DeviceMaintenanceMainSecRules = reactive({
type: [required],
classes: [required],
faultType: [required],
describes : [
describes: [
required,
{ max: 200, message: '不得超过200个字符', trigger: 'blur' },
],
@ -722,7 +738,7 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'textarea',
}
},
},
{
@ -758,6 +774,6 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
width: 300,
fixed: 'right'
},
isDetail:false
isDetail: false
}
]))

5
src/views/eam/device/devicemaintenancejob/index.vue

@ -770,8 +770,9 @@ const submitFormSec = async (formType, data) => {
const detailOpenForm = (type, row) =>{
console.log("type",type);
console.log("row",row);
row.maintenances = row.maintenances.split(',').map(item=>Number(item))
console.log(row.maintenances)
DeviceMaintenanceDetail.allSchemas.tableFormColumns.map((item) => {
// if(purchaseReceiptRecordNumberRef.value == ''){
// if (item.field == 'itemCode') {

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

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

5
src/views/eam/item/itemAccounts/itemAccounts.data.ts

@ -164,11 +164,12 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
field: 'itemDO.financer',
sort: 'custom',
},
{
{
label: '是否以旧换新',
field: 'itemDO.isRadeIn',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
sort: 'custom',
table: {
@ -188,6 +189,8 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '是否可用',
field: 'available',

16
src/views/eam/item/itemApplyMain/index.vue

@ -31,7 +31,7 @@
:tableAllSchemas="ItemApplyDetail.allSchemas" :tableFormRules="ItemApplyDetailRules" :tableData="tableData"
:apiUpdate="ItemApplyMainApi.updateItemApplyMain" :apiCreate="ItemApplyMainApi.createItemApplyMain"
:isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" />
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" @formSelectChange='formSelectChange' />
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="ItemApplyMain.allSchemas"
@ -78,7 +78,6 @@
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => {
if (type == 'tableForm') {
console.log(formField);
//
if (formField == 'itemNumber') {
let subList = tableData.value
@ -102,7 +101,7 @@
}
if (formField == 'deviceNumber') {
row['deviceNumber'] = val[0]['number']
}
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
@ -122,9 +121,14 @@
setV['available'] = val[0]['available']
} else if (formField == 'deviceNumber') {
setV['deviceNumber'] = val[0]['number']
}
}
formRef.setValues(setV)
})
}
const formSelectChange = (field, val, row) => {
if (field == 'type') {
row['deviceNumber'] = ""
}
}
//
@ -167,9 +171,7 @@
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
}
//

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

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

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

@ -138,11 +138,12 @@
// form
const formsSuccess = async (formType, data) => {
data.filePathList = data.filePathListView.map(item=>item.url)
console.log(formType)
if (formType === 'create') {
await ReplaceItemDesApi.createReplaceItemDes(data)
message.success(t('common.createSuccess'))
} else {
await ReplaceItemDesApi.createReplaceItemDes(data)
await ReplaceItemDesApi.updateReplaceItemDes(data)
message.success(t('common.updateSuccess'))
}
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'
},
},
{
label: '关联单号',
field: 'associatedNumber',
sort: 'custom',
isSearch: false,
form: {
component: 'Radio'
},
},
{
label: '计量单位',
field: 'uom',

4
src/views/eam/mold/moldmaintenancejob/index.vue

@ -595,8 +595,8 @@ const submitForm = async (formType, data) => {
}
}
const detailOpenForm = (type, row) =>{
console.log("type",type);
console.log("row",row);
row.maintenances = row.maintenances.split(',').map(item=>Number(item))
MoldMaintenanceDetail.allSchemas.tableFormColumns.map((item) => {
// if(purchaseReceiptRecordNumberRef.value == ''){
// if (item.field == 'itemCode') {

48
src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

@ -313,32 +313,39 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '维修人',
field: 'maintenances',
sort: 'custom',
api: () => userListAll,
formatter: (_: Recordable, __: TableColumn, cellValue) => {
const cellValueList = cellValue ? cellValue.split(',') : [];
return userListAll
.filter(item => cellValueList.includes(item.id.toString()))
.map(item => item.nickname)
.join(',');
},
isDetail: false,
// formatter: (_: Recordable, __: TableColumn, cellValue) => {
// let cellValueList = []
// if (Array.isArray(cellValue)) {
// cellValueList = cellValue
// } else {
// cellValueList = cellValue ? cellValue.split(',') : [];
// }
// // const cellValueList = cellValue ? cellValue.split(',') : [];
// return userListAll
// .filter(item => cellValueList.includes(item.id.toString()))
// .map(item => item.nickname)
// .join(',');
// },
isTable:false,
tableForm: {
type: 'Select',
initOptions: userListAll,
multiple:true,
collapseTags:true,
collapseTagsTooltip:true,
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
}
},
form:{
form: {
component: 'Select',
api: () => userListAll,
// api: () => dutyUserList,
componentProps: {
multiple:true,
collapseTags:true,
collapseTagsTooltip:true,
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
optionsAlias: {
labelField: 'name',
valueField: 'id'
@ -346,6 +353,15 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '维修人',
field: 'maintenancesName',
sort: 'custom',
isForm:false,
isDetail:true,
isTable:true,
isTableForm:false
},
{
label: '备件',
field: 'itemNumbers1',

Loading…
Cancel
Save