Browse Source

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

master_hella_20240701
zhousq 6 months ago
parent
commit
45903158dc
  1. 79
      src/api/eam/equipmentAccounts/index.ts
  2. 2
      src/api/eam/equipmentMainPart/index.ts
  3. 5
      src/api/eam/equipmentManufacturer/index.ts
  4. 5
      src/api/eam/equipmentSupplier/index.ts
  5. 61
      src/api/eam/relationMainPart/index.ts
  6. 75
      src/api/eam/sparePart/index.ts
  7. 12
      src/api/wms/balance/index.ts
  8. 11
      src/api/wms/deliverPlanDetail/index.ts
  9. 13
      src/api/wms/purchasereceiptRecordDetail/index.ts
  10. 5
      src/components/TableForm/src/TableForm.vue
  11. 10
      src/components/rowDrop/index.vue
  12. 9
      src/utils/dict.ts
  13. 24
      src/utils/disposition/defaultButtons.ts
  14. 393
      src/views/eam/equipmentAccounts/equipmentAccounts.data.ts
  15. 293
      src/views/eam/equipmentAccounts/index.vue
  16. 244
      src/views/eam/relationMainPart/index.vue
  17. 122
      src/views/eam/relationMainPart/relationMainPart.data.ts
  18. 244
      src/views/eam/sparePart/index.vue
  19. 264
      src/views/eam/sparePart/sparePart.data.ts
  20. 14
      src/views/qms/inspectionRecord/index.vue
  21. 6
      src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts
  22. 9
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  23. 51
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  24. 35
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  25. 22
      src/views/wms/inventoryManage/balance/index.vue
  26. 1
      src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts
  27. 5
      src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue
  28. 12
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  29. 7
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  30. 136
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

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

@ -0,0 +1,79 @@
import request from '@/config/axios'
export interface EquipmentAccountsVO {
id: number
code: string
name: string
specification: string
type: string
power: string
equity: string
electricMachine: string
beat: string
storageLocation: string
useDept: string
principal: string
principalTelephone: string
status: string
startDate: Date
supplierCode: string
purchaseTime: Date
purchaseDept: string
purchaser: string
productionDate: Date
manufactureCode: string
equipmentLife: string
acceptanceDate: Date
purchasePrice: number
factoryAreaCode: string
workshopCode: string
workshopSectionCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询设备台账列表
export const getEquipmentAccountsPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/equipment-accounts/senior', data })
} else {
return await request.get({ url: `/eam/equipment-accounts/page`, params })
}
}
// 查询设备台账详情
export const getEquipmentAccounts = async (id: number) => {
return await request.get({ url: `/eam/equipment-accounts/get?id=` + id })
}
// 新增设备台账
export const createEquipmentAccounts = async (data: EquipmentAccountsVO) => {
return await request.post({ url: `/eam/equipment-accounts/create`, data })
}
// 修改设备台账
export const updateEquipmentAccounts = async (data: EquipmentAccountsVO) => {
return await request.put({ url: `/eam/equipment-accounts/update`, data })
}
// 删除设备台账
export const deleteEquipmentAccounts = async (id: number) => {
return await request.delete({ url: `/eam/equipment-accounts/delete?id=` + id })
}
// 导出设备台账 Excel
export const exportEquipmentAccounts = async (params) => {
return await request.download({ url: `/eam/equipment-accounts/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/equipment-accounts/get-import-template' })
}

2
src/api/eam/equipmentMainPart/index.ts

@ -64,4 +64,4 @@ export const importTemplate = () => {
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/equipment-main-part/ables` , data })
}
}

5
src/api/eam/equipmentManufacturer/index.ts

@ -65,4 +65,9 @@ export const exportEquipmentManufacturer = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic/equipment-manufacturer/get-import-template' })
}
// 查询设备制造商列表
export const getEquipmentManufacturerNoPage = async (params) => {
return await request.get({ url: `/eam/basic/equipment-manufacturer/noPage`, params })
}

5
src/api/eam/equipmentSupplier/index.ts

@ -65,4 +65,9 @@ export const exportEquipmentSupplier = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic/equipment-supplier/get-import-template' })
}
//供应商列表不分页
export const getEquipmentSupplierNoPage = async (params) => {
return await request.get({ url: `/eam/basic/equipment-supplier/noPage`, params })
}

