YEJIAXING-PC\lenovo
1 month ago
4 changed files with 777 additions and 0 deletions
@ -0,0 +1,54 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 创建采购索赔子
|
|||
export function createPurchaseClaimRequestDetail(data) { |
|||
return request({ |
|||
url: '/request/purchase-claim-request-detail/create', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 更新采购索赔子
|
|||
export function updatePurchaseClaimRequestDetail(data) { |
|||
return request({ |
|||
url: '/request/purchase-claim-request-detail/update', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除采购索赔子
|
|||
export function deletePurchaseClaimRequestDetail(id) { |
|||
return request({ |
|||
url: '/request/purchase-claim-request-detail/delete?id=' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 获得采购索赔子
|
|||
export function getPurchaseClaimRequestDetail(id) { |
|||
return request({ |
|||
url: '/request/purchase-claim-request-detail/get?id=' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 获得采购索赔子分页
|
|||
export function getPurchaseClaimRequestDetailPage(query) { |
|||
return request({ |
|||
url: '/request/purchase-claim-request-detail/page', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
|||
|
|||
// 导出采购索赔子 Excel
|
|||
export function exportPurchaseClaimRequestDetailExcel(query) { |
|||
return request({ |
|||
url: '/request/purchase-claim-request-detail/export-excel', |
|||
method: 'get', |
|||
params: query, |
|||
responseType: 'blob' |
|||
}) |
|||
} |
@ -0,0 +1,55 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface PurchaseClaimRequestMainVO { |
|||
id: number |
|||
number: string |
|||
supplierCode: string |
|||
claimTime: Date |
|||
status: string |
|||
supplierinvoiceNumber: string |
|||
remark: string |
|||
available: string |
|||
siteId: string |
|||
concurrencyStamp: string |
|||
} |
|||
|
|||
// 查询采购索赔主列表
|
|||
export const getPurchaseClaimRequestMainPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/purchaseClaim-request-main/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/purchaseClaim-request-main/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询采购索赔主详情
|
|||
export const getPurchaseClaimRequestMain = async (id: number) => { |
|||
return await request.get({ url: `/wms/purchaseClaim-request-main/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增采购索赔主
|
|||
export const createPurchaseClaimRequestMain = async (data: PurchaseClaimRequestMainVO) => { |
|||
return await request.post({ url: `/wms/purchaseClaim-request-main/create`, data }) |
|||
} |
|||
|
|||
// 修改采购索赔主
|
|||
export const updatePurchaseClaimRequestMain = async (data: PurchaseClaimRequestMainVO) => { |
|||
return await request.put({ url: `/wms/purchaseClaim-request-main/update`, data }) |
|||
} |
|||
|
|||
// 删除采购索赔主
|
|||
export const deletePurchaseClaimRequestMain = async (id: number) => { |
|||
return await request.delete({ url: `/wms/purchaseClaim-request-main/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出采购索赔主 Excel
|
|||
export const exportPurchaseClaimRequestMain = async (params) => { |
|||
return await request.download({ url: `/wms/purchaseClaim-request-main/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/purchaseClaim-request-main/get-import-template' }) |
|||
} |
@ -0,0 +1,336 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="PurchaseClaimRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="PurchaseClaimRequestMain.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="PurchaseClaimRequestMainRules" |
|||
:formAllSchemas="PurchaseClaimRequestMain.allSchemas" |
|||
:tableAllSchemas="PurchaseClaimRequestDetail.allSchemas" |
|||
:tableFormRules="PurchaseClaimRequestDetailRules" |
|||
:tableData="tableData" |
|||
:apiUpdate="PurchaseClaimRequestMainApi.updatePurchaseClaimRequestMain" |
|||
:apiCreate="PurchaseClaimRequestMainApi.createPurchaseClaimRequestMain" |
|||
:isBusiness="true" |
|||
@handleAddTable="handleAddTable" |
|||
@handleDeleteTable="handleDeleteTable" |
|||
:isShowReduceButtonSelection="true" |
|||
@tableSelectionDelete="tableSelectionDelete" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
@submitForm="submitForm" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail |
|||
ref="detailRef" |
|||
:isBasic="false" |
|||
:allSchemas="PurchaseClaimRequestMain.allSchemas" |
|||
:detailAllSchemas="PurchaseClaimRequestDetail.allSchemas" |
|||
:detailAllSchemasRules="PurchaseClaimRequestDetailRules" |
|||
:apiCreate="PurchaseClaimRequestDetailApi.createPurchaseClaimRequestDetail" |
|||
:apiUpdate="PurchaseClaimRequestDetailApi.updatePurchaseClaimRequestDetail" |
|||
:apiPage="PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailPage" |
|||
:apiDelete="PurchaseClaimRequestDetailApi.deletePurchaseClaimRequestDetail" |
|||
fromeWhere="purchaseClaimRequest" |
|||
:detailButtonIsShowAdd="false" |
|||
:Echo="Echo" |
|||
@searchTableSuccessDetail="searchTableSuccessDetail" |
|||
/> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/wms/purchaseClaim-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 { PurchaseClaimRequestMain,PurchaseClaimRequestMainRules,PurchaseClaimRequestDetail,PurchaseClaimRequestDetailRules } from './purchaseClaimRequestMain.data' |
|||
import * as PurchaseClaimRequestMainApi from '@/api/wms/purchaseClaimRequestMain' |
|||
import * as PurchaseClaimRequestDetailApi from '@/api/wms/purchaseClaimRequestDetail' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import { formatDate } from '@/utils/formatTime' |
|||
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|||
const { loadStart, loadDone } = usePageLoading() |
|||
// 采购索赔申请 |
|||
defineOptions({ name: 'PurchaseClaimRequest' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(PurchaseClaimRequestMain.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|||
nextTick(() => { |
|||
if (type == 'tableForm') { |
|||
// 明细查询页赋值 |
|||
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 = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 子表新增的时候选择表格之后需要会显得字段 |
|||
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] |
|||
const Echo = [] |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: PurchaseClaimRequestMainApi.getPurchaseClaimRequestMainPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'wms:countadjust-request-main:create'}), // 新增 |
|||
defaultButtons.defaultImportBtn({hasPermi:'wms:countadjust-request-main:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'wms:countadjust-request-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 == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { |
|||
searchFormClick({ |
|||
filters: tableObject.params.filters |
|||
}) |
|||
} else { |
|||
getList() |
|||
} |
|||
} 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,$index) => { |
|||
return [ |
|||
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:countadjust-request-main:close'}), // 关闭 |
|||
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:countadjust-request-main:reAdd'}), //重新添加 |
|||
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:countadjust-request-main:submit'}), // 提交审批 |
|||
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:countadjust-request-main:refused'}), // 驳回 |
|||
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:countadjust-request-main:agree'}), // 审批通过 |
|||
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:countadjust-request-main:handle'}), // 处理 |
|||
] |
|||
} |
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
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 { 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,"requestCountadjustMain") |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
tableObject.loading = true |
|||
// 发起删除 |
|||
await PurchaseClaimRequestMainApi.deletePurchaseClaimRequestMain(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
buttonBaseClick('refresh',null) |
|||
} finally { |
|||
tableObject.loading = false |
|||
} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
loadStart() |
|||
const excelTitle = ref(route.meta.title) |
|||
const data = await PurchaseClaimRequestMainApi.exportPurchaseClaimRequestMain(tableObject.params) |
|||
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|||
} catch { |
|||
} finally { |
|||
loadDone() |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* tableForm方法 |
|||
*/ |
|||
const tableFormKeys = {} |
|||
PurchaseClaimRequestDetail.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) => { |
|||
let itemIndex = tableData.value.indexOf(item) |
|||
if(itemIndex>-1){ |
|||
tableData.value.splice(itemIndex, 1) |
|||
} |
|||
} |
|||
const tableSelectionDelete = (selection) => { |
|||
tableData.value = tableData.value.filter(item => !selection.includes(item)) |
|||
} |
|||
// 主子数据 提交 |
|||
const submitForm = async (formType, data) => { |
|||
data.subList = tableData.value // 拼接子表数据参数 |
|||
formRef.value.formLoading = true |
|||
try { |
|||
if (formType === 'create') { |
|||
await PurchaseClaimRequestMainApi.createPurchaseClaimRequestMain(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await PurchaseClaimRequestMainApi.updatePurchaseClaimRequestMain(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
formRef.value.dialogVisible = false |
|||
// 刷新当前列表 |
|||
if (formType === 'create') { |
|||
getList() |
|||
}else{ |
|||
buttonBaseClick('refresh',null) |
|||
} |
|||
} finally { |
|||
formRef.value.formLoading = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
|
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: `【${route.meta.title}】导入模版.xlsx` |
|||
}) |
|||
|
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
</script> |
@ -0,0 +1,332 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { TableColumn } from '@/types/table' |
|||
|
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' |
|||
|
|||
const { t } = useI18n() // 国际化
|
|||
|
|||
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
|
|||
const queryParams = { |
|||
pageSize:10, |
|||
pageNo:1, |
|||
code:'PurchaseClaimRequest' |
|||
} |
|||
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 |
|||
// id 转str 否则form回显匹配不到
|
|||
userDept.id = userDept.id.toString() |
|||
const userDeptArray:any = [userDept] |
|||
|
|||
/** |
|||
* @returns {Array} 采购索赔申请主表 |
|||
*/ |
|||
export const PurchaseClaimRequestMain = useCrudSchemas(<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '供应商代码', |
|||
field: 'supplierCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '索赔时间', |
|||
field: 'claimTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
isSearch: true, |
|||
search: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
type: 'daterange', |
|||
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|||
} |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
}, |
|||
//0:新增1:已关闭2:审批中3:审批驳回4:审批通过5:开票中6:已完成
|
|||
{ |
|||
label: '状态', |
|||
field: 'status', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
form: { |
|||
component: 'Radio' |
|||
}, |
|||
}, |
|||
{ |
|||
label: '供应商发票申请单号', |
|||
field: 'supplierinvoiceNumber', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
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, |
|||
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: 'creator', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isDetail: false, |
|||
isForm: false, |
|||
table: { |
|||
width: 300, |
|||
fixed: 'right' |
|||
}, |
|||
} |
|||
])) |
|||
|
|||
//表单校验
|
|||
export const PurchaseClaimRequestMainRules = reactive({ |
|||
// requestNumber: [
|
|||
// { 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 PurchaseClaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
isTableForm: false, |
|||
form: { |
|||
componentProps: { |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '物料代码', |
|||
field: 'itemCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '物料名称', |
|||
field: 'itemName', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTableForm: false, |
|||
isForm: false, |
|||
}, |
|||
{ |
|||
label: '计量单位', |
|||
field: 'uom', |
|||
dictType: DICT_TYPE.UOM, |
|||
dictClass: 'string', |
|||
isTable: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm: { |
|||
type: 'Select' |
|||
} |
|||
}, |
|||
{ |
|||
label: '索赔数量', |
|||
field: 'claimQty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'InputNumber', |
|||
componentProps: { |
|||
min: 1, |
|||
precision: 6 |
|||
} |
|||
}, |
|||
tableForm: { |
|||
type: 'InputNumber', |
|||
min: 1, |
|||
precision: 6 |
|||
} |
|||
}, |
|||
{ |
|||
label: '索赔金额', |
|||
field: 'claimAmount', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'InputNumber', |
|||
componentProps: { |
|||
min: 1, |
|||
precision: 6 |
|||
} |
|||
}, |
|||
tableForm: { |
|||
type: 'InputNumber', |
|||
min: 1, |
|||
precision: 6 |
|||
} |
|||
}, |
|||
{ |
|||
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: 'action', |
|||
isDetail: false, |
|||
isForm: false , |
|||
isTable:false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
}, |
|||
isTableForm:false, |
|||
} |
|||
])) |
|||
|
|||
//表单校验
|
|||
export const PurchaseClaimRequestDetailRules = reactive({ |
|||
countDetailNumber: [ |
|||
{ required: true, message: '请输入盘点明细号', trigger: 'blur' } |
|||
], |
|||
packingNumber: [ |
|||
{ required: true, message: '请选择包装号', trigger: 'change' } |
|||
], |
|||
batch: [ |
|||
{ required: true, message: '请输入批次', trigger: 'blur' } |
|||
], |
|||
locationCode: [ |
|||
{ required: true, message: '请选择库位代码', trigger: 'change' } |
|||
], |
|||
inventoryStatus: [ |
|||
{ required: true, message: '请选择库存状态', trigger: 'change' } |
|||
], |
|||
inventoryQty: [ |
|||
{ required: true, message: '请输入库存数量', trigger: 'blur' } |
|||
], |
|||
countQty: [ |
|||
{ required: true, message: '请输入盘点数量', trigger: 'blur' } |
|||
], |
|||
adjustQty: [ |
|||
{ required: true, message: '请输入调整数量', trigger: 'blur' } |
|||
], |
|||
// number: [
|
|||
// { required: true, message: '请输入单据号', trigger: 'blur' }
|
|||
// ],
|
|||
itemCode: [ |
|||
{ required: true, message: '请选择物料代码', trigger: 'change' } |
|||
], |
|||
}) |
Loading…
Reference in new issue