Browse Source

BUG修改

hella_online_20240829
parent
commit
1c62982934
  1. 13
      src/api/qms/inspectionScheme/index.ts
  2. 17
      src/api/qms/inspectionTemplate/index.ts
  3. 2
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  4. 2
      src/views/qms/inspectionQ3/inspectionQ3.data.ts
  5. 19
      src/views/qms/inspectionScheme/index.vue
  6. 18
      src/views/qms/inspectionTemplate/index.vue
  7. 2
      src/views/qms/selectedSet/index.vue

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

@ -1,21 +1,21 @@
import request from '@/config/axios'
// 新增
export const InspectionSchemeCreat = async (data) => {
return await request.post({ url: `/qms/inspection-scheme/create`,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})
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})
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}
const data = { ...params }
return request.post({ url: '/qms/inspection-scheme/senior', data })
} else {
return await request.get({ url: `/qms/inspection-scheme/page`, params })
@ -31,6 +31,11 @@ export const disableInspectionScheme = async (id: number) => {
return await request.disable({ url: `/qms/inspection-scheme/disable?id=` + id })
}
// 导出检验阶段 Excel
export const exportInspectionScheme = async (params) => {
return await request.download({ url: `/qms/inspection-scheme/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/inspection-scheme/get-import-template' })

17
src/api/qms/inspectionTemplate/index.ts

@ -1,28 +1,26 @@
import request from '@/config/axios'
// 列表
export const getListByTempleteCode = async (code) => {
return await request.get({ url: `/qms/inspection-process/getListByTempleteCode?code=`+code})
return await request.get({ url: `/qms/inspection-process/getListByTempleteCode?code=` + code })
}
// 新增
export const inspectionTemplateCreat = async (data) => {
return await request.post({ url: `/qms/programme-template/create`,data})
return await request.post({ url: `/qms/programme-template/create`, data })
}
// 编辑
export const inspectionTemplateUpdate = async (data) => {
return await request.put({ url: `/qms/programme-template/update`,data})
return await request.put({ url: `/qms/programme-template/update`, data })
}
// 删除
export const inspectionTemplateDelete = async (id) => {
return await request.delete({ url: `/qms/programme-template/delete?id=`+id})
return await request.delete({ url: `/qms/programme-template/delete?id=` + id })
}
// 列表
export const inspectionTemplatePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const data = { ...params }
return request.post({ url: '/qms/programme-template/senior', data })
} else {
return await request.get({ url: `/qms/programme-template/page`, params })
@ -38,6 +36,11 @@ export const disableInspectionTemplate = async (id: number) => {
return await request.disable({ url: `/qms/programme-template/disable?id=` + id })
}
// 导出检验模版 Excel
export const exportInspectionTemplate = async (params) => {
return await request.download({ url: `/qms/programme-template/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/programme-template/get-import-template' })

2
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -50,7 +50,7 @@ export const Q2 = useCrudSchemas(
}
},
{
label: 'q1通知单号',
label: 'Q1通知单号',
field: 'q1Number',
sort: 'custom',
table: {

2
src/views/qms/inspectionQ3/inspectionQ3.data.ts

@ -44,7 +44,7 @@ export const Q3 = useCrudSchemas(
}
},
{
label: 'q1通知单号',
label: 'Q1通知单号',
field: 'q1Number',
sort: 'custom',
table: {

19
src/views/qms/inspectionScheme/index.vue

@ -59,6 +59,7 @@
</template>
<script setup lang="ts">
import download from '@/utils/download'
import {InspectionSchemeMain } from './inspectionScheme.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
@ -96,7 +97,7 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'qms:inspection-scheme:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'qms:inspection-scheme:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:agv-locationrelation:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'qms:inspection-scheme:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -244,6 +245,22 @@ const handleDisable = async (id: number) => {
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InspectionSchemeApi.exportInspectionScheme(tableObject.params)
download.excel(data, '检验方案.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {

18
src/views/qms/inspectionTemplate/index.vue

@ -103,7 +103,7 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'qms:programme-template:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'qms:programme-template:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:agv-locationrelation:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'qms:programme-template:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -133,6 +133,22 @@ const buttonBaseClick = (val, item) => {
}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InspectionProcessPageApi.exportInspectionTemplate(tableObject.params)
download.excel(data, '检验模板.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
const isShowMainButton = (row,val) => {
if (val.indexOf(row.available) > -1) {
return false

2
src/views/qms/selectedSet/index.vue

@ -147,7 +147,7 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'qms:selected-set:query'}), //
defaultButtons.defaultImportBtn({hasPermi:'qms:selected-set:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'qms:selected-set:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'qms:selected-set:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //

Loading…
Cancel
Save