3 changed files with 1060 additions and 0 deletions
@ -0,0 +1,266 @@ |
|||||
|
<template> |
||||
|
<ContentWrap> |
||||
|
<!-- 搜索工作栏 --> |
||||
|
<Search :schema="[...ProductionreturnRecordMain.allSchemas.searchSchema,...ProductionreturnRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 列表头部 --> |
||||
|
<TableHead |
||||
|
:HeadButttondata="HeadButttondata" |
||||
|
@button-base-click="buttonBaseClick" |
||||
|
:routeName="routeName" |
||||
|
@updataTableColumns="updataTableColumns" |
||||
|
@searchFormClick="searchFormClick" |
||||
|
:allSchemas="ProductionreturnRecordMain.allSchemas" |
||||
|
:detailAllSchemas="ProductionreturnRecordDetail.allSchemas" |
||||
|
/> |
||||
|
|
||||
|
<!-- 列表 --> |
||||
|
<ContentWrap> |
||||
|
<Table v-clientTable |
||||
|
: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,$index }"> |
||||
|
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> |
||||
|
</template> |
||||
|
</Table> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 表单弹窗:添加/修改 --> |
||||
|
<BasicForm |
||||
|
ref="formRef" |
||||
|
@success="getList" |
||||
|
:rules="ProductionreturnRecordMainRules" |
||||
|
:formAllSchemas="ProductionreturnRecordMain.allSchemas" |
||||
|
:tableAllSchemas="ProductionreturnRecordDetail.allSchemas" |
||||
|
:tableFormRules="ProductionreturnRecordDetailRules" |
||||
|
:isBusiness="true" |
||||
|
/> |
||||
|
|
||||
|
<!-- 详情 --> |
||||
|
<Detail |
||||
|
ref="detailRef" |
||||
|
:isBasic="false" |
||||
|
:allSchemas="ProductionreturnRecordMain.allSchemas" |
||||
|
:detailAllSchemas="ProductionreturnRecordDetail.allSchemas" |
||||
|
:detailAllSchemasRules="ProductionreturnRecordDetailRules" |
||||
|
:apiPage="ProductionreturnRecordDetailApi.getProductionreturnRecordDetailPage" |
||||
|
/> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import download from '@/utils/download' |
||||
|
import { ProductionreturnRecordMain,ProductionreturnRecordMainRules,ProductionreturnRecordDetail,ProductionreturnRecordDetailRules } from './productionreturnRecordMainHold.data' |
||||
|
import * as ProductionreturnRecordMainApi from '@/api/wms/productionreturnRecordMain' |
||||
|
import * as ProductionreturnRecordDetailApi from '@/api/wms/productionreturnRecordDetail' |
||||
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
||||
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
||||
|
import { formatDate } from '@/utils/formatTime' |
||||
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
||||
|
const { loadStart, loadDone } = usePageLoading() |
||||
|
// 生产退料记录主 and 隔离退料记录 |
||||
|
defineOptions({ name: 'ProductionreturnRecordMainHold' }) |
||||
|
|
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const { t } = useI18n() // 国际化 |
||||
|
|
||||
|
const route = useRoute() // 路由信息 |
||||
|
const routeName = ref() |
||||
|
routeName.value = route.name |
||||
|
|
||||
|
const tableColumns = ref([...ProductionreturnRecordMain.allSchemas.tableColumns,...ProductionreturnRecordDetail.allSchemas.tableMainColumns]) |
||||
|
|
||||
|
// 字段设置 更新主列表字段 |
||||
|
const updataTableColumns = (val) => { |
||||
|
tableColumns.value = val |
||||
|
} |
||||
|
|
||||
|
const { tableObject, tableMethods } = useTable({ |
||||
|
getListApi: 'ProductionreturnRecordMain'==routeName.value?ProductionreturnRecordDetailApi.getProductionreturnRecordDetailPageStore:ProductionreturnRecordDetailApi.getProductionreturnRecordDetailPageHold // 分页接口 |
||||
|
}) |
||||
|
|
||||
|
// 获得表格的各种操作 |
||||
|
const { getList, setSearchParams } = tableMethods |
||||
|
|
||||
|
// 列表头部按钮 |
||||
|
const HeadButttondata = [ |
||||
|
defaultButtons.defaultExportBtn({hasPermi:'wms:productionreturn-record-main: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 == 'export') { // 导出 |
||||
|
handleExport() |
||||
|
} else if (val == 'refresh') { // 刷新 |
||||
|
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { |
||||
|
searchFormClick({ |
||||
|
filters: tableObject.params.filters |
||||
|
}) |
||||
|
} else { |
||||
|
getList() |
||||
|
} |
||||
|
} else if (val == 'filtrate') { // 筛选 |
||||
|
} else { // 其他按钮 |
||||
|
console.log('其他按钮', item) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 根据状态返回该按钮是否显示 |
||||
|
const isShowMainButton = (row,val) => { |
||||
|
if (val.indexOf(row.receiveStatus) > -1) { |
||||
|
return false |
||||
|
} else { |
||||
|
return true |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 列表-操作按钮 |
||||
|
const butttondata = (row,$index) => { |
||||
|
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
||||
|
if(findIndex>-1&&findIndex<$index){ |
||||
|
return [] |
||||
|
} |
||||
|
return [ |
||||
|
{ |
||||
|
label: '拒收', |
||||
|
name: 'mainJobRefusal', |
||||
|
hide: isShowMainButton(row, ['0']), |
||||
|
type: 'primary', |
||||
|
icon: '', |
||||
|
color: '', |
||||
|
hasPermi: '', |
||||
|
link: true // 文本展现按钮 |
||||
|
}, |
||||
|
{ |
||||
|
label: '接收', |
||||
|
name: 'mainJobRecept', |
||||
|
hide: isShowMainButton(row, ['0']), |
||||
|
type: 'primary', |
||||
|
icon: '', |
||||
|
color: '', |
||||
|
hasPermi: '', |
||||
|
link: true // 文本展现按钮 |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
|
||||
|
// 列表-操作按钮事件 |
||||
|
const buttonTableClick = async (val, row) => { |
||||
|
if(val == 'mainJobRefusal'){ |
||||
|
// 拒收 |
||||
|
handleRefusal(row) |
||||
|
}else if(val == 'mainJobRecept'){ |
||||
|
// 接收 |
||||
|
handleRecept(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,"recordProductionreturnMain") |
||||
|
} |
||||
|
|
||||
|
/** 导出按钮操作 */ |
||||
|
const handleExport = async () => { |
||||
|
try { |
||||
|
// 导出的二次确认 |
||||
|
await message.exportConfirm() |
||||
|
// 发起导出 |
||||
|
loadStart() |
||||
|
const excelTitle = ref(route.meta.title) |
||||
|
if('ProductionreturnRecordMain'==routeName.value){ |
||||
|
//生产退料记录导出 |
||||
|
const data = await ProductionreturnRecordMainApi.exportProductionreturnRecordMainStore(tableObject.params) |
||||
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
||||
|
}else{ |
||||
|
// 隔离退料记录导出 |
||||
|
const data = await ProductionreturnRecordMainApi.exportProductionreturnRecordMainHold(tableObject.params) |
||||
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
||||
|
} |
||||
|
|
||||
|
} catch { |
||||
|
} finally { |
||||
|
loadDone() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// 拒收 |
||||
|
const handleRefusal = async (row) => { |
||||
|
try { |
||||
|
loadStart() |
||||
|
// 接口 |
||||
|
ProductionreturnRecordMainApi.refuse(row.masterId).then(() => { |
||||
|
message.success(t('common.updateSuccess')) |
||||
|
tableObject.loading = false |
||||
|
buttonBaseClick('refresh',null) |
||||
|
}).catch(err => { |
||||
|
tableObject.loading = false |
||||
|
console.log(err) |
||||
|
}) |
||||
|
} catch { |
||||
|
} finally { |
||||
|
loadDone() |
||||
|
} |
||||
|
} |
||||
|
// 接收 |
||||
|
const handleRecept = async (row) => { |
||||
|
try { |
||||
|
loadStart() |
||||
|
// 接口 |
||||
|
ProductionreturnRecordMainApi.receive(row.masterId).then(() => { |
||||
|
message.success(t('common.updateSuccess')) |
||||
|
tableObject.loading = false |
||||
|
buttonBaseClick('refresh',null) |
||||
|
}).catch(err => { |
||||
|
tableObject.loading = false |
||||
|
console.log(err) |
||||
|
}) |
||||
|
} catch { |
||||
|
} finally { |
||||
|
loadDone() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 筛选提交 |
||||
|
const searchFormClick = (searchData) => { |
||||
|
tableObject.params = { |
||||
|
isSearch: true, |
||||
|
filters: searchData.filters |
||||
|
} |
||||
|
getList() // 刷新当前列表 |
||||
|
} |
||||
|
|
||||
|
/** 初始化 **/ |
||||
|
onMounted(async () => { |
||||
|
getList() |
||||
|
}) |
||||
|
</script> |
@ -0,0 +1,783 @@ |
|||||
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
||||
|
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' |
||||
|
|
||||
|
/** |
||||
|
* @returns {Array} 生产退料记录主表 |
||||
|
*/ |
||||
|
export const ProductionreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
||||
|
{ |
||||
|
label: '单据号', |
||||
|
field: 'number', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 180, |
||||
|
fixed: 'left' |
||||
|
}, |
||||
|
isSearch: true |
||||
|
}, |
||||
|
{ |
||||
|
label: '申请单号', |
||||
|
field: 'requestNumber', |
||||
|
sort: 'custom', |
||||
|
sortTableDefault:996, |
||||
|
table: { |
||||
|
width: 180 |
||||
|
}, |
||||
|
isSearch: true |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
label: '任务单号', |
||||
|
field: 'jobNumber', |
||||
|
sort: 'custom', |
||||
|
sortTableDefault:997, |
||||
|
table: { |
||||
|
width: 180 |
||||
|
}, |
||||
|
isSearch: true |
||||
|
}, |
||||
|
|
||||
|
// {
|
||||
|
// label: '状态',
|
||||
|
// field: 'status',
|
||||
|
// dictType: DICT_TYPE.REQUEST_STATUS,
|
||||
|
// dictClass: 'string',
|
||||
|
// isForm: false,
|
||||
|
// isTable: true,
|
||||
|
// sort: 'custom',
|
||||
|
// table: {
|
||||
|
// width: 150
|
||||
|
// },
|
||||
|
// },
|
||||
|
{ |
||||
|
label: '车间代码', |
||||
|
field: 'workshopCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
label: '出库事务类型', |
||||
|
field: 'outTransactionType', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '入库事务类型', |
||||
|
field: 'inTransactionType', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '执行时间', |
||||
|
field: 'executeTime', |
||||
|
formatter: dateFormatter, |
||||
|
detail: { |
||||
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
||||
|
}, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 180 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
form: { |
||||
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
type: 'datetime', |
||||
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
||||
|
valueFormat: 'x', |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '生效日期', |
||||
|
field: 'activeDate', |
||||
|
formatter: dateFormatter2, |
||||
|
detail: { |
||||
|
dateFormat: 'YYYY-MM-DD' |
||||
|
}, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 180 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
form: { |
||||
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
style: {width: '100%'}, |
||||
|
type: 'date', |
||||
|
dateFormat: 'YYYY-MM-DD', |
||||
|
valueFormat: 'x', |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '申请时间', |
||||
|
field: 'requestTime', |
||||
|
formatter: dateFormatter, |
||||
|
detail: { |
||||
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
||||
|
}, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 180 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
form: { |
||||
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
type: 'datetime', |
||||
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
||||
|
valueFormat: 'x', |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '截止时间', |
||||
|
field: 'dueTime', |
||||
|
formatter: dateFormatter, |
||||
|
detail: { |
||||
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
||||
|
}, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 180 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
form: { |
||||
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
type: 'datetime', |
||||
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
||||
|
valueFormat: 'x', |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '部门', |
||||
|
field: 'departmentCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '接口类型', |
||||
|
field: 'interfaceType', |
||||
|
dictType: DICT_TYPE.INTERFACE_TYPE, |
||||
|
dictClass: 'string', |
||||
|
isTable: false, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '业务类型', |
||||
|
field: 'businessType', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '备注', |
||||
|
field: 'remark', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '创建者', |
||||
|
field: 'creator', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTable: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '创建时间', |
||||
|
field: 'createTime', |
||||
|
formatter: dateFormatter, |
||||
|
detail: { |
||||
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
||||
|
}, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 180 |
||||
|
}, |
||||
|
isTable: true, |
||||
|
form: { |
||||
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
type: 'datetime', |
||||
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
||||
|
valueFormat: 'x', |
||||
|
} |
||||
|
}, |
||||
|
isSearch: true, |
||||
|
search: { |
||||
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
||||
|
type: 'daterange', |
||||
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '最后更新时间', |
||||
|
field: 'updateTime', |
||||
|
sort: 'custom', |
||||
|
isDetail: true, |
||||
|
isForm: false, |
||||
|
isTable: false, |
||||
|
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', |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '最后更新者', |
||||
|
field: 'updater', |
||||
|
isDetail: true, |
||||
|
isForm: false, |
||||
|
isTable: false, |
||||
|
table: { |
||||
|
width: 150 |
||||
|
} |
||||
|
}, |
||||
|
// {
|
||||
|
// label: '代码',
|
||||
|
// field: 'code',
|
||||
|
// sort: 'custom',
|
||||
|
// table: {
|
||||
|
// width: 150
|
||||
|
// },
|
||||
|
// },
|
||||
|
{ |
||||
|
label: '从仓库代码', |
||||
|
field: 'fromWarehouseCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库区类型范围', |
||||
|
field: 'fromAreaTypes', |
||||
|
dictType: DICT_TYPE.AREA_TYPE, |
||||
|
dictClass: 'string', |
||||
|
isTable: false, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库区代码范围', |
||||
|
field: 'fromAreaCodes', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到仓库代码', |
||||
|
field: 'toWarehouseCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到库区类型范围', |
||||
|
field: 'toAreaTypes', |
||||
|
dictType: DICT_TYPE.AREA_TYPE, |
||||
|
dictClass: 'string', |
||||
|
isTable: false, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到库区代码范围', |
||||
|
field: 'toAreaCodes', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isTable: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: '是否可用', |
||||
|
field: 'available', |
||||
|
dictType: DICT_TYPE.TRUE_FALSE, |
||||
|
dictClass: 'string', |
||||
|
isSearch: true, |
||||
|
isTable: false, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'Switch', |
||||
|
value: 'TRUE', |
||||
|
componentProps: { |
||||
|
inactiveValue: 'FALSE', |
||||
|
activeValue: 'TRUE' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
])) |
||||
|
|
||||
|
//表单校验
|
||||
|
export const ProductionreturnRecordMainRules = reactive({ |
||||
|
requestNumber: [ |
||||
|
{ required: true, message: '请选择申请单号', trigger: 'change' } |
||||
|
], |
||||
|
fromWarehouseCode: [ |
||||
|
{ required: true, message: '请选择从仓库代码', trigger: 'change' } |
||||
|
], |
||||
|
fromAreaTypes: [ |
||||
|
{ required: true, message: '请选择从库区类型范围', trigger: 'change' } |
||||
|
], |
||||
|
toWarehouseCode: [ |
||||
|
{ required: true, message: '请选择到仓库代码', trigger: 'change' } |
||||
|
], |
||||
|
toAreaTypes: [ |
||||
|
{ required: true, message: '请选择到库区类型范围', trigger: 'change' } |
||||
|
], |
||||
|
outTransaction: [ |
||||
|
{ required: true, message: '请输入出库事务类型', trigger: 'blur' } |
||||
|
], |
||||
|
inTransaction: [ |
||||
|
{ required: true, message: '请输入入库事务类型', trigger: 'blur' } |
||||
|
], |
||||
|
executeTime: [ |
||||
|
{ required: true, message: '请输入执行时间', trigger: 'change' } |
||||
|
], |
||||
|
activeDate: [ |
||||
|
{ required: true, message: '请输入生效日期', trigger: 'change' } |
||||
|
], |
||||
|
available: [ |
||||
|
{ required: true, message: '请输入是否可用', trigger: 'blur' } |
||||
|
], |
||||
|
departmentCode: [ |
||||
|
{ required: true, message: '请输入部门', trigger: 'blur' } |
||||
|
], |
||||
|
interfaceType: [ |
||||
|
{ required: true, message: '请选择接口类型', trigger: 'change' } |
||||
|
], |
||||
|
number: [ |
||||
|
{ required: true, message: '请输入单据号', trigger: 'blur' } |
||||
|
], |
||||
|
businessType: [ |
||||
|
{ required: true, message: '请输入业务类型', trigger: 'blur' } |
||||
|
], |
||||
|
createTime: [ |
||||
|
{ required: true, message: '请输入创建时间', trigger: 'blur' } |
||||
|
], |
||||
|
creator: [ |
||||
|
{ required: true, message: '请输入创建者', trigger: 'blur' } |
||||
|
], |
||||
|
}) |
||||
|
|
||||
|
/** |
||||
|
* @returns {Array} 生产退料记录子表 |
||||
|
*/ |
||||
|
export const ProductionreturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
||||
|
{ |
||||
|
label: '生产线代码', |
||||
|
field: 'productionLineCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '工位代码', |
||||
|
field: 'workStationCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '接收状态', |
||||
|
field: 'receiveStatus', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.RECEIVE_STATUS, |
||||
|
dictClass: 'string', |
||||
|
sortTableDefault:998, |
||||
|
isTable: true, |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '物料代码', |
||||
|
field: 'itemCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '物料名称', |
||||
|
field: 'itemName', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '物料描述1', |
||||
|
field: 'itemDesc1', |
||||
|
sort: 'custom', |
||||
|
hiddenInMain: true, |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '物料描述2', |
||||
|
field: 'itemDesc2', |
||||
|
sort: 'custom', |
||||
|
hiddenInMain: true, |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '数量', |
||||
|
field: 'qty', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
form: { |
||||
|
component: 'InputNumber', |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '从批次', |
||||
|
field: 'fromBatch', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到批次', |
||||
|
field: 'toBatch', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从包装号', |
||||
|
field: 'fromPackingNumber', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到包装号', |
||||
|
field: 'toPackingNumber', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
// {
|
||||
|
// label: '包装规格',
|
||||
|
// field: 'packUnit',
|
||||
|
// sort: 'custom',
|
||||
|
// table: {
|
||||
|
// width: 150
|
||||
|
// },
|
||||
|
|
||||
|
// },
|
||||
|
// {
|
||||
|
// label: '包装数量',
|
||||
|
// field: 'packQty',
|
||||
|
// sort: 'custom',
|
||||
|
// table: {
|
||||
|
// width: 150
|
||||
|
// },
|
||||
|
// },
|
||||
|
{ |
||||
|
label: '计量单位', |
||||
|
field: 'uom', |
||||
|
dictType: DICT_TYPE.UOM, |
||||
|
dictClass: 'string', |
||||
|
isTable: true, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '库存状态', |
||||
|
field: 'inventoryStatus', |
||||
|
dictType: DICT_TYPE.INVENTORY_STATUS, |
||||
|
dictClass: 'string', |
||||
|
isTable: true, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库位代码', |
||||
|
field: 'fromLocationCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到库位代码', |
||||
|
field: 'toLocationCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库位组代码', |
||||
|
field: 'fromLocationGroupCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到库位组代码', |
||||
|
field: 'toLocationGroupCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从库区代码', |
||||
|
field: 'fromAreaCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到库区代码', |
||||
|
field: 'toAreaCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '从货主代码', |
||||
|
field: 'fromOwnerCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '到货主代码', |
||||
|
field: 'toOwnerCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '项目代码', |
||||
|
field: 'projectCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '单据号', |
||||
|
field: 'number', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 180 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '备注', |
||||
|
field: 'remark', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '创建者', |
||||
|
field: 'creator', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
}, |
||||
|
{ |
||||
|
label: '创建时间', |
||||
|
field: 'createTime', |
||||
|
formatter: dateFormatter, |
||||
|
detail: { |
||||
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
||||
|
}, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 180 |
||||
|
}, |
||||
|
hiddenInMain: true, |
||||
|
form: { |
||||
|
component: 'DatePicker', |
||||
|
componentProps: { |
||||
|
type: 'datetime', |
||||
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
||||
|
valueFormat: 'x', |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
// {
|
||||
|
// label: '从器具号',
|
||||
|
// field: 'fromContainerNumber',
|
||||
|
// sort: 'custom',
|
||||
|
// table: {
|
||||
|
// width: 150
|
||||
|
// },
|
||||
|
// isTable: false
|
||||
|
// },
|
||||
|
// {
|
||||
|
// label: '到器具号',
|
||||
|
// field: 'toContainerNumber',
|
||||
|
// sort: 'custom',
|
||||
|
// table: {
|
||||
|
// width: 150
|
||||
|
// },
|
||||
|
// isTable: false
|
||||
|
// },
|
||||
|
{ |
||||
|
label: '接口类型', |
||||
|
field: 'interfaceType', |
||||
|
dictType: DICT_TYPE.INTERFACE_TYPE, |
||||
|
dictClass: 'string', |
||||
|
isTable: false, |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '操作', |
||||
|
field: 'action', |
||||
|
isDetail: false, |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 120, |
||||
|
fixed: 'right' |
||||
|
}, |
||||
|
} |
||||
|
])) |
||||
|
|
||||
|
//表单校验
|
||||
|
export const ProductionreturnRecordDetailRules = reactive({ |
||||
|
inventoryStatus: [ |
||||
|
{ required: true, message: '请选择库存状态', trigger: 'change' } |
||||
|
], |
||||
|
frompackingNumber: [ |
||||
|
{ required: true, message: '请选择从包装号', trigger: 'change' } |
||||
|
], |
||||
|
frombatch: [ |
||||
|
{ required: true, message: '请输入从批次', trigger: 'change' } |
||||
|
], |
||||
|
fromlocationCode: [ |
||||
|
{ required: true, message: '请选择从库位代码', trigger: 'change' } |
||||
|
], |
||||
|
fromlocationGroupCode: [ |
||||
|
{ required: true, message: '请选择从库位组代码', trigger: 'change' } |
||||
|
], |
||||
|
fromareaCode: [ |
||||
|
{ required: true, message: '请选择从库区代码', trigger: 'change' } |
||||
|
], |
||||
|
topackingNumber: [ |
||||
|
{ required: true, message: '请选择到仓库代码', trigger: 'change' } |
||||
|
], |
||||
|
tobatch: [ |
||||
|
{ required: true, message: '请输入到批次', trigger: 'change' } |
||||
|
], |
||||
|
toLocationCode: [ |
||||
|
{ required: true, message: '请选择到库位代码', trigger: 'change' } |
||||
|
], |
||||
|
toLocationGroupCode: [ |
||||
|
{ required: true, message: '请选择到库位组代码', trigger: 'change' } |
||||
|
], |
||||
|
toAreaCode: [ |
||||
|
{ required: true, message: '请选择到库区代码', trigger: 'change' } |
||||
|
], |
||||
|
number: [ |
||||
|
{ required: true, message: '请输入单据号', trigger: 'blur' } |
||||
|
], |
||||
|
itemCode: [ |
||||
|
{ required: true, message: '请选择物料代码', trigger: 'change' } |
||||
|
], |
||||
|
createTime: [ |
||||
|
{ required: true, message: '请输入创建时间', trigger: 'blur' } |
||||
|
], |
||||
|
creator: [ |
||||
|
{ required: true, message: '请输入创建者', trigger: 'blur' } |
||||
|
], |
||||
|
}) |
Loading…
Reference in new issue