Browse Source

BUG修改

hella_online_20240829
parent
commit
1c62982934
  1. 5
      src/api/qms/inspectionScheme/index.ts
  2. 7
      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

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

@ -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' })

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

@ -1,7 +1,5 @@
import request from '@/config/axios'
// 列表
export const getListByTempleteCode = async (code) => {
return await request.get({ url: `/qms/inspection-process/getListByTempleteCode?code=` + code })
@ -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