Browse Source

BUG修改

hella_online_20240829
parent
commit
0a77c3fc1a
  1. 360
      src/views/qms/inspectionJob/index.vue
  2. 241
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  3. 92
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
  4. 138
      src/views/qms/inspectionRequest/inspectionRequestMain.data.ts
  5. 556
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

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

@ -1,27 +1,46 @@
<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>
@ -41,52 +60,74 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<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') {
// //
@ -102,9 +143,9 @@
formRef.setValues(setV) formRef.setValues(setV)
} }
}) })
} }
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => { nextTick(async () => {
const setV = {} const setV = {}
// if(formField == 'itemCode'){ // if(formField == 'itemCode'){
@ -117,111 +158,150 @@
// } // }
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }
// //
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: InspectionJobMainApi.getInspectionJobMainPage // getListApi: InspectionJobMainApi.getInspectionJobMainPage //
}) })
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null) //
] ]
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') {
//
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') {
//
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') {
//
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') {
//
getList() getList()
} else if (val == 'filtrate') { // } else if (val == 'filtrate') {
} else { // //
} else {
//
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
// //
const isShowMainButton = (row, val) => { const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) { if (val.indexOf(row.status) > -1) {
return false return false
} else { } else {
return true return true
} }
} }
// //
const isShowMainButton2 = (row, val) => { const isShowMainButton2 = (row, val) => {
if (val.indexOf(row.isStaging) > -1) { if (val.indexOf(row.isStaging) > -1) {
return false return false
} else { } else {
return true return true
} }
} }
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), // defaultButtons.mainListJobAccBtn({
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), // hide: isShowMainButton(row, ['1']),
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), // hasPermi: 'qms:inspection-job-main:accept'
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.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.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) execute('execute', row)
}else if (val == 'mainPackage') { // } else if (val == 'mainPackage') {
//
list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id) list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
// row.status = '1' // row.status = '1'
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns) listTableRef.value.openPackage(row, '包装信息', InspectionJobPackage.allSchemas.tableColumns)
}else if (val == 'mainJobAba') { // } 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) => {
// tableData.value = [] //
// formRef.value.open(type, row)
// }
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain') detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain')
} }
// //
const formRef = ref() const formRef = ref()
const execute = async (type : string, row ?: number) => { const execute = async (type: string, row?: number) => {
formRef.value.open(type, row) formRef.value.open(type, row)
} }
/** 关闭按钮操作 */ /** 关闭按钮操作 */
const handleClose = async (id : number) => { const handleClose = async (id: number) => {
try { try {
// //
await message.confirm(t('common.confirmColse')) await message.confirm(t('common.confirmColse'))
@ -230,10 +310,10 @@ const list = ref([])
message.success(t('common.closeSuccess')) message.success(t('common.closeSuccess'))
// //
await getList() await getList()
} catch { } } catch {}
} }
/** 发布按钮操作 */ /** 发布按钮操作 */
const handleRelease = async (id : number) => { const handleRelease = async (id: number) => {
try { try {
// //
await message.confirm('确认发布吗?') await message.confirm('确认发布吗?')
@ -242,10 +322,10 @@ const list = ref([])
message.success('发布成功!') message.success('发布成功!')
// //
await getList() await getList()
} catch { } } catch {}
} }
// //
const handleAccept = async (id : number) => { const handleAccept = async (id: number) => {
try { try {
// //
await message.confirm(t('common.confirmAccept')) await message.confirm(t('common.confirmAccept'))
@ -254,10 +334,10 @@ const list = ref([])
message.success(t('common.acceptSuccess')) message.success(t('common.acceptSuccess'))
// //
await getList() await getList()
} catch { } } catch {}
} }
// //
const handleAbandon = async (id : number) => { const handleAbandon = async (id: number) => {
try { try {
// //
await message.confirm(t('common.confirmGiveup')) await message.confirm(t('common.confirmGiveup'))
@ -266,12 +346,12 @@ const list = ref([])
message.success(t('common.giveupSuccess')) message.success(t('common.giveupSuccess'))
// //
await getList() await getList()
} catch { } } catch {}
} }
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {
try { try {
// //
await message.exportConfirm() await message.exportConfirm()
@ -283,26 +363,25 @@ const list = ref([])
} finally { } finally {
exportLoading.value = false exportLoading.value = false
} }
} }
/** /**
* tableForm方法 * tableForm方法
*/ */
const tableFormKeys = {} const tableFormKeys = {}
InspectionJobDetail.allSchemas.tableFormColumns.forEach(item => { InspectionJobDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : '' tableFormKeys[item.field] = item.default ? item.default : ''
}) })
const tableData = ref([]) const tableData = ref([])
//
// const submitForm = async (formType, data) => {
const submitForm = async (formType, data) => {
// return // return
try { try {
if (formType === 'create') { if (formType === 'create') {
await InspectionJobMainApi.createInspectionJobMain(data) await InspectionJobMainApi.createInspectionJobMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else if(formType === 'execute') { } else if (formType === 'execute') {
await InspectionJobMainApi.executeInspectionJobMain(data) await InspectionJobMainApi.executeInspectionJobMain(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
@ -312,27 +391,26 @@ const list = ref([])
} finally { } finally {
formRef.value.formLoading = false formRef.value.formLoading = false
} }
} }
/** 导入 */ /** 导入 */
const importFormRef = ref() const importFormRef = ref()
const handleImport = () => { const handleImport = () => {
importFormRef.value.open() 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>

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

@ -2,31 +2,35 @@ 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() // 国际化
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const resultEntryMethodList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY) const resultEntryMethodList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)
const featureTypeList = getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE ) const featureTypeList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE)
const isCanUpdateList = [{ const isCanUpdateList = [
label:'是', {
value:true label: '是',
},{ value: true
label:'否', },
value:false {
}] label: '否',
value: false
}
]
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionJobMain = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '编码', label: '编码',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -40,28 +44,43 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
width: 200 width: 200
} }
}, },
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{ {
label: '供应商编码', label: '供应商编码',
field: 'supplierCode', field: 'supplierCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
width: 175 width: 175
} }
},{ },
{
label: '供应商名称', label: '供应商名称',
field: 'supplierName', field: 'supplierName',
sort: 'custom', sort: 'custom',
@ -70,10 +89,10 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 175 width: 175
}, },
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
}
} }
},
}, },
{ {
label: '物料编码', label: '物料编码',
@ -84,10 +103,10 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
}
} }
},
}, },
{ {
label: '物料名称', label: '物料名称',
@ -98,10 +117,10 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 175 width: 175
}, },
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
}
} }
},
}, },
{ {
label: '物料批次', label: '物料批次',
@ -109,8 +128,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -123,8 +142,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -139,8 +158,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0, value: 0,
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -153,8 +172,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -169,8 +188,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0, value: 0,
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -183,8 +202,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -197,8 +216,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -211,8 +230,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -242,8 +261,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string', dictClass: 'string',
form: { form: {
component: 'Select', component: 'Select',
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -274,8 +293,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0, value: 0,
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -289,9 +308,9 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
dictType: DICT_TYPE.INSPECTION_SEVERITY, dictType: DICT_TYPE.INSPECTION_SEVERITY,
dictClass: 'string', dictClass: 'string',
form:{ form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -317,7 +336,7 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
valueFormat: 'x', valueFormat: 'x',
disabled:true disabled: true
} }
}, },
detail: { detail: {
@ -346,7 +365,7 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
valueFormat: 'x', valueFormat: 'x',
disabled:true disabled: true
} }
}, },
detail: { detail: {
@ -363,9 +382,9 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
dictType: DICT_TYPE.INSPECTION_LEVEL, dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string', dictClass: 'string',
form:{ form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -379,9 +398,9 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
dictType: DICT_TYPE.BASIC_AQL, dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string', dictClass: 'string',
form:{ form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
}, },
table: { table: {
@ -429,7 +448,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' fixed: 'right'
} }
} }
])) ])
)
//表单校验 //表单校验
export const InspectionJobMainRules = reactive({ export const InspectionJobMainRules = reactive({
@ -439,24 +459,25 @@ export const InspectionJobMainRules = reactive({
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionJobDetail = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '编码', label: '编码',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true
}, },
{ {
label: '检验方案模板编码', label: '检验方案模板编码',
field: 'inspectionCode', field: 'inspectionCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true
}, },
{ {
label: '描述', label: '描述',
field: 'processDescribe', field: 'processDescribe',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true
}, },
{ {
label: '顺序号', label: '顺序号',
@ -466,43 +487,48 @@ export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
}, }
}, },
{ {
label: '检验特性编号', label: '检验特性编号',
field: 'inspectionCharCode', field: 'inspectionCharCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true
}, },
{ {
label: '检验特性编码', label: '检验特性编码',
field: 'inspectionJobCharacteristicsRespVO.number', field: 'inspectionJobCharacteristicsRespVO.number',
sort: 'custom', sort: 'custom'
}, },
{ {
label: '检验特性描述', label: '检验特性描述',
field: 'inspectionJobCharacteristicsRespVO.description', field: 'inspectionJobCharacteristicsRespVO.description',
sort: 'custom', sort: 'custom'
},{ },
{
label: '检验方法', label: '检验方法',
field: 'inspectionJobCharacteristicsRespVO.inspectionMethodCode', field: 'inspectionJobCharacteristicsRespVO.inspectionMethodCode',
sort: 'custom', sort: 'custom'
},{ },
{
label: '采样过程编码', label: '采样过程编码',
field: 'inspectionJobCharacteristicsRespVO.samplingProcessCode', field: 'inspectionJobCharacteristicsRespVO.samplingProcessCode',
sort: 'custom', sort: 'custom'
},{ },
{
label: '动态修改规则编码', label: '动态修改规则编码',
field: 'inspectionJobCharacteristicsRespVO.dynamicUpdateCode', field: 'inspectionJobCharacteristicsRespVO.dynamicUpdateCode',
sort: 'custom', sort: 'custom'
},{ },
{
label: '是否允许修改特征值', label: '是否允许修改特征值',
field: 'inspectionJobCharacteristicsRespVO.isCanUpdate', field: 'inspectionJobCharacteristicsRespVO.isCanUpdate',
sort: 'custom', sort: 'custom',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return isCanUpdateList.find((account) => account.value == cellValue)?.label return isCanUpdateList.find((account) => account.value == cellValue)?.label
}
}, },
},{ {
label: '结果录入方式', label: '结果录入方式',
field: 'inspectionJobCharacteristicsRespVO.resultEntryMethod', field: 'inspectionJobCharacteristicsRespVO.resultEntryMethod',
sort: 'custom', sort: 'custom',
@ -510,38 +536,41 @@ export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
// dictClass: 'string', // dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return resultEntryMethodList.find((account) => account.value == cellValue)?.label return resultEntryMethodList.find((account) => account.value == cellValue)?.label
}
}, },
},{ {
label: '特征类型', label: '特征类型',
field: 'inspectionJobCharacteristicsRespVO.featureType', field: 'inspectionJobCharacteristicsRespVO.featureType',
sort: 'custom', sort: 'custom',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return featureTypeList.find((account) => account.value == cellValue)?.label return featureTypeList.find((account) => account.value == cellValue)?.label
},
} }
])) }
])
)
//表单校验 //表单校验
export const InspectionJobDetailRules = reactive({ export const InspectionJobDetailRules = reactive({
taskCode: [required], taskCode: [required],
processCode: [required], processCode: [required],
sequenceCode: [required], sequenceCode: [required],
available: [required], available: [required]
}) })
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionJobPackage = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '编码', label: '编码',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true disabled: true
}, },
table:{ table: {
width:200 width: 200
} }
}, },
{ {
@ -549,11 +578,11 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packageCode', field: 'packageCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true disabled: true
}, },
table:{ table: {
width:200 width: 200
} }
}, },
{ {
@ -561,11 +590,11 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packageSpecificationCode', field: 'packageSpecificationCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true disabled: true
}, },
table:{ table: {
width:180 width: 180
} }
}, },
{ {
@ -577,11 +606,11 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
}, },
tableForm:{ tableForm: {
disabled:true disabled: true
}, },
table:{ table: {
width:150 width: 150
} }
}, },
{ {
@ -589,11 +618,11 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'measuringUnit', field: 'measuringUnit',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true disabled: true
}, },
table:{ table: {
width:150 width: 150
} }
}, },
{ {
@ -601,14 +630,14 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'sampleAmount', field: 'sampleAmount',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isTable:false, isTable: false,
table:{ table: {
width:150, width: 150
} }
}, }
])) ])
)
//表单校验 //表单校验
export const InspectionJobPackageRules = reactive({ export const InspectionJobPackageRules = reactive({
sampleAmount: [required, sampleAmount: [required, { validator: validateSixNum, trigger: 'blur' }]
{ validator:validateSixNum, trigger: 'blur'}]
}) })

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

