Browse Source

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

master_hella_20240701
ljlong_2630 6 months ago
parent
commit
50dbf68337
  1. 3
      .env.test
  2. 2
      README.md
  3. 20
      src/api/eam/documentTypeSelectSet/index.ts
  4. 18
      src/api/eam/inspectionItemSelectSet/index.ts
  5. 60
      src/api/eam/maintenanceItemSelectSet/index.ts
  6. 18
      src/api/eam/spotCheckSelectSet/index.ts
  7. 12
      src/api/wms/balance/index.ts
  8. 5
      src/api/wms/customerreturnRequestMain/index.ts
  9. 2
      src/components/Annex/src/Annex.vue
  10. 2
      src/router/modules/remaining.ts
  11. 42
      src/views/eam/basicInspectionOption/basicInspectionOption.data.ts
  12. 13
      src/views/eam/basicInspectionOption/index.vue
  13. 63
      src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts
  14. 13
      src/views/eam/basicMaintenanceOption/index.vue
  15. 130
      src/views/eam/maintenanceItemSelectSet/index.vue
  16. 280
      src/views/eam/maintenanceItemSelectSet/itemSelectSetForm.vue
  17. 141
      src/views/eam/maintenanceItemSelectSet/maintenanceItemSelectSet.data.ts
  18. 18
      src/views/eam/spotCheckSelectSet/index.vue
  19. 2
      src/views/eam/spotCheckSelectSet/itemSelectSetForm.vue
  20. 0
      src/views/eam/spotCheckSelectSet/spotCheckSelectSet.data.ts
  21. 3
      src/views/mes/abilityInfo/index.vue
  22. 38
      src/views/mes/components/Detail.vue
  23. 1
      src/views/mes/item/item.data.ts
  24. 2
      src/views/mes/operstepsType/operstepsType.data.ts
  25. 1
      src/views/mes/orderDay/components/BasicFormV2.vue
  26. 5
      src/views/mes/orderDay/components/schedule.vue
  27. 7
      src/views/mes/orderDay/orderDay.data.ts
  28. 2
      src/views/mes/pattern/pattern.data.ts
  29. 15
      src/views/mes/processroute/index.vue
  30. 1
      src/views/mes/processroute/processroute.data.ts
  31. 5
      src/views/mes/reworkBatch/reworkBatch.data.ts
  32. 4
      src/views/mes/workScheduling/components/Detail.vue
  33. 12
      src/views/mes/workScheduling/index.vue
  34. 1
      src/views/system/dept/index.vue
  35. 99
      src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue
  36. 308
      src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts
  37. 103
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  38. 66
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  39. 553
      src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequestMain.data.ts
  40. 244
      src/views/wms/basicDataManage/itemManage/relegateRequestDetail/relegateRequest.data.ts
  41. 1
      src/views/wms/basicDataManage/labelManage/callmaterials/index.vue
  42. 22
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  43. 259
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  44. 98
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  45. 22
      src/views/wms/inventoryManage/balance/index.vue
  46. 5
      src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue
  47. 2
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  48. 10
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  49. 20
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  50. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts

3
.env.test

@ -38,3 +38,6 @@ VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'
# 租户配置 # 租户配置
VITE_TENANT='["长春","成都"]' VITE_TENANT='["长春","成都"]'
# 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'

2
README.md

@ -1,4 +1,4 @@
## dev发布2024-05-20-001 ## dev发布2024-05-21-002
**xxxx.data.ts 文件配置说明** **xxxx.data.ts 文件配置说明**
**form表单查询弹窗配置** **form表单查询弹窗配置**
form: { form: {

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

@ -1,5 +1,5 @@
import request from '@/config/axios' import request from '@/config/axios'
import {BasicSpotCheckSelectSetVO} from "@/api/eam/basicSpotCheckSelectSet"; import {BasicSpotCheckSelectSetVO} from "@/api/eam/spotCheckSelectSet";
export interface DocumentTypeSelectSetVO { export interface DocumentTypeSelectSetVO {
id: number id: number
@ -19,43 +19,43 @@ export const getDocumentTypeSelectSetPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return await request.post({ url: '/eam/document-type-select-set/senior', data }) return await request.post({ url: '/eam/basic/document-type-select-set/senior', data })
} else { } else {
return await request.get({ url: `/eam/document-type-select-set/page`, params }) return await request.get({ url: `/eam/basic/document-type-select-set/page`, params })
} }
} }
// 查询文档类型选择集详情 // 查询文档类型选择集详情
export const getDocumentTypeSelectSet = async (id: number) => { export const getDocumentTypeSelectSet = async (id: number) => {
return await request.get({ url: `/eam/document-type-select-set/get?id=` + id }) return await request.get({ url: `/eam/basic/document-type-select-set/get?id=` + id })
} }
// 新增文档类型选择集 // 新增文档类型选择集
export const createDocumentTypeSelectSet = async (data: DocumentTypeSelectSetVO) => { export const createDocumentTypeSelectSet = async (data: DocumentTypeSelectSetVO) => {
return await request.post({ url: `/eam/document-type-select-set/create`, data }) return await request.post({ url: `/eam/basic/document-type-select-set/create`, data })
} }
// 修改文档类型选择集 // 修改文档类型选择集
export const updateDocumentTypeSelectSet = async (data: DocumentTypeSelectSetVO) => { export const updateDocumentTypeSelectSet = async (data: DocumentTypeSelectSetVO) => {
return await request.put({ url: `/eam/document-type-select-set/update`, data }) return await request.put({ url: `/eam/basic/document-type-select-set/update`, data })
} }
// 删除文档类型选择集 // 删除文档类型选择集
export const deleteDocumentTypeSelectSet = async (id: number) => { export const deleteDocumentTypeSelectSet = async (id: number) => {
return await request.delete({ url: `/eam/document-type-select-set/delete?id=` + id }) return await request.delete({ url: `/eam/basic/document-type-select-set/delete?id=` + id })
} }
// 导出文档类型选择集 Excel // 导出文档类型选择集 Excel
export const exportDocumentTypeSelectSet = async (params) => { export const exportDocumentTypeSelectSet = async (params) => {
return await request.download({ url: `/eam/document-type-select-set/export-excel`, params }) return await request.download({ url: `/eam/basic/document-type-select-set/export-excel`, params })
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/document-type-select-set/get-import-template' }) return request.download({ url: '/eam/basic/document-type-select-set/get-import-template' })
} }
// 启用 / 禁用 // 启用 / 禁用
export const updateEnableCode = async (data: DocumentTypeSelectSetVO) => { export const updateEnableCode = async (data: DocumentTypeSelectSetVO) => {
return await request.post({ url: `/eam/document-type-select-set/ables` , data }) return await request.post({ url: `/eam/basic/document-type-select-set/ables` , data })
} }

18
src/api/eam/inspectionItemSelectSet/index.ts

@ -18,43 +18,43 @@ export const getInspectionItemSelectSetPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return await request.post({ url: '/eam/inspection-item-select-set/senior', data }) return await request.post({ url: '/eam/basic/inspection-item-select-set/senior', data })
} else { } else {
return await request.get({ url: `/eam/inspection-item-select-set/page`, params }) return await request.get({ url: `/eam/basic/inspection-item-select-set/page`, params })
} }
} }
// 查询巡检项选择集详情 // 查询巡检项选择集详情
export const getInspectionItemSelectSet = async (id: number) => { export const getInspectionItemSelectSet = async (id: number) => {
return await request.get({ url: `/eam/inspection-item-select-set/get?id=` + id }) return await request.get({ url: `/eam/basic/inspection-item-select-set/get?id=` + id })
} }
// 新增巡检项选择集 // 新增巡检项选择集
export const createInspectionItemSelectSet = async (data: InspectionItemSelectSetVO) => { export const createInspectionItemSelectSet = async (data: InspectionItemSelectSetVO) => {
return await request.post({ url: `/eam/inspection-item-select-set/create`, data }) return await request.post({ url: `/eam/basic/inspection-item-select-set/create`, data })
} }
// 修改巡检项选择集 // 修改巡检项选择集
export const updateInspectionItemSelectSet = async (data: InspectionItemSelectSetVO) => { export const updateInspectionItemSelectSet = async (data: InspectionItemSelectSetVO) => {
return await request.put({ url: `/eam/inspection-item-select-set/update`, data }) return await request.put({ url: `/eam/basic/inspection-item-select-set/update`, data })
} }
// 删除巡检项选择集 // 删除巡检项选择集
export const deleteInspectionItemSelectSet = async (id: number) => { export const deleteInspectionItemSelectSet = async (id: number) => {
return await request.delete({ url: `/eam/inspection-item-select-set/delete?id=` + id }) return await request.delete({ url: `/eam/basic/inspection-item-select-set/delete?id=` + id })
} }
// 导出巡检项选择集 Excel // 导出巡检项选择集 Excel
export const exportInspectionItemSelectSet = async (params) => { export const exportInspectionItemSelectSet = async (params) => {
return await request.download({ url: `/eam/inspection-item-select-set/export-excel`, params }) return await request.download({ url: `/eam/basic/inspection-item-select-set/export-excel`, params })
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/inspection-item-select-set/get-import-template' }) return request.download({ url: '/eam/basic/inspection-item-select-set/get-import-template' })
} }
// 启用 / 禁用 // 启用 / 禁用
export const updateEnableCode = async (data: InspectionItemSelectSetVO) => { export const updateEnableCode = async (data: InspectionItemSelectSetVO) => {
return await request.post({ url: `/eam/inspection-item-select-set/ables` , data }) return await request.post({ url: `/eam/basic/inspection-item-select-set/ables` , data })
} }

