Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

hella_online_20240829
wangyufei 5 months ago
parent
commit
69acf899d9
  1. 274
      src/views/eam/equipmentMainPart/equipmentMainPart.data.ts
  2. 44
      src/views/eam/itemAccounts/index.vue
  3. 3
      src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts
  4. 10
      src/views/eam/sparePartsApplyMain/index.vue
  5. 9
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue
  6. 7
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

274
src/views/eam/equipmentMainPart/equipmentMainPart.data.ts

@ -5,148 +5,150 @@ import { dateFormatter } from '@/utils/formatTime'
export const EquipmentMainPartRules = reactive({ export const EquipmentMainPartRules = reactive({
name: [required], name: [required],
code: [required], code: [required],
type: [required], type: [required]
}) })
export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([ export const EquipmentMainPart = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: 'id', {
field: 'id', label: 'id',
sort: 'custom', field: 'id',
isSearch: false, sort: 'custom',
isTable: false, isSearch: false,
isForm: false, isTable: false,
isDetail:false, isForm: false,
}, isDetail: false
{ },
label: '编码', {
field: 'code', label: '编码',
sort: 'custom', field: 'code',
isSearch: true, sort: 'custom',
}, isSearch: true
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
}, },
isForm: false, {
}, label: '名称',
{ field: 'name',
label: '部门id', sort: 'custom',
field: 'departmentCode', isSearch: true
sort: 'custom', },
isSearch: false, {
isTable: false, label: '类型',
isForm: false, field: 'type',
isDetail:false, sort: 'custom',
}, dictType: DICT_TYPE.DEVICE_TYPE,
{ dictClass: 'string', // 默认都是字符串类型其他暂不考虑
label: '备注', isSearch: true,
field: 'remark', form: {
sort: 'custom', component: 'Select'
isSearch: false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否启用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
form: { {
component: 'DatePicker', label: '创建时间',
componentProps: { field: 'createTime',
type: 'datetime', sort: 'custom',
valueFormat: 'x' formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail: false
},
{
label: '是否启用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
} }
}, },
}, {
{ label: '删除人id',
label: '删除人id', field: 'deleterId',
field: 'deleterId', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: false, isTable: false,
isTable: false, isForm: false,
isForm: false, isDetail: false
isDetail:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
}, },
}, {
{ label: '并发乐观锁',
label: '操作', field: 'concurrencyStamp',
field: 'action', sort: 'custom',
isForm: false, isSearch: false,
table: { isTable: false,
width: 150, isForm: false,
fixed: 'right' isDetail: false,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
} }
} ])
])) )

44
src/views/eam/itemAccounts/index.vue

