Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
7edae16945
  1. 5
      src/api/qms/inspectionScheme/index.ts
  2. 22
      src/views/qms/inspectionScheme/index.vue

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

@ -30,3 +30,8 @@ export const enableInspectionScheme = async (id: number) => {
export const disableInspectionScheme = async (id: number) => {
return await request.disable({ url: `/qms/inspection-scheme/disable?id=` + id })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/inspection-scheme/get-import-template' })
}

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

@ -49,6 +49,8 @@
@submitForm="submitForm"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/qms/inspection-scheme/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -60,6 +62,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import AddForm from './addForm.vue'
import * as InspectionSchemeApi from '@/api/qms/inspectionScheme'
import ImportForm from "../../../components/ImportForm/src/ImportForm.vue";
import * as SampleCodeApi from "@/api/qms/sampleCode";
defineOptions({ name: 'InspectionScheme' })
@ -86,7 +90,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'qms:type-template:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:agv-locationrelation:import'}), //
defaultButtons.defaultImportBtn({hasPermi:'qms:inspection-scheme:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:agv-locationrelation:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -240,9 +244,25 @@ const searchFormClick = (searchData) => {
getList() //
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '检验方案导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await InspectionSchemeApi.importTemplate()
})
</script>

Loading…
Cancel
Save