Browse Source

删除旧版采购索赔

intex_online20241111
YEJIAXING-PC\lenovo 1 month ago
parent
commit
48b5fbc2e7
  1. 66
      src/api/wms/purchaseclaimRecordDetail/index.ts
  2. 64
      src/api/wms/purchaseclaimRecordMain/index.ts
  3. 53
      src/api/wms/purchaseclaimRequestDetail/index.ts
  4. 92
      src/api/wms/purchaseclaimRequestMain/index.ts
  5. 182
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue
  6. 382
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/purchaseclaimRecordMain.data.ts
  7. 518
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue
  8. 597
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts

66
src/api/wms/purchaseclaimRecordDetail/index.ts

@ -1,66 +0,0 @@
import request from '@/config/axios'
export interface PurchaseclaimRecordDetailVO {
batch: string
altBatch: string
poNumber: string
poLine: string
reason: string
singlePrice: number
amount: number
number: string
itemCode: string
remark: string
createTime: Date
creator: string
itemName: string
itemDesc1: string
itemDesc2: string
projectCode: string
qty: number
uom: string
code: string
interfaceType: string
jobDetailId: string
}
// 查询采购索赔记录子列表
export const getPurchaseclaimRecordDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchaseclaim-record-detail/senior', data })
} else {
return await request.get({ url: `/wms/purchaseclaim-record-detail/page`, params })
}
}
// 查询采购索赔记录子详情
export const getPurchaseclaimRecordDetail = async (id: number) => {
return await request.get({ url: `/wms/purchaseclaim-record-detail/get?id=` + id })
}
// 新增采购索赔记录子
export const createPurchaseclaimRecordDetail = async (data: PurchaseclaimRecordDetailVO) => {
return await request.post({ url: `/wms/purchaseclaim-record-detail/create`, data })
}
// 修改采购索赔记录子
export const updatePurchaseclaimRecordDetail = async (data: PurchaseclaimRecordDetailVO) => {
return await request.put({ url: `/wms/purchaseclaim-record-detail/update`, data })
}
// 删除采购索赔记录子
export const deletePurchaseclaimRecordDetail = async (id: number) => {
return await request.delete({ url: `/wms/purchaseclaim-record-detail/delete?id=` + id })
}
// 导出采购索赔记录子 Excel
export const exportPurchaseclaimRecordDetail = async (params) => {
return await request.download({ url: `/wms/purchaseclaim-record-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchaseclaim-record-detail/get-import-template' })
}

64
src/api/wms/purchaseclaimRecordMain/index.ts

@ -1,64 +0,0 @@
import request from '@/config/axios'
export interface PurchaseclaimRecordMainVO {
requestNumber: string
asnNumber: string
ppNumber: string
supplierCode: string
outTransactionType: string
inTransactionType: string
executeTime: Date
activeDate: Date
requestTime: Date
dueTime: Date
departmentCode: string
interfaceType: string
number: string
businessType: string
remark: string
createTime: Date
creator: string
code: string
available: string
}
// 查询采购索赔记录主列表
export const getPurchaseclaimRecordMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchaseclaim-record-main/senior', data })
} else {
return await request.get({ url: `/wms/purchaseclaim-record-main/page`, params })
}
}
// 查询采购索赔记录主详情
export const getPurchaseclaimRecordMain = async (id: number) => {
return await request.get({ url: `/wms/purchaseclaim-record-main/get?id=` + id })
}
// 新增采购索赔记录主
export const createPurchaseclaimRecordMain = async (data: PurchaseclaimRecordMainVO) => {
return await request.post({ url: `/wms/purchaseclaim-record-main/create`, data })
}
// 修改采购索赔记录主
export const updatePurchaseclaimRecordMain = async (data: PurchaseclaimRecordMainVO) => {
return await request.put({ url: `/wms/purchaseclaim-record-main/update`, data })
}
// 删除采购索赔记录主
export const deletePurchaseclaimRecordMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseclaim-record-main/delete?id=` + id })
}
// 导出采购索赔记录主 Excel
export const exportPurchaseclaimRecordMain = async (params) => {
return await request.download({ url: `/wms/purchaseclaim-record-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchaseclaim-record-main/get-import-template' })
}

53
src/api/wms/purchaseclaimRequestDetail/index.ts

@ -1,53 +0,0 @@
import request from '@/config/axios'
export interface PurchaseclaimRequestDetailVO {
altBatch: string
amount: Number
batch: Number
id: string
itemCode: string
itemDesc1: string
itemDesc2: string
itemName: string
number: string
poLine: string
poNumber: string
projectCode: string
qty: Number
reason: string
remark: string
singlePrice: Number
uom: string
}
// 查询采购索赔申请子列表
export const getPurchaseclaimRequestDetailPage = async (params) => {
// return await request.get({ url: `/wms/purchaseclaim-request-detail/page`, params })
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/purchaseclaim-request-detail/senior', data })
} else {
return await request.get({ url: `/wms/purchaseclaim-request-detail/page`, params })
}
}
// 查询采购索赔申请子详情
export const getPurchaseclaimRequesDetail = async (id: number) => {
return await request.get({ url: `/wms/purchaseclaim-request-detail/get?id=` + id })
}
// 新增采购索赔申请子
export const createPurchaseclaimRequestDetail = async (data: PurchaseclaimRequestDetailVO) => {
return await request.post({ url: `/wms/purchaseclaim-request-detail/create`, data })
}
// 修改采购索赔申请子
export const updatePurchaseclaimRequestDetail = async (data: PurchaseclaimRequestDetailVO) => {
return await request.put({ url: `/wms/purchaseclaim-request-detail/update`, data })
}
// 删除采购索赔申请子
export const deletePurchaseclaimRequestDetail = async (id: number) => {
return await request.delete({ url: `/wms/purchaseclaim-request-detail/delete?id=` + id })
}

92
src/api/wms/purchaseclaimRequestMain/index.ts

@ -1,92 +0,0 @@
import request from '@/config/axios'
export interface PurchaseclaimRequestMainVO {
asnNumber: string
ppNumber: string
supplierCode: string
number: string
businessType: string
remark: string
createTime: Date
creator: string
requestTime: Date
dueTime: Date
departmentCode: string
status: string
updateTime: Date
updater: string
autoCommit: string
autoAgree: string
autoExecute: string
directCreateRecord: string
}
// 查询采购索赔申请主列表
export const getPurchaseclaimRequestMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return 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 })
}
// 打开供应商发货申请主
export const opePurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/open?id=` + id })
}
// 关闭供应商发货申请主
export const cloPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/close?id=` + id })
}
// 提交审批供应商发货申请主
export const subPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/sub?id=` + id })
}
// 审批通过供应商发货申请主
export const appPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/app?id=` + id })
}
// 驳回供应商发货申请主
export const rejPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/rej?id=` + id })
}
// 处理
export const genRecordsPurchaseclaimRequestMain = async (id) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/genRecords?id=` + id })
}
// 导出采购索赔申请主 Excel
export const exportPurchaseclaimRequestMain = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.downloadPost({ url: `/wms/purchaseclaim-request-main/export-excel-senior`, data })
} else {
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' })
}

182
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue

@ -1,182 +0,0 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...PurchaseclaimRecordMain.allSchemas.searchSchema,...PurchaseclaimRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="PurchaseclaimRecordMain.allSchemas"
:detailAllSchemas="PurchaseclaimRecordDetail.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="PurchaseclaimRecordMainRules"
:formAllSchemas="PurchaseclaimRecordMain.allSchemas"
:tableAllSchemas="PurchaseclaimRecordDetail.allSchemas"
:tableFormRules="PurchaseclaimRecordDetailRules"
:isBusiness="true"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="PurchaseclaimRecordMain.allSchemas"
:detailAllSchemas="PurchaseclaimRecordDetail.allSchemas"
:detailAllSchemasRules="PurchaseclaimRecordDetailRules"
:apiPage="PurchaseclaimRecordDetailApi.getPurchaseclaimRecordDetailPage"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { PurchaseclaimRecordMain,PurchaseclaimRecordMainRules,PurchaseclaimRecordDetail,PurchaseclaimRecordDetailRules } from './purchaseclaimRecordMain.data'
import * as PurchaseclaimRecordMainApi from '@/api/wms/purchaseclaimRecordMain'
import * as PurchaseclaimRecordDetailApi from '@/api/wms/purchaseclaimRecordDetail'
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()
//
defineOptions({ name: 'PurchaseclaimRecordMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...PurchaseclaimRecordMain.allSchemas.tableColumns,...PurchaseclaimRecordDetail.allSchemas.tableMainColumns])
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: PurchaseclaimRecordDetailApi.getPurchaseclaimRecordDetailPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:purchaseclaim-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 butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return []
}
// -
const buttonTableClick = async (val, 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,"recordPurchaseclaimMain")
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
loadStart()
const excelTitle = ref(route.meta.title)
const data = await PurchaseclaimRecordMainApi.exportPurchaseclaimRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
loadDone()
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

382
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/purchaseclaimRecordMain.data.ts

@ -1,382 +0,0 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
/**
* @returns {Array}
*/
export const PurchaseclaimRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
isSearch: true
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
table: {
width: 180
},
isSearch: true
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 180
},
},
{
label: '要货计划单号',
field: 'ppNumber',
sort: 'custom',
table: {
width: 180
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
}
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
}
},
{
label: '执行时间',
field: 'executeTime',
isTable: true,
formatter: dateFormatter,
deatil: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
}
},
{
label: '生效日期',
field: 'activeDate',
isTable: true,
formatter: dateFormatter2,
deatil: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
}
},
{
label: '申请时间',
field: 'requestTime',
isTable: true,
formatter: dateFormatter,
deatil: {
dateFormatter: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
}
},
{
label: '截止时间',
field: 'dueTime',
isTable: true,
formatter: dateFormatter,
deatil: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
}
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
}
},
{
label: '代码',
field: 'code',
sort: 'custom',
table: {
width: 150
}
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
}
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 150
},
form:{
component:'Switch',
componentProps:{
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
// {
// label: '创建者',
// field: 'creator',
// sort: 'custom',
// table: {
// width: 150
// }
// },
// {
// label: '创建时间',
// field: 'createTime',
// isTable: true,
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// sort: 'custom',
// table: {
// width: 180
// }
// },
]))
//表单校验
export const PurchaseclaimRecordMainRules = reactive({
requestNumber: [
{ required: true, message: '请选择申请单号', trigger: 'change' }
],
supplierCode: [
{ required: true, message: '请选择供应商代码', trigger: 'change' }
],
outTransaction: [
{ required: true, message: '请输入出库事务类型', trigger: 'blur' }
],
inTransaction: [
{ required: true, message: '请输入入库事务类型', trigger: 'blur' }
],
executeTime: [
{ required: true, message: '请输入执行时间', trigger: 'blur' }
],
activeDate: [
{ required: true, message: '请输入生效日期', trigger: 'blur' }
],
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 PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
}
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
}
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
}
},
{
label: '原因',
field: 'reason',
isTable: true,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
}
},
{
label: '单价',
field: 'singlePrice',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '金额',
field: 'amount',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
}
},
{
label: '代码',
field: 'code',
sort: 'custom',
table: {
width: 150
}
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 150
},
form:{
component:'Switch',
componentProps:{
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
}
},
{
label: '创建时间',
field: 'createTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
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')]
},
},
},
]))
//表单校验
export const PurchaseclaimRecordDetailRules = reactive({
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
poNumber: [
{ required: true, message: '请选择订单号', trigger: 'change' }
],
poLine: [
{ required: true, message: '请输入订单行', trigger: 'blur' }
],
reason: [
{ required: true, message: '请输入原因', trigger: 'blur' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' }
],
createTime: [
{ required: true, message: '请输入创建时间', trigger: 'blur' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})

518
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue

@ -1,518 +0,0 @@
<!-- 采购索赔申请 -->
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...PurchaseclaimRequestMain.allSchemas.searchSchema,...PurchaseclaimRequestDetail.allSchemas.searchSchema]" @search="setSearchParams"
@reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="PurchaseclaimRequestMain.allSchemas" :detailAllSchemas="PurchaseclaimRequestDetail.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"
:rules="PurchaseclaimRequestMainRules"
:formAllSchemas="PurchaseclaimRequestMain.allSchemas"
:tableAllSchemas="PurchaseclaimRequestDetail.allSchemas"
:tableFormRules="PurchaseclaimRequestDetailRules" :tableData="tableData"
:apiUpdate="PurchaseclaimRequestMainApi.updatePurchaseclaimRequestMain"
:apiCreate="PurchaseclaimRequestMainApi.createPurchaseclaimRequestMain"
:isBusiness="true"
@success="getList"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@inputStringBlur="inputStringBlur"/>
<!-- 详情 -->
<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"
@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 { getAccessToken } from '@/utils/auth'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import download from '@/utils/download'
import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain'
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import * as PurchaseclaimRequestDetailApi from '@/api/wms/purchaseclaimRequestDetail'
import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules } from './purchaseclaimRequestMain.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
const { loadStart, loadDone } = usePageLoading()
//
defineOptions({ name: 'PurchaseclaimRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...PurchaseclaimRequestMain.allSchemas.tableColumns,...PurchaseclaimRequestDetail.allSchemas.tableMainColumns])
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['poLine'] = val[0]['poLine']
row['batch'] = val[0]['toBatch']
row['altBatch'] = val[0]['altBatch']
row['itemCode'] = val[0]['itemCode']
row['itemName'] = val[0]['itemName']
row['itemDesc1'] = val[0]['itemDesc1']
row['itemDesc2'] = val[0]['itemDesc2']
row['projectCode'] = val[0]['projectCode']
row['qty'] = val[0]['qty']
row['uom'] = val[0]['uom']
} else {
//
const setV = {}
setV[formField] = val[0][searchField]
if(formField=='asnNumber'){
// getSupplierdeliverRecordDetailList
SupplierdeliverRecordDetailApi.getSupplierdeliverRecordDetailList({
asnNumber: val[0]['asnNumber']}).then(res => {
if (res) tableData.value = res;
tableData.value.forEach(item=>{
item.batch = item.toBatch
item.qty = 1
})
}).catch(err => {
console.log(err)
})
}
setV['ppNumber'] = val[0]['ppNumber']
setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
console.log(456)
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['poLine'] = val[0]['poLine']
setV['batch'] = val[0]['toBatch']
setV['altBatch'] = val[0]['altBatch']
setV['itemCode'] = val[0]['itemCode']
setV['itemName'] = val[0]['itemName']
setV['itemDesc1'] = val[0]['itemDesc1']
setV['itemDesc2'] = val[0]['itemDesc2']
setV['projectCode'] = val[0]['projectCode']
setV['qty'] = val[0]['qty']
setV['uom'] = val[0]['uom']
formRef.setValues(setV)
})
}
const exportLoading = ref(false) //
const { tableObject, tableMethods } = useTable({
getListApi: PurchaseclaimRequestDetailApi.getPurchaseclaimRequestDetailPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchaseclaim-request-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchaseclaim-request-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchaseclaim-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 butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:delete' }), //
defaultButtons.mainListDocumentPrintBtn(null), //
//
{
label: '处理',
name: 'genRecords',
hide: isShowMainButton(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
]
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainPurPlanOpe') { //
handleOpe(row.id)
} else if (val == 'mainPurPlanClo') {//
handleClo(row.id)
} else if (val == 'mainPlanSub') { //
handleSub(row.id)
} else if (val == 'mainPlanApp') { //
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
}else if (val == 'genRecords') { //
genRecords(row.id)
}else if (val == 'edit') { //
// const res = await ItempackagingApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'documentPrint') { //
handlePoint(row.id)
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type : string, row ?: number) => {
tableData.value = [] //
//  if (row?.id) {
// const data= await PurchaseclaimRequestMainApi.getPurchaseclaimRequestMain(row.id)
// tableData.value = data.subList
// }
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,"requestPurchaseclaimMain")
}
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
try {
//
await message.delConfirm()
tableObject.loading = true
//
await PurchaseclaimRequestMainApi.deletePurchaseclaimRequestMain(id)
message.success(t('common.delSuccess'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
}
/** 关闭按钮操作 */
const handleClo = async (id : number) => {
try {
//
await message.confirm(t('ts.是否关闭所选中数据?'))
tableObject.loading = true
//
await PurchaseclaimRequestMainApi.cloPurchaseclaimRequestMain(id)
message.success(t('ts.关闭成功!'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
}
/** 打开按钮操作 */
const handleOpe = async (id : number) => {
try {
//
await message.confirm(t('ts.是否打开所选中数据?'))
tableObject.loading = true
//
await PurchaseclaimRequestMainApi.opePurchaseclaimRequestMain(id)
message.success(t('ts.打开成功!'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
}
/** 提交审批按钮操作 */
const handleSub = async (id : number) => {
try {
//
await message.confirm(t('ts.是否提交审批所选中数据?'))
tableObject.loading = true
//
await PurchaseclaimRequestMainApi.subPurchaseclaimRequestMain(id)
message.success(t('ts.提交审批成功!'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
}
/** 审批通过按钮操作 */
const handleApp = async (id : number) => {
try {
//
await message.confirm(t('ts.是否审批通过所选中数据?'))
tableObject.loading = true
//
await PurchaseclaimRequestMainApi.appPurchaseclaimRequestMain(id)
message.success(t('ts.审批通过成功!'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
}
/** 驳回按钮操作 */
const handleTur = async (id : number) => {
try {
//
await message.confirm(t('ts.是否驳回所选中数据?'))
tableObject.loading = true
//
await PurchaseclaimRequestMainApi.rejPurchaseclaimRequestMain(id)
message.success(t('ts.驳回成功!'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
}
/** 处理按钮操作 */
const genRecords = async (id : number) => {
try {
//
await message.confirm(t('ts.是否处理所选中数据?'))
tableObject.loading = true
//
await PurchaseclaimRequestMainApi.genRecordsPurchaseclaimRequestMain(id)
message.success(t('ts.处理成功!'))
tableObject.loading = false
//
await getList()
} catch { }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()
}
}
const BASE_URL = getJmreportBaseUrl()
const src = ref(BASE_URL + '/jmreport/view/882550592342003712?token=' + getAccessToken())
console.log(src)
//
const handlePoint = async (id) => {
window.open(src.value + '&id=' + id)
}
/**
* 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, submitData) => {
let data = {...submitData}
if(data.masterId){
data.id = data.masterId
}
data.subList = tableData.value //
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
//
getList()
} 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() //
}
const inputStringBlur =(headerItem,index,row) =>{
// console.log("headerItem:",headerItem)
//console.log("row:",row)
if(headerItem == 'singlePrice'){
// =
row.amount = row.qty * row.singlePrice
}
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PurchaseclaimRequestMainApi.importTemplate()
})
</script>

597
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts

@ -1,597 +0,0 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as supplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain'
import * as supplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import { SupplierdeliverRecordMain, SupplierdeliverRecordDetail } from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data'
const { t } = useI18n() // 国际化
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table'
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept]
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize:10,
pageNo:1,
code:'PurchaseClaimRequest'
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
/**
* @returns {Array}
*/
export const PurchaseclaimRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
isForm:false,
table: {
width: 180,
fixed: 'left'
},
isSearch: true,
},
{
label: '发货单号',
field: 'asnNumber',
table: {
width: 180
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择发货单号', // 输入框占位文本
searchField: 'asnNumber', // 查询弹窗赋值字段
searchTitle: '供应商发货记录', // 查询弹窗标题
searchAllSchemas: SupplierdeliverRecordMain.allSchemas, // 查询弹窗所需类
searchPage: supplierdeliverRecordMainApi.getSupplierdeliverRecordMainPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '要货计划单号',
field: 'ppNumber',
form:{
componentProps:{
disabled:true,
}
},
table: {
width: 180
}
},
{
label: '供应商代码',
field: 'supplierCode',
form:{
componentProps:{
disabled:true,
}
},
table: {
width: 150
},
isSearch: true,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
isForm:false,
form: {
value:'1',
componentProps:{
disabled:true,
}
},
table: {
width: 100
}
},
{
label: '申请时间',
field: 'requestTime',
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userDeptArray.find((account) => account.id == cellValue)?.name
},
form: {
value: userDept.id,
component: 'Select',
api: () => userDeptArray,
componentProps: {
disabled: true,
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
}
}
},
{
label: '业务类型',
field: 'businessType',
form:{
value:'PurchaseClaim',
componentProps:{
disabled:true,
}
},
table: {
width: 130
}
},
{
label: '备注',
field: 'remark',
isTable: false
},
{
label: '自动提交',
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isForm:false,
table: {
width: 100
},
form:{
component:'Switch',
value:requestsettingData.autoCommit,
componentProps:{
disabled:true,
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '自动通过',
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isForm:false,
table: {
width: 100
},
form:{
component:'Switch',
value:requestsettingData.autoAgree,
componentProps:{
disabled:true,
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '自动执行',
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isForm:false,
table: {
width: 100
},
form:{
component:'Switch',
value:requestsettingData.autoExecute,
componentProps:{
disabled:true,
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '直接生成记录',
field: 'directCreateRecord',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isForm: false,
isTable: false,
table: {
width: 120
},
form:{
component:'Switch',
value:requestsettingData.available,
componentProps:{
disabled:true,
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '创建者',
field: 'creator',
isForm:false,
table: {
width: 120
}
},
{
label: '创建时间',
field: 'createTime',
isTable: true,
formatter: dateFormatter,
isForm:false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
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: 'updater',
isForm:false,
isTable: false,
table: {
width: 120
}
},
{
label: '最后更新时间',
field: 'updateTime',
isTable: false,
formatter: dateFormatter,
isForm:false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 300,
fixed: 'right'
}
}
]))
// 表单校验
export const PurchaseclaimRequestMainRules = reactive({
asnNumber: [
{ required: true, message: '请输入发货单号', trigger: 'blur' }
],
ppNumber: [
{ required: true, message: '请输入要货计划单号', trigger: 'blur' }
],
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'change' }
],
requestTime: [
{ required: true, message: '请选择申请时间', trigger: 'change' }
],
// dueTime: [
// { required: true, message: '请选择截止时间', trigger: 'change' }
// ],
departmentCode: [
{ required: true, message: '请选择部门', trigger: 'change' }
],
status: [
{ required: true, message: '请选择状态', trigger: 'change' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
export const PurchaseclaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '订单号',
field: 'poNumber',
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择订单号',
searchField: 'poNumber',
searchTitle: '供应商发货记录',
searchAllSchemas: SupplierdeliverRecordDetail.allSchemas,
searchPage: supplierdeliverRecordDetailApi.getSupplierdeliverRecordDetailPage
},
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择订单号',
searchField: 'poNumber',
searchTitle: '供应商发货记录',
searchAllSchemas: SupplierdeliverRecordDetail.allSchemas,
searchPage: supplierdeliverRecordDetailApi.getSupplierdeliverRecordDetailPage
}
}
},
{
label: '订单行',
field: 'poLine',
table: {
width: 150
},
},
{
label: '批次',
field: 'batch',
table: {
width: 150
},
},
{
label: '物料代码',
field: 'itemCode',
table: {
width: 150
},
},
{
label: '物料名称',
field: 'itemName',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
table: {
width: 150
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '单价',
field: 'singlePrice',
table: {
width: 150
},
},
{
label: '金额',
field: 'amount',
table: {
width: 150
},
},
{
label: '原因',
field: 'reason',
// dictType: DICT_TYPE.PURCHASE_RETURN_REASON,
dictClass: 'string',
table: {
width: 150
},
},
{
label: '单据号',
field: 'number',
table: {
width: 180
},
form:{
componentProps:{
disabled:true,
}
},
isTableForm:false,
// tableForm:{
// disabled:true,
// }
},
{
label: '备注',
field: 'remark',
table: {
width: 150
},
},
{
label: '创建者',
field: 'creator',
isTableForm:false,
table: {
width: 150
},
isForm:false
},
{
label: '创建时间',
field: 'createTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isTableForm:false,
table: {
width: 150
},
isForm:false
},
{
label: '最后更新者',
field: 'updater',
isTableForm:false,
table: {
width: 150
},
isForm:false
},
{
label: '最后更新时间',
field: 'updateTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isTableForm:false,
table: {
width: 150
},
isForm:false
},
{
label: '操作',
hiddenInMain:true,
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:false,
}
]))
// 表单校验
export const PurchaseclaimRequestDetailRules = reactive({
poNumber: [
{ required: true, message: '请输入订单号', trigger: 'change' }
],
poLine: [
{ required: true, message: '请输入订单行', trigger: 'change' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
qty: [
{ required: true, message: '请输入数量', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
uom: [
{ required: true, message: '请输入计量单位', trigger: 'change' }
],
itemCode: [
{ required: true, message: '请输入物料代码', trigger: 'change' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
itemName: [
{ required: true, message: '请输入物料名称', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
singlePrice: [
{ required: true, message: '请输入单价', trigger: 'change' }
],
amount: [
{ required: true, message: '请输入金额', trigger: 'change' }
],
reason: [
{ required: true, message: '请输入原因', trigger: 'change' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
Loading…
Cancel
Save