60
src/api/eam/maintenanceItemSelectSet/index.ts

@ -0,0 +1,60 @@
import request from '@/config/axios'
export interface MaintenanceItemSelectSetVO {
id: number
name: string
itemCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询保养项选择集列表
export const getBasicMaintenanceItemSelectSetPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/basic/maintenance-item-select-set/senior', data })
} else {
return await request.get({ url: `/eam/basic/maintenance-item-select-set/page`, params })
}
}
// 查询保养项选择集详情
export const getBasicMaintenanceItemSelectSet = async (id: number) => {
return await request.get({ url: `/eam/basic/maintenance-item-select-set/get?id=` + id })
}
// 新增保养项选择集
export const createBasicMaintenanceItemSelectSet = async (data: MaintenanceItemSelectSetVO) => {
return await request.post({ url: `/eam/basic/maintenance-item-select-set/create`, data })
}
// 修改保养项选择集
export const updateBasicMaintenanceItemSelectSet = async (data: MaintenanceItemSelectSetVO) => {
return await request.put({ url: `/eam/basic/maintenance-item-select-set/update`, data })
}
// 删除保养项选择集
export const deleteBasicMaintenanceItemSelectSet = async (id: number) => {
return await request.delete({ url: `/eam/basic/maintenance-item-select-set/delete?id=` + id })
}
// 导出保养项选择集 Excel
export const exportBasicMaintenanceItemSelectSet = async (params) => {
return await request.download({ url: `/eam/basic/maintenance-item-select-set/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic/maintenance-item-select-set/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: MaintenanceItemSelectSetVO) => {
return await request.post({ url: `/eam/basic/inspection-item-select-set/ables` , data })
}

18
src/api/eam/basicSpotCheckSelectSet/index.ts → src/api/eam/spotCheckSelectSet/index.ts

@ -19,43 +19,43 @@ export const getBasicSpotCheckSelectSetPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return await request.post({ url: '/eam/basic-spot-check-select-set/senior', data }) return await request.post({ url: '/eam/basic/spot-check-select-set/senior', data })
} else { } else {
return await request.get({ url: `/eam/basic-spot-check-select-set/page`, params }) return await request.get({ url: `/eam/basic/spot-check-select-set/page`, params })
} }
} }
// 查询点检选择集维护详情 // 查询点检选择集维护详情
export const getBasicSpotCheckSelectSet = async (id: number) => { export const getBasicSpotCheckSelectSet = async (id: number) => {
return await request.get({ url: `/eam/basic-spot-check-select-set/get?id=` + id }) return await request.get({ url: `/eam/basic/spot-check-select-set/get?id=` + id })
} }
// 新增点检选择集维护 // 新增点检选择集维护
export const createBasicSpotCheckSelectSet = async (data: BasicSpotCheckSelectSetVO) => { export const createBasicSpotCheckSelectSet = async (data: BasicSpotCheckSelectSetVO) => {
return await request.post({ url: `/eam/basic-spot-check-select-set/create`, data }) return await request.post({ url: `/eam/basic/spot-check-select-set/create`, data })
} }
// 修改点检选择集维护 // 修改点检选择集维护
export const updateBasicSpotCheckSelectSet = async (data: BasicSpotCheckSelectSetVO) => { export const updateBasicSpotCheckSelectSet = async (data: BasicSpotCheckSelectSetVO) => {
return await request.put({ url: `/eam/basic-spot-check-select-set/update`, data }) return await request.put({ url: `/eam/basic/spot-check-select-set/update`, data })
} }
// 删除点检选择集维护 // 删除点检选择集维护
export const deleteBasicSpotCheckSelectSet = async (id: number) => { export const deleteBasicSpotCheckSelectSet = async (id: number) => {
return await request.delete({ url: `/eam/basic-spot-check-select-set/delete?id=` + id }) return await request.delete({ url: `/eam/basic/spot-check-select-set/delete?id=` + id })
} }
// 导出点检选择集维护 Excel // 导出点检选择集维护 Excel
export const exportBasicSpotCheckSelectSet = async (params) => { export const exportBasicSpotCheckSelectSet = async (params) => {
return await request.download({ url: `/eam/basic-spot-check-select-set/export-excel`, params }) return await request.download({ url: `/eam/basic/spot-check-select-set/export-excel`, params })
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/basic-spot-check-select-set/get-import-template' }) return request.download({ url: '/eam/basic/spot-check-select-set/get-import-template' })
} }
// 启用 / 禁用 // 启用 / 禁用
export const updateEnableCode = async (data: BasicSpotCheckSelectSetVO) => { export const updateEnableCode = async (data: BasicSpotCheckSelectSetVO) => {
return await request.post({ url: `/eam/basic-spot-check-select-set/ables` , data }) return await request.post({ url: `/eam/basic/spot-check-select-set/ables` , data })
} }

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

@ -161,3 +161,15 @@ export const selectConfigToBalance = async (params) => {
return request.get({ url: '/wms/balance/pageConfigToBalance', 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 })
}
}

5
src/api/wms/customerreturnRequestMain/index.ts

@ -118,3 +118,8 @@ export const pageItemCodeToBalance = async (params) => {
return request.get({ url: `/wms/customerreturn-request-main/pageItemCodeToBalance`, params }) return request.get({ url: `/wms/customerreturn-request-main/pageItemCodeToBalance`, params })
} }
} }
// 生成标签
export const genLabel = async (data) => {
return await request.post({ url: `/wms/customerreturn-request-main/genLabel`, data })
}

2
src/components/Annex/src/Annex.vue

@ -69,7 +69,7 @@ const props = defineProps({
}, },
showAddBtn: { showAddBtn: {
type: Boolean, type: Boolean,
required: true default: true
}, },
}) })
// emit // emit

2
src/router/modules/remaining.ts

@ -247,7 +247,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
{ {
path: '/purchasereceiptReport', path: '/purchasereceiptReport',
component: () => import('@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue'), component: () => import('@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue'),
name: 'NoFound', name: 'purchasereceiptReport',
meta: { meta: {
hidden: true, hidden: true,
title: t('ts.查看质检报告'), title: t('ts.查看质检报告'),

42
src/views/eam/basicInspectionOption/basicInspectionOption.data.ts

@ -1,11 +1,16 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as ItemApi from "@/api/eam/inspectionItemSelectSet";
import {
InspectionItemSelectSet
} from "@/views/eam/inspectionItemSelectSet/inspectionItemSelectSet.data";
import {getInspectionItemSelectSetPage} from "@/api/eam/inspectionItemSelectSet";
// 表单校验 // 表单校验
export const BasicInspectionOptionRules = reactive({ export const BasicInspectionOptionRules = reactive({
code: [required], code: [required],
name: [required], name: [required],
type: [required], selectId: [required],
}) })
export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
@ -30,6 +35,29 @@ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{
label: '选择集',
field: 'selectId',
sort: 'custom',
isDetail: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '巡检选择集信息', // 查询弹窗标题
searchAllSchemas: InspectionItemSelectSet.allSchemas, // 查询弹窗所需类
searchField: 'name', // 查询弹窗赋值字段
searchPage: ItemApi.getInspectionItemSelectSetPage, // 查询弹窗所需分页方法
multiple:true,
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{ {
label: '描述', label: '描述',
field: 'describing', field: 'describing',
@ -56,12 +84,12 @@ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{ // {
label: '巡检项', // label: '巡检项',
field: 'type', // field: 'type',
sort: 'custom', // sort: 'custom',
isSearch: true, // isSearch: true,
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

13
src/views/eam/basicInspectionOption/index.vue

@ -165,6 +165,19 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
if(type == "update"){
BasicInspectionOption.allSchemas.formSchema.forEach((item) => {
if (item.field == 'code') {
item.componentProps.disabled = true
}
})
}else{
BasicInspectionOption.allSchemas.formSchema.forEach((item) => {
if (item.field == 'code') {
item.componentProps.disabled = false
}
})
}
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }

63
src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts

@ -1,5 +1,10 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import {
BasicMaintenanceItemSelectSet
} from "@/views/eam/maintenanceItemSelectSet/maintenanceItemSelectSet.data";
import * as ItemApi from "@/api/eam/maintenanceItemSelectSet";
import {getBasicMaintenanceItemSelectSetPage} from "@/api/eam/maintenanceItemSelectSet";
// 表单校验 // 表单校验
export const BasicMaintenanceOptionRules = reactive({ export const BasicMaintenanceOptionRules = reactive({
@ -30,6 +35,29 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{
label: '选择集',
field: 'selectId',
sort: 'custom',
isDetail: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '保养选择集信息', // 查询弹窗标题
searchAllSchemas: BasicMaintenanceItemSelectSet.allSchemas, // 查询弹窗所需类
searchField: 'name', // 查询弹窗赋值字段
searchPage: ItemApi.getBasicMaintenanceItemSelectSetPage, // 查询弹窗所需分页方法
multiple:true,
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{ {
label: '描述', label: '描述',
field: 'describing', field: 'describing',
@ -37,10 +65,16 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
}, },
{ {
label: '项是否可修改默认是', label: '项是否可修改',
field: 'isUpdated', field: 'isUpdated',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.IS_UPDATED,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: true, isSearch: true,
isTableForm: false,
isForm: true,
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TRUE', value: 'TRUE',
@ -50,12 +84,12 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{ // {
label: '保养项', // label: '保养项',
field: 'type', // field: 'type',
sort: 'custom', // sort: 'custom',
isSearch: true, // isSearch: true,
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -103,14 +137,13 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
form: { dictType: DICT_TYPE.TRUE_FALSE,
component: 'Switch', dictClass: 'string', // 默认都是字符串类型其他暂不考虑
value: 'TRUE', isTable: true,
componentProps: { isDetail: false,
inactiveValue: 'FALSE', isSearch: false,
activeValue: 'TRUE' isTableForm: false,
} isForm: false,
},
}, },
{ {
label: '删除时间', label: '删除时间',

13
src/views/eam/basicMaintenanceOption/index.vue

@ -165,6 +165,19 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
if(type == "update"){
BasicMaintenanceOption.allSchemas.formSchema.forEach((item) => {
if (item.field == 'code') {
item.componentProps.disabled = true
}
})
}else{
BasicMaintenanceOption.allSchemas.formSchema.forEach((item) => {
if (item.field == 'code') {
item.componentProps.disabled = false
}
})
}
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }

130
src/views/wms/basicDataManage/itemManage/relegateRequestDetail/index.vue → src/views/eam/maintenanceItemSelectSet/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="RelegateRequest.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="BasicMaintenanceItemSelectSet.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -11,7 +11,7 @@
:routeName="routeName" :routeName="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="RelegateRequest.allSchemas" :allSchemas="BasicMaintenanceItemSelectSet.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -27,46 +27,39 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{row}"> <template #name="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.name)">
<span>{{ row.code }}</span> <span>{{ row.name }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <ItemForm ref="basicFormRef" @success="getData"/>
ref="basicFormRef"
@success="formsSuccess"
:rules="RelegateRequestRules"
:formAllSchemas="RelegateRequest.allSchemas"
:apiUpdate="RelegateRequestApi.updateRelegateRequest"
:apiCreate="RelegateRequestApi.createRelegateRequest"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="RelegateRequest.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="BasicMaintenanceItemSelectSet.allSchemas" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/relegate-request/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/eam/basic-maintenance-item-select-set/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { RelegateRequest,RelegateRequestRules } from './relegateRequest.data' import { BasicMaintenanceItemSelectSet,BasicMaintenanceItemSelectSetRules } from './maintenanceItemSelectSet.data'
import * as RelegateRequestApi from '@/api/wms/relegateRequestDetail' import * as BasicMaintenanceItemSelectSetApi from '@/api/eam/maintenanceItemSelectSet'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import ItemForm from "@/views/eam/maintenanceItemSelectSet/itemSelectSetForm.vue";
import * as InspectionItemSelectSetApi from "@/api/eam/inspectionItemSelectSet";
defineOptions({ name: 'RelegateRequest' }) defineOptions({ name: 'BasicMaintenanceItemSelectSet' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -74,7 +67,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(RelegateRequest.allSchemas.tableColumns) const tableColumns = ref(BasicMaintenanceItemSelectSet.allSchemas.tableColumns)
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
@ -91,7 +84,7 @@ const updataTableColumns = (val) => {
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: RelegateRequestApi.getRelegateRequestPage // getListApi: BasicMaintenanceItemSelectSetApi.getBasicMaintenanceItemSelectSetPage //
}) })
// //
@ -99,9 +92,9 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:relegate-request:create'}), // defaultButtons.defaultAddBtn({hasPermi:'eam:maintenanceItemSelectSet:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:relegate-request:import'}), // //defaultButtons.defaultImportBtn({hasPermi:'eam:basicMaintenanceItemSelectSet:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:relegate-request:export'}), // //defaultButtons.defaultExportBtn({hasPermi:'eam:basicMaintenanceItemSelectSet:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -131,11 +124,23 @@ const buttonBaseClick = (val, item) => {
} }
} }
const isShowMainButton = (row,val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
return true
}
}
// - // -
const butttondata = [ const butttondata = (row) => {
defaultButtons.mainListEditBtn({hasPermi:'wms:relegate-request:update'}), // return [
defaultButtons.mainListDeleteBtn({hasPermi:'wms:relegate-request:delete'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:maintenanceItemSelectSet:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMainPart:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:maintenanceItemSelectSet:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:maintenanceItemSelectSet:update'}),
] ]
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
@ -143,6 +148,10 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'enable') {
handleEnable(row.id)
} else if (val == 'disable') {
handleDisable(row.id)
} }
} }
@ -154,21 +163,37 @@ const openForm = (type: string, row?: any) => {
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {
var isHave =BasicMaintenanceItemSelectSet.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') { if (formType === 'create') {
await RelegateRequestApi.createRelegateRequest(data) await BasicMaintenanceItemSelectSetApi.createBasicMaintenanceItemSelectSet(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
await RelegateRequestApi.updateRelegateRequest(data) await BasicMaintenanceItemSelectSetApi.updateBasicMaintenanceItemSelectSet(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() getList()
} }
//
const getData = async() => {
getList();
}
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicRelegateRequest') detailRef.value.openDetail(row, titleName, titleValue, 'basicBasicMaintenanceItemSelectSet')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */
@ -177,13 +202,44 @@ const handleDelete = async (id: number) => {
// //
await message.delConfirm() await message.delConfirm()
// //
await RelegateRequestApi.deleteRelegateRequest(id) await BasicMaintenanceItemSelectSetApi.deleteBasicMaintenanceItemSelectSet(id)
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() await getList()
} catch {} } catch {}
} }
/** 启用 */
const handleEnable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'TRUE'
await BasicMaintenanceItemSelectSetApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 禁用 */
const handleDisable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'FALSE'
await BasicMaintenanceItemSelectSetApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {
@ -192,8 +248,8 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await RelegateRequestApi.exportRelegateRequest(tableObject.params) const data = await BasicMaintenanceItemSelectSetApi.exportBasicMaintenanceItemSelectSet(tableObject.params)
download.excel(data, '物料降级信息.xlsx') download.excel(data, '保养项选择集.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -208,7 +264,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '物料降级信息导入模版.xlsx' templateTitle: '保养项选择集导入模版.xlsx'
}) })
// //
const importSuccess = () => { const importSuccess = () => {
@ -227,7 +283,7 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await RelegateRequestApi.importTemplate() importTemplateData.templateUrl = await BasicMaintenanceItemSelectSetApi.importTemplate()
}) })
</script> </script>

280
src/views/eam/maintenanceItemSelectSet/itemSelectSetForm.vue

@ -0,0 +1,280 @@
<template>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<el-form
ref="basicFormRef"
v-loading="formLoading"
:model="formData"
:rules="formRules"
label-width="100px"
>
<el-row>
<el-col :span="12">
<el-form-item label="选择集名称" prop="name">
<el-input v-model="formData.name" placeholder="选择集名称" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注名称" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="保养项" prop="items">
<div class="tag-container flex gap-2">
<el-tag v-for="ent in tags" :key="ent.content" closable :disable-transitions="false" @close="handleClose(ent.id)">
{{ ent.content}}
</el-tag>
<el-input v-if="inputVisible" ref="InputRef" v-model="inputValue" class="w-20" size="small"/>
<el-button v-else class="button-new-tag" size="small" @click="addItem">
添加保养项 +
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
<!--添加保养项弹窗-->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</template>
<script lang="ts" setup>
import * as SelectSetApi from '@/api/eam/maintenanceItemSelectSet'
import request from "@/config/axios";
import { SearchTable } from '@/components/SearchTable'
import { MaintenanceItem} from "@/views/eam/maintenanceItem/maintenanceItem.data";
import * as maintenanceItemApi from "@/api/eam/maintenanceItem";
import {ElInput} from "element-plus";
defineOptions({ name: 'TeamForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const tags=ref([])
const inputValue = ref('')
const inputVisible = ref(false)
const isDisabled = ref(false)
const InputRef = ref<InstanceType<typeof ElInput>>()
const itemData = ref({
id: '',
content: ''
})
const formData = ref({
id: '',
name: '',
itemCode: '',
available: 'TRUE',
remark: '',
createTime: ''
})
const formRules = reactive({
name: [
{ required: true, message: '选择集名称不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
const basicFormRef = ref() // Ref
/** 删除保养项 */
const handleClose = (id: string) => {
const index = tags.value.findIndex(tag => tag.id === id);
if (index !== -1) {
tags.value.splice(index, 1);
}
}
/** 弹窗相关参数 */
const searchTableRef = ref();
const _searchTableTitle = ref();
const _searchTableAllSchemas = ref();
const _searchTablePage = ref();
const _formField = ref();
const _searchField = ref();
const _multiple = ref();
const _type = ref();
const _row = ref();
const _searchCondition = ref({})
const addItem = () =>{
addItemCommon(true,'baoYangItem')
}
/** 选择保养项弹窗 */
const addItemCommon = (multiple,field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
action: "==",
column: 'available',
value: 'TRUE'
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择保养项'
_multiple.value = multiple
_formField.value = field
_searchField.value = field
_searchTablePage.value = maintenanceItemApi.getMaintenanceItemPage
_searchTableAllSchemas.value = MaintenanceItem.allSchemas
openCommon()
}
/** 弹窗选择之后 回调函数 添加选择集 */
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick?.(() => {
if (formField === 'baoYangItem') {
val.forEach(item => {
const isExist = tags.value.some(tag => tag.content === item.content);
if (!isExist){
const newItem = {};
newItem['content'] = item.content;
newItem['id'] = item.id;
tags.value.push(newItem);
}
});
}
})
}
/*打开弹窗*/
const openCommon = () => {
searchTableRef.value.open(
_searchTableTitle.value,
_searchTableAllSchemas.value,
_searchTablePage.value,
_formField.value,
_searchField.value,
_multiple.value,
_type.value,
_row.value,
_searchCondition.value
)
}
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
//
if (row) {
tags.value=[];
isDisabled.value = true;
formLoading.value = true
formData.value = row;
let item = (row.itemCode).split(",")
try {
for (var i = 0; i < item.length; i++) {
itemData.value = await request.get({ url: `/eam/basic/maintenance-item/get?id=` + item[i] });
tags.value.push(itemData.value);
}
} finally {
formLoading.value = false
}
}
//
else {
resetForm()
isDisabled.value = false;
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
if (tags.value.length > 10 ){
message.warning('保养项最多10个');
return
}
let result = '';
for (var i = 0; i < tags.value.length; i++) {
result += tags.value[i].id + ',';
}
if(result.endsWith(',')){
result = result.substring(0,result.length -1)
}
formData.value.itemCode = result
//
formLoading.value = true
//formData.value.members = JSON.stringify(tags.value)
try {
const data = formData.value as unknown as SelectSetApi.MaintenanceItemSelectSetVO
if (formType.value === 'create') {
await SelectSetApi.createBasicMaintenanceItemSelectSet(data)
message.success(t('common.createSuccess'))
} else {
await SelectSetApi.updateBasicMaintenanceItemSelectSet(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: '',
name: '',
itemCode: '',
available: 'TRUE',
remark: '',
createTime: ''
}
tags.value=[];
basicFormRef.value?.resetFields()
}
</script>
<style scoped>
.tag-container {
margin-top: 10px; /* 可根据需要调整标签容器与表单项之间的间距 */
border: 1px solid #ccc; /* 添加边框样式 */
padding: 10px; /* 可根据需要调整容器内边距 */
width: 950px; /* 设置固定宽度为 950px */
overflow-y: auto; /* 当内容溢出容器高度时显示滚动条 */
word-wrap: break-word; /* 使用 word-wrap 属性实现超出范围换行 */
overflow-wrap: break-word; /* 兼容性更好的写法 */
flex-wrap: wrap;
}
.input-with-button {
display: flex;
align-items: center;
width: 100%;
}
.input-with-button > .el-input {
flex: 1;
/*margin-right: 10px;*/
}
</style>

141
src/views/eam/maintenanceItemSelectSet/maintenanceItemSelectSet.data.ts

@ -0,0 +1,141 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const BasicMaintenanceItemSelectSetRules = reactive({
name: [required],
itemCode: [required],
concurrencyStamp: [required],
})
export const BasicMaintenanceItemSelectSet = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '选择集名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '项编号',
field: 'itemCode',
sort: 'custom',
isSearch: true,
},
{
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: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: true,
isTableForm: false,
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

18
src/views/eam/basicSpotCheckSelectSet/index.vue → src/views/eam/spotCheckSelectSet/index.vue

@ -50,13 +50,13 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { BasicSpotCheckSelectSet,BasicSpotCheckSelectSetRules } from './basicSpotCheckSelectSet.data' import { BasicSpotCheckSelectSet,BasicSpotCheckSelectSetRules } from './spotCheckSelectSet.data'
import * as BasicSpotCheckSelectSetApi from '@/api/eam/basicSpotCheckSelectSet' import * as BasicSpotCheckSelectSetApi from '@/api/eam/spotCheckSelectSet'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import ItemForm from "@/views/eam/basicSpotCheckSelectSet/itemSelectSetForm.vue"; import ItemForm from "@/views/eam/spotCheckSelectSet/itemSelectSetForm.vue";
defineOptions({ name: 'BasicSpotCheckSelectSet' }) defineOptions({ name: 'BasicSpotCheckSelectSet' })
@ -91,9 +91,9 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:basicSpotCheckSelectSet:create'}), // defaultButtons.defaultAddBtn({hasPermi:'eam:spotCheckSelectSet:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'eam:basicSpotCheckSelectSet:import'}), // //defaultButtons.defaultImportBtn({hasPermi:'eam:spotCheckSelectSet:import'}), //
//defaultButtons.defaultExportBtn({hasPermi:'eam:basicSpotCheckSelectSet:export'}), // //defaultButtons.defaultExportBtn({hasPermi:'eam:spotCheckSelectSet:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -134,10 +134,10 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({hasPermi:'eam:basicSpotCheckSelectSet:update'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:spotCheckSelectSet:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMainPart:delete'}), // //defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMainPart:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:basicSpotCheckSelectSet:update'}), defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:spotCheckSelectSet:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:basicSpotCheckSelectSet:update'}), defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:spotCheckSelectSet:update'}),
] ]
} }

2
src/views/eam/basicSpotCheckSelectSet/itemSelectSetForm.vue → src/views/eam/spotCheckSelectSet/itemSelectSetForm.vue

@ -52,7 +52,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import * as SelectSetApi from '@/api/eam/basicSpotCheckSelectSet' import * as SelectSetApi from '@/api/eam/spotCheckSelectSet'
import request from "@/config/axios"; import request from "@/config/axios";
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
import { InspectionItem} from "@/views/eam/inspectionItem/inspectionItem.data"; import { InspectionItem} from "@/views/eam/inspectionItem/inspectionItem.data";

0
src/views/eam/basicSpotCheckSelectSet/basicSpotCheckSelectSet.data.ts → src/views/eam/spotCheckSelectSet/spotCheckSelectSet.data.ts

3
src/views/mes/abilityInfo/index.vue

@ -66,7 +66,6 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '../components/Detail.vue' import Detail from '../components/Detail.vue'
import {MesOrderMonthMain} from "@/views/mes/ordermonthplan/mesOrderMonthMain.data";
defineOptions({ name: 'AbilityInfo' }) defineOptions({ name: 'AbilityInfo' })
@ -190,7 +189,7 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicAbilityInfo') detailRef.value.openDetail(row, titleName, titleValue, 'AbilityInfo')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */

38
src/views/mes/components/Detail.vue

@ -40,7 +40,7 @@
</ContentWrap> </ContentWrap>
<div class="flex"> <div class="flex">
<!-- 详情 --> <!-- 详情 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!=annexAliasLabel&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'&&tabsList[current].label!='主数据'&&!annexTableData.some(item=>item.label==tabsList[current].label)"> <!-- 列表头部 --> <ContentWrap class="w-[100%]" v-show="tabsList[current].label!=annexAlias.label&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'&&tabsList[current].label!='主数据'&&!annexTableData.some(item=>item.label==tabsList[current].label)"> <!-- 列表头部 -->
<TableHead <TableHead
v-if="!isBasic" v-if="!isBasic"
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
@ -114,6 +114,7 @@
<div v-for="(annexItem ,index) in annexTableData" :key="index" v-show="annexItem.label==tabsList[current].label" class="w-[100%]" :style="{height:annexItem.hasSubDetail?'100%':remarkHeight+'px'}"> <div v-for="(annexItem ,index) in annexTableData" :key="index" v-show="annexItem.label==tabsList[current].label" class="w-[100%]" :style="{height:annexItem.hasSubDetail?'100%':remarkHeight+'px'}">
<ContentWrap class="w-[100%]"> <ContentWrap class="w-[100%]">
<ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}"> <ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexItem.label" <Annex v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem" :annexData="annexItem"
@handleAnnexSuccess="updateAnnexTableHandle" @handleAnnexSuccess="updateAnnexTableHandle"
@ -138,25 +139,37 @@
</div> </div>
<!-- 附件/备注/变更记录 --> <!-- 附件/备注/变更记录 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAliasLabel||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}"> <ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAlias.label" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 --> <!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}"> <ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexAliasLabel" <Annex
:annexData="annexData" :annexData="annexData"
:showDownload = "annexAlias.showDownload"
:hiddenDelete = "annexAlias.hiddenDelete"
@handleAnnexSuccess="handleAnnexSuccess" @handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess" @deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data" :upData="remarksData.data"
:key="count" :key="count"
/> />
</ElScrollbar>
</ContentWrap>
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='备注'" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<!-- 备注组件 --> <!-- 备注组件 -->
<Remarks v-show="tabsList[current].label=='备注'" <Remarks
:remarksData="remarksData" :remarksData="remarksData"
class="mt-20px" class="mt-20px"
@remarksSubmitScuess="remarksSubmitScuess" @remarksSubmitScuess="remarksSubmitScuess"
:key="count" :key="count"
/> />
</ElScrollbar>
</ContentWrap>
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<!-- 变更记录组件 --> <!-- 变更记录组件 -->
<ChangeRecord v-show="tabsList[current].label=='变更记录'" :changeRecordData="changeRecordData" class="mt-20px" :key="count"/> <ChangeRecord :changeRecordData="changeRecordData" class="mt-20px" :key="count"/>
</ElScrollbar> </ElScrollbar>
</ContentWrap> </ContentWrap>
</div> </div>
@ -226,10 +239,15 @@ const props = defineProps({
default: ()=>[] default: ()=>[]
}, },
//tab //tab
annexAliasLabel: { annexAlias: {
type: String, type: Object,
required: false, required: false,
default: '附件' default: ()=>({
label: '附件',
showDownload:false,
showPreview:false,
hiddenDelete:false
})
}, },
// //
isBasic: { isBasic: {
@ -402,7 +420,7 @@ const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : '')))
// } // }
const otherList = [...props.annexTable,{ const otherList = [...props.annexTable,{
label:props.annexAliasLabel, label:props.annexAlias.label,
prop:'Annex' prop:'Annex'
},{ },{
label:'备注', label:'备注',
@ -503,6 +521,7 @@ const getAnnexFileList = async (row:id) => {
} }
/** 添加附件 */ /** 添加附件 */
const handleAnnexSuccess = () => { const handleAnnexSuccess = () => {
getFileList() getFileList()
getChangeRecordList() getChangeRecordList()
} }
@ -520,6 +539,7 @@ const updateAnnexTableHandle = () => {
// Tabs // Tabs
const current = ref(0) const current = ref(0)
const change = (item, index) => { const change = (item, index) => {
current.value = index current.value = index
emit('changeTabs', item) emit('changeTabs', item)
if(otherList.find(other=>other.label==item.label)){ if(otherList.find(other=>other.label==item.label)){

1
src/views/mes/item/item.data.ts

@ -120,6 +120,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchTitle: '质检科目信息', // 查询弹窗标题 searchTitle: '质检科目信息', // 查询弹窗标题
searchListPlaceholder: '请选择 类别编码', // 输入框占位文本
searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类 searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法 searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法

2
src/views/mes/operstepsType/operstepsType.data.ts

@ -153,7 +153,7 @@ export const OperstepsType = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false isTable: true
}, },
{ {
label: '操作', label: '操作',

1
src/views/mes/orderDay/components/BasicFormV2.vue

@ -372,6 +372,7 @@ const submitForm = async () => {
/** 重置表单 */ /** 重置表单 */
const resetForm = () => { const resetForm = () => {
unref(formRef)?.resetFields() unref(formRef)?.resetFields()
//formRef.value?.resetFields()
} }
// //

5
src/views/mes/orderDay/components/schedule.vue

@ -438,6 +438,11 @@ const getConfigProcessEquipment= async (code:any) => {
} }
const nodeClick = (e, x, y, node, view) => { const nodeClick = (e, x, y, node, view) => {
//console.log(node.id) //console.log(node.id)
//console.log("schedule-nodeClick-440",node)
if(node.id=="startNode" || node.id=="endNode"){
return
}
getProcessBom(node.id) getProcessBom(node.id)
getConfigProcessWorkstation(node.id) getConfigProcessWorkstation(node.id)
getConfigProcessWorker(node.id) getConfigProcessWorker(node.id)

7
src/views/mes/orderDay/orderDay.data.ts

@ -178,11 +178,13 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
required: true, required: true,
value:'',
form:{ form:{
component:'Select', component:'Select',
componentProps:{ componentProps:{
options:[{lablel:'1',value:'1'}] options:[],
} },
} }
}, },
{ {
@ -200,6 +202,7 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
field: 'processrouteCode', field: 'processrouteCode',
sort: 'custom', sort: 'custom',
form: { form: {
value:"",
component:'Select', component:'Select',
componentProps: { componentProps: {
options: [] options: []

2
src/views/mes/pattern/pattern.data.ts

@ -307,6 +307,6 @@ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false isTable: true
} }
])) ]))

15
src/views/mes/processroute/index.vue

@ -126,8 +126,16 @@ const buttonBaseClick = (val, item) => {
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
// if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
// searchFormClick({
// filters: tableObject.params.filters
// })
// } else {
// getList()
// }
getList() getList()
} else if (val == 'filtrate') { // } else if (val == 'filtrate') { //
} else { // } else { //
console.log('其他按钮', item) console.log('其他按钮', item)
} }
@ -257,12 +265,15 @@ const importSuccess = () => {
} }
// //
const searchFormClick = (searchData) => { const searchFormClick = async (searchData) => {
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters
} }
getList() //
//await getList()
//console.log('searchFormClick',tableObject.tableList )
//
} }
/** 初始化 **/ /** 初始化 **/

1
src/views/mes/processroute/processroute.data.ts

@ -131,6 +131,7 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isTable:true
}, },
{ {
label: '图形数据', label: '图形数据',

5
src/views/mes/reworkBatch/reworkBatch.data.ts

@ -152,7 +152,10 @@ export const ReworkBatch = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value:1,
componentProps: {
min: 1
}
}, },
}, },
{ {

4
src/views/mes/workScheduling/components/Detail.vue

@ -833,8 +833,10 @@ const opensearchTable = (
// } // }
const buttonClick=(type,row)=>{ const buttonClick=(type,row)=>{
if (type == 'pfinished') { if (type == 'pfinished') {
message.confirm("是否确认进行完工操作?").then (()=>{
WorkSchedulingDetailApi.processFinished(row.id) WorkSchedulingDetailApi.processFinished(row.id)
getList() getList()})
}else if (type == 'reprotProcess') { }else if (type == 'reprotProcess') {
refreport.value.openDetail(row,"工序报工", planDayCode.value) refreport.value.openDetail(row,"工序报工", planDayCode.value)
}else if (type == 'checkProcess') { }else if (type == 'checkProcess') {

12
src/views/mes/workScheduling/index.vue

@ -192,7 +192,7 @@ const butttondata=(row) =>{ return [
]} ]}
const reportRef=ref() const reportRef=ref()
const reportFinishRef=ref() const reportFinishRef=ref()
const qualifiedCheck=ref()
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
@ -231,8 +231,16 @@ const finishReport=async(row)=>{
} }
//console.log("workscheduling-finishReport-213",row) //console.log("workscheduling-finishReport-213",row)
if(row.workingNode=='endNode'){ if(row.workingNode=='endNode'){
message.confirm("是否确认进行完工操作?").then (()=>{
WorkSchedulingApi.completeHandle(params)})
// if(ret =='ddd'){
// WorkSchedulingApi.completeHandle(params)
// }
//reportFinishRef.value.openDetail(row,"") //reportFinishRef.value.openDetail(row,"")
WorkSchedulingApi.completeHandle(params)
}else{ }else{
// let res=await WorkSchedulingApi.getNodePosition(params) // let res=await WorkSchedulingApi.getNodePosition(params)
// if(res){ // if(res){

1
src/views/system/dept/index.vue

@ -32,6 +32,7 @@
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list" row-key="id" :default-expand-all="isExpandAll" v-if="refreshTable"> <el-table v-loading="loading" :data="list" row-key="id" :default-expand-all="isExpandAll" v-if="refreshTable">
<el-table-column prop="name" label="部门名称" /> <el-table-column prop="name" label="部门名称" />
<el-table-column prop="id" align="center" label="部门编号" />
<el-table-column prop="leader" align="center" label="负责人"> <el-table-column prop="leader" align="center" label="负责人">
<template #default="scope"> <template #default="scope">
{{ userList.find((user) => user.id === scope.row.leaderUserId)?.nickname }} {{ userList.find((user) => user.id === scope.row.leaderUserId)?.nickname }}

99
src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="RelegateRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="[...RelegateRecordMain.allSchemas.searchSchema, ...RelegateRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="RelegateRecordMain.allSchemas" :allSchemas="RelegateRecordMain.allSchemas"
:detailAllSchemas="RelegateRecordDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -27,9 +28,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.code }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
@ -41,29 +42,44 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="formsSuccess" :isOpenSearchTable="true"
@success="getList"
:rules="RelegateRecordMainRules" :rules="RelegateRecordMainRules"
:formAllSchemas="RelegateRecordMain.allSchemas" :formAllSchemas="RelegateRecordMain.allSchemas"
:tableAllSchemas="RelegateRecordDetail.allSchemas"
:tableFormRules="RelegateRecordDetailRules"
:apiUpdate="RelegateRecordMainApi.updateRelegateRecordMain" :apiUpdate="RelegateRecordMainApi.updateRelegateRecordMain"
:apiCreate="RelegateRecordMainApi.createRelegateRecordMain" :apiCreate="RelegateRecordMainApi.createRelegateRecordMain"
:isBusiness="true"
fromeWhere="RelegateRecordMain"
@submitForm="submitForm"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="RelegateRecordMain.allSchemas" /> <Detail
ref="detailRef"
<!-- 导入 --> :isBasic="false"
<ImportForm ref="importFormRef" url="/wms/relegate-record-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> :allSchemas="RelegateRecordMain.allSchemas"
:detailAllSchemas="RelegateRecordDetail.allSchemas"
:detailAllSchemasRules="RelegateRecordDetailRules"
:apiCreate="RelegateRecordDetailApi.createRelegateRecordDetail"
:apiUpdate="RelegateRecordDetailApi.updateRelegateRecordDetail"
:apiPage="RelegateRecordDetailApi.getRelegateRecordDetailPage"
:apiDelete="RelegateRecordDetailApi.deleteRelegateRecordDetail"
fromeWhere="RelegateRecordMain"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailButtonIsShowAdd="true"
:detailButtonIsShowDelete="true" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { RelegateRecordMain,RelegateRecordMainRules } from './relegate-record-main.data' import { RelegateRecordMain,RelegateRecordMainRules,RelegateRecordDetail,RelegateRecordDetailRules } from './relegateRecordMain.data'
import * as RelegateRecordMainApi from '@/api/wms/relegateRecordMain' import * as RelegateRecordMainApi from '@/api/wms/relegateRecordMain'
import * as RelegateRecordDetailApi from '@/api/wms/relegateRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' 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 Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'RelegateRecordMain' }) defineOptions({ name: 'RelegateRecordMain' })
@ -74,7 +90,8 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(RelegateRecordMain.allSchemas.tableColumns) const tableColumns = ref([...RelegateRecordMain.allSchemas.tableColumns,...RelegateRecordDetail.allSchemas.tableMainColumns])
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
@ -85,13 +102,22 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
}) })
} }
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: RelegateRecordMainApi.getRelegateRecordMainPage // getListApi: RelegateRecordDetailApi.getRelegateRecordDetailPage //
}) })
// //
@ -99,8 +125,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:relegate-record-main:create'}), // // defaultButtons.defaultAddBtn({hasPermi:'wms:relegate-record-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:relegate-record-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:relegate-record-main:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:relegate-record-main:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
@ -119,8 +144,6 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
openForm('create') openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
@ -133,8 +156,8 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:relegate-record-main:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'wms:relegate-record-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:relegate-record-main:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:relegate-record-main:delete'}), //
] ]
// - // -
@ -152,19 +175,16 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
/**
* tableForm方法
*/
const tableFormKeys = {}
RelegateRecordDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
// form // form
const formsSuccess = async (formType,data) => { const submitForm = async (formType,data) => {
var isHave =RelegateRecordMain.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') { if (formType === 'create') {
await RelegateRecordMainApi.createRelegateRecordMain(data) await RelegateRecordMainApi.createRelegateRecordMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
@ -211,20 +231,6 @@ const handleExport = async () => {
} }
} }
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '物料降级记录主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
@ -238,7 +244,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await RelegateRecordMainApi.importTemplate()
}) })
</script> </script>

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

@ -1,5 +1,11 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { handleTreeToComponentOptions } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept'
const deptList = ref<Tree[]>([]) // 树形结构
// 加载部门树(默认格式)
deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList())
// 表单校验 // 表单校验
export const RelegateRecordMainRules = reactive({ export const RelegateRecordMainRules = reactive({
@ -11,31 +17,28 @@ export const RelegateRecordMainRules = reactive({
export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: 'id', label: '单据号',
field: 'id', field: 'number',
sort: 'custom', sort: 'custom',
isForm: false, isSearch: true,
table: {
width: 180
},
}, },
{ {
label: '申请单号', label: '申请单号',
field: 'requestNumber', field: 'requestNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 180
},
}, },
{ {
label: '执行时间', label: '执行时间',
field: 'executeTime', field: 'executeTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, 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: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -43,21 +46,37 @@ export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 200
},
}, },
{ {
label: '生效日期', label: '是否可用',
field: 'activeDate', field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
sort: 'custom', sort: 'custom',
formatter: dateFormatter, table: {
isSearch: true, width: 150
search: { },
component: 'DatePicker', form: {
component: 'Switch',
value: 'TRUE',
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss', inactiveValue: 'FALSE',
type: 'daterange', activeValue: 'TRUE'
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] }
} }
}, },
{
label: '申请时间',
field: 'requestTime',
sort: 'custom',
formatter: dateFormatter,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -65,137 +84,236 @@ export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
table: {
width: 200
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
}, },
{ {
label: '是否可用', label: '部门',
field: 'available', field: 'departmentCode',
sort: 'custom', sort: 'custom',
isSearch: true, isTable: false,
isDetail: false,
isSearch: false,
isTableForm: false,
form: {
component: 'TreeSelect',
componentProps: { // 假设deptList是部门数据列表
data: deptList,
placeholder: "请选择部门",
filterable: true,
// multiple: true,
}
}
}, },
{ {
label: '申请时间', label: '业务类型',
field: 'requestTime', field: 'businessType',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, table: {
isSearch: true, width: 150
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: { label: '操作',
type: 'datetime', field: 'action',
valueFormat: 'x' isForm: false,
table: {
width: 150,
fixed: 'right'
}
} }
]))
// 表单校验
export const RelegateRecordDetailRules = reactive({
itemCode: [required],
downItemCode: [required],
businessType: [required],
fromBatch: [required],
fromPackingNumber: [required],
fromLocationCode: [required],
available: [required],
departmentCode: [required],
concurrencyStamp: [required],
})
export const RelegateRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 180
}, },
}, },
{ {
label: '截止时间', label: '降级后物料代码',
field: 'dueTime', field: 'downItemCode',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, table: {
isSearch: true, width: 180
search: { },
component: 'DatePicker', },
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss', disabled: true
type: 'daterange', }
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: { form: {
component: 'DatePicker', component: 'InputNumber',
componentProps: { componentProps: {
type: 'datetime', min: 0,
valueFormat: 'x' precision: 6
} }
}, },
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
}
}, },
{ {
label: '部门', label: '库存状态',
field: 'departmentCode', field: 'inventoryStatus',
sort: 'custom', sort: 'custom',
isSearch: true, dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select'
},
hiddenInMain: true,
isTableForm: false,
isForm: false,
}, },
{ {
label: '用户组', label: '从批次',
field: 'userGroupCode', field: 'fromBatch',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 150
},
}, },
{ {
label: '接口类型', label: '从包装号',
field: 'interfaceType', field: 'fromPackingNumber',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
form: { width: 180
component: 'SelectV2'
}, },
}, },
{ {
label: '代码', label: '从库位代码',
field: 'code', field: 'fromLocationCode',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 180
},
}, },
{ {
label: '单据号', label: '从库区类型',
field: 'number', field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable:false,
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 150
},
isForm: false,
}, },
{ {
label: '业务类型', label: '从库区代码',
field: 'businessType', field: 'fromAreaCodes',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
form: { width: 150
component: 'SelectV2'
}, },
}, },
{ {
label: '备注', label: '到包装号',
field: 'remark', field: 'toPackingNumber',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 180
},
}, },
{ {
label: '创建时间', label: '到批次',
field: 'createTime', field: 'toBatch',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, table: {
isSearch: true, width: 150
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: '扩展属性', label: '到库位代码',
field: 'extraProperties', field: 'toLocationCode',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 180
},
}, },
{ {
label: '地点ID', label: '到仓库代码',
field: 'siteId', field: 'toWarehouseCode',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 180
},
},
{
label: '到库区类型',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable:false,
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '到库区代码',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
}, },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
hiddenInMain:true,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

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

@ -87,8 +87,6 @@ const businessType = 'relegate'
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns, ...RelegateRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns, ...RelegateRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true) const isShowButton = ref(true)
// //
const trueFalse = ref(false)
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
@ -103,7 +101,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['toBatch'] = val[0]['batch'] row['toBatch'] = val[0]['batch']
row['toPackingNumber'] = val[0]['packingNumber'] row['toPackingNumber'] = val[0]['packingNumber']
row['fromLocationCode'] = val[0]['locationCode'] row['fromLocationCode'] = val[0]['locationCode']
row['fromInventoryStatus'] = val[0]['inventoryStatus'] row['inventoryStatus'] = val[0]['inventoryStatus']
} else if (formField == 'downItemCode') { } else if (formField == 'downItemCode') {
row['downItemCode'] = val[0]['code'] row['downItemCode'] = val[0]['code']
} else if (formField == 'toLocationCode') { } else if (formField == 'toLocationCode') {
@ -139,6 +137,15 @@ RelegateRequestDetail.allSchemas.tableFormColumns.map(item => {
key: 'businessType', key: 'businessType',
value: businessType, value: businessType,
isMainValue: false isMainValue: false
},{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
message: '请选择从仓库代码!',
key: 'warehouseCode',
value: 'fromWarehouseCode',
isMainValue: true
} }
] ]
item.form.componentProps.searchCondition = [ item.form.componentProps.searchCondition = [
@ -146,6 +153,15 @@ RelegateRequestDetail.allSchemas.tableFormColumns.map(item => {
key: 'businessType', key: 'businessType',
value: businessType, value: businessType,
isMainValue: false isMainValue: false
},{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
message: '请选择从仓库代码!',
key: 'warehouseCode',
value: 'fromWarehouseCode',
isMainValue: true
} }
] ]
} }
@ -239,20 +255,86 @@ const butttondata = (row, $index) => {
return [] return []
} }
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['2','3','4','6']),hasPermi:'wms:relegate-request-main:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['2','3','4']),hasPermi:'wms:relegate-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:relegate-request-main:reAdd'}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:relegate-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:submit'}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:refused'}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:agree'}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:relegate-request-main:handle'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:relegate-request-main:handle'}), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:relegate-request-main:update' }), // defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:relegate-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:relegate-request-main:delete' }), // // defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:relegate-request-main:delete' }), //
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?')
tableObject.loading = true
RelegateRequestMainApi.close(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainReAdd') { //
await message.confirm('确认要重新添加吗?')
tableObject.loading = true
RelegateRequestMainApi.reAdd(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainSubmit') { //
await message.confirm('确认要提交审批吗?')
tableObject.loading = true
RelegateRequestMainApi.submit(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainTurnDown') { //
await message.confirm('确认要驳回吗?')
tableObject.loading = true
RelegateRequestMainApi.refused(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainApprove') { //
await message.confirm('确认要审批通过吗?')
tableObject.loading = true
RelegateRequestMainApi.agree(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?')
tableObject.loading = true
RelegateRequestMainApi.handle(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
@ -269,15 +351,6 @@ const flag = ref(false)
// form // form
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // 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 => { data.subList.forEach(obj => {
if (obj.qty == 0) { if (obj.qty == 0) {
message.warning(`数量不能为0!`) message.warning(`数量不能为0!`)

66
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')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm: false, isForm: false,
isTable: 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')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
isForm: false, detail: {
isTable: false dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
{
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')]
}
}, },
isForm: false, isForm: false,
isTable: false isTable: false
@ -154,6 +144,8 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'departmentCode', field: 'departmentCode',
sort: 'custom', sort: 'custom',
isForm:false, isForm:false,
isTableForm: false,
isTable:false,
}, },
{ {
label: '状态', label: '状态',
@ -257,21 +249,24 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'concurrencyStamp', field: 'concurrencyStamp',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isTable: false isTable: false,
isDetail:false
}, },
{ {
label: '权限所属人员id', label: '权限所属人员id',
field: 'ruleUserId', field: 'ruleUserId',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isTable: false isTable: false,
isDetail:false
}, },
{ {
label: '工作流流水号', label: '工作流流水号',
field: 'serialNumber', field: 'serialNumber',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isTable: false isTable: false,
isDetail:false
}, },
{ {
label: '原因', label: '原因',
@ -283,9 +278,10 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
width: 150, width: 200,
fixed: 'right' fixed: 'right'
} },
isDetail:false
} }
])) ]))
@ -304,7 +300,6 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true,
form: { form: {
componentProps: { componentProps: {
isSearchList: true, isSearchList: true,
@ -312,12 +307,8 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '库存余额信息', searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas, searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, searchPage: BalanceApi.getBalanceByBusinessTypeByItemType,
searchCondition: [{ searchCondition: []
key: 'available',
value: 'TRUE',
isMainValue: false
}]
} }
}, },
tableForm:{ tableForm:{
@ -326,12 +317,17 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, // 查询弹窗所需分页方法 searchPage: BalanceApi.getBalanceByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchCondition:[ searchCondition:[
{ {
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
message: '请选择从仓库代码!',
key: 'fromWarehouseCode',
value: 'fromWarehouseCode',
isMainValue: true
}] }]
}, },
table: { table: {
@ -379,7 +375,6 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isMainValue: false isMainValue: false
}] }]
}, },
isSearch: true,
table: { table: {
width: 150 width: 150
}, },
@ -597,14 +592,6 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false, isTableForm: false,
isTable:false, isTable:false,
}, },
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -618,6 +605,9 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm:false, isForm:false,
isTableForm: false, isTableForm: false,
isTable:false, isTable:false,
@ -666,7 +656,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
hiddenInMain:true, hiddenInMain:true,
table: { table: {
width: 150, width: 200,
fixed: 'right' fixed: 'right'
}, },
isTableForm: false isTableForm: false

553
src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequestMain.data.ts

@ -1,553 +0,0 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as ItembasicApi from "@/api/wms/itembasic";
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WarehouseApi from "@/api/wms/warehouse";
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize:10,
pageNo:1,
code:'RelegateRequest'
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
// 表单校验
export const RelegateRequestMainRules = reactive({
fromWarehouseCode: [required],
number: [required],
businessType: [required],
autoCommit: [required],
autoAgree: [required],
autoExecute: [required],
directCreateRecord: [required],
concurrencyStamp: [required],
fromAreaTypes: [required],
fromAreaCodes: [required],
})
export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isSearch: true,
isForm: false,
isTable: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
isForm: false,
isTable: false
},
{
label: '创建时间',
field: 'createTime',
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')]
}
},
isForm: false,
isTable: false
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '申请时间',
field: 'requestTime',
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')]
}
},
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')]
}
},
isForm: false,
isTable: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm: false,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '自动提交',
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '自动通过',
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '自动执行',
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '直接生成记录',
field: 'directCreateRecord',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '工作流流水号',
field: 'serialNumber',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '原因',
field: 'reason',
sort: 'custom',
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const RelegateRequestDetailRules = reactive({
itemCode: [required],
downItemCode: [required],
businessType: [required],
available: [required],
departmentCode: [required],
concurrencyStamp: [required],
})
export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
tableForm:{
isInpuFocusShow: false, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'code',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '降级物料代码',
field: 'downItemCode',
sort: 'custom',
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择降级物料代码',
searchField: 'itemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
isSearch: true
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
},
{
label: '从批次',
field: 'fromBatch',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从包装号',
field: 'fromPackingNumber',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从库区类型',
field: 'fromAreaTypes',
sort: 'custom',
isForm:false,
},
{
label: '从库区代码',
field: 'fromAreaCodes',
sort: 'custom',
isForm:false,
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到库区类型',
field: 'toAreaTypes',
sort: 'custom',
isForm:false,
},
{
label: '到库区代码',
field: 'toAreaCodes',
sort: 'custom',
isForm:false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isForm:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm:false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
isForm:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm:false,
},
{
label: '创建时间',
field: 'createTime',
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')]
}
},
isForm: false,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '工作流流水号',
field: 'serialNumber',
isForm:false,
sort: 'custom',
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/wms/basicDataManage/itemManage/relegateRequestDetail/relegateRequest.data.ts

@ -1,244 +0,0 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
// 表单校验
export const RelegateRequestRules = reactive({
itemCode: [required],
downItemCode: [required],
businessType: [required],
available: [required],
departmentCode: [required],
concurrencyStamp: [required],
})
export const RelegateRequest = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm:false,
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '降级后物料代码',
field: 'downItemCode',
sort: 'custom',
isSearch: true,
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
},
{
label: '从批次',
field: 'fromBatch',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从包装号',
field: 'fromPackingNumber',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从库区类型',
field: 'fromAreaTypes',
sort: 'custom',
isForm:false,
},
{
label: '从库区代码',
field: 'fromAreaCodes',
sort: 'custom',
isForm:false,
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到库区类型',
field: 'toAreaTypes',
sort: 'custom',
isForm:false,
},
{
label: '到库区代码',
field: 'toAreaCodes',
sort: 'custom',
isForm:false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isForm:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm:false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
isForm:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm:false,
},
{
label: '创建时间',
field: 'createTime',
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')]
}
},
isForm: false,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '工作流流水号',
field: 'serialNumber',
isForm:false,
sort: 'custom',
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

1
src/views/wms/basicDataManage/labelManage/callmaterials/index.vue

@ -86,6 +86,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
const setV = {} const setV = {}
if (formField == 'itemCode') { if (formField == 'itemCode') {
setV['itemCode'] = val[0]['code'] setV['itemCode'] = val[0]['code']
setV['uom'] = val[0]['uom']
} else if (formField == 'packUnit') { } else if (formField == 'packUnit') {
setV['uom'] = val[0]['uom'] setV['uom'] = val[0]['uom']
setV['packUnit'] = val[0]['packUnit'] setV['packUnit'] = val[0]['packUnit']

22
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -76,7 +76,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '物料忽略名单', label: '物料选择名单',
field: 'ignoreListOfItem', field: 'ignoreListOfItem',
sort: 'custom', sort: 'custom',
table: { table: {
@ -86,7 +86,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
multiple:true,//是否可以多选 multiple:true,//是否可以多选
searchListPlaceholder: '请选择物料忽略名单', // 输入框占位文本 searchListPlaceholder: '请选择物料选择名单', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料信息', // 查询弹窗标题 searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
@ -244,6 +244,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false,
form: { form: {
value: 'Count', value: 'Count',
componentProps: { componentProps: {
@ -267,6 +268,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false,
isForm: false, isForm: false,
}, },
{ {
@ -289,6 +291,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x', valueFormat: 'x',
} }
}, },
isTable:false,
isForm: false, isForm: false,
}, },
{ {
@ -351,8 +354,8 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available', field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isSearch: true, isSearch: false,
isTable: true, isTable: false,
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TRUE', value: 'TRUE',
@ -367,7 +370,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoCommit', field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: false,
isForm: false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
@ -388,7 +391,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoAgree', field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: false,
isForm: false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
@ -409,7 +412,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoExecute', field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: false,
isForm: false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
@ -454,6 +457,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false,
isForm: false, isForm: false,
}, },
{ {
@ -473,6 +477,9 @@ export const CountPlanMainRules = reactive({
type: [ type: [
{ required: true, message: '请选择盘点类型', trigger: 'change' } { required: true, message: '请选择盘点类型', trigger: 'change' }
], ],
ignoreListOfItem: [
{ required: true, message: '请选物料选择名单', trigger: 'change' }
],
crontab: [ crontab: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
@ -734,6 +741,7 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
width: 150, width: 150,
fixed: 'right' fixed: 'right'
}, },
hiddenInMain:true,
isTableForm:false, isTableForm:false,
} }
])) ]))

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

@ -1065,3 +1065,262 @@ export const CustomerreturnRequestDetailRules = reactive({
], ],
}) })
export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
isTableForm: true,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
isTableForm: true,
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '器具号',
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min: 1,
precision: 6
},
},
tableForm: {
disabled:true,
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '生产日期',
field: 'produceDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
disabled:true,
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
tableForm:{
disabled:true,
type:'FormDate',
placeholder: '请选择生产日期',
valueFormat: 'x',
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
tableForm: {
type: 'Select'
}
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
isTableForm: true,
isForm: true
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true
}
},
tableForm:{
disabled:true
},
isTableForm: true,
isForm: true
},
]))

98
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -76,6 +76,21 @@
:detailButtonIsShowDelete="trueFalse" :detailButtonIsShowDelete="trueFalse"
@detailOpenForm="detailOpenForm" @detailOpenForm="detailOpenForm"
/> />
<!-- 创建标签 -->
<BasicForm
ref="formLabelRef"
@success="getList"
:tableAllSchemas="CustomerReturnRequestDetailLabel.allSchemas"
:tableFormRules="CustomerreturnRequestDetailRules"
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
@submitForm="submitFormLabel"
@searchTableSuccess="searchTableSuccess"
/>
<!-- 标签打印 -->
<SearchTable style="width:905px" ref="showLabelRef" @searchTableSuccess="showLabelSuccess" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/customerreturn-request-main/import" :importTemplateData="importTemplateData" <ImportForm ref="importFormRef" url="/wms/customerreturn-request-main/import" :importTemplateData="importTemplateData"
@ -85,12 +100,16 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { CustomerreturnRequestMain,CustomerreturnRequestMainRules,CustomerreturnRequestDetail,CustomerreturnRequestDetailRules } from './customerreturnRequestMain.data' import { CustomerreturnRequestMain,CustomerreturnRequestMainRules,CustomerreturnRequestDetail,CustomerreturnRequestDetailRules,CustomerReturnRequestDetailLabel } from './customerreturnRequestMain.data'
import * as CustomerreturnRequestMainApi from '@/api/wms/customerreturnRequestMain' import * as CustomerreturnRequestMainApi from '@/api/wms/customerreturnRequestMain'
import * as CustomerreturnRequestDetailApi from '@/api/wms/customerreturnRequestDetail' import * as CustomerreturnRequestDetailApi from '@/api/wms/customerreturnRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail' import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail'
import {
SupplierdeliverRequestPackage
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data'
import * as PackageApi from '@/api/wms/package'
import { getAccessToken } from '@/utils/auth'
// 退 // 退
defineOptions({ name: 'CustomerreturnRequestMain' }) defineOptions({ name: 'CustomerreturnRequestMain' })
@ -100,6 +119,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
const customerCode = ref() const customerCode = ref()
const genLabelId = ref(); //ID
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...CustomerreturnRequestMain.allSchemas.tableColumns,...CustomerreturnRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref([...CustomerreturnRequestMain.allSchemas.tableColumns,...CustomerreturnRequestDetail.allSchemas.tableMainColumns])
@ -344,8 +364,65 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.masterId) handleDelete(row.masterId)
}else if(val == 'ssbq'){
//
detatableData.params = {
masterId:row.masterId
}
genLabelId.value = row.masterId
await getDetailList()
formLabelRef.value.open('create', row, null,'createLabel')// createLabel
} else if (val == 'point') {
//
labelPrint(row)
}
}
//
const isCreateLabel = ref(false)
const formLabelRef = ref()
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({
getListApi: CustomerreturnRequestDetailApi.getCustomerreturnRequestDetailPage
})
const { getList:getDetailList } = detatableMethods
//
const submitFormLabel = async (formType, data) => {
try {
console.log("formType==",formType)
console.log("data==",data)
data.subList = detatableData.tableList
console.log("detatableData",detatableData)
await message.confirm(t('ts.是否为此数据生成标签?'))
await CustomerreturnRequestMainApi.genLabel(data) //genLabelId.value
isCreateLabel.value = true
message.success('创建标签成功')
} finally {
formLabelRef.value.formLoading = false
formLabelRef.value.dialogVisible = false
} }
} }
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
//
const showLabelRef = ref()
const labelPrint = async (row) => {
tableObject.loading = true
const defaultParams = {'moduleName':'supplier','recordNumber':row.number}
const {tableObject:tableObjectPrint ,tableMethods} = useTable({
defaultParams,
getListApi: PackageApi.getLabelDetailPage //
})
//
const { getList:getListPrint } = tableMethods
getListPrint()
tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
showLabelRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
@ -531,6 +608,23 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
// ---
const showLabelSuccess = async (formField, searchField, val, formRef, type, row) => {
console.log('批量打印',val)
if(val.length == 0){
message.warning("请先选择要打印的数据!")
return
}
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => {
console.log(res)
window.open(src.value + '&asn_number=' + res)
}).catch(err => {
console.log(err)
message.error('创建标签失败')
})
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

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

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

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

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

2
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue

@ -118,6 +118,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['inventoryStatus'] = val[0]['inventoryStatus'] row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['locationCode'] row['fromLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode'] row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
@ -136,6 +137,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['inventoryStatus'] = val[0]['inventoryStatus'] setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['fromLocationCode'] = val[0]['locationCode'] setV['fromLocationCode'] = val[0]['locationCode']
setV['itemCode'] = val[0]['itemCode'] setV['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }

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

@ -220,7 +220,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['supplierQty'] = val[0]['supplierQty'] row['supplierQty'] = val[0]['supplierQty']
row['supplierUom'] = val[0]['supplierUom'] row['supplierUom'] = val[0]['supplierUom']
row['inventoryStatus'] = val[0]['inventoryStatus'] row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['toLocationCode'] // row['fromLocationCode'] = val[0]['toLocationCode']
row['toLocationCode'] = val[0]['toLocationCode'] row['toLocationCode'] = val[0]['toLocationCode']
row['fromLocationGroupCode'] = val[0]['locationGroupCode'] row['fromLocationGroupCode'] = val[0]['locationGroupCode']
row['toLocationGroupCode'] = null row['toLocationGroupCode'] = null
@ -246,7 +246,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['containerNumber'] = val[0]['toContainerNumber'] row['containerNumber'] = val[0]['toContainerNumber']
row['containerNumber'] = val[0]['containerNumber'] row['containerNumber'] = val[0]['containerNumber']
row['containerNumber'] = val[0]['containerNumber'] row['containerNumber'] = val[0]['containerNumber']
row['fromLocationCode'] = val[0]['fromLocationCode'] // row['fromLocationCode'] = val[0]['fromLocationCode']
row['toLocationCode'] = val[0]['toLocationCode'] row['toLocationCode'] = val[0]['toLocationCode']
} }
} else { } else {
@ -266,7 +266,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if (res) tableData.value = res if (res) tableData.value = res
tableData.value.forEach((item) => { tableData.value.forEach((item) => {
item.batch = item.toBatch item.batch = item.toBatch
item.packingNumber = null item.packingNumber = item.fromPackingNumber
item.containerNumber = item.toContainerNumber item.containerNumber = item.toContainerNumber
item.receiptQty = item.qty item.receiptQty = item.qty
item.toLocationGroupCode = null item.toLocationGroupCode = null
@ -336,7 +336,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['supplierQty'] = val[0]['supplierQty'] setV['supplierQty'] = val[0]['supplierQty']
setV['supplierUom'] = val[0]['supplierUom'] setV['supplierUom'] = val[0]['supplierUom']
setV['inventoryStatus'] = val[0]['inventoryStatus'] setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['fromLocationCode'] = val[0]['toLocationCode'] // setV['fromLocationCode'] = val[0]['toLocationCode']
setV['toLocationCode'] = val[0]['toLocationCode'] setV['toLocationCode'] = val[0]['toLocationCode']
setV['fromLocationGroupCode'] = val[0]['locationGroupCode'] setV['fromLocationGroupCode'] = val[0]['locationGroupCode']
setV['toLocationGroupCode'] = null setV['toLocationGroupCode'] = null
@ -362,7 +362,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['containerNumber'] = val[0]['toContainerNumber'] setV['containerNumber'] = val[0]['toContainerNumber']
setV['containerNumber'] = val[0]['containerNumber'] setV['containerNumber'] = val[0]['containerNumber']
setV['containerNumber'] = val[0]['containerNumber'] setV['containerNumber'] = val[0]['containerNumber']
setV['fromLocationCode'] = val[0]['fromLocationCode'] // setV['fromLocationCode'] = val[0]['fromLocationCode']
setV['toLocationCode'] = val[0]['toLocationCode'] setV['toLocationCode'] = val[0]['toLocationCode']
} }
}else { }else {

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

@ -823,16 +823,6 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
} }
} }
}, },
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isTableForm: true
},
{ {
label: '替代批次', label: '替代批次',
field: 'altBatch', field: 'altBatch',
@ -1002,6 +992,16 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
} }
} }
}, },
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
isTable: false,
},
{ {
label: '到库位代码', label: '到库位代码',
field: 'toLocationCode', field: 'toLocationCode',

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

@ -16,7 +16,6 @@ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchem
tableName: 'SupplierdeliverInspectionDetail', tableName: 'SupplierdeliverInspectionDetail',
}, },
fileType:['pdf','png','jpg','jpeg'], fileType:['pdf','png','jpg','jpeg'],
limit:1,
fileSize:100 fileSize:100
} }
}, },

Loading…
Cancel
Save