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. 22
      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

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

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

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