gaojs
4 months ago
27 changed files with 2575 additions and 62 deletions
@ -0,0 +1,67 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface Q1VO { |
||||
|
id: number |
||||
|
number: string |
||||
|
customerCode: string |
||||
|
costCode: string |
||||
|
itemCode: string |
||||
|
qty: number |
||||
|
uom: string |
||||
|
code: string |
||||
|
priority: number |
||||
|
responUser: string |
||||
|
claimAmount: number |
||||
|
claimReason: number |
||||
|
claimTime: Date |
||||
|
handleTime: Date |
||||
|
desc: string |
||||
|
status: string |
||||
|
available: string |
||||
|
deletionTime: Date |
||||
|
deleterId: string |
||||
|
extraProperties: string |
||||
|
concurrencyStamp: number |
||||
|
siteId: string |
||||
|
} |
||||
|
|
||||
|
// 查询Q1通知单列表
|
||||
|
export const getQ1Page = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = { ...params } |
||||
|
return await request.post({ url: '/qms/inspectionQ1/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/qms/inspectionQ1/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询Q1通知单详情
|
||||
|
export const getQ1 = async (id: number) => { |
||||
|
return await request.get({ url: `/qms/inspectionQ1/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增Q1通知单
|
||||
|
export const createQ1 = async (data: Q1VO) => { |
||||
|
return await request.post({ url: `/qms/inspectionQ1/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改Q1通知单
|
||||
|
export const updateQ1 = async (data: Q1VO) => { |
||||
|
return await request.put({ url: `/qms/inspectionQ1/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除Q1通知单
|
||||
|
export const deleteQ1 = async (id: number) => { |
||||
|
return await request.delete({ url: `/qms/inspectionQ1/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出Q1通知单 Excel
|
||||
|
export const exportQ1 = async (params) => { |
||||
|
return await request.download({ url: `/qms/inspectionQ1/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/qms/inspectionQ1/get-import-template' }) |
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface Q2VO { |
||||
|
id: number |
||||
|
number: string |
||||
|
supplierCode: string |
||||
|
itemCode: string |
||||
|
q1Number: string |
||||
|
purchaseReceiptNumber: string |
||||
|
qty: number |
||||
|
uom: string |
||||
|
code: string |
||||
|
desc: string |
||||
|
priority: number |
||||
|
responUser: string |
||||
|
claimAmount: number |
||||
|
costCode: string |
||||
|
claimTime: Date |
||||
|
handleTime: Date |
||||
|
status: string |
||||
|
available: string |
||||
|
deletionTime: Date |
||||
|
deleterId: string |
||||
|
extraProperties: string |
||||
|
concurrencyStamp: number |
||||
|
siteId: string |
||||
|
} |
||||
|
|
||||
|
// 查询Q2通知单列表
|
||||
|
export const getQ2Page = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = { ...params } |
||||
|
return await request.post({ url: '/qms/inspectionQ2/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/qms/inspectionQ2/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询Q2通知单详情
|
||||
|
export const getQ2 = async (id: number) => { |
||||
|
return await request.get({ url: `/qms/inspectionQ2/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增Q2通知单
|
||||
|
export const createQ2 = async (data: Q2VO) => { |
||||
|
return await request.post({ url: `/qms/inspectionQ2/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改Q2通知单
|
||||
|
export const updateQ2 = async (data: Q2VO) => { |
||||
|
return await request.put({ url: `/qms/inspectionQ2/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除Q2通知单
|
||||
|
export const deleteQ2 = async (id: number) => { |
||||
|
return await request.delete({ url: `/qms/inspectionQ2/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出Q2通知单 Excel
|
||||
|
export const exportQ2 = async (params) => { |
||||
|
return await request.download({ url: `/qms/inspectionQ2/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/qms/inspectionQ2/get-import-template' }) |
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface Q3VO { |
||||
|
id: number |
||||
|
number: string |
||||
|
q1Number: string |
||||
|
itemCode: string |
||||
|
qty: number |
||||
|
code: string |
||||
|
uom: string |
||||
|
desc: string |
||||
|
defectLocation: string |
||||
|
defectType: string |
||||
|
problemReason: string |
||||
|
priority: number |
||||
|
responUser: string |
||||
|
amount: number |
||||
|
costCode: string |
||||
|
handleTime: Date |
||||
|
status: string |
||||
|
available: string |
||||
|
deletionTime: Date |
||||
|
deleterId: string |
||||
|
extraProperties: string |
||||
|
concurrencyStamp: number |
||||
|
siteId: string |
||||
|
} |
||||
|
|
||||
|
// 查询Q3通知单列表
|
||||
|
export const getQ3Page = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = { ...params } |
||||
|
return await request.post({ url: '/qms/inspectionQ3/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/qms/inspectionQ3/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询Q3通知单详情
|
||||
|
export const getQ3 = async (id: number) => { |
||||
|
return await request.get({ url: `/qms/inspectionQ3/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增Q3通知单
|
||||
|
export const createQ3 = async (data: Q3VO) => { |
||||
|
return await request.post({ url: `/qms/inspectionQ3/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改Q3通知单
|
||||
|
export const updateQ3 = async (data: Q3VO) => { |
||||
|
return await request.put({ url: `/qms/inspectionQ3/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除Q3通知单
|
||||
|
export const deleteQ3 = async (id: number) => { |
||||
|
return await request.delete({ url: `/qms/inspectionQ3/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出Q3通知单 Excel
|
||||
|
export const exportQ3 = async (params) => { |
||||
|
return await request.download({ url: `/qms/inspectionQ3/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/qms/inspectionQ3/get-import-template' }) |
||||
|
} |
@ -0,0 +1,250 @@ |
|||||
|
<template> |
||||
|
<ContentWrap> |
||||
|
<!-- 搜索工作栏 --> |
||||
|
<Search :schema="Q1.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 列表头部 --> |
||||
|
<TableHead |
||||
|
:HeadButttondata="HeadButttondata" |
||||
|
@button-base-click="buttonBaseClick" |
||||
|
:routeName="routeName" |
||||
|
@updataTableColumns="updataTableColumns" |
||||
|
@searchFormClick="searchFormClick" |
||||
|
:allSchemas="Q1.allSchemas" |
||||
|
/> |
||||
|
|
||||
|
<!-- 列表 --> |
||||
|
<ContentWrap> |
||||
|
<Table |
||||
|
:columns="tableColumns" |
||||
|
:data="tableObject.tableList" |
||||
|
:loading="tableObject.loading" |
||||
|
:pagination="{ |
||||
|
total: tableObject.total |
||||
|
}" |
||||
|
v-model:pageSize="tableObject.pageSize" |
||||
|
v-model:currentPage="tableObject.currentPage" |
||||
|
v-model:sort="tableObject.sort" |
||||
|
> |
||||
|
<template #code="{row}"> |
||||
|
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
||||
|
<span>{{ row.code }}</span> |
||||
|
</el-button> |
||||
|
</template> |
||||
|
<template #action="{ row }"> |
||||
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
||||
|
</template> |
||||
|
</Table> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 表单弹窗:添加/修改 --> |
||||
|
<BasicForm |
||||
|
ref="basicFormRef" |
||||
|
@success="formsSuccess" |
||||
|
:rules="Q1Rules" |
||||
|
:formAllSchemas="Q1.allSchemas" |
||||
|
:apiUpdate="Q1Api.updateQ1" |
||||
|
:apiCreate="Q1Api.createQ1" |
||||
|
@searchTableSuccess="searchTableSuccess" |
||||
|
:isBusiness="false" |
||||
|
/> |
||||
|
|
||||
|
<!-- 详情 --> |
||||
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="Q1.allSchemas" /> |
||||
|
|
||||
|
<!-- 导入 --> |
||||
|
<ImportForm ref="importFormRef" url="/basic/Q1/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import download from '@/utils/download' |
||||
|
import { Q1,Q1Rules } from './inspectionQ1.data' |
||||
|
import * as Q1Api from '@/api/qms/inspectionQ1' |
||||
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
||||
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
||||
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
||||
|
import Detail from '@/components/Detail/src/Detail.vue' |
||||
|
|
||||
|
defineOptions({ name: 'InspectionQ1' }) |
||||
|
|
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const { t } = useI18n() // 国际化 |
||||
|
|
||||
|
const route = useRoute() // 路由信息 |
||||
|
const routeName = ref() |
||||
|
routeName.value = route.name |
||||
|
const tableColumns = ref(Q1.allSchemas.tableColumns) |
||||
|
|
||||
|
// 查询页面返回 |
||||
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
||||
|
nextTick(() => { |
||||
|
const setV = {} |
||||
|
if(formField == 'itemCode'){ |
||||
|
console.log(val); |
||||
|
setV['uom'] = val[0]['customerUom'] |
||||
|
} |
||||
|
setV[formField] = val[0][searchField] |
||||
|
formRef.setValues(setV) |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
// 字段设置 更新主列表字段 |
||||
|
const updataTableColumns = (val) => { |
||||
|
tableColumns.value = val |
||||
|
} |
||||
|
|
||||
|
const { tableObject, tableMethods } = useTable({ |
||||
|
getListApi: Q1Api.getQ1Page // 分页接口 |
||||
|
}) |
||||
|
|
||||
|
// 获得表格的各种操作 |
||||
|
const { getList, setSearchParams } = tableMethods |
||||
|
|
||||
|
// 列表头部按钮 |
||||
|
const HeadButttondata = [ |
||||
|
defaultButtons.defaultAddBtn(null), // 新增 |
||||
|
defaultButtons.defaultImportBtn({hasPermi:'wms:q1:import'}), // 导入 |
||||
|
defaultButtons.defaultExportBtn(null), // 导出 |
||||
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
||||
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
||||
|
defaultButtons.defaultSetBtn(null), // 设置 |
||||
|
// { |
||||
|
// label: '自定义扩展按钮', |
||||
|
// name: 'zdy', |
||||
|
// hide: false, |
||||
|
// type: 'primary', |
||||
|
// icon: 'Select', |
||||
|
// color: '' |
||||
|
// }, |
||||
|
] |
||||
|
|
||||
|
// 头部按钮事件 |
||||
|
const buttonBaseClick = (val, item) => { |
||||
|
if (val == 'add') { // 新增 |
||||
|
openForm('create') |
||||
|
} else if (val == 'import') { // 导入 |
||||
|
handleImport() |
||||
|
} else if (val == 'export') { // 导出 |
||||
|
handleExport() |
||||
|
} else if (val == 'refresh') { // 刷新 |
||||
|
getList() |
||||
|
} else if (val == 'filtrate') { // 筛选 |
||||
|
} else { // 其他按钮 |
||||
|
console.log('其他按钮', item) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 列表-操作按钮 |
||||
|
const butttondata = [ |
||||
|
defaultButtons.mainListEditBtn({hasPermi:'wms:q1:update'}), // 编辑 |
||||
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:q1:delete'}), // 删除 |
||||
|
] |
||||
|
|
||||
|
// 列表-操作按钮事件 |
||||
|
const buttonTableClick = async (val, row) => { |
||||
|
if (val == 'edit') { // 编辑 |
||||
|
openForm('update', row) |
||||
|
} else if (val == 'delete') { // 删除 |
||||
|
handleDelete(row.id) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** 添加/修改操作 */ |
||||
|
const basicFormRef = ref() |
||||
|
const openForm = (type: string, row?: any) => { |
||||
|
basicFormRef.value.open(type, row) |
||||
|
} |
||||
|
|
||||
|
// form表单提交 |
||||
|
const formsSuccess = async (formType,data) => { |
||||
|
var isHave =Q1.allSchemas.formSchema.some(function (item) { |
||||
|
return item.field === 'activeTime' || item.field === 'expireTime'; |
||||
|
}); |
||||
|
if(isHave){ |
||||
|
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
||||
|
message.error('失效时间要大于生效时间') |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
if(data.activeTime==0)data.activeTime = null; |
||||
|
if(data.expireTime==0)data.expireTime = null; |
||||
|
if (formType === 'create') { |
||||
|
await Q1Api.createQ1(data) |
||||
|
message.success(t('common.createSuccess')) |
||||
|
} else { |
||||
|
await Q1Api.updateQ1(data) |
||||
|
message.success(t('common.updateSuccess')) |
||||
|
} |
||||
|
basicFormRef.value.dialogVisible = false |
||||
|
getList() |
||||
|
} |
||||
|
|
||||
|
/** 详情操作 */ |
||||
|
const detailRef = ref() |
||||
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
||||
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicQ1') |
||||
|
} |
||||
|
|
||||
|
/** 删除按钮操作 */ |
||||
|
const handleDelete = async (id: number) => { |
||||
|
try { |
||||
|
// 删除的二次确认 |
||||
|
await message.delConfirm() |
||||
|
// 发起删除 |
||||
|
await Q1Api.deleteQ1(id) |
||||
|
message.success(t('common.delSuccess')) |
||||
|
// 刷新列表 |
||||
|
await getList() |
||||
|
} catch {} |
||||
|
} |
||||
|
|
||||
|
/** 导出按钮操作 */ |
||||
|
const exportLoading = ref(false) // 导出的加载中 |
||||
|
const handleExport = async () => { |
||||
|
try { |
||||
|
// 导出的二次确认 |
||||
|
await message.exportConfirm() |
||||
|
// 发起导出 |
||||
|
exportLoading.value = true |
||||
|
const data = await Q1Api.exportQ1(tableObject.params) |
||||
|
download.excel(data, 'Q1通知单.xlsx') |
||||
|
} catch { |
||||
|
} finally { |
||||
|
exportLoading.value = false |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** 导入 */ |
||||
|
const importFormRef = ref() |
||||
|
const handleImport = () => { |
||||
|
importFormRef.value.open() |
||||
|
} |
||||
|
// 导入附件弹窗所需的参数 |
||||
|
const importTemplateData = reactive({ |
||||
|
templateUrl: '', |
||||
|
templateTitle: 'Q1通知单导入模版.xlsx' |
||||
|
}) |
||||
|
// 导入成功之后 |
||||
|
const importSuccess = () => { |
||||
|
getList() |
||||
|
} |
||||
|
|
||||
|
// 筛选提交 |
||||
|
const searchFormClick = (searchData) => { |
||||
|
tableObject.params = { |
||||
|
isSearch: true, |
||||
|
filters: searchData.filters |
||||
|
} |
||||
|
getList() // 刷新当前列表 |
||||
|
} |
||||
|
|
||||
|
/** 初始化 **/ |
||||
|
onMounted(async () => { |
||||
|
getList() |
||||
|
importTemplateData.templateUrl = await Q1Api.importTemplate() |
||||
|
}) |
||||
|
|
||||
|
</script> |
@ -0,0 +1,352 @@ |
|||||
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
||||
|
import { dateFormatter } from '@/utils/formatTime' |
||||
|
|
||||
|
import * as CustomerApi from '@/api/wms/customer' |
||||
|
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data' |
||||
|
|
||||
|
import * as CustomeritemApi from '@/api/wms/customeritem' |
||||
|
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data' |
||||
|
|
||||
|
import * as QadCostcentreApi from '@/api/wms/qadCostcentre' |
||||
|
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' |
||||
|
|
||||
|
// 表单校验
|
||||
|
export const Q1Rules = reactive({ |
||||
|
customerCode: [required], |
||||
|
costCode: [required], |
||||
|
itemCode: [required], |
||||
|
qty: [required], |
||||
|
code: [required], |
||||
|
priority: [required], |
||||
|
claimAmount: [required], |
||||
|
claimReason: [required], |
||||
|
claimTime: [required], |
||||
|
handleTime: [required] |
||||
|
}) |
||||
|
|
||||
|
export const Q1 = useCrudSchemas( |
||||
|
reactive<CrudSchema[]>([ |
||||
|
{ |
||||
|
label: '通知单号', |
||||
|
field: 'number', |
||||
|
sort: 'custom', |
||||
|
isForm: false, |
||||
|
isSearch: true, |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'left' |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '状态', |
||||
|
field: 'status', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.PUBLISHE_STATUS, |
||||
|
dictClass: 'string', |
||||
|
isForm: false, |
||||
|
isSearch: false, |
||||
|
tableForm: { |
||||
|
type: 'Select', |
||||
|
disabled: true |
||||
|
}, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '客户代码', |
||||
|
field: 'customerCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'left' |
||||
|
}, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
enterSearch: true, |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
|
||||
|
searchField: 'code', // 查询弹窗赋值字段
|
||||
|
searchTitle: '客户信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
isSearch: true |
||||
|
}, |
||||
|
{ |
||||
|
label: '物料代码', |
||||
|
field: 'itemCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isSearch: true, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
enterSearch: true, |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
||||
|
searchField: 'itemCode', // 查询弹窗赋值字段
|
||||
|
searchTitle: '客户物料信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Customeritem.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: CustomeritemApi.getCustomeritemPage, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
}, |
||||
|
{ |
||||
|
key: 'customerCode', |
||||
|
value: 'customerCode', |
||||
|
message: '请填写客户代码!', |
||||
|
isMainValue: true |
||||
|
} |
||||
|
], |
||||
|
verificationParams: [ |
||||
|
{ |
||||
|
key: 'itemCode', |
||||
|
action: '==', |
||||
|
value: '', |
||||
|
isMainValue: false, |
||||
|
isSearch: true, |
||||
|
isFormModel: true |
||||
|
} |
||||
|
] // 失去焦点校验参数
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '数量', |
||||
|
field: 'qty', |
||||
|
sort: 'custom', |
||||
|
isTable: false, |
||||
|
isSearch: false, |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'InputNumber' |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
label: '单位', |
||||
|
field: 'uom', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.UOM, |
||||
|
dictClass: 'string', |
||||
|
isSearch: false, |
||||
|
isTable: true, |
||||
|
tableForm: { |
||||
|
type: 'Select', |
||||
|
disabled: true |
||||
|
}, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '编码', |
||||
|
field: 'code', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.UOM, |
||||
|
dictClass: 'string', |
||||
|
isSearch: false, |
||||
|
isTable: true, |
||||
|
tableForm: { |
||||
|
type: 'Select' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '优先级', |
||||
|
field: 'priority', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.UOM, |
||||
|
dictClass: 'string', |
||||
|
isSearch: false, |
||||
|
isTable: true, |
||||
|
tableForm: { |
||||
|
type: 'Select' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '负责用户', |
||||
|
field: 'responUser', |
||||
|
sort: 'custom', |
||||
|
isSearch: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '索赔金额', |
||||
|
field: 'claimAmount', |
||||
|
sort: 'custom', |
||||
|
isTable: false, |
||||
|
isSearch: false, |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'InputNumber' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '成本中心', |
||||
|
field: 'costCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: false, |
||||
|
isTable: false, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
|
||||
|
searchField: 'costcentreCode', // 查询弹窗赋值字段
|
||||
|
searchTitle: '成本中心信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '索赔原因', |
||||
|
field: 'claimReason', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.UOM, |
||||
|
dictClass: 'string', |
||||
|
isSearch: false, |
||||
|
isTable: true, |
||||
|
tableForm: { |
||||
|
type: 'Select' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '索赔日期', |
||||
|
field: 'claimTime', |
||||
|
sort: 'custom', |
||||
|
formatter: dateFormatter, |
||||
|
isSearch: false, |
||||
|
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' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '处理时间', |
||||
|
field: 'handleTime', |
||||
|
sort: 'custom', |
||||
|
formatter: dateFormatter, |
||||
|
isSearch: false, |
||||
|
isTable: false, |
||||
|
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' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '描述', |
||||
|
field: 'desc', |
||||
|
sort: 'custom', |
||||
|
isSearch: false, |
||||
|
table: { |
||||
|
width: '150' |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'Input', |
||||
|
componentProps: { |
||||
|
type: 'textarea' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '是否可用', |
||||
|
field: 'available', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.TRUE_FALSE, |
||||
|
isSearch: true, |
||||
|
isForm: false, |
||||
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
||||
|
search: { |
||||
|
value: 'TRUE' |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'Switch', |
||||
|
value: 'TRUE', |
||||
|
componentProps: { |
||||
|
inactiveValue: 'FALSE', |
||||
|
activeValue: 'TRUE' |
||||
|
} |
||||
|
}, |
||||
|
table: { |
||||
|
width: 110 |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '创建时间', |
||||
|
field: 'createTime', |
||||
|
sort: 'custom', |
||||
|
formatter: dateFormatter, |
||||
|
isSearch: false, |
||||
|
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')] |
||||
|
} |
||||
|
}, |
||||
|
isForm: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '操作', |
||||
|
field: 'action', |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'right' |
||||
|
} |
||||
|
} |
||||
|
]) |
||||
|
) |
@ -0,0 +1,258 @@ |
|||||
|
<template> |
||||
|
<ContentWrap> |
||||
|
<!-- 搜索工作栏 --> |
||||
|
<Search :schema="Q2.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 列表头部 --> |
||||
|
<TableHead |
||||
|
:HeadButttondata="HeadButttondata" |
||||
|
@button-base-click="buttonBaseClick" |
||||
|
:routeName="routeName" |
||||
|
@updataTableColumns="updataTableColumns" |
||||
|
@searchFormClick="searchFormClick" |
||||
|
:allSchemas="Q2.allSchemas" |
||||
|
/> |
||||
|
|
||||
|
<!-- 列表 --> |
||||
|
<ContentWrap> |
||||
|
<Table |
||||
|
:columns="tableColumns" |
||||
|
:data="tableObject.tableList" |
||||
|
:loading="tableObject.loading" |
||||
|
:pagination="{ |
||||
|
total: tableObject.total |
||||
|
}" |
||||
|
v-model:pageSize="tableObject.pageSize" |
||||
|
v-model:currentPage="tableObject.currentPage" |
||||
|
v-model:sort="tableObject.sort" |
||||
|
> |
||||
|
<template #code="{row}"> |
||||
|
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
||||
|
<span>{{ row.code }}</span> |
||||
|
</el-button> |
||||
|
</template> |
||||
|
<template #action="{ row }"> |
||||
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
||||
|
</template> |
||||
|
</Table> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 表单弹窗:添加/修改 --> |
||||
|
<BasicForm |
||||
|
ref="basicFormRef" |
||||
|
@success="formsSuccess" |
||||
|
:rules="Q2Rules" |
||||
|
:formAllSchemas="Q2.allSchemas" |
||||
|
:apiUpdate="Q2Api.updateQ2" |
||||
|
:apiCreate="Q2Api.createQ2" |
||||
|
@searchTableSuccess="searchTableSuccess" |
||||
|
:isBusiness="false" |
||||
|
/> |
||||
|
|
||||
|
<!-- 详情 --> |
||||
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="Q2.allSchemas" /> |
||||
|
|
||||
|
<!-- 导入 --> |
||||
|
<ImportForm ref="importFormRef" url="/basic/Q2/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import download from '@/utils/download' |
||||
|
import { Q2,Q2Rules } from './inspectionQ2.data' |
||||
|
import * as Q2Api from '@/api/qms/inspectionQ2' |
||||
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
||||
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
||||
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
||||
|
import Detail from '@/components/Detail/src/Detail.vue' |
||||
|
|
||||
|
defineOptions({ name: 'InspectionQ2' }) |
||||
|
|
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const { t } = useI18n() // 国际化 |
||||
|
|
||||
|
const route = useRoute() // 路由信息 |
||||
|
const routeName = ref() |
||||
|
routeName.value = route.name |
||||
|
const tableColumns = ref(Q2.allSchemas.tableColumns) |
||||
|
|
||||
|
// 查询页面返回 |
||||
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
||||
|
nextTick(() => { |
||||
|
const setV = {} |
||||
|
if(formField == 'itemCode'){ |
||||
|
console.log(val); |
||||
|
setV['uom'] = val[0]['supplierUom'] |
||||
|
} |
||||
|
if (formField == 'q1Number') { |
||||
|
console.log(123) |
||||
|
setV['q1Number'] = val[0]['number'] |
||||
|
} |
||||
|
// if (formField == 'supplierCode') { |
||||
|
// console.log(123) |
||||
|
// setV['supplierCode'] = val[0]['code'] |
||||
|
// } |
||||
|
|
||||
|
|
||||
|
setV[formField] = val[0][searchField] |
||||
|
formRef.setValues(setV) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 字段设置 更新主列表字段 |
||||
|
const updataTableColumns = (val) => { |
||||
|
tableColumns.value = val |
||||
|
} |
||||
|
|
||||
|
const { tableObject, tableMethods } = useTable({ |
||||
|
getListApi: Q2Api.getQ2Page // 分页接口 |
||||
|
}) |
||||
|
|
||||
|
// 获得表格的各种操作 |
||||
|
const { getList, setSearchParams } = tableMethods |
||||
|
|
||||
|
// 列表头部按钮 |
||||
|
const HeadButttondata = [ |
||||
|
defaultButtons.defaultAddBtn(null), // 新增 |
||||
|
defaultButtons.defaultImportBtn({hasPermi:'wms:q2:import'}), // 导入 |
||||
|
defaultButtons.defaultExportBtn(null), // 导出 |
||||
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
||||
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
||||
|
defaultButtons.defaultSetBtn(null), // 设置 |
||||
|
// { |
||||
|
// label: '自定义扩展按钮', |
||||
|
// name: 'zdy', |
||||
|
// hide: false, |
||||
|
// type: 'primary', |
||||
|
// icon: 'Select', |
||||
|
// color: '' |
||||
|
// }, |
||||
|
] |
||||
|
|
||||
|
// 头部按钮事件 |
||||
|
const buttonBaseClick = (val, item) => { |
||||
|
if (val == 'add') { // 新增 |
||||
|
openForm('create') |
||||
|
} else if (val == 'import') { // 导入 |
||||
|
handleImport() |
||||
|
} else if (val == 'export') { // 导出 |
||||
|
handleExport() |
||||
|
} else if (val == 'refresh') { // 刷新 |
||||
|
getList() |
||||
|
} else if (val == 'filtrate') { // 筛选 |
||||
|
} else { // 其他按钮 |
||||
|
console.log('其他按钮', item) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 列表-操作按钮 |
||||
|
const butttondata = [ |
||||
|
defaultButtons.mainListEditBtn({hasPermi:'wms:q2:update'}), // 编辑 |
||||
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:q2:delete'}), // 删除 |
||||
|
] |
||||
|
|
||||
|
// 列表-操作按钮事件 |
||||
|
const buttonTableClick = async (val, row) => { |
||||
|
if (val == 'edit') { // 编辑 |
||||
|
openForm('update', row) |
||||
|
} else if (val == 'delete') { // 删除 |
||||
|
handleDelete(row.id) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** 添加/修改操作 */ |
||||
|
const basicFormRef = ref() |
||||
|
const openForm = (type: string, row?: any) => { |
||||
|
basicFormRef.value.open(type, row) |
||||
|
} |
||||
|
|
||||
|
// form表单提交 |
||||
|
const formsSuccess = async (formType,data) => { |
||||
|
var isHave =Q2.allSchemas.formSchema.some(function (item) { |
||||
|
return item.field === 'activeTime' || item.field === 'expireTime'; |
||||
|
}); |
||||
|
if(isHave){ |
||||
|
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
||||
|
message.error('失效时间要大于生效时间') |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
if(data.activeTime==0)data.activeTime = null; |
||||
|
if(data.expireTime==0)data.expireTime = null; |
||||
|
if (formType === 'create') { |
||||
|
await Q2Api.createQ2(data) |
||||
|
message.success(t('common.createSuccess')) |
||||
|
} else { |
||||
|
await Q2Api.updateQ2(data) |
||||
|
message.success(t('common.updateSuccess')) |
||||
|
} |
||||
|
basicFormRef.value.dialogVisible = false |
||||
|
getList() |
||||
|
} |
||||
|
|
||||
|
/** 详情操作 */ |
||||
|
const detailRef = ref() |
||||
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
||||
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicQ2') |
||||
|
} |
||||
|
|
||||
|
/** 删除按钮操作 */ |
||||
|
const handleDelete = async (id: number) => { |
||||
|
try { |
||||
|
// 删除的二次确认 |
||||
|
await message.delConfirm() |
||||
|
// 发起删除 |
||||
|
await Q2Api.deleteQ2(id) |
||||
|
message.success(t('common.delSuccess')) |
||||
|
// 刷新列表 |
||||
|
await getList() |
||||
|
} catch {} |
||||
|
} |
||||
|
|
||||
|
/** 导出按钮操作 */ |
||||
|
const exportLoading = ref(false) // 导出的加载中 |
||||
|
const handleExport = async () => { |
||||
|
try { |
||||
|
// 导出的二次确认 |
||||
|
await message.exportConfirm() |
||||
|
// 发起导出 |
||||
|
exportLoading.value = true |
||||
|
const data = await Q2Api.exportQ2(tableObject.params) |
||||
|
download.excel(data, 'Q2通知单.xlsx') |
||||
|
} catch { |
||||
|
} finally { |
||||
|
exportLoading.value = false |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** 导入 */ |
||||
|
const importFormRef = ref() |
||||
|
const handleImport = () => { |
||||
|
importFormRef.value.open() |
||||
|
} |
||||
|
// 导入附件弹窗所需的参数 |
||||
|
const importTemplateData = reactive({ |
||||
|
templateUrl: '', |
||||
|
templateTitle: 'Q2通知单导入模版.xlsx' |
||||
|
}) |
||||
|
// 导入成功之后 |
||||
|
const importSuccess = () => { |
||||
|
getList() |
||||
|
} |
||||
|
|
||||
|
// 筛选提交 |
||||
|
const searchFormClick = (searchData) => { |
||||
|
tableObject.params = { |
||||
|
isSearch: true, |
||||
|
filters: searchData.filters |
||||
|
} |
||||
|
getList() // 刷新当前列表 |
||||
|
} |
||||
|
|
||||
|
/** 初始化 **/ |
||||
|
onMounted(async () => { |
||||
|
getList() |
||||
|
importTemplateData.templateUrl = await Q2Api.importTemplate() |
||||
|
}) |
||||
|
|
||||
|
</script> |
@ -0,0 +1,395 @@ |
|||||
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
||||
|
import { dateFormatter } from '@/utils/formatTime' |
||||
|
|
||||
|
import * as QadCostcentreApi from '@/api/wms/qadCostcentre' |
||||
|
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' |
||||
|
|
||||
|
import * as InspectionQ1Api from '@/api/qms/inspectionQ1' |
||||
|
import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data' |
||||
|
|
||||
|
import * as SupplieritemApi from '@/api/wms/supplieritem' |
||||
|
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' |
||||
|
|
||||
|
import * as SupplierApi from '@/api/wms/supplier' |
||||
|
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' |
||||
|
|
||||
|
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' |
||||
|
import { PurchasereceiptRecordMain1 } from '@/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data' |
||||
|
|
||||
|
// 表单校验
|
||||
|
export const Q2Rules = reactive({ |
||||
|
number: [required], |
||||
|
supplierCode: [required], |
||||
|
itemCode: [required], |
||||
|
purchaseReceiptNumber: [required], |
||||
|
qty: [required], |
||||
|
code: [required], |
||||
|
priority: [required], |
||||
|
claimAmount: [required], |
||||
|
costCode: [required], |
||||
|
claimTime: [required], |
||||
|
handleTime: [required], |
||||
|
available: [required], |
||||
|
concurrencyStamp: [required] |
||||
|
}) |
||||
|
|
||||
|
export const Q2 = useCrudSchemas( |
||||
|
reactive<CrudSchema[]>([ |
||||
|
{ |
||||
|
label: '通知单号', |
||||
|
field: 'number', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'left' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: 'q1通知单号', |
||||
|
field: 'q1Number', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
enterSearch: true, |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本
|
||||
|
searchField: 'number', // 查询弹窗赋值字段
|
||||
|
searchTitle: 'Q1通知单', // 查询弹窗标题
|
||||
|
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
isSearch: true |
||||
|
}, |
||||
|
{ |
||||
|
label: '状态', |
||||
|
field: 'status', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.PUBLISHE_STATUS, |
||||
|
dictClass: 'string', |
||||
|
isForm: false, |
||||
|
isSearch: false, |
||||
|
tableForm: { |
||||
|
type: 'Select', |
||||
|
disabled: true |
||||
|
}, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '供应商编码', |
||||
|
field: 'supplierCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
table: { |
||||
|
width: 175 |
||||
|
}, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
enterSearch: true, |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择供应商', // 输入框占位文本
|
||||
|
searchField: 'code', // 查询弹窗赋值字段
|
||||
|
searchTitle: '供应商信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '物料代码', |
||||
|
field: 'itemCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
table: { |
||||
|
width: 190 |
||||
|
}, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
enterSearch: true, |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
||||
|
searchField: 'itemCode', // 查询弹窗赋值字段
|
||||
|
searchTitle: '供应商物料信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
{ |
||||
|
key: 'supplierCode', |
||||
|
value: 'supplierCode', |
||||
|
message: '请填写供应商代码!', |
||||
|
isMainValue: true |
||||
|
}, |
||||
|
{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
} |
||||
|
], |
||||
|
verificationParams: [ |
||||
|
{ |
||||
|
key: 'itemCode', |
||||
|
action: '==', |
||||
|
value: '', |
||||
|
isMainValue: false, |
||||
|
isSearch: true, |
||||
|
isFormModel: true |
||||
|
} |
||||
|
] // 失去焦点校验参数
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '单位', |
||||
|
field: 'uom', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.UOM, |
||||
|
dictClass: 'string', |
||||
|
isSearch: false, |
||||
|
isTable: true, |
||||
|
tableForm: { |
||||
|
type: 'Select', |
||||
|
disabled: true |
||||
|
}, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '采购收货单号', |
||||
|
field: 'purchaseReceiptNumber', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 180 |
||||
|
}, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
enterSearch: true, |
||||
|
disabled: true, |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择采购收货记录单号', // 输入框占位文本
|
||||
|
searchField: 'number', // 查询弹窗赋值字段
|
||||
|
searchTitle: '采购收货记录', // 查询弹窗标题
|
||||
|
searchAllSchemas: PurchasereceiptRecordMain1.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
{ |
||||
|
key: 'supplierCode', |
||||
|
value: 'supplierCode', |
||||
|
isMainValue: true |
||||
|
}, |
||||
|
{ |
||||
|
key: 'itemCode', |
||||
|
value: 'itemCode', |
||||
|
isMainValue: true |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '数量', |
||||
|
field: 'qty', |
||||
|
sort: 'custom', |
||||
|
isTable: false, |
||||
|
isSearch: false, |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'InputNumber' |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
label: '编码', |
||||
|
field: 'code', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.UOM, |
||||
|
dictClass: 'string', |
||||
|
isSearch: false, |
||||
|
isTable: true, |
||||
|
tableForm: { |
||||
|
type: 'Select' |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
label: '优先级', |
||||
|
field: 'priority', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.UOM, |
||||
|
dictClass: 'string', |
||||
|
isSearch: false, |
||||
|
isTable: true, |
||||
|
tableForm: { |
||||
|
type: 'Select' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '负责用户', |
||||
|
field: 'responUser', |
||||
|
sort: 'custom', |
||||
|
isSearch: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '索赔金额', |
||||
|
field: 'claimAmount', |
||||
|
sort: 'custom', |
||||
|
isTable: false, |
||||
|
isSearch: false, |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'InputNumber' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '成本中心代码', |
||||
|
field: 'costCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: false, |
||||
|
isTable: true, |
||||
|
isForm: true, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择成本中心', // 输入框占位文本
|
||||
|
searchField: 'costcentreCode', // 查询弹窗赋值字段
|
||||
|
searchTitle: '成本中心信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
label: '索赔日期', |
||||
|
field: 'claimTime', |
||||
|
sort: 'custom', |
||||
|
formatter: dateFormatter, |
||||
|
isSearch: false, |
||||
|
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' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '处理时间', |
||||
|
field: 'handleTime', |
||||
|
sort: 'custom', |
||||
|
formatter: dateFormatter, |
||||
|
isSearch: false, |
||||
|
isTable: false, |
||||
|
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' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '描述', |
||||
|
field: 'desc', |
||||
|
sort: 'custom', |
||||
|
isSearch: false, |
||||
|
table: { |
||||
|
width: '150' |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'Input', |
||||
|
componentProps: { |
||||
|
type: 'textarea' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '是否可用', |
||||
|
field: 'available', |
||||
|
sort: 'custom', |
||||
|
isSearch: false, |
||||
|
isForm: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '创建时间', |
||||
|
field: 'createTime', |
||||
|
sort: 'custom', |
||||
|
formatter: dateFormatter, |
||||
|
isSearch: false, |
||||
|
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')] |
||||
|
} |
||||
|
}, |
||||
|
isForm: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '操作', |
||||
|
field: 'action', |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'right' |
||||
|
} |
||||
|
} |
||||
|
]) |
||||
|
) |
@ -0,0 +1,252 @@ |
|||||
|
<template> |
||||
|
<ContentWrap> |
||||
|
<!-- 搜索工作栏 --> |
||||
|
<Search :schema="Q3.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 列表头部 --> |
||||
|
<TableHead |
||||
|
:HeadButttondata="HeadButttondata" |
||||
|
@button-base-click="buttonBaseClick" |
||||
|
:routeName="routeName" |
||||
|
@updataTableColumns="updataTableColumns" |
||||
|
@searchFormClick="searchFormClick" |
||||
|
:allSchemas="Q3.allSchemas" |
||||
|
/> |
||||
|
|
||||
|
<!-- 列表 --> |
||||
|
<ContentWrap> |
||||
|
<Table |
||||
|
:columns="tableColumns" |
||||
|
:data="tableObject.tableList" |
||||
|
:loading="tableObject.loading" |
||||
|
:pagination="{ |
||||
|
total: tableObject.total |
||||
|
}" |
||||
|
v-model:pageSize="tableObject.pageSize" |
||||
|
v-model:currentPage="tableObject.currentPage" |
||||
|
v-model:sort="tableObject.sort" |
||||
|
> |
||||
|
<template #code="{row}"> |
||||
|
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
||||
|
<span>{{ row.code }}</span> |
||||
|
</el-button> |
||||
|
</template> |
||||
|
<template #action="{ row }"> |
||||
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
||||
|
</template> |
||||
|
</Table> |
||||
|
</ContentWrap> |
||||
|
|
||||
|
<!-- 表单弹窗:添加/修改 --> |
||||
|
<BasicForm |
||||
|
ref="basicFormRef" |
||||
|
@success="formsSuccess" |
||||
|
:rules="Q3Rules" |
||||
|
:formAllSchemas="Q3.allSchemas" |
||||
|
:apiUpdate="Q3Api.updateQ3" |
||||
|
:apiCreate="Q3Api.createQ3" |
||||
|
@searchTableSuccess="searchTableSuccess" |
||||
|
:isBusiness="false" |
||||
|
/> |
||||
|
|
||||
|
<!-- 详情 --> |
||||
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="Q3.allSchemas" /> |
||||
|
|
||||
|
<!-- 导入 --> |
||||
|
<ImportForm ref="importFormRef" url="/basic/Q3/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import download from '@/utils/download' |
||||
|
import { Q3,Q3Rules } from './inspectionQ3.data' |
||||
|
import * as Q3Api from '@/api/qms/inspectionQ3' |
||||
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
||||
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
||||
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
||||
|
import Detail from '@/components/Detail/src/Detail.vue' |
||||
|
|
||||
|
defineOptions({ name: 'InspectionQ3' }) |
||||
|
|
||||
|
const message = useMessage() // 消息弹窗 |
||||
|
const { t } = useI18n() // 国际化 |
||||
|
|
||||
|
const route = useRoute() // 路由信息 |
||||
|
const routeName = ref() |
||||
|
routeName.value = route.name |
||||
|
const tableColumns = ref(Q3.allSchemas.tableColumns) |
||||
|
|
||||
|
// 查询页面返回 |
||||
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
||||
|
nextTick(() => { |
||||
|
const setV = {} |
||||
|
if(formField == 'itemCode'){ |
||||
|
console.log(val); |
||||
|
setV['uom'] = val[0]['customerUom'] |
||||
|
} |
||||
|
if (formField == 'q1Number') { |
||||
|
console.log(123) |
||||
|
setV['q1Number'] = val[0]['number'] |
||||
|
} |
||||
|
setV[formField] = val[0][searchField] |
||||
|
formRef.setValues(setV) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 字段设置 更新主列表字段 |
||||
|
const updataTableColumns = (val) => { |
||||
|
tableColumns.value = val |
||||
|
} |
||||
|
|
||||
|
const { tableObject, tableMethods } = useTable({ |
||||
|
getListApi: Q3Api.getQ3Page // 分页接口 |
||||
|
}) |
||||
|
|
||||
|
// 获得表格的各种操作 |
||||
|
const { getList, setSearchParams } = tableMethods |
||||
|
|
||||
|
// 列表头部按钮 |
||||
|
const HeadButttondata = [ |
||||
|
defaultButtons.defaultAddBtn(null), // 新增 |
||||
|
defaultButtons.defaultImportBtn({hasPermi:'wms:q3:import'}), // 导入 |
||||
|
defaultButtons.defaultExportBtn(null), // 导出 |
||||
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
||||
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
||||
|
defaultButtons.defaultSetBtn(null), // 设置 |
||||
|
// { |
||||
|
// label: '自定义扩展按钮', |
||||
|
// name: 'zdy', |
||||
|
// hide: false, |
||||
|
// type: 'primary', |
||||
|
// icon: 'Select', |
||||
|
// color: '' |
||||
|
// }, |
||||
|
] |
||||
|
|
||||
|
// 头部按钮事件 |
||||
|
const buttonBaseClick = (val, item) => { |
||||
|
if (val == 'add') { // 新增 |
||||
|
openForm('create') |
||||
|
} else if (val == 'import') { // 导入 |
||||
|
handleImport() |
||||
|
} else if (val == 'export') { // 导出 |
||||
|
handleExport() |
||||
|
} else if (val == 'refresh') { // 刷新 |
||||
|
getList() |
||||
|
} else if (val == 'filtrate') { // 筛选 |
||||
|
} else { // 其他按钮 |
||||
|
console.log('其他按钮', item) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 列表-操作按钮 |
||||
|
const butttondata = [ |
||||
|
defaultButtons.mainListEditBtn({hasPermi:'wms:q3:update'}), // 编辑 |
||||
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:q3:delete'}), // 删除 |
||||
|
] |
||||
|
|
||||
|
// 列表-操作按钮事件 |
||||
|
const buttonTableClick = async (val, row) => { |
||||
|
if (val == 'edit') { // 编辑 |
||||
|
openForm('update', row) |
||||
|
} else if (val == 'delete') { // 删除 |
||||
|
handleDelete(row.id) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** 添加/修改操作 */ |
||||
|
const basicFormRef = ref() |
||||
|
const openForm = (type: string, row?: any) => { |
||||
|
basicFormRef.value.open(type, row) |
||||
|
} |
||||
|
|
||||
|
// form表单提交 |
||||
|
const formsSuccess = async (formType,data) => { |
||||
|
var isHave =Q3.allSchemas.formSchema.some(function (item) { |
||||
|
return item.field === 'activeTime' || item.field === 'expireTime'; |
||||
|
}); |
||||
|
if(isHave){ |
||||
|
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
||||
|
message.error('失效时间要大于生效时间') |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
if(data.activeTime==0)data.activeTime = null; |
||||
|
if(data.expireTime==0)data.expireTime = null; |
||||
|
if (formType === 'create') { |
||||
|
await Q3Api.createQ3(data) |
||||
|
message.success(t('common.createSuccess')) |
||||
|
} else { |
||||
|
await Q3Api.updateQ3(data) |
||||
|
message.success(t('common.updateSuccess')) |
||||
|
} |
||||
|
basicFormRef.value.dialogVisible = false |
||||
|
getList() |
||||
|
} |
||||
|
|
||||
|
/** 详情操作 */ |
||||
|
const detailRef = ref() |
||||
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
||||
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicQ3') |
||||
|
} |
||||
|
|
||||
|
/** 删除按钮操作 */ |
||||
|
const handleDelete = async (id: number) => { |
||||
|
try { |
||||
|
// 删除的二次确认 |
||||
|
await message.delConfirm() |
||||
|
// 发起删除 |
||||
|
await Q3Api.deleteQ3(id) |
||||
|
message.success(t('common.delSuccess')) |
||||
|
// 刷新列表 |
||||
|
await getList() |
||||
|
} catch {} |
||||
|
} |
||||
|
|
||||
|
/** 导出按钮操作 */ |
||||
|
const exportLoading = ref(false) // 导出的加载中 |
||||
|
const handleExport = async () => { |
||||
|
try { |
||||
|
// 导出的二次确认 |
||||
|
await message.exportConfirm() |
||||
|
// 发起导出 |
||||
|
exportLoading.value = true |
||||
|
const data = await Q3Api.exportQ3(tableObject.params) |
||||
|
download.excel(data, 'Q3通知单.xlsx') |
||||
|
} catch { |
||||
|
} finally { |
||||
|
exportLoading.value = false |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** 导入 */ |
||||
|
const importFormRef = ref() |
||||
|
const handleImport = () => { |
||||
|
importFormRef.value.open() |
||||
|
} |
||||
|
// 导入附件弹窗所需的参数 |
||||
|
const importTemplateData = reactive({ |
||||
|
templateUrl: '', |
||||
|
templateTitle: 'Q3通知单导入模版.xlsx' |
||||
|
}) |
||||
|
// 导入成功之后 |
||||
|
const importSuccess = () => { |
||||
|
getList() |
||||
|
} |
||||
|
|
||||
|
// 筛选提交 |
||||
|
const searchFormClick = (searchData) => { |
||||
|
tableObject.params = { |
||||
|
isSearch: true, |
||||
|
filters: searchData.filters |
||||
|
} |
||||
|
getList() // 刷新当前列表 |
||||
|
} |
||||
|
|
||||
|
/** 初始化 **/ |
||||
|
onMounted(async () => { |
||||
|
getList() |
||||
|
importTemplateData.templateUrl = await Q3Api.importTemplate() |
||||
|
}) |
||||
|
|
||||
|
</script> |
@ -0,0 +1,328 @@ |
|||||
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
||||
|
import { dateFormatter } from '@/utils/formatTime' |
||||
|
|
||||
|
import * as InspectionQ1Api from '@/api/qms/inspectionQ1' |
||||
|
import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data' |
||||
|
|
||||
|
import * as QadCostcentreApi from '@/api/wms/qadCostcentre' |
||||
|
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' |
||||
|
|
||||
|
import * as CustomeritemApi from '@/api/wms/customeritem' |
||||
|
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data' |
||||
|
|
||||
|
// 表单校验
|
||||
|
export const Q3Rules = reactive({ |
||||
|
number: [required], |
||||
|
itemCode: [required], |
||||
|
qty: [required], |
||||
|
code: [required], |
||||
|
defectLocation: [required], |
||||
|
defectType: [required], |
||||
|
problemReason: [required], |
||||
|
priority: [required], |
||||
|
amount: [required], |
||||
|
costCode: [required], |
||||
|
handleTime: [required], |
||||
|
available: [required], |
||||
|
concurrencyStamp: [required] |
||||
|
}) |
||||
|
|
||||
|
export const Q3 = useCrudSchemas( |
||||
|
reactive<CrudSchema[]>([ |
||||
|
{ |
||||
|
label: '通知单号', |
||||
|
field: 'number', |
||||
|
sort: 'custom', |
||||
|
isSearch: true, |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'left' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: 'q1通知单号', |
||||
|
field: 'q1Number', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
enterSearch: true, |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本
|
||||
|
searchField: 'number', // 查询弹窗赋值字段
|
||||
|
searchTitle: 'Q1通知单', // 查询弹窗标题
|
||||
|
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
isSearch: true |
||||
|
}, |
||||
|
{ |
||||
|
label: '状态', |
||||
|
field: 'status', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.PUBLISHE_STATUS, |
||||
|
dictClass: 'string', |
||||
|
isForm: false, |
||||
|
isSearch: false, |
||||
|
tableForm: { |
||||
|
type: 'Select', |
||||
|
disabled: true |
||||
|
}, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '物料代码', |
||||
|
field: 'itemCode', |
||||
|
sort: 'custom', |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
isSearch: true, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
enterSearch: true, |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
||||
|
searchField: 'itemCode', // 查询弹窗赋值字段
|
||||
|
searchTitle: '客户物料信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: Customeritem.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: CustomeritemApi.getCustomeritemPage, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
}, |
||||
|
{ |
||||
|
key: 'customerCode', |
||||
|
value: 'customerCode', |
||||
|
message: '请填写客户代码!', |
||||
|
isMainValue: true |
||||
|
} |
||||
|
], |
||||
|
verificationParams: [ |
||||
|
{ |
||||
|
key: 'itemCode', |
||||
|
action: '==', |
||||
|
value: '', |
||||
|
isMainValue: false, |
||||
|
isSearch: true, |
||||
|
isFormModel: true |
||||
|
} |
||||
|
] // 失去焦点校验参数
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '数量', |
||||
|
field: 'qty', |
||||
|
sort: 'custom', |
||||
|
isTable: false, |
||||
|
isSearch: false, |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'InputNumber' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '单位', |
||||
|
field: 'uom', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.UOM, |
||||
|
dictClass: 'string', |
||||
|
isSearch: false, |
||||
|
isTable: true, |
||||
|
tableForm: { |
||||
|
type: 'Select', |
||||
|
disabled: true |
||||
|
}, |
||||
|
form: { |
||||
|
componentProps: { |
||||
|
disabled: true |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '编码', |
||||
|
field: 'code', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.UOM, |
||||
|
dictClass: 'string', |
||||
|
isSearch: false, |
||||
|
isTable: true, |
||||
|
tableForm: { |
||||
|
type: 'Select' |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
label: '缺陷位置', |
||||
|
field: 'defectLocation', |
||||
|
sort: 'custom', |
||||
|
isSearch: false, |
||||
|
isTable: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '缺陷类型', |
||||
|
field: 'defectType', |
||||
|
sort: 'custom', |
||||
|
isSearch: false, |
||||
|
isTable: false, |
||||
|
form: { |
||||
|
component: 'SelectV2' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '问题原因', |
||||
|
field: 'problemReason', |
||||
|
sort: 'custom', |
||||
|
isSearch: false, |
||||
|
isTable: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '优先级', |
||||
|
field: 'priority', |
||||
|
sort: 'custom', |
||||
|
dictType: DICT_TYPE.UOM, |
||||
|
dictClass: 'string', |
||||
|
isSearch: false, |
||||
|
isTable: true, |
||||
|
tableForm: { |
||||
|
type: 'Select' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '负责用户', |
||||
|
field: 'responUser', |
||||
|
sort: 'custom', |
||||
|
isSearch: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '金额', |
||||
|
field: 'amount', |
||||
|
sort: 'custom', |
||||
|
isTable: false, |
||||
|
isSearch: false, |
||||
|
table: { |
||||
|
width: 150 |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'InputNumber' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '成本中心代码', |
||||
|
field: 'costCode', |
||||
|
sort: 'custom', |
||||
|
isSearch: false, |
||||
|
isTable: false, |
||||
|
isForm: false, |
||||
|
form: { |
||||
|
// labelMessage: '信息提示说明!!!',
|
||||
|
componentProps: { |
||||
|
isSearchList: true, // 开启查询弹窗
|
||||
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
||||
|
searchField: 'costcentreCode', // 查询弹窗赋值字段
|
||||
|
searchTitle: '成本中心信息', // 查询弹窗标题
|
||||
|
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
|
||||
|
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
|
||||
|
searchCondition: [ |
||||
|
{ |
||||
|
key: 'available', |
||||
|
value: 'TRUE', |
||||
|
isMainValue: false |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '处理时间', |
||||
|
field: 'handleTime', |
||||
|
sort: 'custom', |
||||
|
formatter: dateFormatter, |
||||
|
isSearch: false, |
||||
|
isTable: false, |
||||
|
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' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '描述', |
||||
|
field: 'desc', |
||||
|
sort: 'custom', |
||||
|
isSearch: false, |
||||
|
table: { |
||||
|
width: '150' |
||||
|
}, |
||||
|
form: { |
||||
|
component: 'Input', |
||||
|
componentProps: { |
||||
|
type: 'textarea' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
label: '是否可用', |
||||
|
field: 'available', |
||||
|
sort: 'custom', |
||||
|
isSearch: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '创建时间', |
||||
|
field: 'createTime', |
||||
|
sort: 'custom', |
||||
|
formatter: dateFormatter, |
||||
|
isSearch: false, |
||||
|
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')] |
||||
|
} |
||||
|
}, |
||||
|
isForm: false |
||||
|
}, |
||||
|
{ |
||||
|
label: '操作', |
||||
|
field: 'action', |
||||
|
isForm: false, |
||||
|
table: { |
||||
|
width: 150, |
||||
|
fixed: 'right' |
||||
|
} |
||||
|
} |
||||
|
]) |
||||
|
) |
Loading…
Reference in new issue