Browse Source

计数器修改下一阶段

hella_online_20240829
zhaoyiran 4 months ago
parent
commit
1a32a447f8
  1. 4
      src/api/qms/counter/index.ts
  2. 37
      src/views/qms/counter/counter.data.ts
  3. 10
      src/views/qms/counter/index.vue

4
src/api/qms/counter/index.ts

@ -60,3 +60,7 @@ export const exportCounter = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/qms/counter/get-import-template' })
}
export const getNextStage = async (id:number) => {
return await request.get({ url: `/qms/counter/getNextStage?id=` + id})
}

37
src/views/qms/counter/counter.data.ts

@ -21,6 +21,7 @@ export const Counter = useCrudSchemas(
sort: 'custom',
isSearch: true,
fixed: 'left',
isForm: false,
table: {
fixed: 'left',
width: 175
@ -32,6 +33,7 @@ export const Counter = useCrudSchemas(
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.INSPECTION_TYPE,
isForm: false,
table: {
width: 175
}
@ -41,6 +43,7 @@ export const Counter = useCrudSchemas(
field: 'supplierCode',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 175
}
@ -50,6 +53,7 @@ export const Counter = useCrudSchemas(
field: 'qualifiedTimes',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 140
}
@ -59,6 +63,7 @@ export const Counter = useCrudSchemas(
field: 'lastQualifiedBatch',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 140
}
@ -69,6 +74,7 @@ export const Counter = useCrudSchemas(
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@ -93,6 +99,7 @@ export const Counter = useCrudSchemas(
field: 'unqualifiedTimes',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
@ -106,6 +113,7 @@ export const Counter = useCrudSchemas(
field: 'lastUnqualifiedBatch',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
@ -120,6 +128,7 @@ export const Counter = useCrudSchemas(
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@ -144,6 +153,16 @@ export const Counter = useCrudSchemas(
field: 'nextStage',
sort: 'custom',
isSearch: false,
form:{
component: 'Select',
componentProps: {
options:[],
optionsAlias: {
labelField: 'stage',
valueField: 'stage'
}
}
},
table: {
width: 140
}
@ -213,14 +232,14 @@ export const Counter = useCrudSchemas(
}
},
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
])
)

10
src/views/qms/counter/index.vue

@ -134,7 +134,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'qms:counter:update'}), //
defaultButtons.mainListEditBtn({hasPermi:'qms:counter:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'qms:counter:delete'}), //
]
@ -149,7 +149,13 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
const openForm = async (type: string, row?: any) => {
for (const item of Counter.allSchemas.formSchema) {
if (item.field === 'nextStage') {
item.componentProps.options = await CounterApi.getNextStage(row.id)
}
}
basicFormRef.value.open(type, row)
}

Loading…
Cancel
Save