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. 132
      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. 5
      src/views/mes/abilityInfo/index.vue
  22. 40
      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. 6
      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. 316
      src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts
  37. 107
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  38. 68
      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_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 文件配置说明**
**form表单查询弹窗配置**
form: {

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

@ -1,5 +1,5 @@
import request from '@/config/axios'
import {BasicSpotCheckSelectSetVO} from "@/api/eam/basicSpotCheckSelectSet";
import {BasicSpotCheckSelectSetVO} from "@/api/eam/spotCheckSelectSet";
export interface DocumentTypeSelectSetVO {
id: number
@ -19,43 +19,43 @@ export const getDocumentTypeSelectSetPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
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 {
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) => {
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) => {
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) => {
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) => {
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
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 = () => {
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) => {
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) {
delete params.isSearch
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 {
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) => {
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) => {
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) => {
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) => {
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
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 = () => {
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) => {
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) {
delete params.isSearch
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 {
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) => {
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) => {
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) => {
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) => {
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
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 = () => {
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) => {
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})
}
}
// 查询库存余额列表根据业务类型 根据库存状态及库区类型筛选
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 })
}
}
// 生成标签
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: {
type: Boolean,
required: true
default: true
},
})
// emit

2
src/router/modules/remaining.ts

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

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

@ -1,11 +1,16 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
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({
code: [required],
name: [required],
type: [required],
selectId: [required],
})
export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
@ -30,6 +35,29 @@ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
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: '描述',
field: 'describing',
@ -56,12 +84,12 @@ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '巡检项',
field: 'type',
sort: 'custom',
isSearch: true,
},
// {
// label: '巡检项',
// field: 'type',
// sort: 'custom',
// isSearch: true,
// },
{
label: '创建时间',
field: 'createTime',

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

@ -165,6 +165,19 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
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)
}

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

@ -1,5 +1,10 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
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({
@ -30,6 +35,29 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
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: '描述',
field: 'describing',
@ -37,10 +65,16 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
},
{
label: '项是否可修改默认是',
label: '项是否可修改',
field: 'isUpdated',
sort: 'custom',
dictType: DICT_TYPE.IS_UPDATED,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: true,
isTableForm: false,
isForm: true,
form: {
component: 'Switch',
value: 'TRUE',
@ -50,12 +84,12 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '保养项',
field: 'type',
sort: 'custom',
isSearch: true,
},
// {
// label: '保养项',
// field: 'type',
// sort: 'custom',
// isSearch: true,
// },
{
label: '创建时间',
field: 'createTime',
@ -103,14 +137,13 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
label: '是否可用',
field: 'available',
sort: 'custom',
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
},
{
label: '删除时间',

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

@ -165,6 +165,19 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
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)
}

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

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

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

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

@ -52,7 +52,7 @@
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :isBasicMes="false" :allSchemas="AbilityInfo.allSchemas" :detailAllSchemas="AbilityInfo.allSchemas"
:apiPage="AbilityInfoApi.getAbilityInfoPage" />
:apiPage="AbilityInfoApi.getAbilityInfoPage" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/ability-info/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -66,7 +66,6 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '../components/Detail.vue'
import {MesOrderMonthMain} from "@/views/mes/ordermonthplan/mesOrderMonthMain.data";
defineOptions({ name: 'AbilityInfo' })
@ -190,7 +189,7 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicAbilityInfo')
detailRef.value.openDetail(row, titleName, titleValue, 'AbilityInfo')
}
/** 删除按钮操作 */

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