61
src/api/eam/relationMainPart/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface RelationMainPartVO {
id: number
mainPartCode: string
equipmentCode: string
type: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询主要部件关联列表
export const getRelationMainPartPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/relation/relation-main-partsenior', data })
} else {
return await request.get({ url: `/eam/relation/relation-main-part/page`, params })
}
}
// 查询主要部件关联详情
export const getRelationMainPart = async (id: number) => {
return await request.get({ url: `/eam/relation/relation-main-part/get?id=` + id })
}
// 新增主要部件关联
export const createRelationMainPart = async (data: RelationMainPartVO) => {
return await request.post({ url: `/eam/relation/relation-main-part/create`, data })
}
// 修改主要部件关联
export const updateRelationMainPart = async (data: RelationMainPartVO) => {
return await request.put({ url: `/eam/relation/relation-main-part/update`, data })
}
// 删除主要部件关联
export const deleteRelationMainPart = async (id: number) => {
return await request.delete({ url: `/eam/relation/relation-main-part/delete?id=` + id })
}
// 导出主要部件关联 Excel
export const exportRelationMainPart = async (params) => {
return await request.download({ url: `/eam/relation/relation-main-part/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/relation/relation-main-part/get-import-template' })
}
// 查询主要部件关联列表不分页
export const getRelationMainPartNoPage = async (params) => {
return await request.get({ url: `/eam/relation/relation-main-part/noPage`, params })
}

75
src/api/eam/sparePart/index.ts

@ -0,0 +1,75 @@
import request from '@/config/axios'
export interface SparePartVO {
id: number
code: string
name: string
brand: string
specifications: string
isOverall: string
isConstant: string
subject: string
subjectCode: string
category: string
region: string
classification: string
uom: string
singlePrice: number
stockAge: number
reprocurement: number
safetyStock: number
cost: string
purchaser: string
financer: string
purchaseTime: Date
isFramework: string
isRadeIn: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件基础列表
export const getSparePartPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/sparepart/spare-part/senior', data })
} else {
return await request.get({ url: `/eam/sparepart/spare-part/page`, params })
}
}
// 查询备件基础详情
export const getSparePart = async (id: number) => {
return await request.get({ url: `/eam/sparepart/spare-part/get?id=` + id })
}
// 新增备件基础
export const createSparePart = async (data: SparePartVO) => {
return await request.post({ url: `/eam/sparepart/spare-part/create`, data })
}
// 修改备件基础
export const updateSparePart = async (data: SparePartVO) => {
return await request.put({ url: `/eam/sparepart/spare-part/update`, data })
}
// 删除备件基础
export const deleteSparePart = async (id: number) => {
return await request.delete({ url: `/eam/sparepart/spare-part/delete?id=` + id })
}
// 导出备件基础 Excel
export const exportSparePart = async (params) => {
return await request.download({ url: `/eam/sparepart/spare-part/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/sparepart/spare-part/get-import-template' })
}

12
src/api/wms/balance/index.ts

@ -161,3 +161,15 @@ export const selectConfigToBalance = async (params) => {
return request.get({ url: '/wms/balance/pageConfigToBalance', params})
}
}
// 查询库存余额列表根据业务类型 根据库存状态及库区类型筛选
export const getBalanceByBusinessTypeByItemType = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/balance/pageBusinessTypeToBalanceSenior', data })
} else {
return await request.get({ url: `/wms/balance/pageBusinessTypeToBalance`, params })
}
}

11
src/api/wms/deliverPlanDetail/index.ts

@ -24,6 +24,17 @@ export const selectDetailByMasterID = async (id: number) => {
// 查询发货计划子列表
export const getDeliverPlanDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/deliver-plan-detail/senior', data })
} else {
return await request.get({ url: `/wms/deliver-plan-detail/page`, params })
}
}
// 查询发货计划子列表
export const getDeliverPlanDetailPage1 = async (params) => {
return await request.get({ url: `/wms/deliver-plan-detail/page`, params })
}

13
src/api/wms/purchasereceiptRecordDetail/index.ts