@ -2,19 +2,20 @@ 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: '记录编码', label: '记录编码',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm:false, isForm: false,
table: { table: {
width: 200, width: 200,
fixed: 'left' fixed: 'left'
@ -25,7 +26,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'requestNumber', field: 'requestNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm:false, isForm: false,
table: { table: {
width: 200 width: 200
} }
@ -35,71 +36,86 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'jobNumber', field: 'jobNumber',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 200 width: 200
} }
}, },
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{ {
label: '供应商编码', label: '供应商编码',
field: 'supplierCode', field: 'supplierCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 200 width: 200
} }
},{ },
{
label: '供应商名称', label: '供应商名称',
field: 'supplierName', field: 'supplierName',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 200 width: 200
}, },
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
}
} }
},
}, },
{ {
label: '物料编码', label: '物料编码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
}, },
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
}
} }
},
}, },
{ {
label: '物料名称', label: '物料名称',
field: 'itemName', field: 'itemName',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 200 width: 200
}, },
form: { form: {
componentProps:{ componentProps: {
disabled:true disabled: true
}
} }
},
}, },
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
} }
@ -109,7 +125,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionSchemeCode', field: 'inspectionSchemeCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 200 width: 200
} }
@ -119,7 +135,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionBatch', field: 'inspectionBatch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
} }
@ -129,7 +145,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionBatchAmount', field: 'inspectionBatchAmount',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
} }
@ -150,7 +166,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.INSPECTION_TYPE, dictType: DICT_TYPE.INSPECTION_TYPE,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
form: { form: {
component: 'Select' component: 'Select'
}, },
@ -163,7 +179,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'referenceOrderCode', field: 'referenceOrderCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
} }
@ -173,7 +189,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'referenceOrderRow', field: 'referenceOrderRow',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -187,7 +203,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'referenceCertificateCode', field: 'referenceCertificateCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
} }
@ -198,7 +214,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'referenceCertificateRow', field: 'referenceCertificateRow',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -212,7 +228,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionStage', field: 'inspectionStage',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -227,7 +243,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.INSPECTION_SEVERITY, dictType: DICT_TYPE.INSPECTION_SEVERITY,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
} }
@ -238,7 +254,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false, isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -267,7 +283,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false, isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -296,7 +312,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false, isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -325,7 +341,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false, isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -354,7 +370,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.INSPECTION_LEVEL, dictType: DICT_TYPE.INSPECTION_LEVEL,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
} }
@ -365,7 +381,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.BASIC_AQL, dictType: DICT_TYPE.BASIC_AQL,
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
} }
@ -379,7 +395,6 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
} }
}, },
{ {
label: '创建时间', label: '创建时间',
@ -414,7 +429,8 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' fixed: 'right'
} }
} }
])) ])
)
//表单校验 //表单校验
export const InspectionRecordMainRules = reactive({ export const InspectionRecordMainRules = reactive({

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

@ -4,21 +4,27 @@ 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: '申请编码', label: '申请编码',
field: 'number', field: 'number',
@ -28,12 +34,27 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 200, width: 200,
fixed: 'left' fixed: 'left'
}, },
form:{ form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
} }
}, },
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{ {
label: '申请日期', label: '申请日期',
field: 'applicationDate', field: 'applicationDate',
@ -48,7 +69,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
isForm:false, isForm: false,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -61,7 +82,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
detail: { detail: {
dateFormat: 'YYYY-MM-DD' dateFormat: 'YYYY-MM-DD'
}, }
}, },
{ {
label: '申请时间', label: '申请时间',
@ -77,7 +98,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
isForm:false, isForm: false,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -184,19 +205,21 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 175 width: 175
}, },
form:{ form: {
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchTitle: '供应商信息', // 查询弹窗标题 searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
multiple:false, multiple: false,
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
]
} }
} }
}, },
@ -208,9 +231,9 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 175 width: 175
}, },
form:{ form: {
componentProps: { componentProps: {
disabled:true disabled: true
} }
} }
}, },
@ -222,19 +245,21 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
form:{ form: {
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchTitle: '物料信息', // 查询弹窗标题 searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法 searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法
multiple:false, multiple: false,
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
]
} }
} }
}, },
@ -246,9 +271,9 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
form:{ form: {
componentProps: { componentProps: {
disabled:true disabled: true
} }
} }
}, },
@ -322,8 +347,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.INSPECTION_TYPE, dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string', dictClass: 'string',
form: { form: {
componentProps: { componentProps: {}
}
}, },
table: { table: {
width: 175 width: 175
@ -341,7 +365,8 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
} }
}, { },
{
label: '检验水平', label: '检验水平',
field: 'inspectionLevel', field: 'inspectionLevel',
sort: 'custom', sort: 'custom',
@ -350,8 +375,9 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isSearch: true, isSearch: true
}, { },
{
label: 'aql', label: 'aql',
field: 'aql', field: 'aql',
sort: 'custom', sort: 'custom',
@ -360,7 +386,8 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
} }
}, { },
{
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
@ -369,32 +396,34 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' 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: '编码', label: '编码',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:true disabled: true
}, },
isTableForm:false, isTableForm: false,
form:{ form: {
componentProps:{ componentProps: {
disabled:true disabled: true
} }
} }
}, },
@ -403,18 +432,18 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packageCode', field: 'packageCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:false disabled: false
}, }
}, },
{ {
label: '包装规格', label: '包装规格',
field: 'packageSpecificationCode', field: 'packageSpecificationCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:false disabled: false
}, }
}, },
{ {
label: '数量', label: '数量',
@ -425,20 +454,21 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
}, },
tableForm:{ tableForm: {
disabled:false disabled: false
}, }
}, },
{ {
label: '计量单位', label: '计量单位',
field: 'measuringUnit', field: 'measuringUnit',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
disabled:false disabled: false
}, },
table:{ table: {
width:150 width: 150
} }
} }
])) ])
)

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

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