Browse Source

BUG修改

hella_online_20240829
parent
commit
0a77c3fc1a
  1. 152
      src/views/qms/inspectionJob/index.vue
  2. 99
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  3. 30
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
  4. 74
      src/views/qms/inspectionRequest/inspectionRequestMain.data.ts
  5. 378
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

152
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"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{ row }"> <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,25 +60,46 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<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'
@ -69,6 +109,7 @@
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' })
@ -132,21 +173,27 @@
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)
} }
} }
@ -172,36 +219,69 @@
// - // -
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 showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 添加/修改操作 */ /** 添加/修改操作 */
// const formRef = ref() // const formRef = ref()
// const openForm = async (type : string, row ?: number) => { // const openForm = async (type : string, row ?: number) => {
@ -289,12 +369,11 @@ const list = ref([])
* 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
@ -320,7 +399,6 @@ const list = ref([])
importFormRef.value.open() importFormRef.value.open()
} }
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {

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

@ -7,18 +7,22 @@ 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: '是', label: '是',
value: true value: true
},{ },
{
label: '否', label: '否',
value: false value: false
}] }
]
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionJobMain = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '编码', label: '编码',
field: 'number', field: 'number',
@ -48,6 +52,20 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 200 width: 200
} }
}, },
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{ {
label: '供应商编码', label: '供应商编码',
field: 'supplierCode', field: 'supplierCode',
@ -61,7 +79,8 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 175 width: 175
} }
},{ },
{
label: '供应商名称', label: '供应商名称',
field: 'supplierName', field: 'supplierName',
sort: 'custom', sort: 'custom',
@ -73,7 +92,7 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
}, }
}, },
{ {
label: '物料编码', label: '物料编码',
@ -87,7 +106,7 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
}, }
}, },
{ {
label: '物料名称', label: '物料名称',
@ -101,7 +120,7 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
}, }
}, },
{ {
label: '物料批次', label: '物料批次',
@ -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,28 +536,31 @@ 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',
@ -603,12 +632,12 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
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'}]
}) })

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

@ -8,7 +8,8 @@ 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',
@ -40,6 +41,20 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 200 width: 200
} }
}, },
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{ {
label: '供应商编码', label: '供应商编码',
field: 'supplierCode', field: 'supplierCode',
@ -49,7 +64,8 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 200 width: 200
} }
},{ },
{
label: '供应商名称', label: '供应商名称',
field: 'supplierName', field: 'supplierName',
sort: 'custom', sort: 'custom',
@ -62,7 +78,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
}, }
}, },
{ {
label: '物料编码', label: '物料编码',
@ -77,7 +93,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
}, }
}, },
{ {
label: '物料名称', label: '物料名称',
@ -92,7 +108,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
}, }
}, },
{ {
label: '批次', label: '批次',
@ -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({

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

@ -12,13 +12,19 @@ export const InspectionMainRules = reactive({
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',
@ -34,6 +40,21 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{ {
label: '申请日期', label: '申请日期',
field: 'applicationDate', field: 'applicationDate',
@ -61,7 +82,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
detail: { detail: {
dateFormat: 'YYYY-MM-DD' dateFormat: 'YYYY-MM-DD'
}, }
}, },
{ {
label: '申请时间', label: '申请时间',
@ -192,11 +213,13 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
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
}] }
]
} }
} }
}, },
@ -230,11 +253,13 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
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
}] }
]
} }
} }
}, },
@ -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,20 +396,22 @@ 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',
@ -405,7 +434,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm: { tableForm: {
disabled: false disabled: false
}, }
}, },
{ {
label: '包装规格', label: '包装规格',
@ -414,7 +443,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
tableForm: { tableForm: {
disabled: false disabled: false
}, }
}, },
{ {
label: '数量', label: '数量',
@ -427,7 +456,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
}, },
tableForm: { tableForm: {
disabled: false disabled: false
}, }
}, },
{ {
label: '计量单位', label: '计量单位',
@ -441,4 +470,5 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
} }
} }
])) ])
)

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

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