@ -73,6 +73,17 @@ export const getPurchasereceiptRecordDetailPageSpare = async (params) => {
}
// 查询采购收货记录--退货筛选列表
export const getPurchasereceiptRecordDetailPageReturn = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorReturn', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageReturn`, params })
}
}
export const getPurchasereceiptRecordDetailPageSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
@ -152,4 +163,4 @@ export const queryPurchaseceiptChildPackingNumber = async (params) => {
// 查询采购收货缺货记录子包装数据
export const queryPurchaseshortageChildPackingNumber = async (params) => {
return await request.get({ url: `/wms/purchaseshortage-detail/pageChildPackingNumber`, params })
}
}

5
src/components/TableForm/src/TableForm.vue

@ -534,7 +534,10 @@ defineExpose({
padding: 2px 0px;
border: none;
}
::v-deep(.el-form-item--default) {
margin-bottom: 5px;
margin-top: 5px;
}
::v-deep(.el-table td.el-table__cell .el-form-item__content) {
display: flex !important;
align-items: center !important;

10
src/components/rowDrop/index.vue

@ -82,9 +82,13 @@ const closeRowDrop = () => {
const save = () => {
let saveDate:any[] = []
//
saveDate.push(props.allSchemas.tableColumns[0])
let myTableColumns = props.allSchemas.tableColumns
if(props.detailAllSchemas){
myTableColumns = [...props.allSchemas?.tableColumns,...props.detailAllSchemas?.tableMainColumns]
}
saveDate.push(myTableColumns[0])
allData.value.forEach((item) => {
const _item:any = props.allSchemas.tableColumns.find(itemColumns => (itemColumns.label == item ))
const _item:any = myTableColumns.find(itemColumns => (itemColumns.label == item ))
if(_item){
_item.isTable = false
if (checkedDataList.value.indexOf(_item.label) > -1) {
@ -94,7 +98,7 @@ const save = () => {
}
})
//
saveDate.push(props.allSchemas.tableColumns[props.allSchemas.tableColumns.length-1])
saveDate.push(myTableColumns[myTableColumns.length-1])
updataTableColumns(saveDate)
console.log(99, saveDate)
RedisApi.addRedis({key: routeName.value,value: JSON.stringify(saveDate)}).then(() => {

9
src/utils/dict.ts

@ -339,8 +339,13 @@ export enum DICT_TYPE {
PURCHASE_INVOICE_ORDER_TYPE = 'purchase_invoice_order_type', // 发票采购订单类型
// ========== eam - 业务 - ==========
DEVICE_TYPE = 'device_type', // 设备类
DEVICE_TYPE = 'device_type', // 设备
IS_UPDATED = 'is_updated', //是否可修改
DATA_SCOPE = 'data_scope', // 数据范围
ROLE_STATUS = 'role_status' // 角色状态
ROLE_STATUS = 'role_status', // 角色状态
DEVICE_CLASS = 'device_class', //设备类型
DEVICE_STATUS = 'device_status', //设备状态
SUBJECT = 'subject', //科目
REGION = 'region', //区域
PART_CLASS = 'part_class', //备件分类
}

24
src/utils/disposition/defaultButtons.ts

@ -932,6 +932,30 @@ export function mainCopyBtn(option:any) {
hasPermi: ''
})
}
// 主列表-部件
export function componentBtn(option:any) {
return __defaultBtnOption(option,{
label: '部件',
name: 'component',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-备件
export function itemBtn(option:any) {
return __defaultBtnOption(option,{
label: '备件',
name: 'item',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 默认按钮规则
function __defaultBtnOption(option:any,specific:any){
return {

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

@ -0,0 +1,393 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import { validateHanset, validateNum, validateNum100 } from '@/utils/validator'
import { EquipmentSupplier } from '@/views/eam/equipmentSupplier/equipmentSupplier.data'
import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
import { EquipmentManufacturer } from '@/views/eam/equipmentManufacturer/equipmentManufacturer.data'
import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer'
import * as ConfigApi from '@/api/infra/config'
const workshopNoPage = await WorkshopApi.getWorkshopNoPage({})
const equipmentManufacturerNoPage = await EquipmentManufacturerApi.getEquipmentManufacturerNoPage({})
const equipmentSupplierNoPage = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const autoCodeSwitch = await ConfigApi.getConfigKey('deviceCodeAutoSwitch')
const autoSwitch = ref(false)
if (autoCodeSwitch == 'TRUE') {
autoSwitch.value = true
}
// 表单校验
export const EquipmentAccountsRules = reactive({
code: [required],
name: [required],
concurrencyStamp: [required],
principalTelephone: [
{ validator:validateHanset, message: '输入电话格式不正确', trigger: 'blur'}
],
power: [
{ validator:validateNum, message: '输入功率格式不正确', trigger: 'blur'}
],
})
export const EquipmentAccounts = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '设备编号',
field: 'code',
sort: 'custom',
isForm: !autoSwitch.value,
isSearch: true,
fixed: 'left'
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true
},
{
label: '设备型号',
field: 'specification',
sort: 'custom',
isSearch: false
},
{
label: '设备类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_CLASS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '功率(kw)',
field: 'power',
sort: 'custom',
isSearch: false
},
{
label: '产权',
field: 'equity',
sort: 'custom',
isSearch: false
},
{
label: '电机',
field: 'electricMachine',
sort: 'custom',
isSearch: false
},
{
label: '节拍',
field: 'beat',
sort: 'custom',
isSearch: false
},
{
label: '存放位置',
field: 'storageLocation',
sort: 'custom',
isSearch: false
},
{
label: '使用部门',
field: 'useDept',
sort: 'custom',
isSearch: false
},
{
label: '负责人',
field: 'principal',
sort: 'custom',
isSearch: false
},
{
label: '负责人联系方式',
field: 'principalTelephone',
sort: 'custom',
isSearch: false,
},
{
label: '设备状态',
field: 'status',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.DEVICE_STATUS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Select'
}
},
{
label: '启用日期',
field: 'startDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: '供应商',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
isDetail: false,
isForm: false,
isTable: true,
isTableForm: false,
search: {
component: 'Select',
componentProps: {
options: equipmentSupplierNoPage,
optionsAlias: {
labelField: 'name',
valueField: 'number'
},
filterable: true,
}
},
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return equipmentSupplierNoPage.find((item) => item.number == cellValue)?.name
},
},
{
label: '供应商',
field: 'supplierName',
sort: 'custom',
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: EquipmentSupplier.allSchemas, // 查询弹窗所需类
searchPage: EquipmentSupplierApi.getEquipmentSupplierPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
},
{
label: '采购时间',
field: 'purchaseTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: '采购部门',
field: 'purchaseDept',
sort: 'custom',
isSearch: false
},
{
label: '采购人',
field: 'purchaser',
sort: 'custom',
isSearch: false
},
{
label: '出厂日期',
field: 'productionDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: '生产厂商',
field: 'manufactureCode',
sort: 'custom',
isSearch: true,
isDetail: false,
isForm: false,
isTable: true,
isTableForm: false,
search: {
component: 'Select',
componentProps: {
options: equipmentManufacturerNoPage,
optionsAlias: {
labelField: 'name',
valueField: 'number'
}
}
},
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return equipmentManufacturerNoPage.find((item) => item.number == cellValue)?.name
},
},
{
label: '生产厂商',
field: 'manufactureName',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择厂商', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '生产厂商', // 查询弹窗标题
searchAllSchemas: EquipmentManufacturer.allSchemas, // 查询弹窗所需类
searchPage: EquipmentManufacturerApi.getEquipmentManufacturerPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
},
{
label: '设备使用寿命',
field: 'equipmentLife',
sort: 'custom',
isSearch: false
},
{
label: '验收日期',
field: 'acceptanceDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: '价格',
field: 'purchasePrice',
sort: 'custom',
isSearch: false
},
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true,
isDetail: false,
isForm: false,
isTable: true,
isTableForm: false,
search: {
component: 'Select',
componentProps: {
options: workshopNoPage,
optionsAlias: {
labelField: 'name',
valueField: 'code'
},
filterable: true,
}
},
formatter: (_: Recordable, __: TableColumn, cellValue: string) => {
return workshopNoPage.find((item) => item.code == cellValue)?.name
},
},
{
label: '车间编号',
field: 'workshopName',
sort: 'custom',
isTable: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
},
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

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

@ -0,0 +1,293 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="EquipmentAccounts.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="EquipmentAccounts.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<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)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="EquipmentAccountsRules"
:formAllSchemas="EquipmentAccounts.allSchemas"
:apiUpdate="EquipmentAccountsApi.updateEquipmentAccounts"
:apiCreate="EquipmentAccountsApi.createEquipmentAccounts"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="EquipmentAccounts.allSchemas" />
<!-- 主要部件 -->
<SearchTable ref="searchTableRef" @onMountedCallBack="onMountedCallBack" @searchTableSuccess="submitItem" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/equipment-accounts/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { EquipmentAccounts,EquipmentAccountsRules } from './equipmentAccounts.data'
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 Detail from '@/components/Detail/src/Detail.vue'
import { RelationMainPart,RelationMainPartRules } from '../relationMainPart/relationMainPart.data'
import * as RelationMainPartApi from '@/api/eam/relationMainPart'
defineOptions({ name: 'EquipmentAccounts' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(EquipmentAccounts.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: EquipmentAccountsApi.getEquipmentAccountsPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:equipment-accounts:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:equipment-accounts:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:equipment-accounts:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-accounts:update'}), //
defaultButtons.componentBtn({hasPermi:'eam:equipment-accounts:component'}), //
defaultButtons.itemBtn({hasPermi:'eam:equipment-accounts:item'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-accounts:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'component') { //
openComponent(row)
} else if (val == 'part') { //
openItem(row)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =EquipmentAccounts.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;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await EquipmentAccountsApi.createEquipmentAccounts(data)
message.success(t('common.createSuccess'))
} else {
await EquipmentAccountsApi.updateEquipmentAccounts(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicEquipmentAccounts')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await EquipmentAccountsApi.deleteEquipmentAccounts(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await EquipmentAccountsApi.exportEquipmentAccounts(tableObject.params)
download.excel(data, '设备台账.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '设备台账导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
const searchTableRef = ref()
const searchTableSelections = ref([])
// const syncData = async () => {
// await RelationMainPartApi.getRelationMainPartNoPage({ deviceNumber: deviceNumber.value }).then(async (res) => {
// await ItemApi.getItemNoPage().then(response => {
// searchTableSelections.value = response.filter(element => {
// let flag = false;
// res.forEach(item => {
// if (element.number == item.itemNumber) {
// flag = true;
// }
// });
// return flag;
// });
// });
// });
// };
/** 绑定备件操作 */
const openComponent = async (row : any) => {
searchTableRef.value.open(
'选择部件',
RelationMainPart.allSchemas,
RelationMainPartApi.getRelationMainPartPage,
null,
RelationMainPart.allSchemas.searchSchema,
true,
null,
null,
null,
null,
searchTableSelections.value
)
}
const openItem = async (number : String) => {
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await EquipmentAccountsApi.importTemplate()
})
</script>

244
src/views/eam/relationMainPart/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="RelationMainPart.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RelationMainPart.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<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)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="RelationMainPartRules"
:formAllSchemas="RelationMainPart.allSchemas"
:apiUpdate="RelationMainPartApi.updateRelationMainPart"
:apiCreate="RelationMainPartApi.createRelationMainPart"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="RelationMainPart.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/relation/main-part/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { RelationMainPart,RelationMainPartRules } from './relationMainPart.data'
import * as RelationMainPartApi from '@/api/eam/relationMainPart'
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'
defineOptions({ name: 'RelationMainPart' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(RelationMainPart.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: RelationMainPartApi.getRelationMainPartPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:main-part:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:main-part:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:main-part:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:main-part:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:main-part:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =RelationMainPart.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;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await RelationMainPartApi.createRelationMainPart(data)
message.success(t('common.createSuccess'))
} else {
await RelationMainPartApi.updateRelationMainPart(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicMainPart')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await RelationMainPartApi.deleteRelationMainPart(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RelationMainPartApi.exportRelationMainPart(tableObject.params)
download.excel(data, '主要部件关联.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '主要部件关联导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await RelationMainPartApi.importTemplate()
})
</script>

122
src/views/eam/relationMainPart/relationMainPart.data.ts

@ -0,0 +1,122 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const RelationMainPartRules = reactive({
mainPartCode: [required],
equipmentCode: [required],
type: [required],
concurrencyStamp: [required]
})
export const RelationMainPart = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '主要零件编号',
field: 'mainPartCode',
sort: 'custom',
isSearch: true
},
{
label: '编码',
field: 'equipmentCode',
sort: 'custom',
isSearch: true
},
{
label: '类别',
field: 'type',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
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: 'departmentCode',
sort: 'custom',
isSearch: true
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
},
{
label: '地点',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: true
},
{
label: '删除时间',
field: 'deletionTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '删除人',
field: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/eam/sparePart/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SparePart.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SparePart.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<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)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="SparePartRules"
:formAllSchemas="SparePart.allSchemas"
:apiUpdate="SparePartApi.updateSparePart"
:apiCreate="SparePartApi.createSparePart"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="SparePart.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/sparepart/spare-part/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SparePart,SparePartRules } from './sparePart.data'
import * as SparePartApi from '@/api/eam/sparePart'
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'
defineOptions({ name: 'SparePart' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SparePart.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: SparePartApi.getSparePartPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:spare-part:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:spare-part:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:spare-part:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:spare-part:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:spare-part:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =SparePart.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;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await SparePartApi.createSparePart(data)
message.success(t('common.createSuccess'))
} else {
await SparePartApi.updateSparePart(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicSparePart')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await SparePartApi.deleteSparePart(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SparePartApi.exportSparePart(tableObject.params)
download.excel(data, '备件基础.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '备件基础导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SparePartApi.importTemplate()
})
</script>

264
src/views/eam/sparePart/sparePart.data.ts

@ -0,0 +1,264 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as ConfigApi from '@/api/infra/config'
const autoCodeSwitch = await ConfigApi.getConfigKey('sparePartCodeAutoSwitch')
const autoSwitch = ref(false)
if (autoCodeSwitch == 'TRUE') {
autoSwitch.value = true
}
// 表单校验
export const SparePartRules = reactive({
code: [required],
name: [required],
isOverall: [required],
uom: [required],
concurrencyStamp: [required]
})
export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '备件编号',
field: 'code',
sort: 'custom',
isForm: !autoSwitch.value,
isSearch: true,
fixed: 'left'
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true
},
{
label: '品牌',
field: 'brand',
sort: 'custom',
isSearch: false
},
{
label: '规格型号',
field: 'specifications',
sort: 'custom',
isSearch: false
},
{
label: '是否全局',
field: 'isOverall',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '是否存储',
field: 'isConstant',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '科目',
field: 'subject',
sort: 'custom',
dictType: DICT_TYPE.SUBJECT,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '科目代码',
field: 'subjectCode',
sort: 'custom',
isSearch: false
},
{
label: '类别',
field: 'category',
sort: 'custom',
isSearch: false
},
{
label: '区域',
field: 'region',
sort: 'custom',
dictType: DICT_TYPE.REGION,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
form: {
component: 'Select'
}
},
{
label: '备件分类',
field: 'classification',
sort: 'custom',
dictType: DICT_TYPE.PART_CLASS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '单位',
field: 'uom',
sort: 'custom',
isSearch: false
},
{
label: '单价',
field: 'singlePrice',
sort: 'custom',
isSearch: false
},
{
label: '库龄',
field: 'stockAge',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '重采购点',
field: 'reprocurement',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '安全库存',
field: 'safetyStock',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '成本中心',
field: 'cost',
sort: 'custom',
isSearch: false
},
{
label: '采购员',
field: 'purchaser',
sort: 'custom',
isSearch: false
},
{
label: '财务',
field: 'financer',
sort: 'custom',
isSearch: false
},
{
label: '采购时间',
field: 'purchaseTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: '是否框架协议',
field: 'isFramework',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '是否以旧换新',
field: 'isRadeIn',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isForm: false,
isSearch: false,
isTableForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

14
src/views/qms/inspectionRecord/index.vue

@ -73,10 +73,20 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionRecordMain.allSchemas.tableColumns)
if(routeName.value=='InspectRecordMain'){
tableColumns.value = tableColumns.value.filter(item=>{
return item.label!='操作'
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
if(routeName.value=='InspectRecordMain'){
tableColumns.value = val.filter(item=>{
return item.label!='操作'
})
}else{
tableColumns.value = val
}
}

6
src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts

@ -46,6 +46,9 @@ export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 200
},
@ -84,6 +87,9 @@ export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 200
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '部门',

9
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

@ -351,15 +351,6 @@ const flag = ref(false)
// form
const submitForm = async (formType, data) => {
data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if (rs.length > 1) isExist = true
})
if (isExist) {
basicFormRef.value.formLoading = false
return message.warning('物料代码重复')
}
data.subList.forEach(obj => {
if (obj.qty == 0) {
message.warning(`数量不能为0!`)

51
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts

@ -100,6 +100,9 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm: false,
isTable: false
},
@ -130,21 +133,8 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
isTable: false
},
{
label: '截止时间',
field: 'dueTime',
sort: 'custom',
formatter: dateFormatter,
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')]
}
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm: false,
isTable: false
@ -153,7 +143,9 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm: false,
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '状态',
@ -257,21 +249,24 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'concurrencyStamp',
sort: 'custom',
isForm: false,
isTable: false
isTable: false,
isDetail:false
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm: false,
isTable: false
isTable: false,
isDetail:false
},
{
label: '工作流流水号',
field: 'serialNumber',
sort: 'custom',
isForm: false,
isTable: false
isTable: false,
isDetail:false
},
{
label: '原因',
@ -285,7 +280,8 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 200,
fixed: 'right'
}
},
isDetail:false
}
]))
@ -311,7 +307,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType,
searchPage: BalanceApi.getBalanceByBusinessTypeByItemType,
searchCondition: []
}
},
@ -321,7 +317,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchPage: BalanceApi.getBalanceByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchCondition:[
{
key: 'available',
@ -596,14 +592,6 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false,
isTable:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '创建时间',
field: 'createTime',
@ -617,6 +605,9 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm:false,
isTableForm: false,
isTable:false,

35
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -19,6 +19,8 @@ import { Carrier } from '@/views/wms/basicDataManage/orderManage/carrier/carrier
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ItemPackageApi from '@/api/wms/itempackage/index'
import * as CustomerreturnRequestApi from '@/api/wms/customerreturnRequestMain'
@ -884,22 +886,22 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
// {
// label: '到库位代码',
// field: 'toLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// disabled: true
// },
// form: {
// componentProps: {
// disabled: true
// }
// }
// },
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '库存状态',
field: 'inventoryStatus',
@ -1187,7 +1189,6 @@ export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSche
{
label: '生产日期',
field: 'produceDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},

22
src/views/wms/inventoryManage/balance/index.vue

@ -133,17 +133,17 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
// {
// label: '',
// name: 'bqxx',
// hide: false,
// type: 'primary',
// icon: '',
// color: '',
// link: true,
// float:'right',
// hasPermi: ''
// },
{
label: '标签信息',
name: 'bqxx',
hide: false,
type: 'primary',
icon: '',
color: '',
link: true,
float:'right',
hasPermi: ''
},
defaultButtons.mainListPointBtn(null), //
// defaultButtons.mainListEditBtn({hasPermi:'wms:balance:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:balance:delete'}), //

1
src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts

@ -274,6 +274,7 @@ export const ContainerRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
hiddenInMain:true,
isTableForm: false,
isTable: false,
table: {
width: 150,
fixed: 'right'

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

@ -58,6 +58,9 @@
:detailAllSchemas="ContainerRecordDetail.allSchemas"
:detailAllSchemasRules="ContainerRecordDetailRules"
:apiPage="ContainerRecordDetailApi.getContainerRecordDetailPage"
:detailButtonIsShowAdd="false"
:detailButtonIsShowDelete="false"
:detailButtonIsShowUpdate="false"
/>
</template>
@ -137,7 +140,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:container-record-detail:create'}), //
// defaultButtons.defaultAddBtn({hasPermi:'wms:container-record-detail:create'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:container-record-detail:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //

12
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -464,10 +464,14 @@ const handleAgree = async (id: number) => {
const handleHandle = async (id: number) => {
await message.confirm(t('common.confirmHandle'))
tableObject.loading = true
await UnplannedreceiptRequestMainApi.handleUnplannedreceiptRequestMain(id)
message.success(t('common.handleSuccess'))
tableObject.loading = false
await getList()
try {
await UnplannedreceiptRequestMainApi.handleUnplannedreceiptRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} finally {
tableObject.loading = false
}
}
/** 添加/修改操作 */

7
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -269,8 +269,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
item.packingNumber = item.fromPackingNumber
item.containerNumber = item.toContainerNumber
item.receiptQty = item.qty
item.packUnit = item.packUnit
item.packQty = item.packQty
item.toLocationGroupCode = null
item.toWarehouseCode = null
item.fromLocationCode = null
item.toAreaTypes = null
item.toLocationCode = null
// item.fromLocationCode = item.fromLocationCode
@ -337,7 +340,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['supplierUom'] = val[0]['supplierUom']
setV['inventoryStatus'] = val[0]['inventoryStatus']
// setV['fromLocationCode'] = val[0]['toLocationCode']
setV['toLocationCode'] = val[0]['toLocationCode']
// setV['toLocationCode'] = val[0]['toLocationCode']
setV['fromLocationGroupCode'] = val[0]['locationGroupCode']
setV['toLocationGroupCode'] = null
setV['toWarehouseCode'] = null
@ -363,7 +366,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['containerNumber'] = val[0]['containerNumber']
setV['containerNumber'] = val[0]['containerNumber']
// setV['fromLocationCode'] = val[0]['fromLocationCode']
setV['toLocationCode'] = val[0]['toLocationCode']
// setV['toLocationCode'] = val[0]['toLocationCode']
}
}else {
setV[formField] = val[0][searchField]

136
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -96,14 +96,6 @@ const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '计量单位',
field: 'uom',
@ -115,14 +107,6 @@ const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '包装号', // 实际是子表的从包装号,为了不影响页面,单独放上面
field: 'fromPackingNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装规格',
field: 'packUnit',
@ -133,21 +117,6 @@ const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
},
tableForm: {
disabled: true,
},
isForm:false,
},
{
label: '从库位代码',
field: 'fromLocationCode',
@ -241,7 +210,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '采购收货记录', // 查询弹窗标题
searchAllSchemas: PurchasereceiptRecordMain1.allSchemas, // 查询弹窗所需类
searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage, // 查询弹窗所需分页方法
searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'supplierCode',
@ -608,6 +577,9 @@ export const PurchasereturnRequestMainRules = reactive({
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
dueTime: [
{ required: true, message: '请选择截止时间', trigger: 'blur' }
],
purchaseReceiptRecordNumber: [
{ required: true, message: '请输入采购收货记录单号', trigger: 'blur' }
],
@ -674,7 +646,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
isInpuFocusShow: false, // 开启查询弹窗
searchListPlaceholder: '请选择订单行',
searchField: 'poLine',
searchTitle: '采购收货记录信息',
@ -690,7 +662,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
isSearchList: false,
searchListPlaceholder: '请选择订单行',
searchField: 'poLine',
searchTitle: '采购收货记录信息',
@ -796,33 +768,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
// {
// label: '从批次',
// field: 'fromBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// disabled:true
// }
// },
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '替代批次',
field: 'altBatch',
@ -880,6 +826,27 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true,
type: 'Select',
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '收货数量',
field: 'receiptQty',
@ -895,6 +862,8 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
disabled:true
}
},
isTable:false,
isTableForm:false,
tableForm:{
disabled:true,
type:'InputNumber',
@ -948,27 +917,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true,
type: 'Select',
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '库存状态',
field: 'inventoryStatus',
@ -1168,7 +1117,6 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
},
},
{
label: '项目代码',
field: 'projectCode',
@ -1394,7 +1342,7 @@ export const PurchasereReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
table: {
width: 150
},
isTableForm: false,
isTableForm: true,
isForm: false
},
{
@ -1482,17 +1430,7 @@ export const PurchasereReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
valueFormat: 'x',
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '替代批次',
field: 'altBatch',
@ -1519,6 +1457,14 @@ export const PurchasereReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
type: 'Select'
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装数量',
field: 'packQty',

Loading…
Cancel
Save