陈薪名
12 months ago
8 changed files with 1692 additions and 304 deletions
@ -0,0 +1,67 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface ProductionreturnRequestDetailVO { |
||||
|
productionLineCode: string |
||||
|
workStationCode: string |
||||
|
inventoryStatus: string |
||||
|
fromOwnerCode: string |
||||
|
packingNumber: string |
||||
|
containerNumber: string |
||||
|
batch: string |
||||
|
fromLocationCode: string |
||||
|
number: string |
||||
|
itemCode: string |
||||
|
remark: string |
||||
|
createTime: Date |
||||
|
creator: string |
||||
|
itemName: string |
||||
|
itemDesc1: string |
||||
|
itemDesc2: string |
||||
|
projectCode: string |
||||
|
qty: number |
||||
|
uom: string |
||||
|
updateTime: Date |
||||
|
updater: string |
||||
|
toOwnerCode: string |
||||
|
} |
||||
|
|
||||
|
// 查询生产退料申请子列表
|
||||
|
export const getProductionreturnRequestDetailPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/wms/productionreturn-request-detail/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/wms/productionreturn-request-detail/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询生产退料申请子详情
|
||||
|
export const getProductionreturnRequestDetail = async (id: number) => { |
||||
|
return await request.get({ url: `/wms/productionreturn-request-detail/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增生产退料申请子
|
||||
|
export const createProductionreturnRequestDetail = async (data: ProductionreturnRequestDetailVO) => { |
||||
|
return await request.post({ url: `/wms/productionreturn-request-detail/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改生产退料申请子
|
||||
|
export const updateProductionreturnRequestDetail = async (data: ProductionreturnRequestDetailVO) => { |
||||
|
return await request.put({ url: `/wms/productionreturn-request-detail/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除生产退料申请子
|
||||
|
export const deleteProductionreturnRequestDetail = async (id: number) => { |
||||
|
return await request.delete({ url: `/wms/productionreturn-request-detail/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出生产退料申请子 Excel
|
||||
|
export const exportProductionreturnRequestDetail = async (params) => { |
||||
|
return await request.download({ url: `/wms/productionreturn-request-detail/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/wms/productionreturn-request-detail/get-import-template' }) |
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface ProductionreturnRequestMainVO { |
||||
|
workshopCode: string |
||||
|
fromWarehouseCode: string |
||||
|
fromLocationTypes: string |
||||
|
fromAreaCodes: string |
||||
|
number: string |
||||
|
businessType: string |
||||
|
remark: string |
||||
|
createTime: Date |
||||
|
creator: string |
||||
|
requestTime: Date |
||||
|
dueTime: Date |
||||
|
departmentCode: string |
||||
|
status: string |
||||
|
updateTime: Date |
||||
|
updater: string |
||||
|
toWarehouseCode: string |
||||
|
toLocationTypes: string |
||||
|
toAreaCodes: string |
||||
|
autoCommit: string |
||||
|
autoAgree: string |
||||
|
autoExecute: string |
||||
|
directCreateRecord: string |
||||
|
} |
||||
|
|
||||
|
// 查询生产退料申请主列表
|
||||
|
export const getProductionreturnRequestMainPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = {...params} |
||||
|
return await request.post({ url: '/wms/productionreturn-request-main/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/wms/productionreturn-request-main/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询生产退料申请主详情
|
||||
|
export const getProductionreturnRequestMain = async (id: number) => { |
||||
|
return await request.get({ url: `/wms/productionreturn-request-main/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增生产退料申请主
|
||||
|
export const createProductionreturnRequestMain = async (data: ProductionreturnRequestMainVO) => { |
||||
|
return await request.post({ url: `/wms/productionreturn-request-main/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改生产退料申请主
|
||||
|
export const updateProductionreturnRequestMain = async (data: ProductionreturnRequestMainVO) => { |
||||
|
return await request.put({ url: `/wms/productionreturn-request-main/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除生产退料申请主
|
||||
|
export const deleteProductionreturnRequestMain = async (id: number) => { |
||||
|
return await request.delete({ url: `/wms/productionreturn-request-main/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出生产退料申请主 Excel
|
||||
|
export const exportProductionreturnRequestMain = async (params) => { |
||||
|
return await request.download({ url: `/wms/productionreturn-request-main/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/wms/productionreturn-request-main/get-import-template' }) |
||||
|
} |
@ -0,0 +1,367 @@ |
|||||
|
<template> |
||||
|
<ContentWrap> |
||||
|
<!-- 搜索工作栏 --> |
||||
|
<Search :schema="ProductionreturnRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 列表头部 --> |
||||
|
<TableHead |
||||
|
:HeadButttondata="HeadButttondata" |
||||
|
@button-base-click="buttonBaseClick" |
||||
|
:routeName="routeName" |
||||
|
@updataTableColumns="updataTableColumns" |
||||
|
@searchFormClick="searchFormClick" |
||||
|
:allSchemas="ProductionreturnRequestMain.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="ProductionreturnRequestMainRules" |
||||
|
:formAllSchemas="ProductionreturnRequestMain.allSchemas" |
||||
|
:tableAllSchemas="ProductionreturnRequestDetail.allSchemas" |
||||
|
:tableFormRules="ProductionreturnRequestDetailRules" |
||||
|
:tableData="tableData" |
||||
|
:apiUpdate="ProductionreturnRequestMainNoApi.updateProductionreturnRequestMain" |
||||
|
:apiCreate="ProductionreturnRequestMainNoApi.createProductionreturnRequestMain" |
||||
|
:isBusiness="true" |
||||
|
@handleAddTable="handleAddTable" |
||||
|
@handleDeleteTable="handleDeleteTable" |
||||
|
@searchTableSuccess="searchTableSuccess" |
||||
|
@submitForm="submitForm" |
||||
|
/> |
||||
|
|
||||
|
<!-- 详情 --> |
||||
|
<Detail |
||||
|
ref="detailRef" |
||||
|
:isBasic="false" |
||||
|
:allSchemas="ProductionreturnRequestMain.allSchemas" |
||||
|
:detailAllSchemas="ProductionreturnRequestDetail.allSchemas" |
||||
|
:detailAllSchemasRules="ProductionreturnRequestDetailRules" |
||||
|
:apiCreate="ProductionreturnRequestDetailNoApi.createProductionreturnRequestDetail" |
||||
|
:apiUpdate="ProductionreturnRequestDetailNoApi.updateProductionreturnRequestDetail" |
||||
|
:apiPage="ProductionreturnRequestDetailNoApi.getProductionreturnRequestDetailPage" |
||||
|
:apiDelete="ProductionreturnRequestDetailNoApi.deleteProductionreturnRequestDetail" |
||||
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
||||
|
/> |
||||
|
|
||||
|
<!-- 导入 --> |
||||
|
<ImportForm ref="importFormRef" :url="importFormUrlRef" :importTemplateData="importTemplateData" |
||||
|
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import download from '@/utils/download' |
||||
|
import { ProductionreturnRequestMain,ProductionreturnRequestMainRules,ProductionreturnRequestDetail,ProductionreturnRequestDetailRules } from './productionreturnRequestMainNo.data' |
||||
|
import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo' |
||||
|
import * as ProductionreturnRequestDetailNoApi from '@/api/wms/productionreturnRequestDetailNo' |
||||
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
||||
|
|
||||
|
// 生产退料申请 |
||||
|
defineOptions({ name: 'ProductionreturnRequestMainNo' }) |
||||
|
|
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const { t } = useI18n() // 国际化 |
||||
|
|
||||
|
const route = useRoute() // 路由信息 |
||||
|
const routeName = ref() |
||||
|
routeName.value = route.name |
||||
|
const tableColumns = ref(ProductionreturnRequestMain.allSchemas.tableColumns) |
||||
|
|
||||
|
const importFormUrlRef = ref('/wms/productionreturn-request-main/import') |
||||
|
|
||||
|
// 字段设置 更新主列表字段 |
||||
|
const updataTableColumns = (val) => { |
||||
|
tableColumns.value = val |
||||
|
} |
||||
|
|
||||
|
// 查询页面返回 |
||||
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
||||
|
nextTick(() => { |
||||
|
if (type == 'tableForm') { |
||||
|
// 明细查询页赋值 |
||||
|
if(formField == 'packingNumber') { |
||||
|
row['packingNumber'] = val[0]['packingNumber'] |
||||
|
row['containerNumber'] = val[0]['containerNumber'] |
||||
|
row['batch'] = val[0]['batch'] |
||||
|
row['itemCode'] = val[0]['itemCode'] |
||||
|
row['uom'] = val[0]['uom'] |
||||
|
} else { |
||||
|
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 == 'packingNumber') { |
||||
|
setV['packingNumber'] = val[0]['packingNumber'] |
||||
|
setV['containerNumber'] = val[0]['containerNumber'] |
||||
|
setV['batch'] = val[0]['batch'] |
||||
|
setV['itemCode'] = val[0]['itemCode'] |
||||
|
setV['uom'] = val[0]['uom'] |
||||
|
} else { |
||||
|
setV[formField] = val[0][searchField] |
||||
|
} |
||||
|
formRef.setValues(setV) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
const { tableObject, tableMethods } = useTable({ |
||||
|
getListApi: ProductionreturnRequestMainNoApi.getProductionreturnRequestMainPage // 分页接口 |
||||
|
}) |
||||
|
|
||||
|
// 获得表格的各种操作 |
||||
|
const { getList, setSearchParams } = tableMethods |
||||
|
|
||||
|
// 列表头部按钮 |
||||
|
const HeadButttondata = [ |
||||
|
{ |
||||
|
label: '新增合格', |
||||
|
name: 'xzhg', |
||||
|
hide: false, |
||||
|
type: 'primary', |
||||
|
icon: 'ep:plus', |
||||
|
color: '', |
||||
|
hasPermi:'wms:productionreturn-request-main:create' |
||||
|
}, |
||||
|
{ |
||||
|
label: '新增不合格', |
||||
|
name: 'xzbhg', |
||||
|
hide: false, |
||||
|
type: 'primary', |
||||
|
icon: 'ep:plus', |
||||
|
color: '', |
||||
|
hasPermi:'wms:productionreturn-request-main:create' |
||||
|
}, |
||||
|
{ |
||||
|
label: '导入合格', |
||||
|
name: 'drhg', |
||||
|
hide: false, |
||||
|
type: 'warning', |
||||
|
icon: 'ep:upload', |
||||
|
color: '', |
||||
|
hasPermi:'wms:productionreturn-request-main:import' |
||||
|
}, |
||||
|
{ |
||||
|
label: '导入不合格', |
||||
|
name: 'drbhg', |
||||
|
hide: false, |
||||
|
type: 'warning', |
||||
|
icon: 'ep:upload', |
||||
|
color: '', |
||||
|
hasPermi:'wms:productionreturn-request-main:import' |
||||
|
}, |
||||
|
defaultButtons.defaultExportBtn({hasPermi:'wms:productionreturn-request-main:export'}), // 导出 |
||||
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
||||
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
||||
|
defaultButtons.defaultSetBtn(null), // 设置 |
||||
|
|
||||
|
] |
||||
|
|
||||
|
// 头部按钮事件 |
||||
|
const buttonBaseClick = (val, item) => { |
||||
|
if (val == 'xzhg') { // 新增合格 |
||||
|
openForm('create') |
||||
|
} else if (val == 'xzbhg') { // 新增不合格 |
||||
|
openForm('create') |
||||
|
} else if (val == 'drhg') { // 导入合格 |
||||
|
handleImport() |
||||
|
} else if (val == 'drbhg') { // 导入不合格 |
||||
|
importFormUrlRef.value = '/wms/productionreturn-request-main/importNO' |
||||
|
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','6'])}), // 关闭 |
||||
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加 |
||||
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 |
||||
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回 |
||||
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 |
||||
|
defaultButtons.mainListEditBtn({hasPermi:'wms:productionreturn-request-main:update'}), // 编辑 |
||||
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productionreturn-request-main:delete'}), // 删除 |
||||
|
] |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
// 列表-操作按钮事件 |
||||
|
const buttonTableClick = async (val, row) => { |
||||
|
if (val == 'mainClose') { // 关闭 |
||||
|
console.log('列表-操作按钮事件-关闭') |
||||
|
} else if (val == 'mainReAdd') { // 重新添加 |
||||
|
console.log('列表-操作按钮事件-重新添加') |
||||
|
} else if (val == 'mainSubmit') { // 提交审批 |
||||
|
console.log('列表-操作按钮事件-提交审批') |
||||
|
} else if (val == 'mainTurnDown') { // 驳回 |
||||
|
console.log('列表-操作按钮事件-驳回') |
||||
|
} else if (val == 'mainApprove') { // 审批通过 |
||||
|
console.log('列表-操作按钮事件-审批通过') |
||||
|
} 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 = [] // 重置明细数据 |
||||
|
formRef.value.open(type, row) |
||||
|
} |
||||
|
|
||||
|
/** 详情操作 */ |
||||
|
const detailRef = ref() |
||||
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
||||
|
detailRef.value.openDetail(row, titleName, titleValue) |
||||
|
} |
||||
|
|
||||
|
/** 删除按钮操作 */ |
||||
|
const handleDelete = async (id: number) => { |
||||
|
try { |
||||
|
// 删除的二次确认 |
||||
|
await message.delConfirm() |
||||
|
// 发起删除 |
||||
|
await ProductionreturnRequestMainNoApi.deleteProductionreturnRequestMain(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 ProductionreturnRequestMainNoApi.exportProductionreturnRequestMain(setSearchParams) |
||||
|
download.excel(data, '生产退料申请主.xlsx') |
||||
|
} catch { |
||||
|
} finally { |
||||
|
exportLoading.value = false |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* tableForm方法 |
||||
|
*/ |
||||
|
const tableFormKeys = {} |
||||
|
ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => { |
||||
|
tableFormKeys[item.field] = item.default ? item.default : '' |
||||
|
}) |
||||
|
const tableData = ref([]) |
||||
|
|
||||
|
// 添加明细 |
||||
|
const handleAddTable = () => { |
||||
|
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) |
||||
|
} |
||||
|
// 删除明细 |
||||
|
const handleDeleteTable = (item, index) => { |
||||
|
tableData.value.splice(index, 1) |
||||
|
} |
||||
|
|
||||
|
// 主子数据 提交 |
||||
|
const submitForm = async (formType, data) => { |
||||
|
data.subList = tableData.value // 拼接子表数据参数 |
||||
|
try { |
||||
|
if (formType === 'create') { |
||||
|
await ProductionreturnRequestMainNoApi.createProductionreturnRequestMain(data) |
||||
|
message.success(t('common.createSuccess')) |
||||
|
} else { |
||||
|
await ProductionreturnRequestMainNoApi.updateProductionreturnRequestMain(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() // 刷新当前列表 |
||||
|
} |
||||
|
|
||||
|
/** 初始化 **/ |
||||
|
onMounted(async () => { |
||||
|
getList() |
||||
|
importTemplateData.templateUrl = await ProductionreturnRequestMainNoApi.importTemplate() |
||||
|
}) |
||||
|
</script> |
@ -0,0 +1,804 @@ |
|||||
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
||||
|
import { dateFormatter } from '@/utils/formatTime' |
||||
|
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' |
||||
|
|
||||
|
import * as WorkshopApi from '@/api/wms/workshop' |
||||
|
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' |
||||
|
|
||||
|
import * as ProductionlineApi from '@/api/wms/productionline' |
||||
|
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' |
||||
|
|
||||
|
import * as WorkstationApi from '@/api/wms/workstation' |
||||
|
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' |
||||
|
|
||||
|
import * as BalanceApi from '@/api/wms/balance' |
||||
|
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' |
||||
|
|
||||
|
const { t } = useI18n() // 国际化
|
||||
|
|
||||
|
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
|
||||
|
const queryParams = { |
||||
|
pageSize:10, |
||||
|
pageNo:1, |
||||
|
code:'MaterialReturnRequest' |
||||
|
} |
||||
|
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) |
||||
|
const requestsettingData =data?.list[0]||{} |
||||
|
|
||||
|
// 获取当前操作人的部门
|
||||
|
import { useUserStore } from '@/store/modules/user' |
||||
|
const userStore = useUserStore() |
||||
|
const userDept = userStore.userSelfInfo.dept |
||||
|
|
||||
|
/** |
||||
|
* @returns {Array} 生产退料申请主表 |
||||
|
*/ |
||||
|
export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
||||
|
{ |
||||
|
label: '车间代码', |
||||
|
field: 'workshopCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isSearch: true, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
|
||||
|
searchField: 'code', // 查询弹窗赋值字段
|
||||
|
searchTitle: '车间信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
|
||||
|
searchCondition:[{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
}] |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从仓库代码', |
||||
|
field: 'fromWarehouseCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库位类型范围', |
||||
|
field: 'fromLocationTypes', |
||||
|
dictType: DICT_TYPE.LOCATION_TYPE, |
||||
|
dictClass: 'string', |
||||
|
isTable: true, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库区代码范围', |
||||
|
field: 'fromAreaCodes', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '单据号', |
||||
|
field: 'number', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'left' |
||||
|
}, |
||||
|
isForm: false, |
||||
|
isSearch: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '业务类型', |
||||
|
field: 'businessType', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '备注', |
||||
|
field: 'remark', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTable: 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', |
||||
|
} |
||||
|
}, |
||||
|
isForm: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '创建者', |
||||
|
field: 'creator', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isForm: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '申请时间', |
||||
|
field: 'requestTime', |
||||
|
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: 'dueTime', |
||||
|
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', |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '部门', |
||||
|
field: 'departmentCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
value: userDept.name, |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
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: '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', |
||||
|
} |
||||
|
}, |
||||
|
isForm: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '最后更新者', |
||||
|
field: 'updater', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isForm: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '到仓库代码', |
||||
|
field: 'toWarehouseCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到库位类型范围', |
||||
|
field: 'toLocationTypes', |
||||
|
dictType: DICT_TYPE.LOCATION_TYPE, |
||||
|
dictClass: 'string', |
||||
|
isSearch: true, |
||||
|
isTable: true, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到库区代码范围', |
||||
|
field: 'toAreaCodes', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '自动提交', |
||||
|
field: 'autoCommit', |
||||
|
dictType: DICT_TYPE.TRUE_FALSE, |
||||
|
dictClass: 'string', |
||||
|
isTable: true, |
||||
|
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: true, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'Switch', |
||||
|
value: requestsettingData.autoAgree, |
||||
|
componentProps: { |
||||
|
inactiveValue: 'FALSE', |
||||
|
activeValue: 'TRUE', |
||||
|
disabled: true, |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '自动执行', |
||||
|
field: 'autoExecute', |
||||
|
dictType: DICT_TYPE.TRUE_FALSE, |
||||
|
dictClass: 'string', |
||||
|
isTable: true, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'Switch', |
||||
|
value: requestsettingData.autoExecute, |
||||
|
componentProps: { |
||||
|
inactiveValue: 'FALSE', |
||||
|
activeValue: 'TRUE', |
||||
|
disabled: true, |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '直接生成记录', |
||||
|
field: 'directCreateRecord', |
||||
|
dictType: DICT_TYPE.TRUE_FALSE, |
||||
|
dictClass: 'string', |
||||
|
isTable: true, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'Switch', |
||||
|
value: requestsettingData.directCreateRecord, |
||||
|
componentProps: { |
||||
|
inactiveValue: 'FALSE', |
||||
|
activeValue: 'TRUE', |
||||
|
disabled: true, |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '操作', |
||||
|
field: 'action', |
||||
|
isDetail: false, |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 300, |
||||
|
fixed: 'right' |
||||
|
}, |
||||
|
} |
||||
|
])) |
||||
|
|
||||
|
//表单校验
|
||||
|
export const ProductionreturnRequestMainRules = reactive({ |
||||
|
// fromWarehouseCode: [
|
||||
|
// { required: true, message: '请输入从仓库代码', trigger: 'blur' }
|
||||
|
// ],
|
||||
|
// fromLocationTypes: [
|
||||
|
// { required: true, message: '请选择从库位类型范围', trigger: 'change' }
|
||||
|
// ],
|
||||
|
// toWarehouseCode: [
|
||||
|
// { required: true, message: '请输入到仓库代码', trigger: 'blur' }
|
||||
|
// ],
|
||||
|
// toLocationTypes: [
|
||||
|
// { required: true, message: '请选择到库位类型范围', trigger: 'change' }
|
||||
|
// ],
|
||||
|
departmentCode: [ |
||||
|
{ required: true, message: '请输入部门', trigger: 'blur' } |
||||
|
], |
||||
|
autoCommit: [ |
||||
|
{ required: true, message: '请选择是否自动提交', trigger: 'change' } |
||||
|
], |
||||
|
autoAgree: [ |
||||
|
{ required: true, message: '请选择是否自动通过', trigger: 'change' } |
||||
|
], |
||||
|
autoExecute: [ |
||||
|
{ required: true, message: '请选择是否自动执行', trigger: 'change' } |
||||
|
], |
||||
|
directCreateRecord: [ |
||||
|
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } |
||||
|
], |
||||
|
// businessType: [
|
||||
|
// { required: true, message: '请输入业务类型', trigger: 'blur' }
|
||||
|
// ],
|
||||
|
}) |
||||
|
|
||||
|
/** |
||||
|
* @returns {Array} 生产退料申请子表 |
||||
|
*/ |
||||
|
export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
||||
|
{ |
||||
|
label: '生产线代码', |
||||
|
field: 'productionLineCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
|
||||
|
searchField: 'code', // 查询弹窗赋值字段
|
||||
|
searchTitle: '生产线信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
|
||||
|
searchCondition:[{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
}] |
||||
|
} |
||||
|
}, |
||||
|
tableForm:{ |
||||
|
isInpuFocusShow: true, |
||||
|
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
|
||||
|
searchField: 'code', // 查询弹窗赋值字段
|
||||
|
searchTitle: '生产线信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
|
||||
|
searchCondition:[{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
}] |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '工位代码', |
||||
|
field: 'workStationCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
|
||||
|
searchField: 'code', // 查询弹窗赋值字段
|
||||
|
searchTitle: '工位信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
|
||||
|
searchCondition:[{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
}] |
||||
|
} |
||||
|
}, |
||||
|
tableForm:{ |
||||
|
isInpuFocusShow: true, |
||||
|
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
|
||||
|
searchField: 'code', // 查询弹窗赋值字段
|
||||
|
searchTitle: '工位信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
|
||||
|
searchCondition:[{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
}] |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '库存状态', |
||||
|
field: 'inventoryStatus', |
||||
|
dictType: DICT_TYPE.INVENTORY_STATUS, |
||||
|
dictClass: 'string', |
||||
|
isTable: true, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
tableForm: { |
||||
|
type: 'Select' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '从货主代码', |
||||
|
field: 'fromOwnerCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTableForm: false, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到货主代码', |
||||
|
field: 'toOwnerCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTableForm: false, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '包装号', |
||||
|
field: 'packingNumber', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择包装号', // 输入框占位文本
|
||||
|
searchField: 'packingNumber', // 查询弹窗赋值字段
|
||||
|
searchTitle: '库存余额信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法
|
||||
|
} |
||||
|
}, |
||||
|
tableForm:{ |
||||
|
isInpuFocusShow: true, |
||||
|
searchListPlaceholder: '请选择包装号', // 输入框占位文本
|
||||
|
searchField: 'packingNumber', // 查询弹窗赋值字段
|
||||
|
searchTitle: '库存余额信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法
|
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '器具号', |
||||
|
field: 'containerNumber', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
tableForm: { |
||||
|
disabled: true |
||||
|
}, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '批次', |
||||
|
field: 'batch', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
tableForm: { |
||||
|
disabled: true |
||||
|
}, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库位代码', |
||||
|
field: 'fromLocationCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTableForm: false, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '单据号', |
||||
|
field: 'number', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTableForm: false, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '物品代码', |
||||
|
field: 'itemCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
tableForm: { |
||||
|
disabled: true |
||||
|
}, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '备注', |
||||
|
field: 'remark', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
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: 'creator', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTableForm: false, |
||||
|
isForm: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '物品名称', |
||||
|
field: 'itemName', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTableForm: false, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '物品描述1', |
||||
|
field: 'itemDesc1', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTableForm: false, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '物品描述2', |
||||
|
field: 'itemDesc2', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTableForm: false, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '项目代码', |
||||
|
field: 'projectCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTableForm: false, |
||||
|
isForm: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '数量', |
||||
|
field: 'qty', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'InputNumber', |
||||
|
componentProps: { |
||||
|
min: 1, |
||||
|
precision: 6 |
||||
|
} |
||||
|
}, |
||||
|
tableForm: { |
||||
|
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' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
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: 'updater', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTableForm: false, |
||||
|
isForm: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '操作', |
||||
|
field: 'action', |
||||
|
isDetail: false, |
||||
|
isForm: false , |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'right' |
||||
|
}, |
||||
|
isTableForm:false, |
||||
|
} |
||||
|
])) |
||||
|
|
||||
|
//表单校验
|
||||
|
export const ProductionreturnRequestDetailRules = reactive({ |
||||
|
packingNumber: [ |
||||
|
{ required: true, message: '请选择包装号', trigger: 'change' } |
||||
|
], |
||||
|
batch: [ |
||||
|
{ required: true, message: '请输入批次', trigger: 'blur' } |
||||
|
], |
||||
|
inventoryStatus: [ |
||||
|
{ required: true, message: '请选择库存状态', trigger: 'change' } |
||||
|
], |
||||
|
// fromLocationCode: [
|
||||
|
// { required: true, message: '请输入从库位代码', trigger: 'blur' }
|
||||
|
// ],
|
||||
|
itemCode: [ |
||||
|
{ required: true, message: '请输入物品代码', trigger: 'blur' } |
||||
|
], |
||||
|
}) |
Loading…
Reference in new issue