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> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="InspectionJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="InspectionJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName" <TableHead
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :HeadButttondata="HeadButttondata"
:allSchemas="InspectionJobMain.allSchemas" /> @button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionJobMain.allSchemas"
/>
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ <Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" }"
v-model:sort="tableObject.sort"> v-model:pageSize="tableObject.pageSize"
<template #number="{row}"> v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<AddForm <AddForm
ref="formRef" ref="formRef"
basicFormWidth="80" basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas" :formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
@ -41,298 +60,357 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas" ref="detailRef"
:isBasic="false"
:allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemas="InspectionJobDetail.allSchemas"
:detailAllSchemasRules="InspectionJobDetailRules" :detailAllSchemasRules="InspectionJobDetailRules"
:apiCreate="InspectionJobDetailApi.createInspectionJobDetail" :apiCreate="InspectionJobDetailApi.createInspectionJobDetail"
:apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail" :apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail"
:apiPage="InspectionJobDetailApi.getInspectionJobDetailPage" :apiPage="InspectionJobDetailApi.getInspectionJobDetailPage"
:apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail" @searchTableSuccessDetail="searchTableSuccessDetail" :apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail"
:isShowAddBtn="false" :detailButtonIsShow="true" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true"
/> />
<!-- 包装信息 --> <!-- 包装信息 -->
<ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionJobMain.allSchemas" <ListTable
:detailAllSchemas="InspectionJobPackage.allSchemas" :detailAllSchemasRules="InspectionJobPackageRules" ref="listTableRef"
:list="list" /> titleName="包装信息"
:allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobPackage.allSchemas"
:detailAllSchemasRules="InspectionJobPackageRules"
:list="list"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage,InspectionJobPackageRules} from './inspectionJobMain.data' import {
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data' 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 InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail' import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue' import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue' import AddForm from './addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
// //
defineOptions({ name: 'InspectionJobMain' }) defineOptions({ name: 'InspectionJobMain' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns) const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => { nextTick(async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
// row['itemNumber'] = val[0]['number'] // row['itemNumber'] = val[0]['number']
// row['itemName'] = val[0]['name'] // row['itemName'] = val[0]['name']
// row['uom'] = val[0]['uom'] // row['uom'] = val[0]['uom']
// row['isRadeIn'] = val[0]['isRadeIn'] // row['isRadeIn'] = val[0]['isRadeIn']
// row['available'] = val[0]['available'] // row['available'] = val[0]['available']
} else { } else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => {
const setV = {} const setV = {}
// if(formField == 'itemCode'){ setV[formField] = val[0][searchField]
// await ItembasicApi.getItembasicPage({
// code: setV['itemCode']
// }).then(res => {
// setV['uom'] = res.list[0].uom
// setV[formField] = val[0][searchField]
// })
// }
formRef.setValues(setV) 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 = [ const { getList, setSearchParams } = tableMethods
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
// //
const buttonBaseClick = (val, item) => { const HeadButttondata = [
if (val == 'add') { // defaultButtons.defaultFreshBtn(null), //
openForm('create') defaultButtons.defaultFilterBtn(null), //
} else if (val == 'import') { // defaultButtons.defaultSetBtn(null) //
handleImport() ]
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// //
const isShowMainButton = (row, val) => { const buttonBaseClick = (val, item) => {
if (val.indexOf(row.status) > -1) { if (val == 'add') {
return false //
} else { openForm('create')
return true } 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) { const isShowMainButton = (row, val) => {
return false if (val.indexOf(row.status) > -1) {
} else { return false
return true } else {
} return true
} }
}
// - //
const butttondata = (row) => { const isShowMainButton2 = (row, val) => {
return [ if (val.indexOf(row.isStaging) > -1) {
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), // return false
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), // } else {
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), // return true
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 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 listTableRef = ref()
const list = ref([]) const list = ref([])
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { // if (val == 'mainJobExe') {
execute('execute', row) //
}else if (val == 'mainPackage') { // execute('execute', row)
} else if (val == 'mainPackage') {
list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id) //
// row.status = '1'
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns) list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
}else if (val == 'mainJobAba') { // // row.status = '1'
listTableRef.value.openPackage(row, '包装信息', InspectionJobPackage.allSchemas.tableColumns)
} else if (val == 'mainJobAba') {
//
handleAbandon(row.id) handleAbandon(row.id)
} else if (val == 'mainJobClo') { // } else if (val == 'mainJobClo') {
//
handleClose(row.id) handleClose(row.id)
} else if (val == 'mainOrderPub') { // } else if (val == 'mainOrderPub') {
//
handleRelease(row.id) handleRelease(row.id)
} else if (val == 'mainJobAcc') { // } else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
} else if (val == 'mainJobAcc') {
//
handleAccept(row.id) handleAccept(row.id)
} }
} }
/** 添加/修改操作 */ //
// const formRef = ref() const showQualityReport = ref(false)
// const openForm = async (type : string, row ?: number) => { const qualityReport = ref('')
// tableData.value = [] // const checkQualityReport = async (row) => {
// formRef.value.open(type, row) showQualityReport.value = true
// } qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 详情操作 */ /** 添加/修改操作 */
const detailRef = ref() // const formRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => { // const openForm = async (type : string, row ?: number) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain') // tableData.value = [] //
} // formRef.value.open(type, row)
// // }
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
}
}
/** /** 详情操作 */
* tableForm方法 const detailRef = ref()
*/ const openDetail = (row: any, titleName: any, titleValue: any) => {
const tableFormKeys = {} detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain')
InspectionJobDetail.allSchemas.tableFormColumns.forEach(item => { }
tableFormKeys[item.field] = item.default ? item.default : '' //
})
const tableData = ref([])
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) => { const exportLoading = ref(false) //
// return const handleExport = async () => {
try { try {
if (formType === 'create') { //
await InspectionJobMainApi.createInspectionJobMain(data) await message.exportConfirm()
message.success(t('common.createSuccess')) //
} else if(formType === 'execute') { exportLoading.value = true
await InspectionJobMainApi.executeInspectionJobMain(data) const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params)
message.success(t('common.updateSuccess')) download.excel(data, '检验任务.xlsx')
} } catch {
formRef.value.dialogVisible = false } finally {
// exportLoading.value = false
getList()
} finally {
formRef.value.formLoading = false
}
} }
}
/** 导入 */ /**
const importFormRef = ref() * tableForm方法
const handleImport = () => { */
importFormRef.value.open() 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) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters
}
getList() //
} }
getList() //
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
// importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate() // importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate()
}) })
</script> </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 { dateFormatter2 } from '@/utils/formatTime'
import { validateHanset, validateEmail } from '@/utils/validator' import { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import {validateTwoNum,validateSixNum } from '@/utils/validator' import { validateTwoNum, validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionRecordMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '记录编码', {
field: 'number', label: '记录编码',
sort: 'custom', field: 'number',
isSearch: true, sort: 'custom',
isForm:false, isSearch: true,
table: { isForm: false,
width: 200, table: {
fixed: 'left' 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
}, },
form: { {
componentProps:{ label: '申请编码',
disabled:true field: 'requestNumber',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 200
} }
}, },
}, {
{ label: '任务编码',
label: '物料编码', field: 'jobNumber',
field: 'itemCode', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: false, isForm: false,
isForm:false, table: {
table: { width: 200
width: 150 }
}, },
form: { {
componentProps:{ label: '发货单号',
disabled:true field: 'asnNumber',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
} }
}, },
}, {
{ label: '供应商编码',
label: '物料名称', field: 'supplierCode',
field: 'itemName', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: false, isForm: false,
isForm:false, table: {
table: { width: 200
width: 200 }
}, },
form: { {
componentProps:{ label: '供应商名称',
disabled:true field: 'supplierName',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
} }
}, },
}, {
{ label: '物料编码',
label: '批次', field: 'itemCode',
field: 'batch', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: false, isForm: false,
isForm:false, table: {
table: { width: 150
width: 150 },
} form: {
}, componentProps: {
{ disabled: true
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'
}, },
table: { {
width: 150 label: '物料名称',
} field: 'itemName',
}, sort: 'custom',
{ isSearch: false,
label: '参考订单号', isForm: false,
field: 'referenceOrderCode', table: {
sort: 'custom', width: 200
isSearch: false, },
isForm:false, form: {
table: { componentProps: {
width: 150 disabled: true
} }
}, }
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'InputNumber',
value: 0
}, },
table: { {
width: 150 label: '批次',
} field: 'batch',
}, sort: 'custom',
{ isSearch: false,
label: '参考凭证号', isForm: false,
field: 'referenceCertificateCode', table: {
sort: 'custom', width: 150
isSearch: false, }
isForm:false,
table: {
width: 150
}
},
{
// reference_certificate_row
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'InputNumber',
value: 0
}, },
table: { {
width: 150 label: '检验方案编码',
} field: 'inspectionSchemeCode',
}, sort: 'custom',
{ isSearch: false,
label: '检验阶段', isForm: false,
field: 'inspectionStage', table: {
sort: 'custom', width: 200
isSearch: false, }
isForm:false,
form: {
component: 'InputNumber',
value: 0
}, },
table: { {
width: 150 label: '检验批次',
} field: 'inspectionBatch',
}, sort: 'custom',
{ isSearch: false,
label: '检验严格性', isForm: false,
field: 'inspectionStringency', table: {
dictType: DICT_TYPE.INSPECTION_SEVERITY, width: 150
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')]
} }
}, },
form: { {
component: 'DatePicker', label: '检验批数量',
componentProps: { field: 'inspectionBatchAmount',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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: 'referenceOrderCode',
}, sort: 'custom',
{ isSearch: false,
label: '计划结束时间', isForm: false,
field: 'planEndTime', table: {
sort: 'custom', width: 150
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', label: '参考订单行',
componentProps: { field: 'referenceOrderRow',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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 // reference_certificate_row
} label: '参考凭证行',
}, field: 'referenceCertificateRow',
{ sort: 'custom',
label: '实际开始时间', isSearch: false,
field: 'realStartTime', isForm: false,
sort: 'custom', form: {
formatter: dateFormatter, component: 'InputNumber',
isSearch: false, value: 0
isForm:false, },
search: { table: {
component: 'DatePicker', width: 150
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', label: '检验阶段',
componentProps: { field: 'inspectionStage',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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: 'planStartTime',
}, sort: 'custom',
{ formatter: dateFormatter,
label: '实际结束时间', isSearch: false,
field: 'realEndTime', isForm: false,
sort: 'custom', search: {
formatter: dateFormatter, component: 'DatePicker',
isSearch: false, componentProps: {
isForm:false, valueFormat: 'YYYY-MM-DD HH:mm:ss',
search: { type: 'daterange',
component: 'DatePicker', defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
componentProps: { }
valueFormat: 'YYYY-MM-DD HH:mm:ss', },
type: 'daterange', form: {
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
} }
}, },
form: { {
component: 'DatePicker', label: '计划结束时间',
componentProps: { field: 'planEndTime',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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: 'realEndTime',
}, sort: 'custom',
{ formatter: dateFormatter,
label: '检验水平', isSearch: false,
field: 'inspectionLevel', isForm: false,
dictType: DICT_TYPE.INSPECTION_LEVEL, search: {
sort: 'custom', component: 'DatePicker',
isSearch: false, componentProps: {
isForm:false, valueFormat: 'YYYY-MM-DD HH:mm:ss',
table: { type: 'daterange',
width: 150 defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
{ form: {
label: 'AQL值', component: 'DatePicker',
field: 'aqlValue', componentProps: {
dictType: DICT_TYPE.BASIC_AQL, type: 'datetime',
sort: 'custom', valueFormat: 'x'
isSearch: false, }
isForm:false, },
table: { detail: {
width: 150 dateFormat: 'YYYY-MM-DD HH:mm:ss'
} },
}, table: {
{ width: 175
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: { label: '检验水平',
dateFormat: 'YYYY-MM-DD HH:mm:ss' 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: '操作', label: '操作',
field: 'action', field: 'action',
isDetail: false, isDetail: false,
isForm: false, isForm: false,
table: { table: {
width: 200, width: 200,
fixed: 'right' fixed: 'right'
}
} }
} ])
])) )
//表单校验 //表单校验
export const InspectionRecordMainRules = reactive({ 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 { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' 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({ export const InspectionMainRules = reactive({
requestStartTime: [required], requestStartTime: [required],
itemCode: [required], itemCode: [required],
requestEndTime: [required], requestEndTime: [required],
batch: [required,{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}], batch: [required, { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }],
requestInspectionNum: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}], requestInspectionNum: [
referenceCertificateRow: [{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}], required,
{ validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }
],
referenceCertificateRow: [
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
inspectionType: [required], inspectionType: [required],
minPackageQty: [required], minPackageQty: [required]
}) })
export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '申请编码', {
field: 'number', label: '申请编码',
sort: 'custom', field: 'number',
isSearch: true, sort: 'custom',
table: { isSearch: true,
width: 200, table: {
fixed: 'left' width: 200,
}, fixed: 'left'
form:{ },
componentProps:{ form: {
disabled:true 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')]
} }
}, },
isForm:false, {
form: { label: '发货单号',
component: 'DatePicker', field: 'asnNumber',
componentProps: { sort: 'custom',
type: 'datetime', isSearch: false,
valueFormat: 'x' isForm: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
} }
}, },
table: { {
width: 120 label: '申请日期',
}, field: 'applicationDate',
detail: { sort: 'custom',
dateFormat: 'YYYY-MM-DD' formatter: dateFormatter2,
}, isSearch: false,
}, search: {
{ component: 'DatePicker',
label: '申请时间', componentProps: {
field: 'applicationTime', valueFormat: 'YYYY-MM-DD HH:mm:ss',
sort: 'custom', type: 'daterange',
formatter: dateFormatter, defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
isSearch: false, }
search: { },
component: 'DatePicker', isForm: false,
componentProps: { form: {
valueFormat: 'YYYY-MM-DD HH:mm:ss', component: 'DatePicker',
type: 'daterange', componentProps: {
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 120
},
detail: {
dateFormat: 'YYYY-MM-DD'
} }
}, },
isForm:false, {
form: { label: '申请时间',
component: 'DatePicker', field: 'applicationTime',
componentProps: { sort: 'custom',
type: 'datetime', formatter: dateFormatter,
valueFormat: 'x' 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' label: '要求开始时间',
}, field: 'requestStartTime',
table: { sort: 'custom',
width: 175 formatter: dateFormatter,
} isSearch: false,
}, search: {
{ component: 'DatePicker',
label: '要求开始时间', componentProps: {
field: 'requestStartTime', valueFormat: 'YYYY-MM-DD HH:mm:ss',
sort: 'custom', type: 'daterange',
formatter: dateFormatter, defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
isSearch: false, }
search: { },
component: 'DatePicker', form: {
componentProps: { component: 'DatePicker',
valueFormat: 'YYYY-MM-DD HH:mm:ss', componentProps: {
type: 'daterange', type: 'datetime',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
} }
}, },
form: { {
component: 'DatePicker', label: '要求结束时间',
componentProps: { field: 'requestEndTime',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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' label: '完成时间',
}, field: 'finishTime',
table: { sort: 'custom',
width: 175 formatter: dateFormatter,
} isSearch: false,
}, search: {
{ component: 'DatePicker',
label: '要求结束时间', componentProps: {
field: 'requestEndTime', valueFormat: 'YYYY-MM-DD HH:mm:ss',
sort: 'custom', type: 'daterange',
formatter: dateFormatter, defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
isSearch: false, }
search: { },
component: 'DatePicker', form: {
componentProps: { component: 'DatePicker',
valueFormat: 'YYYY-MM-DD HH:mm:ss', componentProps: {
type: 'daterange', type: 'datetime',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
} }
}, },
form: { {
component: 'DatePicker', label: '供应商编码',
componentProps: { field: 'supplierCode',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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' label: '供应商名称',
}, field: 'supplierName',
table: { sort: 'custom',
width: 175 isSearch: false,
} table: {
}, width: 175
{ },
label: '完成时间', form: {
field: 'finishTime', componentProps: {
sort: 'custom', disabled: true
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', label: '物料编码',
componentProps: { field: 'itemCode',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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: 'batch',
}, sort: 'custom',
{ isSearch: false,
label: '供应商编码', table: {
field: 'supplierCode', width: 150
sort: 'custom', }
isSearch: false,
table: {
width: 175
}, },
form:{ {
componentProps: { label: '待检数量',
isSearchList: true, // 开启查询弹窗 field: 'requestInspectionNum',
searchTitle: '供应商信息', // 查询弹窗标题 sort: 'custom',
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 isSearch: false,
searchField: 'code', // 查询弹窗赋值字段 table: {
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 width: 150
multiple:false,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
} }
}
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 175
}, },
form:{ {
componentProps: { label: '参考订单号',
disabled:true field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
} }
}
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}, },
form:{ {
componentProps: { label: '参考订单行',
isSearchList: true, // 开启查询弹窗 field: 'referenceOrderRow',
searchTitle: '物料信息', // 查询弹窗标题 sort: 'custom',
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 isSearch: false,
searchField: 'code', // 查询弹窗赋值字段 form: {
searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法 component: 'InputNumber',
multiple:false, value: 0
searchCondition: [{ },
key: 'available', table: {
value: 'TRUE', width: 150
isMainValue: false
}]
} }
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
width: 150
}, },
form:{ {
componentProps: { label: '参考凭证号',
disabled:true 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: 'referenceCertificateRow',
}, sort: 'custom',
{ isSearch: false,
label: '参考凭证号', form: {
field: 'referenceCertificateCode', component: 'InputNumber',
sort: 'custom', value: 0
isSearch: false, },
table: { table: {
width: 150 width: 150
} }
},
{
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
}, },
table: { {
width: 150 label: '检验类型',
} field: 'inspectionType',
}, sort: 'custom',
{ isSearch: false,
label: '检验类型', dictType: DICT_TYPE.INSPECTION_TYPE,
field: 'inspectionType', dictClass: 'string',
sort: 'custom', form: {
isSearch: false, componentProps: {}
dictType: DICT_TYPE.INSPECTION_TYPE, },
dictClass: 'string', table: {
form: { width: 175
componentProps: {
} }
}, },
table: { {
width: 175 label: '小包装数',
} field: 'minPackageQty',
}, sort: 'custom',
{ isSearch: false,
label: '小包装数', form: {
field: 'minPackageQty', component: 'InputNumber',
sort: 'custom', value: 0
isSearch: false, },
form: { table: {
component: 'InputNumber', width: 150
value: 0 }
}, },
table: { {
width: 150 label: '检验水平',
} field: 'inspectionLevel',
}, { sort: 'custom',
label: '检验水平', dictType: DICT_TYPE.INSPECTION_LEVEL,
field: 'inspectionLevel', dictClass: 'string',
sort: 'custom', table: {
dictType: DICT_TYPE.INSPECTION_LEVEL, width: 150
dictClass: 'string', },
table: { isSearch: true
width: 150 },
{
label: 'aql',
field: 'aql',
sort: 'custom',
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
table: {
width: 150
}
}, },
isSearch: true, {
}, { label: '操作',
label: 'aql', field: 'action',
field: 'aql', isForm: false,
sort: 'custom', table: {
dictType: DICT_TYPE.BASIC_AQL, width: 240,
dictClass: 'string', fixed: 'right'
table: { }
width: 150
}
}, {
label: '操作',
field: 'action',
isForm: false,
table: {
width: 240,
fixed: 'right'
} }
} ])
])) )
// 表单校验 // 表单校验
export const InspectionRequestPackageRules = reactive({ export const InspectionRequestPackageRules = reactive({
// packageCode: [required], // packageCode: [required],
// packageSpecificationCode: [required], // packageSpecificationCode: [required],
amount: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}], amount: [required, { validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }],
measuringUnit: [required], measuringUnit: [required]
}) })
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionRequestPackage = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '编码', {
field: 'number', label: '编码',
sort: 'custom', field: 'number',
isSearch: true, sort: 'custom',
tableForm:{ isSearch: true,
disabled:true tableForm: {
}, disabled: true
isTableForm:false, },
form:{ isTableForm: false,
componentProps:{ form: {
disabled:true componentProps: {
disabled: true
}
} }
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
},
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
}, },
}, {
{ label: '包装号',
label: '数量', field: 'packageCode',
field: 'amount', sort: 'custom',
sort: 'custom', isSearch: true,
isSearch: false, tableForm: {
form: { disabled: false
component: 'InputNumber', }
value: 0
}, },
tableForm:{ {
disabled:false label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: false
}
}, },
}, {
{ label: '数量',
label: '计量单位', field: 'amount',
field: 'measuringUnit', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: true, form: {
tableForm:{ component: 'InputNumber',
disabled:false 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