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>
<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">
}"
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,25 +60,46 @@
/>
<!-- 详情 -->
<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 {
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'
@ -69,6 +109,7 @@
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' })
@ -132,21 +173,27 @@
const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
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)
}
}
@ -172,36 +219,69 @@
// -
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') { //
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') { //
} 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 showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 添加/修改操作 */
// const formRef = ref()
// const openForm = async (type : string, row ?: number) => {
@ -289,12 +369,11 @@ const list = ref([])
* tableForm方法
*/
const tableFormKeys = {}
InspectionJobDetail.allSchemas.tableFormColumns.forEach(item => {
InspectionJobDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const submitForm = async (formType, data) => {
// return
@ -320,7 +399,6 @@ const list = ref([])
importFormRef.value.open()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {

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

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

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

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

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

@ -12,13 +12,19 @@ export const InspectionMainRules = reactive({
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'}],
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',
@ -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: '申请日期',
field: 'applicationDate',
@ -61,7 +82,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
},
detail: {
dateFormat: 'YYYY-MM-DD'
},
}
},
{
label: '申请时间',
@ -192,11 +213,13 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
multiple: false,
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
]
}
}
},
@ -230,11 +253,13 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段
searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法
multiple: false,
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
]
}
}
},
@ -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,20 +396,22 @@ 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],
measuringUnit: [required]
})
/**
* @returns {Array}
*/
export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
export const InspectionRequestPackage = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
@ -405,7 +434,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm: {
disabled: false
},
}
},
{
label: '包装规格',
@ -414,7 +443,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
tableForm: {
disabled: false
},
}
},
{
label: '数量',
@ -427,7 +456,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm: {
disabled: false
},
}
},
{
label: '计量单位',
@ -441,4 +470,5 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
}
}
]))
])
)

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

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