Browse Source

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

hella_online_20240829
chenfang 4 months ago
parent
commit
7833b96031
  1. 1
      src/api/eam/basicEamWorkshop/index.ts
  2. 1
      src/api/eam/documentTypeSelectSet/index.ts
  3. 8
      src/api/eam/equipmentAccounts/index.ts
  4. 1
      src/api/eam/inspectionItem/index.ts
  5. 4
      src/components/TableForm/src/TableForm.vue
  6. 2
      src/components/UploadFile/src/UploadFile.vue
  7. 4
      src/utils/disposition/defaultButtons.ts
  8. 2
      src/views/eam/equipmentAccounts/equipmentAccounts.data.ts
  9. 56
      src/views/eam/equipmentAccounts/index.vue
  10. 350
      src/views/eam/toolAccounts/index.vue
  11. 2
      src/views/wms/basicDataManage/itemManage/itempackage/index.vue
  12. 14
      src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue
  13. 16
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  14. 14
      src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts
  15. 17
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue
  16. 131
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  17. 8
      src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue
  18. 6
      src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue
  19. 6
      src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue
  20. 2
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue
  21. 6
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue
  22. 5
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts

1
src/api/eam/basicEamWorkshop/index.ts

@ -1,5 +1,4 @@
import request from '@/config/axios'
import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart";
export interface BasicEamWorkshopVO {
id: number

1
src/api/eam/documentTypeSelectSet/index.ts

@ -1,5 +1,4 @@
import request from '@/config/axios'
import {BasicSpotCheckSelectSetVO} from "@/api/eam/spotCheckSelectSet";
export interface DocumentTypeSelectSetVO {
id: number

8
src/api/eam/equipmentAccounts/index.ts

@ -15,6 +15,7 @@ export interface EquipmentAccountsVO {
principal: string
principalTelephone: string
status: string
changeReason: string
startDate: Date
supplierCode: string
purchaseTime: Date
@ -81,4 +82,9 @@ export const importTemplate = () => {
// 查询设备台账列表
export const getEquipmentAccountsNoPage = async (params) => {
return await request.get({ url: `/eam/device/equipment-accounts/noPage`, params })
}
}
//停用启用
export const ableEquipmentAccountsMain = async (data: EquipmentAccountsVO) => {
return await request.post({ url: `/eam/device/equipment-accounts/ables`, data })
}

1
src/api/eam/inspectionItem/index.ts

@ -1,5 +1,4 @@
import request from '@/config/axios'
import {InspectionItemSelectSetVO} from "@/api/eam/inspectionItemSelectSet";
export interface InspectionItemVO {
id: number

4
src/components/TableForm/src/TableForm.vue

@ -406,7 +406,9 @@
routeName == 'DeliverPlanMain' ||
routeName == 'DeliverRequestMain' ||
routeName == 'ZZBJDeliverRequestMain' ||
routeName == 'UnplannedreceiptRequestMain'
routeName == 'UnplannedreceiptRequestMain'||
routeName == 'RepleinshRequestMain'
"
>
<el-input v-model="keyWord" style="width: 240px" placeholder="回车自动添加" />

2
src/components/UploadFile/src/UploadFile.vue

@ -80,7 +80,7 @@ const uploadHeaders = ref({
//
const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => {
if (fileList.value.length >= props.limit) {
message.error(`${t('ts.上传文件数量不能超过')}${props.limit}!`)
message.error(`${t('ts.上传文件数量不能超过').replace('ts.','')}${props.limit}!`)
return false
}
let fileExtension = ''

4
src/utils/disposition/defaultButtons.ts

@ -1154,7 +1154,7 @@ export function mainCopyBtn(option: any) {
// 主列表-部件
export function componentBtn(option: any) {
return __defaultBtnOption(option, {
label: '部件',
label: '关联部件',
name: 'component',
hide: false,
type: 'primary',
@ -1166,7 +1166,7 @@ export function componentBtn(option: any) {
// 主列表-备件
export function sparePartBtn(option: any) {
return __defaultBtnOption(option, {
label: '备件',
label: '关联备件',
name: 'sparePart',
hide: false,
type: 'primary',

2
src/views/eam/equipmentAccounts/equipmentAccounts.data.ts

@ -631,7 +631,7 @@ export const EquipmentAccounts = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isForm: false,
table: {
width: 200,
width: 250,
fixed: 'right'
}
}

56
src/views/eam/equipmentAccounts/index.vue

@ -33,7 +33,7 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)"/>
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)"/>
</template>
</Table>
</ContentWrap>
@ -50,6 +50,8 @@
:isBusiness="false"
/>
<AblesForm ref="ablesFormRef" @success="getData" @close="getClosed"/>
<!-- 详情 -->
<DetailLedger
ref="detailRef"
@ -80,14 +82,13 @@ import * as EquipmentAccountsApi from '@/api/eam/equipmentAccounts'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import AblesForm from '@/views/eam/equipmentAccounts/ablesForm.vue'
import DetailLedger from '@/components/Detail/src/DetailLedger.vue'
import { RelationMainPart,RelationMainPartRules } from '../relationMainPart/relationMainPart.data'
import * as RelationMainPartApi from '@/api/eam/relationMainPart'
import { EquipmentMainPart,EquipmentMainPartRules } from '../equipmentMainPart/equipmentMainPart.data'
import * as EquipmentMainPartApi from '@/api/eam/equipmentMainPart'
import { SparePart,SparePartRules } from '../sparePart/sparePart.data'
import * as SparePartApi from '@/api/eam/sparePart'
import { EquipmentToolSparePart,EquipmentToolSparePartRules } from '../equipmentToolSparePart/equipmentToolSparePart.data'
import * as EquipmentToolSparePartApi from '@/api/eam/equipmentToolSparePart'
import { EquipmentReportRepairRequest,EquipmentReportRepairRequestRules } from '../equipmentReportRepairRequest/equipmentReportRepairRequest.data'
import * as EquipmentReportRepairRequestApi from '@/api/eam/equipmentReportRepairRequest'
@ -129,6 +130,7 @@ const detailAllSchemas = ref()
const apiPage = ref()
const dialogApiPage = ref()
const dialogAllSchemas = ref()
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
@ -217,13 +219,30 @@ const buttonBaseClick = (val, item) => {
}
}
const isShowMainButton = (row,val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-accounts:update'}), //
defaultButtons.componentBtn({hasPermi:'eam:equipment-accounts:component'}), //
defaultButtons.sparePartBtn({hasPermi:'eam:equipment-accounts:item'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-accounts:delete'}), //
]
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-accounts:update'}), //
defaultButtons.componentBtn({hasPermi:'eam:equipment-accounts:component'}), //
defaultButtons.sparePartBtn({hasPermi:'eam:equipment-accounts:item'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:basicFaultType:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:basicFaultType:update'}),
]
}
//
const ablesFormRef = ref()
function openables(row, val) {
ablesFormRef.value.open(val,row);
}
// -
const buttonTableClick = async (val, row) => {
@ -235,6 +254,10 @@ const buttonTableClick = async (val, row) => {
openComponent(row)
} else if (val == 'sparePart') { //
openSparePart(row)
} else if (val == 'enable') { // /
openables(row,val)
} else if (val == 'disable') { // /
openables(row,val)
}
}
@ -351,6 +374,21 @@ const searchFormClick = (searchData) => {
getList() //
}
//ablesForm
const getData=(val)=> {
nextTick?.(async () => {
await getList()
})
}
//ablesForm
const getClosed=(val)=> {
nextTick?.(() => {
console.log(val)
getList()
})
}
const searchTableRef = ref()
const searchSparePartTableRef = ref()

350
src/views/eam/toolAccounts/index.vue

@ -1,18 +1,22 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ToolAccounts.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="ToolAccounts.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ToolAccounts.allSchemas"
/>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ToolAccounts.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
@ -27,13 +31,13 @@
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)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, row)" />
</template>
</Table>
</ContentWrap>
@ -51,19 +55,19 @@
/>
<!-- 详情 -->
<DetailLedger
ref="detailRef"
:isBasic="true"
<DetailLedger
ref="detailRef"
:isBasic="true"
:allSchemas="ToolAccounts.allSchemas"
:subTabs="subTabList"
:operationRecordList="operationRecordList"
@handleOperationTabsChange="handleOperationTabsChange"
:subTabs="subTabList"
:operationRecordList="operationRecordList"
@handleOperationTabsChange="handleOperationTabsChange"
:detailAllSchemas="detailAllSchemas"
:apiPage="apiPage"
:dialogApiPage="dialogApiPage"
:dialogAllSchemas="dialogAllSchemas"
:dynamicInfoFields="dynamicInfoFields"
funcCode="tool_mould_file"
funcCode="tool_mould_file"
/>
<!-- 主要部件 -->
@ -71,40 +75,75 @@
<!-- 备件 -->
<SearchTable ref="searchSparePartTableRef" @searchTableSuccess="submitSparePartRelation" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/tool/tool-accounts/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/eam/tool/tool-accounts/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ToolAccounts,ToolAccountsRules } from './toolAccounts.data'
import { ToolAccounts, ToolAccountsRules } from './toolAccounts.data'
import * as ToolAccountsApi from '@/api/eam/toolAccounts'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as RelationMainPartApi from '@/api/eam/relationMainPart'
import { EquipmentMainPart,EquipmentMainPartRules } from '../equipmentMainPart/equipmentMainPart.data'
import {
EquipmentMainPart,
EquipmentMainPartRules
} from '../equipmentMainPart/equipmentMainPart.data'
import * as EquipmentMainPartApi from '@/api/eam/equipmentMainPart'
import { SparePart,SparePartRules } from '../sparePart/sparePart.data'
import * as SparePartApi from '@/api/eam/sparePart'
import { Item, ItemRules } from '../item/item.data'
import * as ItemApi from '@/api/eam/item'
import * as EquipmentToolSparePartApi from '@/api/eam/equipmentToolSparePart'
import { EquipmentReportRepairRequest,EquipmentReportRepairRequestRules } from '../equipmentReportRepairRequest/equipmentReportRepairRequest.data'
import {
EquipmentReportRepairRequest,
EquipmentReportRepairRequestRules
} from '../equipmentReportRepairRequest/equipmentReportRepairRequest.data'
import * as EquipmentReportRepairRequestApi from '@/api/eam/equipmentReportRepairRequest'
import { EquipmentSpotCheckRecordMain,EquipmentSpotCheckRecordMainRules } from '../equipmentSpotCheckRecordMain/equipmentSpotCheckRecordMain.data'
import {
EquipmentSpotCheckRecordMain,
EquipmentSpotCheckRecordMainRules
} from '../equipmentSpotCheckRecordMain/equipmentSpotCheckRecordMain.data'
import * as EquipmentSpotCheckRecordMainApi from '@/api/eam/equipmentSpotCheckRecordMain'
import { EquipmentSpotCheckRecordDetail,EquipmentSpotCheckRecordDetailRules } from '../equipmentSpotCheckRecordDetail/equipmentSpotCheckRecordDetail.data'
import {
EquipmentSpotCheckRecordDetail,
EquipmentSpotCheckRecordDetailRules
} from '../equipmentSpotCheckRecordDetail/equipmentSpotCheckRecordDetail.data'
import * as EquipmentSpotCheckRecordDetailApi from '@/api/eam/equipmentSpotCheckRecordDetail'
import { EquipmentInspectionRecordMain,EquipmentInspectionRecordMainRules } from '../equipmentInspectionRecordMain/equipmentInspectionRecordMain.data'
import {
EquipmentInspectionRecordMain,
EquipmentInspectionRecordMainRules
} from '../equipmentInspectionRecordMain/equipmentInspectionRecordMain.data'
import * as EquipmentInspectionRecordMainApi from '@/api/eam/equipmentInspectionRecordMain'
import { EquipmentInspectionRecordDetail,EquipmentInspectionRecordDetailRules } from '../equipmentInspectionRecordDetail/equipmentInspectionRecordDetail.data'
import {
EquipmentInspectionRecordDetail,
EquipmentInspectionRecordDetailRules
} from '../equipmentInspectionRecordDetail/equipmentInspectionRecordDetail.data'
import * as EquipmentInspectionRecordDetailApi from '@/api/eam/equipmentInspectionRecordDetail'
import { EquipmentRepairRecordMain,EquipmentRepairRecordMainRules } from '../equipmentRepairRecordMain/equipmentRepairRecordMain.data'
import {
EquipmentRepairRecordMain,
EquipmentRepairRecordMainRules
} from '../equipmentRepairRecordMain/equipmentRepairRecordMain.data'
import * as EquipmentRepairRecordMainApi from '@/api/eam/equipmentRepairRecordMain'
import { EquipmentRepairRecordDetail,EquipmentRepairRecordDetailRules } from '../equipmentRepairRecordDetail/equipmentRepairRecordDetail.data'
import {
EquipmentRepairRecordDetail,
EquipmentRepairRecordDetailRules
} from '../equipmentRepairRecordDetail/equipmentRepairRecordDetail.data'
import * as EquipmentRepairRecordDetailApi from '@/api/eam/equipmentRepairRecordDetail'
import { EquipmentMaintenanceRecordMain,EquipmentMaintenanceRecordMainRules } from '../equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data'
import {
EquipmentMaintenanceRecordMain,
EquipmentMaintenanceRecordMainRules
} from '../equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data'
import * as EquipmentMaintenanceRecordMainApi from '@/api/eam/equipmentMaintenanceRecordMain'
import { EquipmentMaintenanceRecordDetail,EquipmentMaintenanceRecordDetailRules } from '../equipmentMaintenanceRecordDetail/equipmentMaintenanceRecordDetail.data'
import {
EquipmentMaintenanceRecordDetail,
EquipmentMaintenanceRecordDetailRules
} from '../equipmentMaintenanceRecordDetail/equipmentMaintenanceRecordDetail.data'
import * as EquipmentMaintenanceRecordDetailApi from '@/api/eam/equipmentMaintenanceRecordDetail'
import * as WorkshopApi from '@/api/wms/workshop'
import * as ProductionlineApi from '@/api/wms/productionline'
@ -120,18 +159,18 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ToolAccounts.allSchemas.tableColumns)
const tabs = ref<{ label: string; prop: string; }[]>([])
const subTabList = ref([]);
const tabs = ref<{ label: string; prop: string }[]>([])
const subTabList = ref([])
const detailAllSchemas = ref()
const apiPage = ref()
const dialogApiPage = ref()
const dialogAllSchemas = ref()
const operationRecordList = ref([
{label:'报修记录',value:'report'},
{label:'维修记录',value:'repair'},
{label:'保养记录',value:'maintenance'},
{label:'巡检记录',value:'inspection'},
{label:'点检记录',value:'spot_check'},
{ label: '报修记录', value: 'report' },
{ label: '维修记录', value: 'repair' },
{ label: '保养记录', value: 'maintenance' },
{ label: '巡检记录', value: 'inspection' },
{ label: '点检记录', value: 'spot_check' }
])
//
@ -139,16 +178,16 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
if(formField == 'workshopName'){
if (formField == 'workshopName') {
setV['workshopCode'] = val[0]['code']
setV['workshopName'] = val[0]['name']
}else if(formField == 'lineName'){
} else if (formField == 'lineName') {
setV['lineCode'] = val[0]['code']
setV['lineName'] = val[0]['name']
}else if(formField == 'manufactureName'){
} else if (formField == 'manufactureName') {
setV['manufactureCode'] = val[0]['number']
setV['manufactureName'] = val[0]['name']
}else if(formField == 'supplierName'){
} else if (formField == 'supplierName') {
setV['supplierCode'] = val[0]['number']
setV['supplierName'] = val[0]['name']
}
@ -170,12 +209,12 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:tool-accounts:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:tool-accounts:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:tool-accounts:export'}), //
defaultButtons.defaultAddBtn({ hasPermi: 'eam:tool-accounts:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'eam:tool-accounts:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'eam:tool-accounts:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -188,37 +227,47 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:tool-accounts:update'}), //
defaultButtons.componentBtn({hasPermi:'eam:tool-accounts:component'}), //
defaultButtons.sparePartBtn({hasPermi:'eam:tool-accounts:item'}), //
defaultButtons.mainListEditBtn({ hasPermi: 'eam:tool-accounts:update' }), //
defaultButtons.componentBtn({ hasPermi: 'eam:tool-accounts:component' }), //
defaultButtons.sparePartBtn({ hasPermi: 'eam:tool-accounts:item' }) //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:tool-accounts:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
} else if (val == 'component') { //
} else if (val == 'component') {
//
openComponent(row)
} else if (val == 'sparePart') { //
} else if (val == 'sparePart') {
//
openSparePart(row)
}
}
@ -226,32 +275,37 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = async (type: string, row?: any) => {
if(type == 'update'){
const equipmentManufacturerNoPage = await EquipmentManufacturerApi.getEquipmentManufacturerNoPage({})
if (type == 'update') {
const equipmentManufacturerNoPage =
await EquipmentManufacturerApi.getEquipmentManufacturerNoPage({})
const equipmentSupplierNoPage = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const workshopNoPage = await WorkshopApi.getWorkshopNoPage({})
const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({});
row.workshopName = workshopNoPage?.find(item=>item.code == row.workshopCode)?.name
row.lineName = productionlineNoPage?.find(item=>item.code == row.lineCode)?.name
row.manufactureName = equipmentManufacturerNoPage?.find(item=>item.number == row.manufactureCode)?.name
row.supplierName = equipmentSupplierNoPage?.find(item=>item.number == row.supplierCode)?.name
const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({})
row.workshopName = workshopNoPage?.find((item) => item.code == row.workshopCode)?.name
row.lineName = productionlineNoPage?.find((item) => item.code == row.lineCode)?.name
row.manufactureName = equipmentManufacturerNoPage?.find(
(item) => item.number == row.manufactureCode
)?.name
row.supplierName = equipmentSupplierNoPage?.find(
(item) => item.number == row.supplierCode
)?.name
}
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ToolAccounts.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
const formsSuccess = async (formType, data) => {
var isHave = ToolAccounts.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
if (formType === 'create') {
await ToolAccountsApi.createToolAccounts(data)
message.success(t('common.createSuccess'))
@ -266,14 +320,14 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */
const detailRef = ref()
const dynamicInfoFields = ref([
"totalRunningTime",
"maintenanceRunningTime",
"usageTimes",
"lastInspectionDate",
"outageRate",
"breakdownRecover",
"purchaseInterval"
]);
'totalRunningTime',
'maintenanceRunningTime',
'usageTimes',
'lastInspectionDate',
'outageRate',
'breakdownRecover',
'purchaseInterval'
])
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicToolAccounts')
@ -332,27 +386,27 @@ const searchFormClick = (searchData) => {
getList() //
}
const handleOperationTabsChange = (val) => {
if(val == 'report'){
if (val == 'report') {
apiPage.value = EquipmentReportRepairRequestApi.getEquipmentReportRepairRequestPage
detailAllSchemas.value = EquipmentReportRepairRequest.allSchemas
}else if(val == 'repair'){
} else if (val == 'repair') {
apiPage.value = EquipmentRepairRecordMainApi.getEquipmentRepairRecordMainPage
detailAllSchemas.value = EquipmentRepairRecordMain.allSchemas
dialogApiPage.value = EquipmentRepairRecordDetailApi.getEquipmentRepairRecordDetailPage
dialogAllSchemas.value = EquipmentRepairRecordDetail.allSchemas
}else if(val == 'maintenance'){
} else if (val == 'maintenance') {
apiPage.value = EquipmentMaintenanceRecordMainApi.getEquipmentMaintenanceRecordMainPage
detailAllSchemas.value = EquipmentMaintenanceRecordMain.allSchemas
dialogApiPage.value = EquipmentMaintenanceRecordDetailApi.getEquipmentMaintenanceRecordDetailPage
dialogApiPage.value =
EquipmentMaintenanceRecordDetailApi.getEquipmentMaintenanceRecordDetailPage
dialogAllSchemas.value = EquipmentMaintenanceRecordDetail.allSchemas
}else if(val == 'inspection'){
} else if (val == 'inspection') {
apiPage.value = EquipmentInspectionRecordMainApi.getEquipmentInspectionRecordMainPage
detailAllSchemas.value = EquipmentInspectionRecordMain.allSchemas
dialogApiPage.value = EquipmentInspectionRecordDetailApi.getEquipmentInspectionRecordDetailPage
dialogAllSchemas.value = EquipmentInspectionRecordDetail.allSchemas
}else if(val == 'spot_check'){
} else if (val == 'spot_check') {
apiPage.value = EquipmentSpotCheckRecordMainApi.getEquipmentSpotCheckRecordMainPage
detailAllSchemas.value = EquipmentSpotCheckRecordMain.allSchemas
dialogApiPage.value = EquipmentSpotCheckRecordDetailApi.getEquipmentSpotCheckRecordDetailPage
@ -366,38 +420,45 @@ const searchTableSelections = ref([])
const searchTableSparePartSelections = ref([])
const syncData = async (row) => {
searchTableSparePartSelections.value = []
await RelationMainPartApi.getRelationMainPartNoPage({ equipmentCode: row.code,type: 'EQUIPMENT' }).then(async (res) => {
await EquipmentMainPartApi.getEquipmentMainPartNoPage({type: 'EQUIPMENT'}).then(response => {
searchTableSelections.value = response.filter(element => {
let flag = false;
res.forEach(item => {
if (element.code == item.mainPartCode) {
flag = true;
}
});
return flag;
});
});
});
};
await RelationMainPartApi.getRelationMainPartNoPage({
equipmentCode: row.code,
type: 'EQUIPMENT'
}).then(async (res) => {
await EquipmentMainPartApi.getEquipmentMainPartNoPage({ type: 'EQUIPMENT' }).then(
(response) => {
searchTableSelections.value = response.filter((element) => {
let flag = false
res.forEach((item) => {
if (element.code == item.mainPartCode) {
flag = true
}
})
return flag
})
}
)
})
}
const syncSparePartData = async (row) => {
searchTableSparePartSelections.value = []
await EquipmentToolSparePartApi.getEquipmentToolSparePartNoPage({ equipmentToolCode: row.code}).then(async (res) => {
await SparePartApi.getSparePartNoPage({}).then(response => {
searchTableSparePartSelections.value = response.filter(element => {
let flag = false;
res.forEach(item => {
if (element.code == item.sparePartCode) {
flag = true;
await EquipmentToolSparePartApi.getEquipmentToolSparePartNoPage({
equipmentToolCode: row.code
}).then(async (res) => {
await ItemApi.getItemNoPage({}).then((response) => {
searchTableSparePartSelections.value = response.filter((element) => {
let flag = false
res.forEach((item) => {
if (element.number == item.sparePartCode) {
flag = true
}
});
return flag;
});
});
});
};
})
return flag
})
})
})
}
/** 绑定备件操作 */
const openComponent = async (row : any) => {
const openComponent = async (row: any) => {
await syncData(row)
searchTableRef.value.open(
'选择部件',
@ -406,9 +467,9 @@ const openComponent = async (row : any) => {
'equipmentMainPart',
EquipmentMainPart.allSchemas.searchSchema,
true,
null,//type
null, //type
row,
{type: 'EQUIPMENT'},
{ type: 'EQUIPMENT' },
null,
null,
null,
@ -416,16 +477,16 @@ const openComponent = async (row : any) => {
)
}
const openSparePart = async (row : any) => {
const openSparePart = async (row: any) => {
await syncSparePartData(row)
searchSparePartTableRef.value.open(
'选择备件',
SparePart.allSchemas,
SparePartApi.getSparePartPage,
'sparePartPart',
SparePart.allSchemas.searchSchema,
Item.allSchemas,
ItemApi.getItemPage,
'item',
Item.allSchemas.searchSchema,
true,
null,//type
null, //type
row,
null,
null,
@ -435,33 +496,34 @@ const openSparePart = async (row : any) => {
)
}
const submitEquipmentMainPartRelation = (formField, searchField, val, formRef, rowRef) => {
const submitEquipmentMainPartRelation = (formField, searchField, val, formRef, rowRef) => {
const deviceMainPartRelList = val.map((element) => ({
mainPartCode: element.code,
equipmentCode: rowRef.code,
type: 'EQUIPMENT'
}))
RelationMainPartApi.createRelationMainPartBatch(deviceMainPartRelList).then(res => {
mainPartCode: element.number,
equipmentCode: rowRef.code,
type: 'EQUIPMENT'
}))
RelationMainPartApi.createRelationMainPartBatch(deviceMainPartRelList).then((res) => {
message.success(t('common.createSuccess'))
getList()
})
}
const submitSparePartRelation = (formField, searchField, val, formRef, rowRef) => {
const submitSparePartRelation = (formField, searchField, val, formRef, rowRef) => {
const equipmentToolSparePartRelList = val.map((element) => ({
sparePartCode: element.code,
equipmentToolCode: rowRef.code,
type: 'EQUIPMENT'
}))
EquipmentToolSparePartApi.createEquipmentToolSparePartBatch(equipmentToolSparePartRelList).then(res => {
message.success(t('common.createSuccess'))
getList()
})
sparePartCode: element.number,
equipmentToolCode: rowRef.code,
type: 'EQUIPMENT'
}))
EquipmentToolSparePartApi.createEquipmentToolSparePartBatch(equipmentToolSparePartRelList).then(
(res) => {
message.success(t('common.createSuccess'))
getList()
}
)
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ToolAccountsApi.importTemplate()
})
</script>

2
src/views/wms/basicDataManage/itemManage/itempackage/index.vue

@ -153,7 +153,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({ hasPermi: 'wms:itempackage:update' }), //
// defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:itempackage:delete' }) //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:itempackage:delete' }) //
]
// -

14
src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue

@ -49,7 +49,7 @@
:tableFormRules="ContainerRecordDetailRules"
:isBusiness="true"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
@ -91,7 +91,7 @@ const { tableObject, tableMethods } = useTable({
//
/**
*
*
*/
if ( routeName.value == 'ReturnContainerManageRecord') {
tableObject.params = {
@ -111,11 +111,11 @@ const { tableObject, tableMethods } = useTable({
}
businessType.value = 'InitialContainerManage'
importFileName.value = '器具初始化记录'
}
}
else if ( routeName.value == 'ScrapContainerManageRecord') {
tableObject.params = {
type:'SCRAP'
}
}
businessType.value = 'ScrapContainerManage'
importFileName.value = '器具报废记录'
} else if ( routeName.value == 'DeliverContainerManageRecord') {
@ -237,6 +237,12 @@ const handleExport = async () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'type',
'action':'==',
'value':'INITIAL'
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

16
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue

@ -109,7 +109,7 @@ const { tableObject, tableMethods } = useTable({
})
//
/**
*
*
*/
if ( routeName.value == 'InitialContainerManageRequest') {
tableObject.params = {
@ -121,7 +121,7 @@ const { tableObject, tableMethods } = useTable({
}});
businessType.value = 'InitialContainerManage'
importFileName.value = '器具初始化申请'
}
}
// //
const trueFalse = ref(false)
@ -397,19 +397,19 @@ const submitForm = async (formType,submitData) => {
if(data.masterId){
data.id = data.masterId
}
data.subList = tableData.value //
data.subList = tableData.value //
data.subList.forEach(item => {
if(item.qty == 0){
message.error(`到数量不能为0!`)
flag.value = true
return;
}
}
})
try {
if (formType === 'create') {
data.businessType = businessType.value
console.log(data.businessType,999);
await ContainerMainRequestApi.createContainerMainRequest(data)
message.success(t('common.createSuccess'))
} else {
@ -475,6 +475,12 @@ const importSuccess = () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'type',
'action':'==',
'value':'INITIAL'
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

14
src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts

@ -429,7 +429,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
isSearch: false,
hiddenInMain: true
},
{
@ -439,7 +439,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
isSearch: false,
hiddenInMain: true
},
{
@ -480,7 +480,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
sortSearchDefault:3,
isSearch: true,
isSearch: false,
hiddenInMain: true
},
{
@ -491,7 +491,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
sortSearchDefault:4,
isSearch: true,
isSearch: false,
hiddenInMain: true
},
{
@ -512,6 +512,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
hiddenInMain:true,
sortTableDefault:2,
},
@ -522,6 +523,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
hiddenInMain:true,
sortTableDefault:3,
},
@ -529,6 +531,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
isTable:false,
table: {
width: 150
},
@ -690,6 +693,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
hiddenInMain:true,
},
{
@ -740,6 +744,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
hiddenInMain:true,
},
@ -750,6 +755,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
hiddenInMain:true,
},

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

@ -51,6 +51,8 @@
:apiUpdate="RepleinshRequestMainApi.updateRepleinshRequestMain"
:apiCreate="RepleinshRequestMainApi.createRepleinshRequestMain"
:isBusiness="true"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@ -108,8 +110,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (type == 'tableForm') {
//
if (formField == 'itemCode') {
row['itemCode'] = val[0]['code']
row['uom'] = val[0]['uom']
// row['itemCode'] = val[0]['code']
// row['uom'] = val[0]['uom']
val.forEach(item=>{
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['itemCode'] = item['code']
newRow['uom'] = item['uom']
newRow['id'] = item['id']
tableData.value.push(newRow)
})
} else {
row[formField] = val[0][searchField]
}
@ -366,6 +376,9 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){
data.id = data.masterId
}
tableData.value.forEach(item=>{
item.toLocationCode = data.toLocationCode
})
data.subList = tableData.value //
if(tableData.value.find(item => (item.qty <= 0))) {
message.warning('数量必须大于0')

131
src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts

@ -208,44 +208,86 @@ export const RepleinshRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
hiddenInMain:true,
sortSearchDefault:1000,
isSearch: true,
sortTableDefault:1100,
// isTableForm: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchListPlaceholder: '请选择到库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
searchTitle: '库信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPageRepleinsh, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
form: {
componentProps: {
disabled: true
}
}
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择到库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPageRepleinsh, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
},
// {
// label: '从仓库代码',
// field: 'fromWarehouseCode',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false,
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '仓库信息', // 查询弹窗标题
// searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
// searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
// {
// label: '到仓库代码',
// field: 'toWarehouseCode',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false,
// form: {
// componentProps: {
// disabled: true
// }
// }
// },
{
label: '自动提交',
field: 'autoCommit',
@ -498,8 +540,8 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
multiple:true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
@ -587,48 +629,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
sortSearchDefault:1000,
isSearch: true,
sortTableDefault:1100,
// isTableForm: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPageRepleinsh, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择到库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPageRepleinsh, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
},
// {
// label: '包装号',
// field: 'packingNumber',

8
src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue

@ -129,7 +129,7 @@ const getSwitchStatus = async ()=>{
console.log('getSwitchStatus',res)
if(res&&res.list){
switchproductPutawayJobPrint.value = res.list[0].effectiveSetValue == 'TRUE'
}
}
//
@ -255,6 +255,12 @@ const handleExport = async () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'type',
'action':'==',
'value':'predict'
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

6
src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue

@ -165,6 +165,12 @@ const handleExport = async () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'type',
'action':'==',
'value':'predict'
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

6
src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue

@ -421,6 +421,12 @@ const importSuccess = () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'type',
'action':'==',
'value':'predict'
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

2
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue

@ -299,7 +299,7 @@ const searchFormClick = (searchData) => {
const cmd = {
'column':'type',
'action':'==',
'value':'predict'
'value':'scrap'
}
searchData.filters.push(cmd)
tableObject.params = {

6
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue

@ -208,6 +208,12 @@ const handleExport = async () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'type',
'action':'==',
'value':'scrap'
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

5
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts

@ -3,7 +3,7 @@ import { dateFormatter } from '@/utils/formatTime'
export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '上传质报告',
label: '上传质报告',
field: 'uploadFile',
sort: 'custom',
isTable:false,
@ -16,7 +16,8 @@ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchem
tableName: 'SupplierdeliverInspectionDetail',
},
fileType:['pdf','png','jpg','jpeg'],
fileSize:100
fileSize:100,
limit:20000
}
},
},

Loading…
Cancel
Save