@ -40,7 +40,7 @@
</ContentWrap>
<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
v-if="!isBasic"
: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'}">
<ContentWrap class="w-[100%]">
<ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem"
@handleAnnexSuccess="updateAnnexTableHandle"
@ -137,26 +138,38 @@
</ContentWrap>
</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'}">
<Annex v-show="tabsList[current].label==annexAliasLabel"
<Annex
:annexData="annexData"
:showDownload = "annexAlias.showDownload"
:hiddenDelete = "annexAlias.hiddenDelete"
@handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data"
: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"
class="mt-20px"
@remarksSubmitScuess="remarksSubmitScuess"
: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>
</ContentWrap>
</div>
@ -226,10 +239,15 @@ const props = defineProps({
default: ()=>[]
},
//tab
annexAliasLabel: {
type: String,
annexAlias: {
type: Object,
required: false,
default: '附件'
default: ()=>({
label: '附件',
showDownload:false,
showPreview:false,
hiddenDelete:false
})
},
//
isBasic: {
@ -402,7 +420,7 @@ const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : '')))
// }
const otherList = [...props.annexTable,{
label:props.annexAliasLabel,
label:props.annexAlias.label,
prop:'Annex'
},{
label:'备注',
@ -503,6 +521,7 @@ const getAnnexFileList = async (row:id) => {
}
/** 添加附件 */
const handleAnnexSuccess = () => {
getFileList()
getChangeRecordList()
}
@ -520,6 +539,7 @@ const updateAnnexTableHandle = () => {
// Tabs
const current = ref(0)
const change = (item, index) => {
current.value = index
emit('changeTabs', item)
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: {
isSearchList: true, // 开启查询弹窗
searchTitle: '质检科目信息', // 查询弹窗标题
searchListPlaceholder: '请选择 类别编码', // 输入框占位文本
searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法

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

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

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

@ -372,6 +372,7 @@ const submitForm = async () => {
/** 重置表单 */
const resetForm = () => {
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) => {
//console.log(node.id)
//console.log("schedule-nodeClick-440",node)
if(node.id=="startNode" || node.id=="endNode"){
return
}
getProcessBom(node.id)
getConfigProcessWorkstation(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',
isSearch: true,
required: true,
value:'',
form:{
component:'Select',
componentProps:{
options:[{lablel:'1',value:'1'}]
}
options:[],
},
}
},
{
@ -200,6 +202,7 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
field: 'processrouteCode',
sort: 'custom',
form: {
value:"",
component:'Select',
componentProps: {
options: []

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

@ -307,6 +307,6 @@ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark',
sort: 'custom',
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') { //
handleExport()
} else if (val == 'refresh') { //
// if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
// searchFormClick({
// filters: tableObject.params.filters
// })
// } else {
// getList()
// }
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
@ -257,12 +265,15 @@ const importSuccess = () => {
}
//
const searchFormClick = (searchData) => {
const searchFormClick = async (searchData) => {
tableObject.params = {
isSearch: true,
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: '备注',
field: 'remark',
sort: 'custom',
isTable:true
},
{
label: '图形数据',

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

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

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

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

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

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

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

@ -32,6 +32,7 @@
<ContentWrap>
<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="id" align="center" label="部门编号" />
<el-table-column prop="leader" align="center" label="负责人">
<template #default="scope">
{{ userList.find((user) => user.id === scope.row.leaderUserId)?.nickname }}

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

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

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

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

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

@ -87,8 +87,6 @@ const businessType = 'relegate'
routeName.value = route.name
const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns, ...RelegateRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true)
// //
const trueFalse = ref(false)
//
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['toPackingNumber'] = val[0]['packingNumber']
row['fromLocationCode'] = val[0]['locationCode']
row['fromInventoryStatus'] = val[0]['inventoryStatus']
row['inventoryStatus'] = val[0]['inventoryStatus']
} else if (formField == 'downItemCode') {
row['downItemCode'] = val[0]['code']
} else if (formField == 'toLocationCode') {
@ -139,14 +137,32 @@ RelegateRequestDetail.allSchemas.tableFormColumns.map(item => {
key: 'businessType',
value: businessType,
isMainValue: false
}
},{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
message: '请选择从仓库代码!',
key: 'warehouseCode',
value: 'fromWarehouseCode',
isMainValue: true
}
]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}
},{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
message: '请选择从仓库代码!',
key: 'warehouseCode',
value: 'fromWarehouseCode',
isMainValue: true
}
]
}
if (item.field == "toLocationCode") {
@ -239,20 +255,86 @@ const butttondata = (row, $index) => {
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.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:submit'}), //
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.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:relegate-request-main:handle'}), //
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) => {
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)
} else if (val == 'delete') { //
handleDelete(row.id)
@ -269,15 +351,6 @@ const flag = ref(false)
// form
const submitForm = async (formType, data) => {
data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if (rs.length > 1) isExist = true
})
if (isExist) {
basicFormRef.value.formLoading = false
return message.warning('物料代码重复')
}
data.subList.forEach(obj => {
if (obj.qty == 0) {
message.warning(`数量不能为0!`)

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

@ -100,6 +100,9 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm: false,
isTable: false
},
@ -130,21 +133,8 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
isTable: false
},
{
label: '截止时间',
field: 'dueTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm: false,
isTable: false
@ -153,7 +143,9 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm: false,
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '状态',
@ -257,21 +249,24 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'concurrencyStamp',
sort: 'custom',
isForm: false,
isTable: false
isTable: false,
isDetail:false
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm: false,
isTable: false
isTable: false,
isDetail:false
},
{
label: '工作流流水号',
field: 'serialNumber',
sort: 'custom',
isForm: false,
isTable: false
isTable: false,
isDetail:false
},
{
label: '原因',
@ -283,9 +278,10 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isForm: false,
table: {
width: 150,
width: 200,
fixed: 'right'
}
},
isDetail:false
}
]))
@ -304,7 +300,6 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
isSearchList: true,
@ -312,12 +307,8 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
searchPage: BalanceApi.getBalanceByBusinessTypeByItemType,
searchCondition: []
}
},
tableForm:{
@ -326,12 +317,17 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchPage: BalanceApi.getBalanceByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchCondition:[
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
message: '请选择从仓库代码!',
key: 'fromWarehouseCode',
value: 'fromWarehouseCode',
isMainValue: true
}]
},
table: {
@ -379,7 +375,6 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isMainValue: false
}]
},
isSearch: true,
table: {
width: 150
},
@ -597,14 +592,6 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false,
isTable:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '创建时间',
field: 'createTime',
@ -618,6 +605,9 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm:false,
isTableForm: false,
isTable:false,
@ -666,7 +656,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
hiddenInMain:true,
table: {
width: 150,
width: 200,
fixed: 'right'
},
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 = {}
if (formField == 'itemCode') {
setV['itemCode'] = val[0]['code']
setV['uom'] = val[0]['uom']
} else if (formField == 'packUnit') {
setV['uom'] = val[0]['uom']
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',
sort: 'custom',
table: {
@ -86,7 +86,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
isSearchList: true, // 开启查询弹窗
multiple:true,//是否可以多选
searchListPlaceholder: '请选择物料忽略名单', // 输入框占位文本
searchListPlaceholder: '请选择物料选择名单', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
@ -244,6 +244,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
form: {
value: 'Count',
componentProps: {
@ -267,6 +268,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
isForm: false,
},
{
@ -289,6 +291,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x',
}
},
isTable:false,
isForm: false,
},
{
@ -351,8 +354,8 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
isSearch: false,
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
@ -367,7 +370,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
isForm: false,
sort: 'custom',
table: {
@ -388,7 +391,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
isForm: false,
sort: 'custom',
table: {
@ -409,7 +412,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
isForm: false,
sort: 'custom',
table: {
@ -454,6 +457,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
isForm: false,
},
{
@ -473,6 +477,9 @@ export const CountPlanMainRules = reactive({
type: [
{ required: true, message: '请选择盘点类型', trigger: 'change' }
],
ignoreListOfItem: [
{ required: true, message: '请选物料选择名单', trigger: 'change' }
],
crontab: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
@ -734,6 +741,7 @@ export const CountPlanDetail = useCrudSchemas(<CrudSchema[]>([
width: 150,
fixed: 'right'
},
hiddenInMain:true,
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"
@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"
@ -85,12 +100,16 @@
<script setup lang="ts">
import download from '@/utils/download'
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 CustomerreturnRequestDetailApi from '@/api/wms/customerreturnRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
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' })
@ -100,6 +119,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
const customerCode = ref()
const genLabelId = ref(); //ID
routeName.value = route.name
const tableColumns = ref([...CustomerreturnRequestMain.allSchemas.tableColumns,...CustomerreturnRequestDetail.allSchemas.tableMainColumns])
@ -344,8 +364,65 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
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()
@ -531,6 +608,23 @@ const searchFormClick = (searchData) => {
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 () => {
getList()

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

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

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

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

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['fromLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
} else {
const setV = {}
setV[formField] = val[0][searchField]
@ -136,6 +137,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['fromLocationCode'] = val[0]['locationCode']
setV['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
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['supplierUom'] = val[0]['supplierUom']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['toLocationCode']
// row['fromLocationCode'] = val[0]['toLocationCode']
row['toLocationCode'] = val[0]['toLocationCode']
row['fromLocationGroupCode'] = val[0]['locationGroupCode']
row['toLocationGroupCode'] = null
@ -246,7 +246,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['containerNumber'] = val[0]['toContainerNumber']
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']
}
} else {
@ -266,7 +266,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if (res) tableData.value = res
tableData.value.forEach((item) => {
item.batch = item.toBatch
item.packingNumber = null
item.packingNumber = item.fromPackingNumber
item.containerNumber = item.toContainerNumber
item.receiptQty = item.qty
item.toLocationGroupCode = null
@ -336,7 +336,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['supplierQty'] = val[0]['supplierQty']
setV['supplierUom'] = val[0]['supplierUom']
setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['fromLocationCode'] = val[0]['toLocationCode']
// setV['fromLocationCode'] = val[0]['toLocationCode']
setV['toLocationCode'] = val[0]['toLocationCode']
setV['fromLocationGroupCode'] = val[0]['locationGroupCode']
setV['toLocationGroupCode'] = null
@ -362,7 +362,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['containerNumber'] = val[0]['toContainerNumber']
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']
}
}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: '替代批次',
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: '到库位代码',
field: 'toLocationCode',

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

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

Loading…
Cancel
Save