@ -31,9 +31,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{ row }"> <template #itemNumber="{ row }">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.itemNumber)">
<span>{{ row.code }}</span> <span>{{ row.itemNumber }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
@ -42,13 +42,6 @@
@button-base-click="buttonTableClick($event, row)" @button-base-click="buttonTableClick($event, row)"
/> />
</template> </template>
<!-- <template #upload="{ row }">
<ButtonBase
v-if="row.filePathList != null && row.filePathList.length != 0"
:Butttondata="butttondataView(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> -->
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -67,7 +60,20 @@
<SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" /> <SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemAccounts.allSchemas" /> <DetailLedger
ref="detailRef"
:isBasic="true"
:allSchemas="ItemAccounts.allSchemas"
:subTabs="subTabList"
:operationRecordList="operationRecordList"
@handleOperationTabsChange="handleOperationTabsChange"
:detailAllSchemas="detailAllSchemas"
:apiPage="apiPage"
:dialogApiPage="dialogApiPage"
:dialogAllSchemas="dialogAllSchemas"
:dynamicInfoFields="dynamicInfoFields"
funcCode="tool_mould_file"
/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm
@ -309,6 +315,20 @@ const openForm = (type: string, row?: any) => {
urls.value = row.filePathList urls.value = row.filePathList
viewKey.value += 1 viewKey.value += 1
} else { } else {
if (type == 'create') {
ItemAccounts.allSchemas.formSchema.forEach((item) => {
if (item.field == 'qty') {
item.componentProps.disabled = false
}
})
} else if (type == 'update') {
ItemAccounts.allSchemas.formSchema.forEach((item) => {
if (item.field == 'qty') {
item.componentProps.disabled = true
}
})
}
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
} }
@ -340,7 +360,7 @@ const formsSuccess = async (formType, data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicItemAccounts') detailRef.value.openDetail(row, titleName, titleValue, 'ItemAccounts')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */

3
src/views/eam/sparePartsApplyMain/SparePartsApply.data.ts

@ -208,7 +208,7 @@ export const SparePartsApplyMain = useCrudSchemas(
isForm: false isForm: false
}, },
{ {
label: '操作11', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
@ -257,7 +257,6 @@ export const SparePartsApplyDetail = useCrudSchemas(
searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段 searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题 searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [

10
src/views/eam/sparePartsApplyMain/index.vue

@ -254,11 +254,11 @@ const butttondata = (row) => {
defaultButtons.mainListApproveBtn({ defaultButtons.mainListApproveBtn({
hide: isShowStatusButton(row, ['3']), hide: isShowStatusButton(row, ['3']),
hasPermi: 'eam:spare-parts-in-location-main:approve' hasPermi: 'eam:spare-parts-in-location-main:approve'
}), // }) //
defaultButtons.mainListFinishBtn({ // defaultButtons.mainListFinishBtn({
hide: isShowStatusButton(row, ['4']), // hide: isShowStatusButton(row, ['4']),
hasPermi: 'eam:spare-parts-in-location-main:finish' // hasPermi: 'eam:spare-parts-in-location-main:finish'
}) // // }) //
] ]
} }

9
src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

@ -118,6 +118,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['itemCode'] = item['code'] newRow['itemCode'] = item['code']
newRow['uom'] = item['uom'] newRow['uom'] = item['uom']
newRow['id'] = item['id'] newRow['id'] = item['id']
newRow['toLocationCode'] = formRef.formModel['toLocationCode']
tableData.value.push(newRow) tableData.value.push(newRow)
}) })
} else { } else {
@ -359,6 +360,7 @@ const tableData = ref([])
// //
const handleAddTable = () => { const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
} }
// //
const handleDeleteTable = (item, index) => { const handleDeleteTable = (item, index) => {
@ -376,10 +378,11 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){ if(data.masterId){
data.id = data.masterId data.id = data.masterId
} }
tableData.value.forEach(item=>{
item.toLocationCode = data.toLocationCode
})
data.subList = tableData.value // data.subList = tableData.value //
if( data.subList.length>1){
message.warning('明细只能选择一条数据')
return;
}
if(tableData.value.find(item => (item.qty <= 0))) { if(tableData.value.find(item => (item.qty <= 0))) {
message.warning('数量必须大于0') message.warning('数量必须大于0')
formRef.value.formLoading = false formRef.value.formLoading = false

7
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

@ -118,7 +118,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
sortTableDefault:4, sortTableDefault:4,
tableForm:{ tableForm:{
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 searchListPlaceholder: '请选择返修生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题 searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
@ -138,7 +138,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 searchListPlaceholder: '请选择返修生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题 searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
@ -501,6 +501,9 @@ export const ProductrepairRequestMainRules = reactive({
workshopCode: [ workshopCode: [
{ required: true, message: '请选择车间代码', trigger: 'change' } { required: true, message: '请选择车间代码', trigger: 'change' }
], ],
productionLineCode: [
{ required: true, message: '请选择返修生产线', trigger: 'change' }
],
// dueTime: [ // dueTime: [
// { required: true, message: '请选择截止时间', trigger: 'change' } // { required: true, message: '请选择截止时间', trigger: 'change' }
// ], // ],

Loading…
Cancel
Save