陈宜阳
8 months ago
16 changed files with 3044 additions and 3 deletions
@ -0,0 +1,71 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface ProductredressJobDetailVO { |
|||
id: number |
|||
productionLineCode: string |
|||
workStationCode: string |
|||
processCode: string |
|||
packingNumber: string |
|||
containerNumber: string |
|||
batch: string |
|||
produceDate: Date |
|||
expireDate: Date |
|||
inventoryStatus: string |
|||
toLocationCode: string |
|||
woNumber: string |
|||
woLine: string |
|||
packQty: number |
|||
packUnit: string |
|||
itemCode: string |
|||
itemName: string |
|||
itemDesc1: string |
|||
itemDesc2: string |
|||
projectCode: string |
|||
qty: number |
|||
uom: string |
|||
masterId: number |
|||
number: string |
|||
remark: string |
|||
toOwnerCode: string |
|||
} |
|||
|
|||
// 查询制品回收任务子列表
|
|||
export const getProductredressJobDetailPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/productredress-job-detail/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/productredress-job-detail/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询制品回收任务子详情
|
|||
export const getProductredressJobDetail = async (id: number) => { |
|||
return await request.get({ url: `/wms/productredress-job-detail/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增制品回收任务子
|
|||
export const createProductredressJobDetail = async (data: ProductredressJobDetailVO) => { |
|||
return await request.post({ url: `/wms/productredress-job-detail/create`, data }) |
|||
} |
|||
|
|||
// 修改制品回收任务子
|
|||
export const updateProductredressJobDetail = async (data: ProductredressJobDetailVO) => { |
|||
return await request.put({ url: `/wms/productredress-job-detail/update`, data }) |
|||
} |
|||
|
|||
// 删除制品回收任务子
|
|||
export const deleteProductredressJobDetail = async (id: number) => { |
|||
return await request.delete({ url: `/wms/productredress-job-detail/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出制品回收任务子 Excel
|
|||
export const exportProductredressJobDetail = async (params) => { |
|||
return await request.download({ url: `/wms/productredress-job-detail/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/productredress-job-detail/get-import-template' }) |
|||
} |
@ -0,0 +1,87 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface ProductredressJobMainVO { |
|||
id: number |
|||
requestNumber: string |
|||
productionPlanNumber: string |
|||
workShopCode: string |
|||
team: string |
|||
shift: string |
|||
details: string |
|||
requestTime: Date |
|||
requestDueTime: Date |
|||
status: string |
|||
expiredTime: Date |
|||
jobStageStatus: string |
|||
priority: number |
|||
priorityIncrement: number |
|||
departmentCode: string |
|||
userGroupCode: string |
|||
acceptUserId: string |
|||
acceptUserName: string |
|||
acceptTime: Date |
|||
completeUserId: string |
|||
completeUserName: string |
|||
completeTime: Date |
|||
toWarehouseCode: string |
|||
toAreaCodes: string |
|||
fromAreaTypes: string |
|||
toAreaTypes: string |
|||
number: string |
|||
type: string |
|||
businessType: string |
|||
remark: string |
|||
autoComplete: string |
|||
allowModifyLocation: string |
|||
allowModifyQty: string |
|||
allowBiggerQty: string |
|||
allowSmallerQty: string |
|||
allowModifyInventoryStatus: string |
|||
allowContinuousScanning: string |
|||
allowPartialComplete: string |
|||
allowModifyBatch: string |
|||
allowModifyPackingNumber: string |
|||
inInventoryStatuses: string |
|||
outInventoryStatuses: string |
|||
} |
|||
|
|||
// 查询制品回收任务主列表
|
|||
export const getProductredressJobMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/productredress-job-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/productredress-job-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询制品回收任务主详情
|
|||
export const getProductredressJobMain = async (id: number) => { |
|||
return await request.get({ url: `/wms/productredress-job-main/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增制品回收任务主
|
|||
export const createProductredressJobMain = async (data: ProductredressJobMainVO) => { |
|||
return await request.post({ url: `/wms/productredress-job-main/create`, data }) |
|||
} |
|||
|
|||
// 修改制品回收任务主
|
|||
export const updateProductredressJobMain = async (data: ProductredressJobMainVO) => { |
|||
return await request.put({ url: `/wms/productredress-job-main/update`, data }) |
|||
} |
|||
|
|||
// 删除制品回收任务主
|
|||
export const deleteProductredressJobMain = async (id: number) => { |
|||
return await request.delete({ url: `/wms/productredress-job-main/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出制品回收任务主 Excel
|
|||
export const exportProductredressJobMain = async (params) => { |
|||
return await request.download({ url: `/wms/productredress-job-main/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/productredress-job-main/get-import-template' }) |
|||
} |
@ -0,0 +1,77 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface ProductredressRecordDetailVO { |
|||
id: number |
|||
productionlineCode: string |
|||
workStationCode: string |
|||
processCode: string |
|||
packingNumber: string |
|||
containerNumber: string |
|||
batch: string |
|||
produceDate: Date |
|||
expireDate: Date |
|||
inventoryStatus: string |
|||
toLocationCode: string |
|||
toLocationGroupCode: string |
|||
toAreaCode: string |
|||
toOwnerCode: string |
|||
woNumber: string |
|||
woLine: string |
|||
packQty: number |
|||
packUnit: string |
|||
bomVersion: string |
|||
backFlushDetails: string |
|||
masterId: number |
|||
number: string |
|||
itemCode: string |
|||
remark: string |
|||
siteId: string |
|||
itemName: string |
|||
itemDesc1: string |
|||
itemDesc2: string |
|||
projectCode: string |
|||
qty: number |
|||
uom: string |
|||
interfaceType: string |
|||
} |
|||
|
|||
// 查询制品回收记录子列表
|
|||
export const getProductredressRecordDetailPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/productredress-record-detail/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/productredress-record-detail/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询制品回收记录子详情
|
|||
export const getProductredressRecordDetail = async (id: number) => { |
|||
return await request.get({ url: `/wms/productredress-record-detail/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增制品回收记录子
|
|||
export const createProductredressRecordDetail = async (data: ProductredressRecordDetailVO) => { |
|||
return await request.post({ url: `/wms/productredress-record-detail/create`, data }) |
|||
} |
|||
|
|||
// 修改制品回收记录子
|
|||
export const updateProductredressRecordDetail = async (data: ProductredressRecordDetailVO) => { |
|||
return await request.put({ url: `/wms/productredress-record-detail/update`, data }) |
|||
} |
|||
|
|||
// 删除制品回收记录子
|
|||
export const deleteProductredressRecordDetail = async (id: number) => { |
|||
return await request.delete({ url: `/wms/productredress-record-detail/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出制品回收记录子 Excel
|
|||
export const exportProductredressRecordDetail = async (params) => { |
|||
return await request.download({ url: `/wms/productredress-record-detail/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/productredress-record-detail/get-import-template' }) |
|||
} |
@ -0,0 +1,70 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface ProductredressRecordMainVO { |
|||
id: number |
|||
requestNumber: string |
|||
jobNumber: string |
|||
productionPlanNumber: string |
|||
workshopCode: string |
|||
team: string |
|||
shift: string |
|||
details: string |
|||
outTransactionType: string |
|||
inTransactionType: string |
|||
executeTime: Date |
|||
activeDate: Date |
|||
available: string |
|||
requestTime: Date |
|||
dueTime: Date |
|||
departmentCode: string |
|||
interfaceType: string |
|||
number: string |
|||
type: string |
|||
businessType: string |
|||
remark: string |
|||
code: string |
|||
toWarehouseCode: string |
|||
toAreaTypes: string |
|||
toAreaCodes: string |
|||
} |
|||
|
|||
// 查询制品回收记录主列表
|
|||
export const getProductredressRecordMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/productredress-record-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/productredress-record-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询制品回收记录主详情
|
|||
export const getProductredressRecordMain = async (id: number) => { |
|||
return await request.get({ url: `/wms/productredress-record-main/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增制品回收记录主
|
|||
export const createProductredressRecordMain = async (data: ProductredressRecordMainVO) => { |
|||
return await request.post({ url: `/wms/productredress-record-main/create`, data }) |
|||
} |
|||
|
|||
// 修改制品回收记录主
|
|||
export const updateProductredressRecordMain = async (data: ProductredressRecordMainVO) => { |
|||
return await request.put({ url: `/wms/productredress-record-main/update`, data }) |
|||
} |
|||
|
|||
// 删除制品回收记录主
|
|||
export const deleteProductredressRecordMain = async (id: number) => { |
|||
return await request.delete({ url: `/wms/productredress-record-main/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出制品回收记录主 Excel
|
|||
export const exportProductredressRecordMain = async (params) => { |
|||
return await request.download({ url: `/wms/productredress-record-main/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/productredress-record-main/get-import-template' }) |
|||
} |
@ -0,0 +1,73 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface ProductredressRequestDetailVO { |
|||
id: number |
|||
productionLineCode: string |
|||
workStationCode: string |
|||
toLocationCode: string |
|||
processCode: string |
|||
packingNumber: string |
|||
containerNumber: string |
|||
batch: string |
|||
produceDate: Date |
|||
expireDate: Date |
|||
inventoryStatus: string |
|||
woNumber: string |
|||
woLine: string |
|||
packQty: number |
|||
packUnit: string |
|||
bomVersion: string |
|||
backFlushDetails: string |
|||
masterId: number |
|||
number: string |
|||
itemCode: string |
|||
remark: string |
|||
itemName: string |
|||
itemDesc1: string |
|||
itemDesc2: string |
|||
projectCode: string |
|||
qty: number |
|||
uom: string |
|||
toOwnerCode: string |
|||
} |
|||
|
|||
// 查询制品回收申请子列表
|
|||
export const getProductredressRequestDetailPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/productredress-request-detail/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/productredress-request-detail/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询制品回收申请子详情
|
|||
export const getProductredressRequestDetail = async (id: number) => { |
|||
return await request.get({ url: `/wms/productredress-request-detail/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增制品回收申请子
|
|||
export const createProductredressRequestDetail = async (data: ProductredressRequestDetailVO) => { |
|||
return await request.post({ url: `/wms/productredress-request-detail/create`, data }) |
|||
} |
|||
|
|||
// 修改制品回收申请子
|
|||
export const updateProductredressRequestDetail = async (data: ProductredressRequestDetailVO) => { |
|||
return await request.put({ url: `/wms/productredress-request-detail/update`, data }) |
|||
} |
|||
|
|||
// 删除制品回收申请子
|
|||
export const deleteProductredressRequestDetail = async (id: number) => { |
|||
return await request.delete({ url: `/wms/productredress-request-detail/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出制品回收申请子 Excel
|
|||
export const exportProductredressRequestDetail = async (params) => { |
|||
return await request.download({ url: `/wms/productredress-request-detail/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/productredress-request-detail/get-import-template' }) |
|||
} |
@ -0,0 +1,100 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface ProductredressRequestMainVO { |
|||
id: number |
|||
productionPlanNumber: string |
|||
workshopCode: string |
|||
team: string |
|||
shift: string |
|||
toWarehouseCode: string |
|||
toAreaTypes: string |
|||
toAreaCodes: string |
|||
number: string |
|||
type: string |
|||
businessType: string |
|||
remark: string |
|||
extraProperties: string |
|||
siteId: string |
|||
requestTime: Date |
|||
dueTime: Date |
|||
departmentCode: string |
|||
status: string |
|||
autoCommit: string |
|||
autoAgree: string |
|||
autoExecute: string |
|||
directCreateRecord: string |
|||
inInventoryStatuses: string |
|||
outInventoryStatuses: string |
|||
} |
|||
|
|||
// 查询制品回收申请主列表
|
|||
export const getProductredressRequestMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/productredress-request-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/productredress-request-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询制品回收申请主详情
|
|||
export const getProductredressRequestMain = async (id: number) => { |
|||
return await request.get({ url: `/wms/productredress-request-main/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增制品回收申请主
|
|||
export const createProductredressRequestMain = async (data: ProductredressRequestMainVO) => { |
|||
return await request.post({ url: `/wms/productredress-request-main/create`, data }) |
|||
} |
|||
|
|||
// 修改制品回收申请主
|
|||
export const updateProductredressRequestMain = async (data: ProductredressRequestMainVO) => { |
|||
return await request.put({ url: `/wms/productredress-request-main/update`, data }) |
|||
} |
|||
|
|||
// 删除制品回收申请主
|
|||
export const deleteProductredressRequestMain = async (id: number) => { |
|||
return await request.delete({ url: `/wms/productredress-request-main/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出制品回收申请主 Excel
|
|||
export const exportProductredressRequestMain = async (params) => { |
|||
return await request.download({ url: `/wms/productredress-request-main/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/productredress-request-main/get-import-template' }) |
|||
} |
|||
|
|||
|
|||
// 关闭
|
|||
export const close = (id) => { |
|||
return request.put({ url: '/wms/productredress-request-main/close?id=' + id }) |
|||
} |
|||
|
|||
// 重新添加
|
|||
export const reAdd = (id) => { |
|||
return request.put({ url: '/wms/productredress-request-main/reAdd?id=' + id }) |
|||
} |
|||
|
|||
// 提交审批
|
|||
export const submit = (id) => { |
|||
return request.put({ url: '/wms/productredress-request-main/submit?id=' + id }) |
|||
} |
|||
|
|||
// 驳回
|
|||
export const refused = (id) => { |
|||
return request.put({ url: '/wms/productredress-request-main/refused?id=' + id }) |
|||
} |
|||
|
|||
// 审批通过
|
|||
export const agree = (id) => { |
|||
return request.put({ url: '/wms/productredress-request-main/agree?id=' + id }) |
|||
} |
|||
|
|||
// 处理
|
|||
export const handle = (id) => { |
|||
return request.put({ url: '/wms/productredress-request-main/handle?id=' + id }) |
|||
} |
@ -0,0 +1,244 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="ProductredressJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="ProductredressJobMain.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="formsSuccess" |
|||
:rules="ProductredressJobMainRules" |
|||
:formAllSchemas="ProductredressJobMain.allSchemas" |
|||
:apiUpdate="ProductredressJobMainApi.updateProductredressJobMain" |
|||
:apiCreate="ProductredressJobMainApi.createProductredressJobMain" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="ProductredressJobMain.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/wms/productredress-job-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { ProductredressJobMain,ProductredressJobMainRules } from './productredressJobMain.data' |
|||
import * as ProductredressJobMainApi from '@/api/wms/productredressJobMain' |
|||
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: 'ProductredressJobMain' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(ProductredressJobMain.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: ProductredressJobMainApi.getProductredressJobMainPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'wms:productredressJobMain:create'}), // 新增 |
|||
defaultButtons.defaultImportBtn({hasPermi:'wms:productredressJobMain:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'wms:productredressJobMain:export'}), // 导出 |
|||
defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
defaultButtons.mainListEditBtn({hasPermi:'wms:productredressJobMain:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productredressJobMain:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =ProductredressJobMain.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 ProductredressJobMainApi.createProductredressJobMain(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await ProductredressJobMainApi.updateProductredressJobMain(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicProductredressJobMain') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await ProductredressJobMainApi.deleteProductredressJobMain(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await ProductredressJobMainApi.exportProductredressJobMain(tableObject.params) |
|||
download.excel(data, '制品回收任务主.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '制品回收任务主导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await ProductredressJobMainApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,523 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const ProductredressJobMainRules = reactive({ |
|||
}) |
|||
|
|||
export const ProductredressJobMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: 'id', |
|||
field: 'id', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '申请单号', |
|||
field: 'requestNumber', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '生产计划单号', |
|||
field: 'productionPlanNumber', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '车间代码', |
|||
field: 'workShopCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '班组', |
|||
field: 'team', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '班次', |
|||
field: 'shift', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '明细', |
|||
field: 'details', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '申请时间', |
|||
field: 'requestTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '要求截止时间', |
|||
field: 'requestDueTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '状态', |
|||
field: 'status', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'Radio' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '过期时间', |
|||
field: 'expiredTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '最后更新时间', |
|||
field: 'updateTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '最后更新者Id', |
|||
field: 'updater', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '并发乐观锁', |
|||
field: 'concurrencyStamp', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '状态', |
|||
field: 'jobStageStatus', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'Radio' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '优先级', |
|||
field: 'priority', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '优先级增量', |
|||
field: 'priorityIncrement', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '部门', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '用户组', |
|||
field: 'userGroupCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '承接人用户ID', |
|||
field: 'acceptUserId', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '承接人用户名', |
|||
field: 'acceptUserName', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '承接时间', |
|||
field: 'acceptTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '完成人用户ID', |
|||
field: 'completeUserId', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '完成人用户名', |
|||
field: 'completeUserName', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '完成时间', |
|||
field: 'completeTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到仓库代码', |
|||
field: 'toWarehouseCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到库区代码范围', |
|||
field: 'toAreaCodes', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '从库区类型范围', |
|||
field: 'fromAreaTypes', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到库区类型范围', |
|||
field: 'toAreaTypes', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '收货类型', |
|||
field: 'type', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'SelectV2' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '业务类型', |
|||
field: 'businessType', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'SelectV2' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '创建者id', |
|||
field: 'creator', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '自动完成', |
|||
field: 'autoComplete', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '允许修改库位', |
|||
field: 'allowModifyLocation', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '允许修改数量', |
|||
field: 'allowModifyQty', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '允许大于推荐数量', |
|||
field: 'allowBiggerQty', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '允许小于推荐数量', |
|||
field: 'allowSmallerQty', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '允许修改库存状态', |
|||
field: 'allowModifyInventoryStatus', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'Radio' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '允许连续扫描', |
|||
field: 'allowContinuousScanning', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '允许部分完成', |
|||
field: 'allowPartialComplete', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '允许修改批次', |
|||
field: 'allowModifyBatch', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '允许修改箱码', |
|||
field: 'allowModifyPackingNumber', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '入库库存状态范围', |
|||
field: 'inInventoryStatuses', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '出库库存状态范围', |
|||
field: 'outInventoryStatuses', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
|||
|
|||
// 表单校验
|
|||
export const ProductredressJobDetailRules = reactive({ |
|||
}) |
|||
|
|||
export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: 'id', |
|||
field: 'id', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '生产线代码', |
|||
field: 'productionLineCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '工位代码', |
|||
field: 'workStationCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '工序代码', |
|||
field: 'processCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '包装号', |
|||
field: 'packingNumber', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '器具号', |
|||
field: 'containerNumber', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '批次', |
|||
field: 'batch', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '生产日期', |
|||
field: 'produceDate', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '过期日期', |
|||
field: 'expireDate', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库存状态', |
|||
field: 'inventoryStatus', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'Radio' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到库位代码', |
|||
field: 'toLocationCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '订单号', |
|||
field: 'woNumber', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '订单行', |
|||
field: 'woLine', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '包装数量', |
|||
field: 'packQty', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '包装规格', |
|||
field: 'packUnit', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '物品代码', |
|||
field: 'itemCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '物品名称', |
|||
field: 'itemName', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '物品描述1', |
|||
field: 'itemDesc1', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '物品描述2', |
|||
field: 'itemDesc2', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '项目代码', |
|||
field: 'projectCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '数量', |
|||
field: 'qty', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '计量单位', |
|||
field: 'uom', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '主表ID', |
|||
field: 'masterId', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '创建者Id', |
|||
field: 'creator', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '最后更新时间', |
|||
field: 'updateTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '最后更新者Id', |
|||
field: 'updater', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '到货主代码', |
|||
field: 'toOwnerCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
@ -0,0 +1,244 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="ProductredressRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="ProductredressRecordMain.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="formsSuccess" |
|||
:rules="ProductredressRecordMainRules" |
|||
:formAllSchemas="ProductredressRecordMain.allSchemas" |
|||
:apiUpdate="ProductredressRecordMainApi.updateProductredressRecordMain" |
|||
:apiCreate="ProductredressRecordMainApi.createProductredressRecordMain" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="ProductredressRecordMain.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/wms/productredress-record-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { ProductredressRecordMain,ProductredressRecordMainRules } from './productredressRecordMain.data' |
|||
import * as ProductredressRecordMainApi from '@/api/wms/productredressRecordMain' |
|||
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: 'ProductredressRecordMain' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(ProductredressRecordMain.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: ProductredressRecordMainApi.getProductredressRecordMainPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'wms:productredressRecordMain:create'}), // 新增 |
|||
defaultButtons.defaultImportBtn({hasPermi:'wms:productredressRecordMain:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'wms:productredressRecordMain:export'}), // 导出 |
|||
defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
defaultButtons.mainListEditBtn({hasPermi:'wms:productredressRecordMain:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productredressRecordMain:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =ProductredressRecordMain.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 ProductredressRecordMainApi.createProductredressRecordMain(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await ProductredressRecordMainApi.updateProductredressRecordMain(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicProductredressRecordMain') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await ProductredressRecordMainApi.deleteProductredressRecordMain(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await ProductredressRecordMainApi.exportProductredressRecordMain(tableObject.params) |
|||
download.excel(data, '制品回收记录主.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '制品回收记录主导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await ProductredressRecordMainApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,446 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const ProductredressRecordMainRules = reactive({ |
|||
}) |
|||
|
|||
export const ProductredressRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '申请单号', |
|||
field: 'requestNumber', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '任务单号', |
|||
field: 'jobNumber', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '生产计划单号', |
|||
field: 'productionPlanNumber', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '车间代码', |
|||
field: 'workshopCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '班组', |
|||
field: 'team', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '班次', |
|||
field: 'shift', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '明细', |
|||
field: 'details', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '出库事务类型', |
|||
field: 'outTransactionType', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'SelectV2' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '入库事务类型', |
|||
field: 'inTransactionType', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'SelectV2' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '执行时间', |
|||
field: 'executeTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '生效日期', |
|||
field: 'activeDate', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '是否可用', |
|||
field: 'available', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '申请时间', |
|||
field: 'requestTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '截止时间', |
|||
field: 'dueTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '部门', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '接口类型', |
|||
field: 'interfaceType', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'SelectV2' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '收货类型', |
|||
field: 'type', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'SelectV2' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '业务类型', |
|||
field: 'businessType', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'SelectV2' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '创建者Id', |
|||
field: 'creator', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '代码', |
|||
field: 'code', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到仓库代码', |
|||
field: 'toWarehouseCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到库区类型范围', |
|||
field: 'toAreaTypes', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到库区代码范围', |
|||
field: 'toAreaCodes', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '最后更新时间', |
|||
field: 'updateTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '最后更新者用户名', |
|||
field: 'updater', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
|||
|
|||
|
|||
// 表单校验
|
|||
export const ProductredressRecordDetailRules = reactive({ |
|||
productionlineCode: [required], |
|||
masterId: [required], |
|||
}) |
|||
|
|||
export const ProductredressRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: 'id', |
|||
field: 'id', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '生产线代码', |
|||
field: 'productionlineCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '工位代码', |
|||
field: 'workStationCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '工序代码', |
|||
field: 'processCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '包装号', |
|||
field: 'packingNumber', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '器具号', |
|||
field: 'containerNumber', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '批次', |
|||
field: 'batch', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '生产日期', |
|||
field: 'produceDate', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '过期日期', |
|||
field: 'expireDate', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库存状态', |
|||
field: 'inventoryStatus', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'Radio' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到库位代码', |
|||
field: 'toLocationCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到库位组代码', |
|||
field: 'toLocationGroupCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到库区代码', |
|||
field: 'toAreaCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到货主代码', |
|||
field: 'toOwnerCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '订单号', |
|||
field: 'woNumber', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '订单行', |
|||
field: 'woLine', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '包装数量', |
|||
field: 'packQty', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '包装规格', |
|||
field: 'packUnit', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: 'BOM版本', |
|||
field: 'bomVersion', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '明细', |
|||
field: 'backFlushDetails', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '主表ID', |
|||
field: 'masterId', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '物品代码', |
|||
field: 'itemCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '创建者Id', |
|||
field: 'creator', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '地点ID', |
|||
field: 'siteId', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '物品名称', |
|||
field: 'itemName', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '物品描述1', |
|||
field: 'itemDesc1', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '物品描述2', |
|||
field: 'itemDesc2', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '项目代码', |
|||
field: 'projectCode', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '数量', |
|||
field: 'qty', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '计量单位', |
|||
field: 'uom', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '接口类型', |
|||
field: 'interfaceType', |
|||
sort: 'custom', |
|||
form: { |
|||
component: 'SelectV2' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '最后更新时间', |
|||
field: 'updateTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '最后更新者用户名', |
|||
field: 'updater', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
@ -0,0 +1,501 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="ProductredressRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="ProductredressRequestMain.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #number="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|||
<span>{{ row.number }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="formRef" |
|||
@success="getList" |
|||
:rules="ProductredressRequestMainRules" |
|||
:formAllSchemas="ProductredressRequestMain.allSchemas" |
|||
:tableAllSchemas="ProductredressRequestDetail.allSchemas" |
|||
:tableFormRules="ProductredressRequestDetailRules" |
|||
:tableData="tableData" |
|||
:apiUpdate="ProductredressRequestMainApi.updateProductredressRequestMain" |
|||
:apiCreate="ProductredressRequestMainApi.createProductredressRequestMain" |
|||
:isBusiness="true" |
|||
@handleAddTable="handleAddTable" |
|||
@handleDeleteTable="handleDeleteTable" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
@submitForm="submitForm" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail |
|||
ref="detailRef" |
|||
:isBasic="false" |
|||
:allSchemas="ProductredressRequestMain.allSchemas" |
|||
:detailAllSchemas="ProductredressRequestDetail.allSchemas" |
|||
:detailAllSchemasRules="ProductredressRequestDetailRules" |
|||
:apiCreate="ProductredressRequestDetailApi.createProductredressRequestDetail" |
|||
:apiUpdate="ProductredressRequestDetailApi.updateProductredressRequestDetail" |
|||
:apiPage="ProductredressRequestDetailApi.getProductredressRequestDetailPage" |
|||
:apiDelete="ProductredressRequestDetailApi.deleteProductredressRequestDetail" |
|||
@searchTableSuccessDetail="searchTableSuccessDetail" |
|||
:buttondataTable="buttondataTable" |
|||
@tableFormButton="tableFormButton" |
|||
:detailValidate="detailValidate" |
|||
/> |
|||
<!-- bom列表 |
|||
<Dialog |
|||
:title="DialogTitle" |
|||
v-model="bomModelVisible" |
|||
width="80%" |
|||
:scroll="true" |
|||
max-height="450px" |
|||
> |
|||
<Table |
|||
:columns="BackflushDetailRequest.allSchemas.tableColumns" |
|||
:data="detatableDataBom.tableList" |
|||
:loading="detatableDataBom.loading" |
|||
:pagination="{ |
|||
total: detatableDataBom.total |
|||
}" |
|||
v-model:pageSize="detatableDataBom.pageSize" |
|||
v-model:currentPage="detatableDataBom.currentPage" |
|||
v-model:sort="detatableDataBom.sort" |
|||
/> |
|||
</Dialog>--> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/wms/productredress-request-main/import" :importTemplateData="importTemplateData" |
|||
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|||
import { ProductredressRequestMain,ProductredressRequestMainRules,ProductredressRequestDetail,ProductredressRequestDetailRules } from './productredressRequestMain.data' |
|||
import * as ProductredressRequestMainApi from '@/api/wms/productredressRequestMain' |
|||
import * as ProductredressRequestDetailApi from '@/api/wms/productredressRequestDetail' |
|||
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: 'ProductredressRequestMain' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(ProductredressRequestMain.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|||
nextTick(() => { |
|||
if (type == 'tableForm') { |
|||
if (formField == 'itemCode') { |
|||
row['itemCode'] = val[0]['itemCode'] |
|||
row['qty'] = val[0]['qty'] |
|||
row['uom'] = val[0]['uom'] |
|||
row['packingNumber'] = val[0]['packingNumber'] |
|||
row['batch'] = val[0]['batch'] |
|||
row['packQty'] = val[0]['packQty'] |
|||
row['packUnit'] = val[0]['packUnit'] |
|||
row['inventoryStatus'] = val[0]['inventoryStatus'] |
|||
} |
|||
// 明细查询页赋值 |
|||
row[formField] = val[0][searchField] |
|||
} else { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 查询页面返回——详情 |
|||
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
if (formField == 'itemCode') { |
|||
setV['itemCode'] = val[0]['itemCode'] |
|||
setV['qty'] = val[0]['qty'] |
|||
setV['uom'] = val[0]['uom'] |
|||
setV['packingNumber'] = val[0]['packingNumber'] |
|||
setV['batch'] = val[0]['batch'] |
|||
setV['packQty'] = val[0]['packQty'] |
|||
setV['packUnit'] = val[0]['packUnit'] |
|||
setV['inventoryStatus'] = val[0]['inventoryStatus'] |
|||
} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: ProductredressRequestMainApi.getProductredressRequestMainPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'wms:productredress-request-main:create'}), // 新增 |
|||
defaultButtons.defaultImportBtn({hasPermi:'wms:productredress-request-main:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'wms:productredress-request-main:export'}), // 导出 |
|||
defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 根据状态返回该按钮是否显示 |
|||
const isShowMainButton = (row,val) => { |
|||
if (val.indexOf(row.status) > -1) { |
|||
return false |
|||
} else { |
|||
return true |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = (row) => { |
|||
return [ |
|||
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productredress-request-main:close'}), // 关闭 |
|||
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productredress-request-main:reAdd'}), // 重新添加 |
|||
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productredress-request-main:submit'}), // 提交审批 |
|||
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productredress-request-main:refused'}), // 驳回 |
|||
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productredress-request-main:agree'}), // 审批通过 |
|||
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:productredress-request-main:handle'}), // 处理 |
|||
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productredress-request-main:update'}), // 编辑 |
|||
] |
|||
} |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'mainClose') { // 关闭 |
|||
await message.confirm('确认要关闭吗?') |
|||
tableObject.loading = true |
|||
ProductredressRequestMainApi.close(row.id).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 |
|||
ProductredressRequestMainApi.reAdd(row.id).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 |
|||
ProductredressRequestMainApi.submit(row.id).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 |
|||
ProductredressRequestMainApi.refused(row.id).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 |
|||
ProductredressRequestMainApi.agree(row.id).then(() => { |
|||
message.success(t('common.updateSuccess')) |
|||
tableObject.loading = false |
|||
getList() |
|||
}).catch(err => { |
|||
tableObject.loading = false |
|||
console.log(err) |
|||
}) |
|||
} |
|||
else if (val == 'mainHandle') { // 处理 |
|||
tableObject.loading = true |
|||
ProductredressRequestMainApi.handle(row.id).then(() => { |
|||
message.success(t('common.updateSuccess')) |
|||
tableObject.loading = false |
|||
getList() |
|||
}).catch(err => { |
|||
console.log(err) |
|||
}) |
|||
} else if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const formRef = ref() |
|||
const openForm =async (type: string, row?: number) => { |
|||
tableData.value = [] // 重置明细数据 |
|||
// 编辑时 车间代码不可修改 |
|||
if (type == 'update') { |
|||
// 修改 tableform 属性 |
|||
ProductredressRequestMain.allSchemas.formSchema.map(itemColumns => { |
|||
if(itemColumns.field == 'workshopCode') { |
|||
itemColumns.componentProps.isSearchList = false |
|||
itemColumns.componentProps.disabled = true |
|||
} |
|||
}) |
|||
} else { |
|||
// 修改 tableform 属性 |
|||
ProductredressRequestMain.allSchemas.formSchema.map(itemColumns => { |
|||
if(itemColumns.field == 'workshopCode') { |
|||
itemColumns.componentProps.isSearchList = true |
|||
itemColumns.componentProps.disabled = false |
|||
} |
|||
}) |
|||
} |
|||
formRef.value.open(type, row) |
|||
} |
|||
|
|||
// 获取部门 用于详情 部门回显 |
|||
const { wsCache } = useCache() |
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name |
|||
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) |
|||
detailRef.value.openDetail(row, titleName, titleValue,'requestProductreceiptMain') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
tableObject.loading = true |
|||
// 发起删除 |
|||
await ProductredressRequestMainApi.deleteProductredressRequestMain(id) |
|||
message.success(t('common.delSuccess')) |
|||
tableObject.loading = false |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {}finally{ |
|||
tableObject.loading = false |
|||
} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await ProductredressRequestMainApi.exportProductredressRequestMain(tableObject.params) |
|||
download.excel(data, '制品回收申请主.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* tableForm方法 |
|||
*/ |
|||
const tableFormKeys = {} |
|||
ProductredressRequestDetail.allSchemas.tableFormColumns.forEach(item => { |
|||
tableFormKeys[item.field] = item.default ? item.default : '' |
|||
}) |
|||
const tableData = ref([]) |
|||
|
|||
// 添加明细 |
|||
const handleAddTable = () => { |
|||
let tfk = JSON.parse(JSON.stringify(tableFormKeys)) |
|||
// tfk.batch = formatTime(new Date(), 'yyyyMMdd') |
|||
tableData.value.push(tfk) |
|||
} |
|||
// 删除明细 |
|||
const handleDeleteTable = (item, index) => { |
|||
tableData.value.splice(index, 1) |
|||
} |
|||
|
|||
// 主子数据 提交 |
|||
const submitForm = async (formType, data) => { |
|||
data.subList = tableData.value // 拼接子表数据参数 |
|||
if(data.subList.find(item => (item.qty <= 0))) { |
|||
message.warning('数量必须大于0') |
|||
formRef.value.formLoading = false |
|||
return |
|||
} |
|||
try { |
|||
if (formType === 'create') { |
|||
await ProductredressRequestMainApi.createProductredressRequestMain(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await ProductredressRequestMainApi.updateProductredressRequestMain(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
formRef.value.dialogVisible = false |
|||
// 刷新当前列表 |
|||
getList() |
|||
} finally { |
|||
formRef.value.formLoading = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
|
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '制品回收申请导入模版.xlsx' |
|||
}) |
|||
|
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
// 查看 Bom 按钮回调事件 |
|||
// const tableFormButton = async (val , row) => { |
|||
// if (val == 'bom') { // 查看 bom |
|||
// bomModelVisible.value = true |
|||
// DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息' |
|||
// detatableDataBom.params = { |
|||
// masterId: row.id |
|||
// } |
|||
// await getDetailListBom() |
|||
// } |
|||
// } |
|||
|
|||
// 子表新增/编辑校验 |
|||
const detailValidate = (data) => { |
|||
let tag = false; |
|||
if(data.qty <= 0){ |
|||
message.warning('数量必须大于0') |
|||
tag = false; |
|||
return tag; |
|||
}else { |
|||
tag = true; |
|||
return tag; |
|||
} |
|||
} |
|||
|
|||
// const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|||
// // 标签打印 |
|||
// const handlePoint = async (row) => { |
|||
// // 查询是否已创建过标签 |
|||
// await PackageApi.getPackagePage({ |
|||
// requestNumber: row.number |
|||
// }).then((res) => { |
|||
// if(res.list.length > 0) { |
|||
// isCreateLabel.value = true |
|||
// if (res.list[0].productionLineCode != null) { |
|||
// labelType.value = 'zz' |
|||
// } else { |
|||
// labelType.value = 'cg' |
|||
// } |
|||
// } else { |
|||
// isCreateLabel.value = false |
|||
// } |
|||
// }).catch(err => { |
|||
// isCreateLabel.value = false |
|||
// console.log(err) |
|||
// }) |
|||
// // 判断是采购还是制造 |
|||
// if (isCreateLabel.value) { |
|||
// if (labelType.value == 'cg') { |
|||
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) |
|||
// window.open(src.value+'&request_number='+row.number) |
|||
// } else { |
|||
// const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) |
|||
// window.open(src.value+'&request_number='+row.number) |
|||
// } |
|||
// } else { |
|||
// message.warning('请先创建标签') |
|||
// } |
|||
// } |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await ProductredressRequestMainApi.importTemplate() |
|||
}) |
|||
</script> |
@ -0,0 +1,595 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
import * as BalanceApi from '@/api/wms/balance' |
|||
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' |
|||
|
|||
// 表单校验
|
|||
export const ProductredressRequestMainRules = reactive({ |
|||
autoCommit: [required], |
|||
autoAgree: [required], |
|||
autoExecute: [required], |
|||
directCreateRecord: [required], |
|||
}) |
|||
|
|||
export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180, |
|||
fixed: 'left' |
|||
}, |
|||
isForm: false, |
|||
isSearch: true, |
|||
}, |
|||
// {
|
|||
// label: '生产计划单号',
|
|||
// field: 'productionPlanNumber',
|
|||
// sort: 'custom',
|
|||
// },
|
|||
{ |
|||
label: '状态', |
|||
field: 'status', |
|||
dictType: DICT_TYPE.REQUEST_STATUS, |
|||
dictClass: 'string', |
|||
isSearch: true, |
|||
isTable: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
value: '1', |
|||
componentProps: { |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
// {
|
|||
// label: '车间代码',
|
|||
// field: 'workshopCode',
|
|||
// sort: 'custom',
|
|||
// isSearch: true,
|
|||
// },
|
|||
// {
|
|||
// label: '班组',
|
|||
// field: 'team',
|
|||
// sort: 'custom',
|
|||
// },
|
|||
// {
|
|||
// label: '班次',
|
|||
// field: 'shift',
|
|||
// sort: 'custom',
|
|||
// },
|
|||
{ |
|||
label: '申请时间', |
|||
field: 'requestTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width: '100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '截止时间', |
|||
field: 'dueTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width: '100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '到仓库代码', |
|||
field: 'toWarehouseCode', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '部门', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '自动提交', |
|||
field: 'autoCommit', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '自动通过', |
|||
field: 'autoAgree', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '自动执行', |
|||
field: 'autoExecute', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '直接生成记录', |
|||
field: 'directCreateRecord', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '业务类型', |
|||
field: 'businessType', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '到库区类型范围', |
|||
field: 'toAreaTypes', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '到库区代码范围', |
|||
field: 'toAreaCodes', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '入库库存状态范围', |
|||
field: 'inInventoryStatuses', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '出库库存状态范围', |
|||
field: 'outInventoryStatuses', |
|||
sort: 'custom', |
|||
isForm:false, |
|||
}, |
|||
{ |
|||
label: '创建者用户名', |
|||
field: 'creator', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width: '100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '最后更新者用户名', |
|||
field: 'updater', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '最后更新时间', |
|||
field: 'updateTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width: '100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
|||
|
|||
// 表单校验
|
|||
export const ProductredressRequestDetailRules = reactive({ |
|||
}) |
|||
|
|||
export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '生产线代码',
|
|||
// field: 'productionLineCode',
|
|||
// sort: 'custom',
|
|||
// isSearch: true,
|
|||
// },
|
|||
// {
|
|||
// label: '工位代码',
|
|||
// field: 'workStationCode',
|
|||
// sort: 'custom',
|
|||
// },
|
|||
// {
|
|||
// label: '目标库位',
|
|||
// field: 'toLocationCode',
|
|||
// sort: 'custom',
|
|||
// },
|
|||
// {
|
|||
// label: '工序代码',
|
|||
// field: 'processCode',
|
|||
// sort: 'custom',
|
|||
// },
|
|||
|
|||
// {
|
|||
// label: '器具号',
|
|||
// field: 'containerNumber',
|
|||
// sort: 'custom',
|
|||
// },
|
|||
|
|||
// {
|
|||
// label: '生产日期',
|
|||
// field: 'produceDate',
|
|||
// sort: 'custom',
|
|||
// formatter: dateFormatter,
|
|||
// detail: {
|
|||
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|||
// },
|
|||
// table: {
|
|||
// width: 180
|
|||
// },
|
|||
// form: {
|
|||
// component: 'DatePicker',
|
|||
// componentProps: {
|
|||
// style: {width: '100%'},
|
|||
// type: 'datetime',
|
|||
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|||
// valueFormat: 'x',
|
|||
// }
|
|||
// },
|
|||
// isForm: false
|
|||
// },
|
|||
// {
|
|||
// label: '过期日期',
|
|||
// field: 'expireDate',
|
|||
// formatter: dateFormatter,
|
|||
// detail: {
|
|||
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|||
// },
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 180
|
|||
// },
|
|||
// form: {
|
|||
// component: 'DatePicker',
|
|||
// componentProps: {
|
|||
// style: {width: '100%'},
|
|||
// type: 'datetime',
|
|||
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|||
// valueFormat: 'x',
|
|||
// }
|
|||
// },
|
|||
// isForm: false
|
|||
// },
|
|||
|
|||
// {
|
|||
// label: '订单号',
|
|||
// field: 'woNumber',
|
|||
// sort: 'custom',
|
|||
// },
|
|||
// {
|
|||
// label: '订单行',
|
|||
// field: 'woLine',
|
|||
// sort: 'custom',
|
|||
// },
|
|||
|
|||
// {
|
|||
// label: 'BOM版本',
|
|||
// field: 'bomVersion',
|
|||
// sort: 'custom',
|
|||
// },
|
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
isTableForm: false, |
|||
}, |
|||
{ |
|||
label: '物料代码', |
|||
field: 'itemCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
// labelMessage: '信息提示说明!!!',
|
|||
componentProps: { |
|||
isSearchList: true, // 开启查询弹窗
|
|||
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
|||
searchField: 'itemCode', // 查询弹窗赋值字段
|
|||
searchTitle: '库存余额信息', // 查询弹窗标题
|
|||
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
|
|||
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法
|
|||
searchCondition:[ |
|||
{ |
|||
key: 'inventoryStatus', |
|||
value: 'OK', |
|||
isMainValue: false |
|||
},{ |
|||
key: 'packingNumber', // 查询列表中字段
|
|||
value: '', // 指查询具体值
|
|||
action: '!=', // 查询拼接条件
|
|||
isSearch: true, // 使用自定义拼接条件
|
|||
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
|
|||
}] |
|||
} |
|||
}, |
|||
tableForm:{ |
|||
isInpuFocusShow: true, |
|||
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
|||
searchField: 'itemCode', // 查询弹窗赋值字段
|
|||
searchTitle: '库存余额信息', // 查询弹窗标题
|
|||
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
|
|||
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法
|
|||
searchCondition:[ |
|||
{ |
|||
key: 'inventoryStatus', |
|||
value: 'OK', |
|||
isMainValue: false |
|||
},{ |
|||
key: 'packingNumber', // 查询列表中字段
|
|||
value: '', // 指查询具体值
|
|||
action: '!=', // 查询拼接条件
|
|||
isSearch: true, // 使用自定义拼接条件
|
|||
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
|
|||
}] |
|||
}, |
|||
}, |
|||
{ |
|||
label: '物品名称', |
|||
field: 'itemName', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
isTableForm: false, |
|||
}, |
|||
{ |
|||
label: '物品描述1', |
|||
field: 'itemDesc1', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
isTableForm: false, |
|||
}, |
|||
{ |
|||
label: '物品描述2', |
|||
field: 'itemDesc2', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
isTableForm: false, |
|||
}, |
|||
{ |
|||
label: '项目代码', |
|||
field: 'projectCode', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
isTableForm: false, |
|||
}, |
|||
{ |
|||
label: '数量', |
|||
field: 'qty', |
|||
sort: 'custom', |
|||
tableForm: { |
|||
disabled: true |
|||
}, |
|||
form: { |
|||
componentProps: { |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '计量单位', |
|||
field: 'uom', |
|||
sort: 'custom', |
|||
tableForm: { |
|||
disabled: true |
|||
}, |
|||
form: { |
|||
componentProps: { |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '包装号', |
|||
field: 'packingNumber', |
|||
sort: 'custom', |
|||
tableForm: { |
|||
disabled: true |
|||
}, |
|||
form: { |
|||
componentProps: { |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '批次', |
|||
field: 'batch', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
tableForm: { |
|||
disabled: true |
|||
}, |
|||
form: { |
|||
componentProps: { |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '包装数量', |
|||
field: 'packQty', |
|||
sort: 'custom', |
|||
tableForm: { |
|||
disabled: true |
|||
}, |
|||
form: { |
|||
componentProps: { |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '包装规格', |
|||
field: 'packUnit', |
|||
sort: 'custom', |
|||
tableForm: { |
|||
disabled: true |
|||
}, |
|||
form: { |
|||
componentProps: { |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '库存状态', |
|||
field: 'inventoryStatus', |
|||
sort: 'custom', |
|||
tableForm: { |
|||
disabled: true |
|||
}, |
|||
form: { |
|||
componentProps: { |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
}, |
|||
{ |
|||
label: '创建者用户名', |
|||
field: 'creator', |
|||
sort: 'custom', |
|||
isTableForm: false, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width: '100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isTableForm: false, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '最后更新者用户名', |
|||
field: 'updater', |
|||
sort: 'custom', |
|||
isForm: false, |
|||
isTableForm: false, |
|||
}, |
|||
{ |
|||
label: '最后更新时间', |
|||
field: 'updateTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width: '100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isTableForm: false, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isForm: false, |
|||
isTableForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
])) |
Loading…
Reference in new issue