You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
450 lines
12 KiB
450 lines
12 KiB
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'
|
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
const userStore = useUserStore()
|
|
|
|
// 表单校验
|
|
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
|
|
},
|
|
{
|
|
key: 'status',
|
|
value: '0',
|
|
isMainValue: false
|
|
}
|
|
],
|
|
verificationParams: [{
|
|
key: 'number',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
}
|
|
},
|
|
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
|
|
}
|
|
],
|
|
verificationParams: [{
|
|
key: 'code',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
}
|
|
}
|
|
},
|
|
{
|
|
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
|
|
}
|
|
],
|
|
verificationParams: [{
|
|
key: 'number',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '数量',
|
|
field: 'qty',
|
|
sort: 'custom',
|
|
isTable: false,
|
|
isSearch: false,
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
min: 0.01,
|
|
precision: 2
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '编码',
|
|
field: 'code',
|
|
sort: 'custom',
|
|
dictType: DICT_TYPE.QMS_CODE,
|
|
dictClass: 'string',
|
|
isSearch: false,
|
|
isTable: true,
|
|
tableForm: {
|
|
type: 'Select'
|
|
}
|
|
},
|
|
|
|
{
|
|
label: '优先级',
|
|
field: 'priority',
|
|
sort: 'custom',
|
|
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
|
|
dictClass: 'string',
|
|
isSearch: false,
|
|
isTable: true,
|
|
tableForm: {
|
|
type: 'Select'
|
|
}
|
|
},
|
|
{
|
|
label: '负责用户',
|
|
field: 'responUser',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isForm: true,
|
|
form: {
|
|
componentProps: {
|
|
value: userStore.getUser.nickname,
|
|
disabled: true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '索赔金额',
|
|
field: 'claimAmount',
|
|
sort: 'custom',
|
|
isTable: false,
|
|
isSearch: false,
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
min: 0.01,
|
|
precision: 2
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '成本中心代码',
|
|
field: 'costCode',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: true,
|
|
isForm: true,
|
|
form: {
|
|
// labelMessage: '信息提示说明!!!',
|
|
componentProps: {
|
|
enterSearch:true,
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchListPlaceholder: '请选择成本中心', // 输入框占位文本
|
|
searchField: 'costcentreCode', // 查询弹窗赋值字段
|
|
searchTitle: '成本中心信息', // 查询弹窗标题
|
|
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
|
|
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
|
|
searchCondition: [
|
|
{
|
|
key: 'available',
|
|
value: 'TRUE',
|
|
isMainValue: false
|
|
}
|
|
],
|
|
verificationParams: [{
|
|
key: 'costcentreCode',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
}
|
|
}
|
|
},
|
|
|
|
{
|
|
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'
|
|
}
|
|
}
|
|
])
|
|
)
|
|
|