feat: 新增多模块导入导出入口
- 反馈登记:新增导入按钮
- 售后处理:补导出按钮
- 临期售后管理:新增导入、导出
- 入库管理:新增导入
- 出库台账:新增导入
- 库存管理:新增导入出库
- 产品维护:新增导出
| | |
| | | plain> |
| | | å é¤ |
| | | </el-button> |
| | | <el-button @click="handleExportModels" |
| | | style="margin-left: 10px"> |
| | | å¯¼åº |
| | | </el-button> |
| | | </div> |
| | | <PIMTable rowKey="id" |
| | | :column="tableColumn" |
| | |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | // 导åºå½å产åçè§æ ¼åå· |
| | | const handleExportModels = () => { |
| | | if (!currentId.value) { |
| | | proxy.$modal.msgWarning("请å
éæ©äº§å"); |
| | | return; |
| | | } |
| | | proxy.download( |
| | | "/basic/product/exportModel", |
| | | { id: currentId.value }, |
| | | "产åè§æ ¼åå·.xlsx" |
| | | ); |
| | | }; |
| | | |
| | | const debounce = (fn, delay = 300) => { |
| | | let timer; |
| | | return (...args) => { |
| | |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_header" style="display: flex; justify-content: flex-end; padding-bottom: 10px;"> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | </div> |
| | | <div class="table_list"> |
| | | <PIMTable |
| | | rowKey="id" |
| | |
| | | >éç½®</el-button |
| | | > |
| | | </div> |
| | | <div class="table_actions"> |
| | | <el-button type="primary" @click="openForm('add')">æ°å¢</el-button> |
| | | <el-button type="danger" @click="handleDelete">å é¤</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="table_header" style="display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding-bottom: 10px;"> |
| | | <el-button type="primary" @click="openForm('add')">æ°å¢</el-button> |
| | | <el-button type="info" plain icon="Upload" @click="handleImport">导å
¥</el-button> |
| | | <el-button @click="handleExport">导åº</el-button> |
| | | <el-button type="danger" @click="handleDelete">å é¤</el-button> |
| | | </div> |
| | | |
| | | <div class="table_list"> |
| | |
| | | </PIMTable> |
| | | </div> |
| | | <form-dia ref="formDia" @close="handleQuery"></form-dia> |
| | | <!-- 临æå®å导å
¥å¯¹è¯æ¡ --> |
| | | <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body> |
| | | <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url" |
| | | :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" |
| | | :on-error="handleFileError" :auto-upload="false" drag> |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | <template #tip> |
| | | <div class="el-upload__tip text-center"> |
| | | <span>ä»
å
许导å
¥ xlsãxlsx æ ¼å¼æä»¶ã</span> |
| | | <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" |
| | | @click="importTemplate">ä¸è½½æ¨¡æ¿</el-link> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFileForm">ç¡® å®</el-button> |
| | | <el-button @click="upload.open = false">å æ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import {ElMessageBox} from "element-plus"; |
| | | import {expiryAfterSalesDelete, expiryAfterSalesListPage} from "@/api/customerService/index.js"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore() |
| | | |
| | |
| | | }); |
| | | }; |
| | | |
| | | // å¯¼åº |
| | | const handleExport = () => { |
| | | ElMessageBox.confirm("æ¯å¦ç¡®è®¤å¯¼åºå
¨é¨ä¸´æå®åæ°æ®ï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(() => { |
| | | proxy.download("/afterSalesNearExpiryService/export", {}, "临æå®å管ç.xlsx"); |
| | | }).catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | |
| | | // 导å
¥ |
| | | const uploadRef = ref(); |
| | | const upload = reactive({ |
| | | open: false, |
| | | title: "", |
| | | isUploading: false, |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | url: import.meta.env.VITE_APP_BASE_API + "/afterSalesNearExpiryService/import", |
| | | }); |
| | | const handleImport = () => { |
| | | upload.title = "临æå®å导å
¥"; |
| | | upload.open = true; |
| | | }; |
| | | const importTemplate = () => { |
| | | proxy.download("/afterSalesNearExpiryService/importTemplate", {}, "临æå®å管ç导å
¥æ¨¡æ¿.xlsx"); |
| | | }; |
| | | const submitFileForm = () => { |
| | | upload.isUploading = true; |
| | | uploadRef.value.submit(); |
| | | }; |
| | | const handleFileUploadProgress = () => { |
| | | upload.isUploading = true; |
| | | }; |
| | | const handleFileSuccess = (response) => { |
| | | upload.isUploading = false; |
| | | upload.open = false; |
| | | uploadRef.value.clearFiles(); |
| | | if (response.code === 200) { |
| | | const failCount = response.failCount || 0; |
| | | if (failCount > 0) { |
| | | const errors = Array.isArray(response.errors) ? response.errors : []; |
| | | proxy.$modal.alert(`${response.msg}\n\n${errors.join("\n")}`, "导å
¥ç»æ", { |
| | | confirmButtonText: "ç¥éäº", |
| | | }).then(() => { |
| | | getList(); |
| | | }); |
| | | } else { |
| | | proxy.$modal.msgSuccess(response.msg || "导å
¥æå"); |
| | | getList(); |
| | | } |
| | | } else { |
| | | proxy.$modal.msgError(response.msg || "导å
¥å¤±è´¥"); |
| | | } |
| | | }; |
| | | const handleFileError = () => { |
| | | upload.isUploading = false; |
| | | proxy.$modal.msgError("æä»¶ä¸ä¼ 失败"); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | |
| | | </div> |
| | | <div> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | <el-button type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="handleImport">导å
¥</el-button> |
| | | <el-button type="danger" |
| | | plain |
| | | @click="handleDelete">å é¤</el-button> |
| | |
| | | <form-dia ref="formDia" |
| | | @close="handleQuery"></form-dia> |
| | | <view-dia ref="viewDia"></view-dia> |
| | | <!-- åé¦ç»è®°å¯¼å
¥å¯¹è¯æ¡ --> |
| | | <el-dialog :title="upload.title" |
| | | v-model="upload.open" |
| | | width="400px" |
| | | append-to-body> |
| | | <el-upload ref="uploadRef" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url" |
| | | :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :on-error="handleFileError" |
| | | :auto-upload="false" |
| | | drag> |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | <template #tip> |
| | | <div class="el-upload__tip text-center"> |
| | | <span>ä»
å
许导å
¥ xlsãxlsx æ ¼å¼æä»¶ã</span> |
| | | <el-link type="primary" |
| | | :underline="false" |
| | | style="font-size: 12px; vertical-align: baseline" |
| | | @click="importTemplate">ä¸è½½æ¨¡æ¿</el-link> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" |
| | | @click="submitFileForm">ç¡® å®</el-button> |
| | | <el-button @click="upload.open = false">å æ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | getSalesLedgerDetail, |
| | | } from "@/api/customerService/index.js"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore(); |
| | | import { Document, FolderOpened, UserFilled } from "@element-plus/icons-vue"; |
| | |
| | | }; |
| | | const formDia = ref(); |
| | | const viewDia = ref(); |
| | | const uploadRef = ref(); |
| | | |
| | | // 导å
¥å¼¹çª |
| | | const upload = reactive({ |
| | | open: false, |
| | | title: "", |
| | | isUploading: false, |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | url: import.meta.env.VITE_APP_BASE_API + "/afterSalesService/import", |
| | | }); |
| | | |
| | | // åå
¸è·å |
| | | /* |
| | |
| | | }); |
| | | }; |
| | | |
| | | /** 导å
¥æé®æä½ */ |
| | | const handleImport = () => { |
| | | upload.title = "åé¦ç»è®°å¯¼å
¥"; |
| | | upload.open = true; |
| | | }; |
| | | |
| | | /** ä¸è½½æ¨¡æ¿ */ |
| | | const importTemplate = () => { |
| | | proxy.download( |
| | | "/afterSalesService/importTemplate", |
| | | {}, |
| | | "åé¦ç»è®°å¯¼å
¥æ¨¡æ¿.xlsx" |
| | | ); |
| | | }; |
| | | |
| | | /** æäº¤ä¸ä¼ æä»¶ */ |
| | | const submitFileForm = () => { |
| | | upload.isUploading = true; |
| | | uploadRef.value.submit(); |
| | | }; |
| | | |
| | | /** æä»¶ä¸ä¼ ä¸å¤ç */ |
| | | const handleFileUploadProgress = () => { |
| | | upload.isUploading = true; |
| | | }; |
| | | |
| | | /** æä»¶ä¸ä¼ æåå¤ç */ |
| | | const handleFileSuccess = response => { |
| | | upload.isUploading = false; |
| | | upload.open = false; |
| | | uploadRef.value.clearFiles(); |
| | | if (response.code === 200) { |
| | | const failCount = response.failCount || 0; |
| | | if (failCount > 0) { |
| | | const errors = Array.isArray(response.errors) ? response.errors : []; |
| | | proxy.$modal |
| | | .alert(`${response.msg}\n\n${errors.join("\n")}`, "导å
¥ç»æ", { |
| | | confirmButtonText: "ç¥éäº", |
| | | dangerouslyUseHTMLString: false, |
| | | }) |
| | | .then(() => { |
| | | getList(); |
| | | }); |
| | | } else { |
| | | proxy.$modal.msgSuccess(response.msg || "导å
¥æå"); |
| | | getList(); |
| | | } |
| | | } else { |
| | | proxy.$modal.msgError(response.msg || "导å
¥å¤±è´¥"); |
| | | } |
| | | }; |
| | | |
| | | /** æä»¶ä¸ä¼ 失败å¤ç */ |
| | | const handleFileError = () => { |
| | | upload.isUploading = false; |
| | | proxy.$modal.msgError("æä»¶ä¸ä¼ 失败"); |
| | | }; |
| | | |
| | | const getStatsCountByStatus = (list, status) => { |
| | | if (!Array.isArray(list)) return 0; |
| | | return list.find(item => item?.status === status)?.count || 0; |
| | |
| | | </div> |
| | | <div class="actions"> |
| | | <!-- <el-button type="primary" @click="handleBatchApprove">审æ¹</el-button> --> |
| | | <el-button type="info" plain icon="Upload" @click="handleImport">导å
¥</el-button> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">å é¤</el-button> |
| | | <el-button type="primary" plain @click="handlePrint">æå°</el-button> |
| | |
| | | @pagination="paginationChange" |
| | | /> |
| | | </div> |
| | | <!-- åºåºå¯¼å
¥å¯¹è¯æ¡ --> |
| | | <el-dialog :title="upload.title" |
| | | v-model="upload.open" |
| | | width="400px" |
| | | append-to-body> |
| | | <el-upload ref="uploadRef" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url" |
| | | :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :on-error="handleFileError" |
| | | :auto-upload="false" |
| | | drag> |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | <template #tip> |
| | | <div class="el-upload__tip text-center"> |
| | | <span>ä»
å
许导å
¥ xlsãxlsx æ ¼å¼æä»¶ã</span> |
| | | <el-link type="primary" |
| | | :underline="false" |
| | | style="font-size: 12px; vertical-align: baseline" |
| | | @click="importTemplate">ä¸è½½æ¨¡æ¿</el-link> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFileForm">ç¡® å®</el-button> |
| | | <el-button @click="upload.open = false">å æ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | findAllUnQualifiedStockOutRecordTypeOptions, |
| | | } from "@/api/basicData/enum.js"; |
| | | import { parseTime } from "@/utils/ruoyi"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | |
| | | const userStore = useUserStore(); |
| | | const { proxy } = getCurrentInstance(); |
| | |
| | | const seconds = String(date.getSeconds()).padStart(2, "0"); |
| | | return `${year}/${month}/${day} ${hours}:${minutes}:${seconds}`; |
| | | }; |
| | | // 导å
¥ |
| | | const uploadRef = ref(); |
| | | const upload = reactive({ |
| | | open: false, |
| | | title: "", |
| | | isUploading: false, |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | url: import.meta.env.VITE_APP_BASE_API + "/stockOutRecord/import?type=" + props.type, |
| | | }); |
| | | const handleImport = () => { |
| | | upload.title = "åºåºå¯¼å
¥"; |
| | | upload.open = true; |
| | | }; |
| | | const importTemplate = () => { |
| | | proxy.download("/stockOutRecord/importTemplate", {}, "åºåºå¯¼å
¥æ¨¡æ¿.xlsx"); |
| | | }; |
| | | const submitFileForm = () => { |
| | | upload.isUploading = true; |
| | | uploadRef.value.submit(); |
| | | }; |
| | | const handleFileUploadProgress = () => { |
| | | upload.isUploading = true; |
| | | }; |
| | | const handleFileSuccess = (response) => { |
| | | upload.isUploading = false; |
| | | upload.open = false; |
| | | uploadRef.value.clearFiles(); |
| | | if (response.code === 200) { |
| | | const failCount = response.failCount || 0; |
| | | if (failCount > 0) { |
| | | const errors = Array.isArray(response.errors) ? response.errors : []; |
| | | proxy.$modal.alert(`${response.msg}\n\n${errors.join("\n")}`, "导å
¥ç»æ", { |
| | | confirmButtonText: "ç¥éäº", |
| | | }).then(() => { |
| | | getList(); |
| | | }); |
| | | } else { |
| | | proxy.$modal.msgSuccess(response.msg || "导å
¥æå"); |
| | | getList(); |
| | | } |
| | | } else { |
| | | proxy.$modal.msgError(response.msg || "导å
¥å¤±è´¥"); |
| | | } |
| | | }; |
| | | const handleFileError = () => { |
| | | upload.isUploading = false; |
| | | proxy.$modal.msgError("æä»¶ä¸ä¼ 失败"); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | fetchStockRecordTypeOptions(); |
| | |
| | | @click="handleBatchApprove">审æ¹</el-button> |
| | | <el-button :disabled="!canReverseApprove" |
| | | @click="handleReverseApprove">å审</el-button> --> |
| | | <el-button type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="handleImport">导å
¥</el-button> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | <el-button type="danger" |
| | | plain |
| | |
| | | :limit="page.size" |
| | | @pagination="pageProductChange"/> |
| | | </div> |
| | | <!-- å
¥åºå¯¼å
¥å¯¹è¯æ¡ --> |
| | | <el-dialog :title="upload.title" |
| | | v-model="upload.open" |
| | | width="400px" |
| | | append-to-body> |
| | | <el-upload ref="uploadRef" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url" |
| | | :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :on-error="handleFileError" |
| | | :auto-upload="false" |
| | | drag> |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | <template #tip> |
| | | <div class="el-upload__tip text-center"> |
| | | <span>ä»
å
许导å
¥ xlsãxlsx æ ¼å¼æä»¶ã</span> |
| | | <el-link type="primary" |
| | | :underline="false" |
| | | style="font-size: 12px; vertical-align: baseline" |
| | | @click="importTemplate">ä¸è½½æ¨¡æ¿</el-link> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" |
| | | @click="submitFileForm">ç¡® å®</el-button> |
| | | <el-button @click="upload.open = false">å æ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | // findAllUnQualifiedStockInRecordTypeOptions, |
| | | } from "@/api/basicData/enum.js"; |
| | | import { parseTime } from "@/utils/ruoyi"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | |
| | | const {proxy} = getCurrentInstance(); |
| | | |
| | |
| | | }); |
| | | }; |
| | | |
| | | // 导å
¥ |
| | | const uploadRef = ref(); |
| | | const upload = reactive({ |
| | | open: false, |
| | | title: "", |
| | | isUploading: false, |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | url: import.meta.env.VITE_APP_BASE_API + "/stockInRecord/import?type=" + props.type, |
| | | }); |
| | | const handleImport = () => { |
| | | upload.title = "å
¥åºå¯¼å
¥"; |
| | | upload.open = true; |
| | | }; |
| | | const importTemplate = () => { |
| | | proxy.download("/stockInRecord/importTemplate", {}, "å
¥åºå¯¼å
¥æ¨¡æ¿.xlsx"); |
| | | }; |
| | | const submitFileForm = () => { |
| | | upload.isUploading = true; |
| | | uploadRef.value.submit(); |
| | | }; |
| | | const handleFileUploadProgress = () => { |
| | | upload.isUploading = true; |
| | | }; |
| | | const handleFileSuccess = (response) => { |
| | | upload.isUploading = false; |
| | | upload.open = false; |
| | | uploadRef.value.clearFiles(); |
| | | if (response.code === 200) { |
| | | const failCount = response.failCount || 0; |
| | | if (failCount > 0) { |
| | | const errors = Array.isArray(response.errors) ? response.errors : []; |
| | | proxy.$modal.alert(`${response.msg}\n\n${errors.join("\n")}`, "导å
¥ç»æ", { |
| | | confirmButtonText: "ç¥éäº", |
| | | }).then(() => { |
| | | getList(); |
| | | }); |
| | | } else { |
| | | proxy.$modal.msgSuccess(response.msg || "导å
¥æå"); |
| | | getList(); |
| | | } |
| | | } else { |
| | | proxy.$modal.msgError(response.msg || "导å
¥å¤±è´¥"); |
| | | } |
| | | }; |
| | | const handleFileError = () => { |
| | | upload.isUploading = false; |
| | | proxy.$modal.msgError("æä»¶ä¸ä¼ 失败"); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | fetchStockRecordTypeOptions(); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog v-model="isShow" title="导å
¥åºåº" @close="closeModal"> |
| | | <FileUpload |
| | | ref="fileUploadRef" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url" |
| | | :disabled="upload.isUploading" |
| | | :showTip="true" |
| | | @success="handleFileSuccess" |
| | | :downloadTemplate="downloadTemplate" |
| | | /> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFileForm">ç¡® å®</el-button> |
| | | <el-button @click="closeModal">å æ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { computed, getCurrentInstance, reactive } from "vue"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | import { FileUpload } from "@/components/Upload"; |
| | | import { ElMessage } from "element-plus"; |
| | | |
| | | defineOptions({ |
| | | name: "导å
¥åºåº", |
| | | }); |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const props = defineProps({ |
| | | visible: { |
| | | type: Boolean, |
| | | required: true, |
| | | }, |
| | | }); |
| | | |
| | | const emit = defineEmits(["update:visible", "uploadSuccess"]); |
| | | |
| | | const isShow = computed({ |
| | | get() { |
| | | return props.visible; |
| | | }, |
| | | set(val) { |
| | | emit("update:visible", val); |
| | | }, |
| | | }); |
| | | |
| | | const fileUploadRef = ref(); |
| | | const upload = reactive({ |
| | | // æ¯å¦ç¦ç¨ä¸ä¼ |
| | | isUploading: false, |
| | | // 设置ä¸ä¼ ç请æ±å¤´é¨ |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // ä¸ä¼ å°åï¼å¤ç¨åºåºå°è´¦å¯¼å
¥æ¥å£ï¼type=0 åæ ¼ï¼ï¼çæå¾
审æ¹åºåºè®°å½ï¼å¯¼å
¥æ¶ä¸æ£åºå |
| | | url: import.meta.env.VITE_APP_BASE_API + "/stockOutRecord/import?type=0", |
| | | }); |
| | | |
| | | const submitFileForm = () => { |
| | | fileUploadRef.value.uploadApi(); |
| | | }; |
| | | |
| | | const handleFileSuccess = (response) => { |
| | | const { code, msg } = response; |
| | | if (code == 200) { |
| | | const failCount = response.failCount || 0; |
| | | if (failCount > 0) { |
| | | const errors = Array.isArray(response.errors) ? response.errors : []; |
| | | proxy.$modal |
| | | .alert(`${response.msg}\n\n${errors.join("\n")}`, "导å
¥ç»æ", { |
| | | confirmButtonText: "ç¥éäº", |
| | | }) |
| | | .then(() => { |
| | | emit("uploadSuccess"); |
| | | closeModal(); |
| | | }); |
| | | } else { |
| | | ElMessage({ message: response.msg || "导å
¥æå", type: "success" }); |
| | | emit("uploadSuccess"); |
| | | closeModal(); |
| | | } |
| | | } else { |
| | | ElMessage({ message: msg, type: "error" }); |
| | | } |
| | | }; |
| | | |
| | | const downloadTemplate = () => { |
| | | proxy.download("/stockOutRecord/importTemplate", {}, "åºåºå¯¼å
¥æ¨¡æ¿.xlsx"); |
| | | }; |
| | | |
| | | const closeModal = () => { |
| | | isShow.value = false; |
| | | }; |
| | | </script> |
| | |
| | | > |
| | | 导å
¥åºå |
| | | </el-button> |
| | | <el-button |
| | | type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="isShowImportOutModal = true" |
| | | > |
| | | 导å
¥åºåº |
| | | </el-button> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | type="qualified" |
| | | @uploadSuccess="handleQuery" |
| | | /> |
| | | <!-- 导å
¥åºåº--> |
| | | <import-stock-out |
| | | v-if="isShowImportOutModal" |
| | | v-model:visible="isShowImportOutModal" |
| | | @uploadSuccess="handleQuery" |
| | | /> |
| | | <!-- å»ç»/è§£å»åºå--> |
| | | <frozen-and-thaw-stock-inventory |
| | | v-if="isShowFrozenAndThawModal" |
| | |
| | | const ImportStockInventory = defineAsyncComponent(() => |
| | | import("@/views/inventoryManagement/stockManagement/Import.vue") |
| | | ); |
| | | const ImportStockOut = defineAsyncComponent(() => |
| | | import("@/views/inventoryManagement/stockManagement/ImportOut.vue") |
| | | ); |
| | | const FrozenAndThawStockInventory = defineAsyncComponent(() => |
| | | import("@/views/inventoryManagement/stockManagement/FrozenAndThaw.vue") |
| | | ); |
| | |
| | | const operationType = ref("frozen"); |
| | | // æ¯å¦æ¾ç¤ºå¯¼å
¥å¼¹æ¡ |
| | | const isShowImportModal = ref(false); |
| | | // æ¯å¦æ¾ç¤ºå¯¼å
¥åºåºå¼¹æ¡ |
| | | const isShowImportOutModal = ref(false); |
| | | const data = reactive({ |
| | | searchForm: { |
| | | productName: "", |