| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="料号" prop="itemNumber"> |
| | | <el-input |
| | | v-model="queryParams.itemNumber" |
| | | placeholder="请输入料号" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="图号" prop="drawingNo"> |
| | | <el-input |
| | | v-model="queryParams.drawingNo" |
| | | placeholder="请输入图号" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="版本" prop="version"> |
| | | <el-input |
| | | v-model="queryParams.version" |
| | | placeholder="请输入版本" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="工序名称" prop="processName"> |
| | | <el-input |
| | | v-model="queryParams.processName" |
| | | placeholder="请输入工序名称" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="标准用量" prop="standardAmount"> |
| | | <el-input |
| | | v-model="queryParams.standardAmount" |
| | | placeholder="请输入标准用量" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col> |
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" label-position="left" v-show="showSearch"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="料号" prop="itemNumber" :style="{ width: '100%' }"> |
| | | <el-input |
| | | v-model="queryParams.itemNumber" |
| | | placeholder="请输入料号" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="图号" prop="drawingNo" :style="{ width: '100%' }"> |
| | | <el-input |
| | | v-model="queryParams.drawingNo" |
| | | placeholder="请输入图号" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="版本" prop="version" :style="{ width: '100%' }"> |
| | | <el-input |
| | | v-model="queryParams.version" |
| | | placeholder="请输入版本" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="工序名称" prop="processName" :style="{ width: '100%' }"> |
| | | <el-input |
| | | v-model="queryParams.processName" |
| | | placeholder="请输入工序名称" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row :gutter="20"> |
| | | |
| | | <el-col :span="16" style="text-align: right;"> |
| | | <el-form-item class="column-with-margin"> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> --> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['gasMaterialUsage:import']" |
| | | >导入</el-button> |
| | | >导入 |
| | | </el-button> |
| | | </el-col> |
| | | <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
| | | <right-toolbar v-model:showSearch="showSearch" |
| | | @queryTable="handleQuery" |
| | | @resetTable="resetQuery"></right-toolbar> |
| | | </el-row> |
| | | <HxlhTable |
| | | style="width: 100%" |
| | |
| | | </HxlhTable> |
| | | |
| | | <!-- 添加或修改钣金计划管理对话框 --> |
| | | <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body @close="dialogCancel" > |
| | | <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body @close="dialogCancel"> |
| | | <el-row :gutter="10"> |
| | | <el-col> |
| | | <div style="border-bottom: 1px solid #ccc;" > |
| | | <div style="border-bottom: 1px solid #ccc;"> |
| | | <p>上传Excel文件,系统将解析数据并保存。</p> |
| | | </div> |
| | | </el-col> |
| | | <el-col > |
| | | <el-col> |
| | | <div></div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :auto-upload="true" drag> |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <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"> |
| | |
| | | </el-row> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="dialogCancel">取 消</el-button> |
| | | <el-button @click="dialogCancel">关 闭</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script setup name="ApsGasMaterialUsage"> |
| | | import { list, getOne, add, update, del } from "@/api/basicData/gasMaterialUsage.js"; |
| | | import {list, getOne, add, update, del} from "@/api/basicData/gasMaterialUsage.js"; |
| | | import HxlhTable from "@/components/HxlhTable/index.vue"; |
| | | import {ref} from "vue"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {getToken} from "@/utils/auth.js"; |
| | | // import {ElMessage} from "element-plus"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const {proxy} = getCurrentInstance(); |
| | | |
| | | const ApsGasMaterialUsageList = ref([]); |
| | | const open = ref(false); |
| | |
| | | const total = ref(0); |
| | | const title = ref(""); |
| | | |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;") |
| | | const height = ref(document.documentElement.clientHeight - 220 + "px;") |
| | | const isVisible = ref(false); |
| | | const isError = ref(false); |
| | | const planned = ref(true); |
| | |
| | | standardAmount: null, |
| | | orgCode: null, |
| | | }, |
| | | rules: { |
| | | } |
| | | rules: {} |
| | | }); |
| | | |
| | | const { queryParams, form, rules } = toRefs(data); |
| | | const {queryParams, form, rules} = toRefs(data); |
| | | const columns = ref([ |
| | | { type: 'seq', title: '序号', width: 60 }, |
| | | { title: '料号', field: 'itemNumber', width: 150,}, |
| | | { title: '图号', field: 'drawingNo', width: 150,}, |
| | | { title: '版本', field: 'version', width: 150,}, |
| | | { title: '工序名称', field: 'processName', width: 150,}, |
| | | { title: '标准用量', field: 'standardAmount', width: 150,}, |
| | | {type: 'seq', title: '序号', width: 60}, |
| | | {title: '料号', field: 'itemNumber'}, |
| | | {title: '图号', field: 'drawingNo'}, |
| | | {title: '版本', field: 'version', width: 150,}, |
| | | {title: '工序名称', field: 'processName'}, |
| | | {title: '标准用量', field: 'standardAmount', width: 150,}, |
| | | ]) |
| | | |
| | | /** 查询气柜管路物料用量列表 */ |
| | |
| | | // 是否更新已经存在的用户数据 |
| | | updateSupport: 0, |
| | | // 设置上传的请求头部 |
| | | headers: { Authorization: "Bearer " + getToken() ,local: 'zhl'}, |
| | | headers: {Authorization: "Bearer " + getToken(), local: 'int'}, |
| | | // 上传的地址 |
| | | url: import.meta.env.VITE_APP_BASE_API + "/aps/gasMaterialUsage/importData" |
| | | }); |
| | |
| | | upload.title = "钣金计划数据上传"; |
| | | upload.open = true; |
| | | } |
| | | |
| | | /**文件上传中处理 */ |
| | | const handleFileUploadProgress = (event, file, fileList) => { |
| | | upload.isUploading = true; |
| | | }; |
| | | /** 文件上传成功处理 */ |
| | | const handleFileSuccess = (response, file, fileList) => { |
| | | if(response.code === '200'){ |
| | | if (response.code === 200) { |
| | | batchNumber.value = response.data; |
| | | isVisible.value = true; |
| | | planned.value = false; |
| | | isError.value = false; |
| | | }else{ |
| | | getList(); |
| | | } else { |
| | | isError.value = true; |
| | | proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true }); |
| | | proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", {dangerouslyUseHTMLString: true}); |
| | | } |
| | | proxy.$refs["uploadRef"].handleRemove(file); |
| | | upload.isUploading = false; |
| | | }; |
| | | |
| | | /** dialog取消 */ |
| | | function dialogCancel() { |
| | | if (uploadRef.value) { |
| | | uploadRef.value.clearFiles(); |
| | | } |
| | | isVisible.value = false; |
| | | isError.value = false; |
| | | planned.value = true; |
| | | upload.open = false; |
| | | upload.isUploading = false; |
| | | } |
| | | |
| | | // 取消按钮 |
| | | function cancel() { |
| | |
| | | /** 删除按钮操作 */ |
| | | function handleDelete(row) { |
| | | const _ids = row.id || ids.value; |
| | | proxy.$modal.confirm('是否确认删除气柜管路物料用量编号为"' + _ids + '"的数据项?').then(function() { |
| | | proxy.$modal.confirm('是否确认删除气柜管路物料用量编号为"' + _ids + '"的数据项?').then(function () { |
| | | return del(_ids); |
| | | }).then(() => { |
| | | getList(); |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }).catch(() => { |
| | | }); |
| | | } |
| | | |
| | | /** 导出按钮操作 */ |
| | |
| | | |
| | | getList(); |
| | | </script> |
| | | <style scoped> |
| | | .column-with-margin { |
| | | margin-right: 0px; |
| | | } |
| | | </style> |