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. 5
      src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts
  4. 20
      src/views/eam/basic/item/item.data.ts
  5. 32
      src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts
  6. 72
      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. 3
      src/views/eam/item/itemAccounts/itemAccounts.data.ts
  10. 10
      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') { if (val == 'edit') {
// //
openForm('update', row) openForm('update', row)
// emit('detailOpenForm',val, row) emit('detailOpenForm',val, row)
} else if (val == 'delete') { } else if (val == 'delete') {
// //
handleDelete(row.id) handleDelete(row.id)

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,

5
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,8 +133,12 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: {
min: 1,
precision: 0
} }
}, },
},
{ {
label: '保养所需时间(分钟)', label: '保养所需时间(分钟)',
field: 'estimatedMinutes', field: 'estimatedMinutes',

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

@ -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,7 +64,15 @@ 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: '科目代码', label: '科目代码',
field: 'subjectCode', field: 'subjectCode',
@ -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,
}, },
}, },
{ {

32
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',

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

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

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">

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

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

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

@ -31,7 +31,7 @@
:tableAllSchemas="ItemApplyDetail.allSchemas" :tableFormRules="ItemApplyDetailRules" :tableData="tableData" :tableAllSchemas="ItemApplyDetail.allSchemas" :tableFormRules="ItemApplyDetailRules" :tableData="tableData"
:apiUpdate="ItemApplyMainApi.updateItemApplyMain" :apiCreate="ItemApplyMainApi.createItemApplyMain" :apiUpdate="ItemApplyMainApi.updateItemApplyMain" :apiCreate="ItemApplyMainApi.createItemApplyMain"
:isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" :isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" @formSelectChange='formSelectChange' />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="ItemApplyMain.allSchemas" <Detail ref="detailRef" :isBasic="false" :allSchemas="ItemApplyMain.allSchemas"
@ -78,7 +78,6 @@
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => { nextTick(async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
console.log(formField);
// //
if (formField == 'itemNumber') { if (formField == 'itemNumber') {
let subList = tableData.value let subList = tableData.value
@ -126,6 +125,11 @@
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }
const formSelectChange = (field, val, row) => {
if (field == 'type') {
row['deviceNumber'] = ""
}
}
// //
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] // const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
@ -167,8 +171,6 @@
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
getList() getList()
} else if (val == 'filtrate') { // } 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', 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',

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

@ -595,8 +595,8 @@ const submitForm = async (formType, data) => {
} }
} }
const detailOpenForm = (type, row) =>{ 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) => { MoldMaintenanceDetail.allSchemas.tableFormColumns.map((item) => {
// if(purchaseReceiptRecordNumberRef.value == ''){ // if(purchaseReceiptRecordNumberRef.value == ''){
// if (item.field == 'itemCode') { // if (item.field == 'itemCode') {

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

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

Loading…
Cancel
Save