Browse Source

BUG修改

hella_online_20240829
parent
commit
0a77c3fc1a
  1. 596
      src/views/qms/inspectionJob/index.vue
  2. 1135
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  3. 756
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
  4. 784
      src/views/qms/inspectionRequest/inspectionRequestMain.data.ts
  5. 3038
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

596
src/views/qms/inspectionJob/index.vue

@ -1,33 +1,52 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="InspectionJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="InspectionJobMain.allSchemas" />
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionJobMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
<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 #number="{row}">
}"
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 }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<AddForm
<AddForm
ref="formRef"
basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
@ -41,298 +60,357 @@
/>
<!-- 详情 -->
<Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas"
ref="detailRef"
:isBasic="false"
:allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas"
:detailAllSchemasRules="InspectionJobDetailRules"
:apiCreate="InspectionJobDetailApi.createInspectionJobDetail"
:apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail"
:apiPage="InspectionJobDetailApi.getInspectionJobDetailPage"
:apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false" :detailButtonIsShow="true"
:apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true"
/>
<!-- 包装信息 -->
<ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobPackage.allSchemas" :detailAllSchemasRules="InspectionJobPackageRules"
:list="list" />
<ListTable
ref="listTableRef"
titleName="包装信息"
:allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobPackage.allSchemas"
:detailAllSchemasRules="InspectionJobPackageRules"
:list="list"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage,InspectionJobPackageRules} from './inspectionJobMain.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
import download from '@/utils/download'
import {
InspectionJobMain,
InspectionJobMainRules,
InspectionJobDetail,
InspectionJobDetailRules,
InspectionJobPackage,
InspectionJobPackageRules
} from './inspectionJobMain.data'
import {
InspectionTemplateMain,
InspectionTemplateProcess,
InspectionTemplateFeatures,
InspectionTemplateRules
} from '../inspectionTemplate/inspectionTemplate.data'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
//
defineOptions({ name: 'InspectionJobMain' })
//
defineOptions({ name: 'InspectionJobMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns)
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
// row['itemNumber'] = val[0]['number']
// row['itemName'] = val[0]['name']
// row['uom'] = val[0]['uom']
// row['isRadeIn'] = val[0]['isRadeIn']
// row['available'] = val[0]['available']
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => {
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
// row['itemNumber'] = val[0]['number']
// row['itemName'] = val[0]['name']
// row['uom'] = val[0]['uom']
// row['isRadeIn'] = val[0]['isRadeIn']
// row['available'] = val[0]['available']
} else {
const setV = {}
// if(formField == 'itemCode'){
// await ItembasicApi.getItembasicPage({
// code: setV['itemCode']
// }).then(res => {
// setV['uom'] = res.list[0].uom
// setV[formField] = val[0][searchField]
// })
// }
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: InspectionJobMainApi.getInspectionJobMainPage //
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => {
const setV = {}
// if(formField == 'itemCode'){
// await ItembasicApi.getItembasicPage({
// code: setV['itemCode']
// }).then(res => {
// setV['uom'] = res.list[0].uom
// setV[formField] = val[0][searchField]
// })
// }
formRef.setValues(setV)
})
}
//
const { getList, setSearchParams } = tableMethods
//
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: InspectionJobMainApi.getInspectionJobMainPage //
})
//
const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const { getList, setSearchParams } = tableMethods
//
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 HeadButttondata = [
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
//
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 isShowMainButton2 = (row, val) => {
if (val.indexOf(row.isStaging) > -1) {
return false
} else {
return true
}
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:execute'}), //
defaultButtons.mainListOrderPubBtn({hide:isShowMainButton2(row,['TRUE']),hasPermi:'qms:inspection-job-main:execute'}), //
defaultButtons.mainListPackageBtn(null), //
]
//
const isShowMainButton2 = (row, val) => {
if (val.indexOf(row.isStaging) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:accept'
}), //
defaultButtons.mainListJobCloBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:close'
}), //
defaultButtons.mainListJobAbaBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-job-main:abandon'
}), //
defaultButtons.mainListJobExeBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListOrderPubBtn({
hide: isShowMainButton2(row, ['TRUE']),
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListPackageBtn(null), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) //
]
}
const listTableRef = ref()
const list = ref([])
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
execute('execute', row)
}else if (val == 'mainPackage') { //
list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
// row.status = '1'
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns)
}else if (val == 'mainJobAba') { //
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') {
//
execute('execute', row)
} else if (val == 'mainPackage') {
//
list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
// row.status = '1'
listTableRef.value.openPackage(row, '包装信息', InspectionJobPackage.allSchemas.tableColumns)
} else if (val == 'mainJobAba') {
//
handleAbandon(row.id)
} else if (val == 'mainJobClo') { //
} else if (val == 'mainJobClo') {
//
handleClose(row.id)
} else if (val == 'mainOrderPub') { //
} else if (val == 'mainOrderPub') {
//
handleRelease(row.id)
} else if (val == 'mainJobAcc') { //
} else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
} else if (val == 'mainJobAcc') {
//
handleAccept(row.id)
}
}
}
/** 添加/修改操作 */
// const formRef = ref()
// const openForm = async (type : string, row ?: number) => {
// tableData.value = [] //
// formRef.value.open(type, row)
// }
//
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain')
}
//
const formRef = ref()
const execute = async (type : string, row ?: number) => {
formRef.value.open(type, row)
}
/** 关闭按钮操作 */
const handleClose = async (id : number) => {
try {
//
await message.confirm(t('common.confirmColse'))
//
await InspectionJobMainApi.closeInspectionJobMain(id)
message.success(t('common.closeSuccess'))
//
await getList()
} catch { }
}
/** 发布按钮操作 */
const handleRelease = async (id : number) => {
try {
//
await message.confirm('确认发布吗?')
//
await InspectionJobMainApi.releaseInspectionJobMain(id)
message.success('发布成功!')
//
await getList()
} catch { }
}
//
const handleAccept = async (id : number) => {
try {
//
await message.confirm(t('common.confirmAccept'))
//
await InspectionJobMainApi.acceptInspectionJobMain(id)
message.success(t('common.acceptSuccess'))
//
await getList()
} catch { }
}
//
const handleAbandon = async (id : number) => {
try {
//
await message.confirm(t('common.confirmGiveup'))
//
await InspectionJobMainApi.abandonInspectionJobMain(id)
message.success(t('common.giveupSuccess'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params)
download.excel(data, '检验任务.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 添加/修改操作 */
// const formRef = ref()
// const openForm = async (type : string, row ?: number) => {
// tableData.value = [] //
// formRef.value.open(type, row)
// }
/**
* tableForm方法
*/
const tableFormKeys = {}
InspectionJobDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain')
}
//
const formRef = ref()
const execute = async (type: string, row?: number) => {
formRef.value.open(type, row)
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
//
await message.confirm(t('common.confirmColse'))
//
await InspectionJobMainApi.closeInspectionJobMain(id)
message.success(t('common.closeSuccess'))
//
await getList()
} catch {}
}
/** 发布按钮操作 */
const handleRelease = async (id: number) => {
try {
//
await message.confirm('确认发布吗?')
//
await InspectionJobMainApi.releaseInspectionJobMain(id)
message.success('发布成功!')
//
await getList()
} catch {}
}
//
const handleAccept = async (id: number) => {
try {
//
await message.confirm(t('common.confirmAccept'))
//
await InspectionJobMainApi.acceptInspectionJobMain(id)
message.success(t('common.acceptSuccess'))
//
await getList()
} catch {}
}
//
const handleAbandon = async (id: number) => {
try {
//
await message.confirm(t('common.confirmGiveup'))
//
await InspectionJobMainApi.abandonInspectionJobMain(id)
message.success(t('common.giveupSuccess'))
//
await getList()
} catch {}
}
//
const submitForm = async (formType, data) => {
// return
try {
if (formType === 'create') {
await InspectionJobMainApi.createInspectionJobMain(data)
message.success(t('common.createSuccess'))
} else if(formType === 'execute') {
await InspectionJobMainApi.executeInspectionJobMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params)
download.excel(data, '检验任务.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
/**
* tableForm方法
*/
const tableFormKeys = {}
InspectionJobDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const submitForm = async (formType, data) => {
// return
try {
if (formType === 'create') {
await InspectionJobMainApi.createInspectionJobMain(data)
message.success(t('common.createSuccess'))
} else if (formType === 'execute') {
await InspectionJobMainApi.executeInspectionJobMain(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 searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
// importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate()
})
/** 初始化 **/
onMounted(async () => {
getList()
// importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate()
})
</script>

1135
src/views/qms/inspectionJob/inspectionJobMain.data.ts

File diff suppressed because it is too large

756
src/views/qms/inspectionRecord/inspectionRecordMain.data.ts

@ -2,419 +2,435 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime'
import { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime'
import {validateTwoNum,validateSixNum } from '@/utils/validator'
import { validateTwoNum, validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
* @returns {Array}
*/
export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '记录编码',
field: 'number',
sort: 'custom',
isSearch: true,
isForm:false,
table: {
width: 200,
fixed: 'left'
}
},
{
label: '申请编码',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
isForm:false,
table: {
width: 200
}
},
{
label: '任务编码',
field: 'jobNumber',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 200
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 200
}
},{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 200
export const InspectionRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '记录编码',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 200,
fixed: 'left'
}
},
form: {
componentProps:{
disabled:true
{
label: '申请编码',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 200
}
},
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
{
label: '任务编码',
field: 'jobNumber',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
}
},
form: {
componentProps:{
disabled:true
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 200
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
}
},
form: {
componentProps:{
disabled:true
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: '检验方案编码',
field: 'inspectionSchemeCode',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 200
}
},
{
label: '检验批次',
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: '检验批数量',
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
// {
// label: '采样总数量',
// field: 'sampleTotalAmount',
// sort: 'custom',
// isSearch: false,
// isForm:false,
// table: {
// width: 150
// }
// },
{
label: '检验类型',
field: 'inspectionType',
dictType: DICT_TYPE.INSPECTION_TYPE,
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'Select'
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
table: {
width: 150
}
},
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'InputNumber',
value: 0
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
table: {
width: 150
}
},
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
// reference_certificate_row
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'InputNumber',
value: 0
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
table: {
width: 150
}
},
{
label: '检验阶段',
field: 'inspectionStage',
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'InputNumber',
value: 0
{
label: '检验方案编码',
field: 'inspectionSchemeCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
}
},
table: {
width: 150
}
},
{
label: '检验严格性',
field: 'inspectionStringency',
dictType: DICT_TYPE.INSPECTION_SEVERITY,
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: '计划开始时间',
field: 'planStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: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')]
{
label: '检验批次',
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '检验批数量',
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
// {
// label: '采样总数量',
// field: 'sampleTotalAmount',
// sort: 'custom',
// isSearch: false,
// isForm:false,
// table: {
// width: 150
// }
// },
{
label: '检验类型',
field: 'inspectionType',
dictType: DICT_TYPE.INSPECTION_TYPE,
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'Select'
},
table: {
width: 150
}
},
table: {
width: 175
}
},
{
label: '计划结束时间',
field: 'planEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: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')]
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
table: {
width: 175
}
},
{
label: '实际开始时间',
field: 'realStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: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')]
{
// reference_certificate_row
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '检验阶段',
field: 'inspectionStage',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '检验严格性',
field: 'inspectionStringency',
dictType: DICT_TYPE.INSPECTION_SEVERITY,
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
table: {
width: 175
}
},
{
label: '实际结束时间',
field: 'realEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: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')]
{
label: '计划开始时间',
field: 'planStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: 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'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '计划结束时间',
field: 'planEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: 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'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '实际开始时间',
field: 'realStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: 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'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
table: {
width: 175
}
},
{
label: '检验水平',
field: 'inspectionLevel',
dictType: DICT_TYPE.INSPECTION_LEVEL,
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: 'AQL值',
field: 'aqlValue',
dictType: DICT_TYPE.BASIC_AQL,
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: '使用决策',
field: 'useDecision',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION,
table: {
width: 150
}
},
{
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')]
{
label: '实际结束时间',
field: 'realEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: 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'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '检验水平',
field: 'inspectionLevel',
dictType: DICT_TYPE.INSPECTION_LEVEL,
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
{
label: 'AQL值',
field: 'aqlValue',
dictType: DICT_TYPE.BASIC_AQL,
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
{
label: '使用决策',
field: 'useDecision',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION,
table: {
width: 150
}
},
{
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,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
table: {
width: 175
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 200,
fixed: 'right'
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 200,
fixed: 'right'
}
}
}
]))
])
)
//表单校验
export const InspectionRecordMainRules = reactive({

784
src/views/qms/inspectionRequest/inspectionRequestMain.data.ts

@ -4,441 +4,471 @@ import * as ItemApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import { validateInteger,validateTwoNum } from '@/utils/validator'
import { validateInteger, validateTwoNum } from '@/utils/validator'
// 表单校验
export const InspectionMainRules = reactive({
requestStartTime: [required],
itemCode: [required],
requestEndTime: [required],
batch: [required,{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}],
requestInspectionNum: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}],
referenceCertificateRow: [{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}],
batch: [required, { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }],
requestInspectionNum: [
required,
{ validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }
],
referenceCertificateRow: [
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
inspectionType: [required],
minPackageQty: [required],
minPackageQty: [required]
})
export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '申请编码',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 200,
fixed: 'left'
},
form:{
componentProps:{
disabled:true
}
}
},
{
label: '申请日期',
field: 'applicationDate',
sort: 'custom',
formatter: dateFormatter2,
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')]
export const InspectionMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '申请编码',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 200,
fixed: 'left'
},
form: {
componentProps: {
disabled: true
}
}
},
isForm:false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
table: {
width: 120
},
detail: {
dateFormat: 'YYYY-MM-DD'
},
},
{
label: '申请时间',
field: 'applicationTime',
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')]
{
label: '申请日期',
field: 'applicationDate',
sort: 'custom',
formatter: dateFormatter2,
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,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 120
},
detail: {
dateFormat: 'YYYY-MM-DD'
}
},
isForm:false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '申请时间',
field: 'applicationTime',
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,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '要求开始时间',
field: 'requestStartTime',
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')]
{
label: '要求开始时间',
field: 'requestStartTime',
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'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '要求结束时间',
field: 'requestEndTime',
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'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '要求结束时间',
field: 'requestEndTime',
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')]
{
label: '完成时间',
field: 'finishTime',
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'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
table: {
width: 175
},
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
multiple: false,
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '完成时间',
field: 'finishTime',
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')]
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 175
},
form: {
componentProps: {
disabled: true
}
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法
multiple: false,
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
table: {
width: 175
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
table: {
width: 175
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
form:{
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
multiple:false,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
{
label: '待检数量',
field: 'requestInspectionNum',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
}
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 175
},
form:{
componentProps: {
disabled:true
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
}
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form:{
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法
multiple:false,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form:{
componentProps: {
disabled:true
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{
label: '待检数量',
field: 'requestInspectionNum',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
{
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
table: {
width: 150
}
},
{
label: '检验类型',
field: 'inspectionType',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string',
form: {
componentProps: {
{
label: '检验类型',
field: 'inspectionType',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string',
form: {
componentProps: {}
},
table: {
width: 175
}
},
table: {
width: 175
}
},
{
label: '小包装数',
field: 'minPackageQty',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
{
label: '小包装数',
field: 'minPackageQty',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
table: {
width: 150
}
}, {
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
table: {
width: 150
{
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
table: {
width: 150
},
isSearch: true
},
{
label: 'aql',
field: 'aql',
sort: 'custom',
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
table: {
width: 150
}
},
isSearch: true,
}, {
label: 'aql',
field: 'aql',
sort: 'custom',
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
table: {
width: 150
}
}, {
label: '操作',
field: 'action',
isForm: false,
table: {
width: 240,
fixed: 'right'
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 240,
fixed: 'right'
}
}
}
]))
])
)
// 表单校验
export const InspectionRequestPackageRules = reactive({
// packageCode: [required],
// packageSpecificationCode: [required],
amount: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}],
measuringUnit: [required],
amount: [required, { validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }],
measuringUnit: [required]
})
/**
* @returns {Array}
*/
export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
},
isTableForm:false,
form:{
componentProps:{
disabled:true
export const InspectionRequestPackage = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
},
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
},
},
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: false
}
},
tableForm:{
disabled:false
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: false
}
},
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
tableForm: {
disabled: false
}
},
table:{
width:150
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: false
},
table: {
width: 150
}
}
}
]))
])
)

3038
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

File diff suppressed because it is too large
Loading…
Cancel
Save