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>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="InspectionJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="InspectionJobMain.allSchemas" />
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionJobMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort">
<template #number="{row}">
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -41,52 +60,74 @@
/>
<!-- 详情 -->
<Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas"
ref="detailRef"
:isBasic="false"
:allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas"
:detailAllSchemasRules="InspectionJobDetailRules"
:apiCreate="InspectionJobDetailApi.createInspectionJobDetail"
:apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail"
:apiPage="InspectionJobDetailApi.getInspectionJobDetailPage"
:apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false" :detailButtonIsShow="true"
:apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true"
/>
<!-- 包装信息 -->
<ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobPackage.allSchemas" :detailAllSchemasRules="InspectionJobPackageRules"
:list="list" />
<ListTable
ref="listTableRef"
titleName="包装信息"
:allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobPackage.allSchemas"
:detailAllSchemasRules="InspectionJobPackageRules"
:list="list"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage,InspectionJobPackageRules} from './inspectionJobMain.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
import download from '@/utils/download'
import {
InspectionJobMain,
InspectionJobMainRules,
InspectionJobDetail,
InspectionJobDetailRules,
InspectionJobPackage,
InspectionJobPackageRules
} from './inspectionJobMain.data'
import {
InspectionTemplateMain,
InspectionTemplateProcess,
InspectionTemplateFeatures,
InspectionTemplateRules
} from '../inspectionTemplate/inspectionTemplate.data'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
//
defineOptions({ name: 'InspectionJobMain' })
//
defineOptions({ name: 'InspectionJobMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns)
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => {
if (type == 'tableForm') {
//
@ -102,9 +143,9 @@
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => {
const setV = {}
// if(formField == 'itemCode'){
@ -117,111 +158,150 @@
// }
formRef.setValues(setV)
})
}
}
//
const Echo = []
const { tableObject, tableMethods } = useTable({
//
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: InspectionJobMainApi.getInspectionJobMainPage //
})
})
//
const { getList, setSearchParams } = tableMethods
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
//
const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
defaultButtons.defaultSetBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
//
const buttonBaseClick = (val, item) => {
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
}
//
const isShowMainButton = (row, val) => {
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
}
//
const isShowMainButton2 = (row, val) => {
//
const isShowMainButton2 = (row, val) => {
if (val.indexOf(row.isStaging) > -1) {
return false
} else {
return true
}
}
}
// -
const butttondata = (row) => {
// -
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.mainListJobAccBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:accept'
}), //
defaultButtons.mainListJobCloBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:close'
}), //
defaultButtons.mainListJobAbaBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-job-main:abandon'
}), //
defaultButtons.mainListJobExeBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListOrderPubBtn({
hide: isShowMainButton2(row, ['TRUE']),
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListPackageBtn(null), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) //
]
}
}
const listTableRef = ref()
const list = ref([])
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') {
//
execute('execute', row)
}else if (val == 'mainPackage') { //
} else if (val == 'mainPackage') {
//
list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
// row.status = '1'
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns)
}else if (val == 'mainJobAba') { //
listTableRef.value.openPackage(row, '包装信息', InspectionJobPackage.allSchemas.tableColumns)
} else if (val == 'mainJobAba') {
//
handleAbandon(row.id)
} else if (val == 'mainJobClo') { //
} else if (val == 'mainJobClo') {
//
handleClose(row.id)
} else if (val == 'mainOrderPub') { //
} else if (val == 'mainOrderPub') {
//
handleRelease(row.id)
} else if (val == 'mainJobAcc') { //
} else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
} else if (val == 'mainJobAcc') {
//
handleAccept(row.id)
}
}
}
/** 添加/修改操作 */
// const formRef = ref()
// const openForm = async (type : string, row ?: number) => {
// tableData.value = [] //
// formRef.value.open(type, row)
// }
//
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
/** 添加/修改操作 */
// const formRef = ref()
// 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')
}
//
}
//
const formRef = ref()
const execute = async (type : string, row ?: number) => {
const formRef = ref()
const execute = async (type: string, row?: number) => {
formRef.value.open(type, row)
}
/** 关闭按钮操作 */
const handleClose = async (id : number) => {
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
//
await message.confirm(t('common.confirmColse'))
@ -230,10 +310,10 @@ const list = ref([])
message.success(t('common.closeSuccess'))
//
await getList()
} catch { }
}
/** 发布按钮操作 */
const handleRelease = async (id : number) => {
} catch {}
}
/** 发布按钮操作 */
const handleRelease = async (id: number) => {
try {
//
await message.confirm('确认发布吗?')
@ -242,10 +322,10 @@ const list = ref([])
message.success('发布成功!')
//
await getList()
} catch { }
}
//
const handleAccept = async (id : number) => {
} catch {}
}
//
const handleAccept = async (id: number) => {
try {
//
await message.confirm(t('common.confirmAccept'))
@ -254,10 +334,10 @@ const list = ref([])
message.success(t('common.acceptSuccess'))
//
await getList()
} catch { }
}
//
const handleAbandon = async (id : number) => {
} catch {}
}
//
const handleAbandon = async (id: number) => {
try {
//
await message.confirm(t('common.confirmGiveup'))
@ -266,12 +346,12 @@ const list = ref([])
message.success(t('common.giveupSuccess'))
//
await getList()
} catch { }
}
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
@ -283,26 +363,25 @@ const list = ref([])
} finally {
exportLoading.value = false
}
}
}
/**
/**
* tableForm方法
*/
const tableFormKeys = {}
InspectionJobDetail.allSchemas.tableFormColumns.forEach(item => {
const tableFormKeys = {}
InspectionJobDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
})
const tableData = ref([])
//
const submitForm = async (formType, data) => {
//
const submitForm = async (formType, data) => {
// return
try {
if (formType === 'create') {
await InspectionJobMainApi.createInspectionJobMain(data)
message.success(t('common.createSuccess'))
} else if(formType === 'execute') {
} else if (formType === 'execute') {
await InspectionJobMainApi.executeInspectionJobMain(data)
message.success(t('common.updateSuccess'))
}
@ -312,27 +391,26 @@ const list = ref([])
} finally {
formRef.value.formLoading = false
}
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
}
//
const searchFormClick = (searchData) => {
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
}
/** 初始化 **/
onMounted(async () => {
/** 初始化 **/
onMounted(async () => {
getList()
// importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate()
})
})
</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 { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime'
import { validateTwoNum,validateSixNum} from '@/utils/validator'
import { validateTwoNum, validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const resultEntryMethodList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)
const featureTypeList = getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )
const isCanUpdateList = [{
label:'是',
value:true
},{
label:'否',
value:false
}]
const featureTypeList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE)
const isCanUpdateList = [
{
label: '是',
value: true
},
{
label: '否',
value: false
}
]
/**
* @returns {Array}
*/
export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
export const InspectionJobMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
@ -40,28 +44,43 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
width: 200
}
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
width: 175
}
},{
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
@ -70,10 +89,10 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 175
},
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
}
},
},
{
label: '物料编码',
@ -84,10 +103,10 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
}
},
},
{
label: '物料名称',
@ -98,10 +117,10 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 175
},
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
}
},
},
{
label: '物料批次',
@ -109,8 +128,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: false,
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
@ -123,8 +142,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: false,
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
@ -139,8 +158,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
value: 0,
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
@ -153,8 +172,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: false,
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
@ -169,8 +188,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
value: 0,
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
@ -183,8 +202,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: false,
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
@ -197,8 +216,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: false,
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
@ -211,8 +230,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: false,
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
@ -242,8 +261,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Select',
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
@ -274,8 +293,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
value: 0,
componentProps:{
disabled:true
componentProps: {
disabled: true
}
},
table: {
@ -289,9 +308,9 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false,
dictType: DICT_TYPE.INSPECTION_SEVERITY,
dictClass: 'string',
form:{
componentProps:{
disabled:true
form: {
componentProps: {
disabled: true
}
},
table: {
@ -317,7 +336,7 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
valueFormat: 'x',
disabled:true
disabled: true
}
},
detail: {
@ -346,7 +365,7 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
valueFormat: 'x',
disabled:true
disabled: true
}
},
detail: {
@ -363,9 +382,9 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false,
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
form:{
componentProps:{
disabled:true
form: {
componentProps: {
disabled: true
}
},
table: {
@ -379,9 +398,9 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false,
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
form:{
componentProps:{
disabled:true
form: {
componentProps: {
disabled: true
}
},
table: {
@ -429,7 +448,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right'
}
}
]))
])
)
//表单校验
export const InspectionJobMainRules = reactive({
@ -439,24 +459,25 @@ export const InspectionJobMainRules = reactive({
/**
* @returns {Array}
*/
export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
export const InspectionJobDetail = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
isSearch: true
},
{
label: '检验方案模板编码',
field: 'inspectionCode',
sort: 'custom',
isSearch: true,
isSearch: true
},
{
label: '描述',
field: 'processDescribe',
sort: 'custom',
isSearch: true,
isSearch: true
},
{
label: '顺序号',
@ -466,43 +487,48 @@ export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
value: 0
},
}
},
{
label: '检验特性编号',
field: 'inspectionCharCode',
sort: 'custom',
isSearch: true,
isSearch: true
},
{
label: '检验特性编码',
field: 'inspectionJobCharacteristicsRespVO.number',
sort: 'custom',
sort: 'custom'
},
{
label: '检验特性描述',
field: 'inspectionJobCharacteristicsRespVO.description',
sort: 'custom',
},{
sort: 'custom'
},
{
label: '检验方法',
field: 'inspectionJobCharacteristicsRespVO.inspectionMethodCode',
sort: 'custom',
},{
sort: 'custom'
},
{
label: '采样过程编码',
field: 'inspectionJobCharacteristicsRespVO.samplingProcessCode',
sort: 'custom',
},{
sort: 'custom'
},
{
label: '动态修改规则编码',
field: 'inspectionJobCharacteristicsRespVO.dynamicUpdateCode',
sort: 'custom',
},{
sort: 'custom'
},
{
label: '是否允许修改特征值',
field: 'inspectionJobCharacteristicsRespVO.isCanUpdate',
sort: 'custom',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return isCanUpdateList.find((account) => account.value == cellValue)?.label
}
},
},{
{
label: '结果录入方式',
field: 'inspectionJobCharacteristicsRespVO.resultEntryMethod',
sort: 'custom',
@ -510,38 +536,41 @@ export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
// dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return resultEntryMethodList.find((account) => account.value == cellValue)?.label
}
},
},{
{
label: '特征类型',
field: 'inspectionJobCharacteristicsRespVO.featureType',
sort: 'custom',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return featureTypeList.find((account) => account.value == cellValue)?.label
},
}
]))
}
])
)
//表单校验
export const InspectionJobDetailRules = reactive({
taskCode: [required],
processCode: [required],
sequenceCode: [required],
available: [required],
available: [required]
})
/**
* @returns {Array}
*/
export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
export const InspectionJobPackage = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
tableForm: {
disabled: true
},
table:{
width:200
table: {
width: 200
}
},
{
@ -549,11 +578,11 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
tableForm: {
disabled: true
},
table:{
width:200
table: {
width: 200
}
},
{
@ -561,11 +590,11 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
tableForm: {
disabled: true
},
table:{
width:180
table: {
width: 180
}
},
{
@ -577,11 +606,11 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber',
value: 0
},
tableForm:{
disabled:true
tableForm: {
disabled: true
},
table:{
width:150
table: {
width: 150
}
},
{
@ -589,11 +618,11 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
tableForm: {
disabled: true
},
table:{
width:150
table: {
width: 150
}
},
{
@ -601,14 +630,14 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'sampleAmount',
sort: 'custom',
isSearch: true,
isTable:false,
table:{
width:150,
isTable: false,
table: {
width: 150
}
},
]))
}
])
)
//表单校验
export const InspectionJobPackageRules = reactive({
sampleAmount: [required,
{ validator:validateSixNum, trigger: 'blur'}]
sampleAmount: [required, { 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 { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime'
import {validateTwoNum,validateSixNum } from '@/utils/validator'
import { validateTwoNum, validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
* @returns {Array}
*/
export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
export const InspectionRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '记录编码',
field: 'number',
sort: 'custom',
isSearch: true,
isForm:false,
isForm: false,
table: {
width: 200,
fixed: 'left'
@ -25,7 +26,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'requestNumber',
sort: 'custom',
isSearch: true,
isForm:false,
isForm: false,
table: {
width: 200
}
@ -35,71 +36,86 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'jobNumber',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 200
}
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 200
}
},{
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 200
},
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
}
},
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 150
},
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
}
},
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 200
},
form: {
componentProps:{
disabled:true
componentProps: {
disabled: true
}
}
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 150
}
@ -109,7 +125,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionSchemeCode',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 200
}
@ -119,7 +135,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 150
}
@ -129,7 +145,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 150
}
@ -150,7 +166,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.INSPECTION_TYPE,
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
form: {
component: 'Select'
},
@ -163,7 +179,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 150
}
@ -173,7 +189,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
@ -187,7 +203,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 150
}
@ -198,7 +214,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
@ -212,7 +228,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionStage',
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
@ -227,7 +243,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.INSPECTION_SEVERITY,
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 150
}
@ -238,7 +254,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm:false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@ -267,7 +283,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm:false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@ -296,7 +312,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm:false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@ -325,7 +341,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm:false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@ -354,7 +370,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.INSPECTION_LEVEL,
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 150
}
@ -365,7 +381,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.BASIC_AQL,
sort: 'custom',
isSearch: false,
isForm:false,
isForm: false,
table: {
width: 150
}
@ -379,7 +395,6 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
}
},
{
label: '创建时间',
@ -414,7 +429,8 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right'
}
}
]))
])
)
//表单校验
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 * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import { validateInteger,validateTwoNum } from '@/utils/validator'
import { validateInteger, validateTwoNum } from '@/utils/validator'
// 表单校验
export const InspectionMainRules = reactive({
requestStartTime: [required],
itemCode: [required],
requestEndTime: [required],
batch: [required,{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}],
requestInspectionNum: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}],
referenceCertificateRow: [{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}],
batch: [required, { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }],
requestInspectionNum: [
required,
{ validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }
],
referenceCertificateRow: [
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
inspectionType: [required],
minPackageQty: [required],
minPackageQty: [required]
})
export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
export const InspectionMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '申请编码',
field: 'number',
@ -28,12 +34,27 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 200,
fixed: 'left'
},
form:{
componentProps:{
disabled:true
form: {
componentProps: {
disabled: true
}
}
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '申请日期',
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')]
}
},
isForm:false,
isForm: false,
form: {
component: 'DatePicker',
componentProps: {
@ -61,7 +82,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
},
detail: {
dateFormat: 'YYYY-MM-DD'
},
}
},
{
label: '申请时间',
@ -77,7 +98,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm:false,
isForm: false,
form: {
component: 'DatePicker',
componentProps: {
@ -184,19 +205,21 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 175
},
form:{
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
multiple:false,
searchCondition: [{
multiple: false,
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
]
}
}
},
@ -208,9 +231,9 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 175
},
form:{
form: {
componentProps: {
disabled:true
disabled: true
}
}
},
@ -222,19 +245,21 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
form:{
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法
multiple:false,
searchCondition: [{
multiple: false,
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
]
}
}
},
@ -246,9 +271,9 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
form:{
form: {
componentProps: {
disabled:true
disabled: true
}
}
},
@ -322,8 +347,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string',
form: {
componentProps: {
}
componentProps: {}
},
table: {
width: 175
@ -341,7 +365,8 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
}
}, {
},
{
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
@ -350,8 +375,9 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
}, {
isSearch: true
},
{
label: 'aql',
field: 'aql',
sort: 'custom',
@ -360,7 +386,8 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
}
}, {
},
{
label: '操作',
field: 'action',
isForm: false,
@ -369,32 +396,34 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right'
}
}
]))
])
)
// 表单校验
export const InspectionRequestPackageRules = reactive({
// packageCode: [required],
// packageSpecificationCode: [required],
amount: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}],
measuringUnit: [required],
amount: [required, { validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }],
measuringUnit: [required]
})
/**
* @returns {Array}
*/
export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
export const InspectionRequestPackage = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
tableForm: {
disabled: true
},
isTableForm:false,
form:{
componentProps:{
disabled:true
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
@ -403,18 +432,18 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
},
tableForm: {
disabled: false
}
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
},
tableForm: {
disabled: false
}
},
{
label: '数量',
@ -425,20 +454,21 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber',
value: 0
},
tableForm:{
disabled:false
},
tableForm: {
disabled: false
}
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
tableForm: {
disabled: false
},
table:{
width:150
table: {
width: 150
}
}
]))
])
)

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

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