Browse Source

BUG修改

master_hella_20240701
parent
commit
c63ba68cd9
  1. 23
      src/api/qms/inspectionPlan/index.ts
  2. 23
      src/api/qms/inspectionScheme/index.ts
  3. 0
      src/views/qms/basicDataManage/inspectionScheme/addForm.vue
  4. 24
      src/views/qms/basicDataManage/inspectionScheme/index.vue
  5. 2
      src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts

23
src/api/qms/inspectionPlan/index.ts

@ -1,23 +0,0 @@
import request from '@/config/axios'
// 新增
export const inspectionPlanCreat = async (data) => {
return await request.post({ url: `/qms/type-template/create`,data})
}
// 编辑
export const inspectionPlanUpdate = async (data) => {
return await request.put({ url: `/qms/type-template/update`,data})
}
// 删除
export const inspectionPlanDelete = async (id) => {
return await request.delete({ url: `/qms/type-template/delete?id=`+id})
}
// 列表
export const inspectionPlanPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/qms/type-template/senior', data })
} else {
return await request.get({ url: `/qms/type-template/page`, params })
}
}

23
src/api/qms/inspectionScheme/index.ts

@ -0,0 +1,23 @@
import request from '@/config/axios'
// 新增
export const InspectionSchemeCreat = async (data) => {
return await request.post({ url: `/qms/inspection-scheme/create`,data})
}
// 编辑
export const InspectionSchemeUpdate = async (data) => {
return await request.put({ url: `/qms/inspection-scheme/update`,data})
}
// 删除
export const InspectionSchemeDelete = async (id) => {
return await request.delete({ url: `/qms/inspection-scheme/delete?id=`+id})
}
// 列表
export const InspectionSchemePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/qms/inspection-scheme/senior', data })
} else {
return await request.get({ url: `/qms/inspection-scheme/page`, params })
}
}

0
src/views/qms/basicDataManage/inspectionPlan/addForm.vue → src/views/qms/basicDataManage/inspectionScheme/addForm.vue

24
src/views/qms/basicDataManage/inspectionPlan/index.vue → src/views/qms/basicDataManage/inspectionScheme/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionPlanMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="InspectionSchemeMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -11,7 +11,7 @@
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionPlanMain.allSchemas"
:allSchemas="InspectionSchemeMain.allSchemas"
/>
<!-- 列表 -->
@ -52,16 +52,16 @@
</template>
<script setup lang="ts">
import {InspectionPlanMain } from './inspectionPlan.data'
import {InspectionSchemeMain } from './inspectionScheme.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import AddForm from './addForm.vue'
import * as InspectionPlanApi from '@/api/qms/inspectionPlan'
import * as InspectionSchemeApi from '@/api/qms/inspectionScheme'
defineOptions({ name: 'AgvLocationrelation' })
defineOptions({ name: 'InspectionScheme' })
const message = useMessage() //
const { t } = useI18n() //
@ -69,7 +69,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionPlanMain.allSchemas.tableColumns)
const tableColumns = ref(InspectionSchemeMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
@ -77,7 +77,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: InspectionPlanApi.inspectionPlanPage //
getListApi: InspectionSchemeApi.InspectionSchemePage //
})
//
@ -143,7 +143,7 @@ const openForm = (type: string, row?: any) => {
// form
const submitForm = async (formType,data) => {
var isHave =InspectionPlanMain.allSchemas.formSchema.some(function (item) {
var isHave =InspectionSchemeMain.allSchemas.formSchema.some(function (item) {
return item.field === 'effectiveDate' || item.field === 'expirationDate';
});
if(isHave){
@ -170,10 +170,10 @@ const submitForm = async (formType,data) => {
content:JSON.stringify(data.process)
}
if (formType === 'create') {
await InspectionPlanApi.inspectionPlanCreat(data1)
await InspectionSchemeApi.inspectionSchemeCreat(data1)
message.success(t('common.createSuccess'))
} else {
await InspectionPlanApi.inspectionPlanUpdate(data1)
await InspectionSchemeApi.inspectionSchemeUpdate(data1)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
@ -192,7 +192,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await InspectionPlanApi.inspectionPlanDelete(id)
await InspectionSchemeApi.inspectionSchemeDelete(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -214,4 +214,4 @@ onMounted(async () => {
getList()
})
</script>
</script>

2
src/views/qms/basicDataManage/inspectionPlan/inspectionPlan.data.ts → src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts

@ -68,7 +68,7 @@ export const InspectionTemplateRules = reactive({
{ required: true, message: '请输入选择集编码', trigger: 'blur' }
],
})
export const InspectionPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
Loading…
Cancel
Save