| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="工序编码" prop="processNumber"> |
| | | <el-input |
| | | v-model="queryParams.processNumber" |
| | | 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="resourceGroupName"> |
| | | <el-input |
| | | v-model="queryParams.resourceGroupName" |
| | | placeholder="请输入资源组" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产能模型" prop="model"> |
| | | <el-input |
| | | v-model="queryParams.model" |
| | | placeholder="请输入产能模型: 独占/合批" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="设计产能" prop="designCapacity"> |
| | | <el-input |
| | | v-model="queryParams.designCapacity" |
| | | placeholder="请输入设计产能" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="工厂" prop="plant"> |
| | | <el-input |
| | | v-model="queryParams.plant" |
| | | placeholder="请输入工厂" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="车间" prop="workShop"> |
| | | <el-input |
| | | v-model="queryParams.workShop" |
| | | placeholder="请输入车间" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="日历描述" prop="workCalender"> |
| | | <el-input |
| | | v-model="queryParams.workCalender" |
| | | placeholder="请输入日历描述" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryRef" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | label-width="68px" |
| | | > |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="工序编码" prop="processNumber" style="width:100%"> |
| | | <el-input |
| | | v-model="queryParams.processNumber" |
| | | 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-col :span="6"> |
| | | <el-form-item label="资源组" prop="resourceGroupName" style="width:100%"> |
| | | <el-input |
| | | v-model="queryParams.resourceGroupName" |
| | | placeholder="请输入资源组" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="产能模型" prop="model" style="width:100%"> |
| | | <el-input |
| | | v-model="queryParams.model" |
| | | placeholder="请输入产能模型: 独占/合批" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="设计产能" prop="designCapacity" style="width:100%"> |
| | | <el-input |
| | | v-model="queryParams.designCapacity" |
| | | placeholder="请输入设计产能" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="工厂" prop="plant" style="width:100%"> |
| | | <el-select |
| | | clearable |
| | | v-model="queryParams.plant" |
| | | style="width: 200px" |
| | | placeholder="请输入适用工厂" |
| | | > |
| | | <el-option |
| | | v-for="plant in plantList" |
| | | :key="plant.id" |
| | | :label="plant.plantName" |
| | | :value="plant.plantCode" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="车间" prop="workShop" style="width:100%"> |
| | | <el-input |
| | | v-model="queryParams.workShop" |
| | | placeholder="请输入车间" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="日历描述" prop="workCalender" style="width:100%"> |
| | | <el-input |
| | | v-model="queryParams.workCalender" |
| | | placeholder="请输入日历描述" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <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-item> --> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | |
| | | icon="Plus" |
| | | @click="handleAdd" |
| | | v-hasPermi="['core:standardProcess:add']" |
| | | >新增</el-button> |
| | | >新增</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['core:standardProcess:edit']" |
| | | >修改</el-button> |
| | | >修改</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['core:standardProcess:remove']" |
| | | >删除</el-button> |
| | | >删除</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['aps:standardProcess:importData']" |
| | | >导入</el-button> |
| | | type="info" |
| | | plain |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['aps:standardProcess:importData']" |
| | | >导入</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['core:standardProcess:export']" |
| | | >导出</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%" |
| | | :columns="columns" |
| | | :data="standardProcessList" |
| | | :loading="loading" |
| | | :height="height" |
| | | @on-checkbox="handleCheckboxChange" |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="standardProcessList" |
| | | :loading="loading" |
| | | :height="height" |
| | | :page="page" |
| | | @changePageNo="changePageNo" |
| | | @changePageSize="changePageSize" |
| | | @on-checkbox="handleCheckboxChange" |
| | | > |
| | | </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> |
| | | |
| | | <el-row :gutter="10" style="margin-top: 20px;"> |
| | | </el-row> |
| | | <el-row :gutter="10" style="margin-top: 20px"> </el-row> |
| | | <el-row> |
| | | <el-col> |
| | | <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="true" drag> |
| | | <el-upload |
| | | ref="uploadRef" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport" |
| | | :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :auto-upload="true" |
| | | drag |
| | | > |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
| | | <div class="el-upload__text"> |
| | | 将文件拖到此处,或<em>点击上传</em> |
| | | </div> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | <span>仅允许导入xls、xlsx格式文件。</span> |
| | |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row v-show="isVisible">--> |
| | | <!-- <el-col>--> |
| | | <!-- <div>--> |
| | | <!-- <h2>数据预览</h2>--> |
| | | <!-- </div>--> |
| | | <!-- <HxlhTable--> |
| | | <!-- style="width: 100%"--> |
| | | <!-- :columns="exampleColumns"--> |
| | | <!-- :data="exampleList"--> |
| | | <!-- :loading="loading"--> |
| | | <!-- :maxHeight="exampleHeight"--> |
| | | <!-- @on-checkbox="handleCheckboxChange"--> |
| | | <!-- >--> |
| | | <!-- </HxlhTable>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col>--> |
| | | <!-- <div style="text-align: right;">--> |
| | | <!-- <h4>共上传<span style="color: blue;">{{ total }}</span>条数据</h4>--> |
| | | <!-- </div>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | <!-- <el-row v-show="isVisible">--> |
| | | <!-- <el-col>--> |
| | | <!-- <div>--> |
| | | <!-- <h2>数据预览</h2>--> |
| | | <!-- </div>--> |
| | | <!-- <HxlhTable--> |
| | | <!-- style="width: 100%"--> |
| | | <!-- :columns="exampleColumns"--> |
| | | <!-- :data="exampleList"--> |
| | | <!-- :loading="loading"--> |
| | | <!-- :maxHeight="exampleHeight"--> |
| | | <!-- @on-checkbox="handleCheckboxChange"--> |
| | | <!-- >--> |
| | | <!-- </HxlhTable>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col>--> |
| | | <!-- <div style="text-align: right;">--> |
| | | <!-- <h4>共上传<span style="color: blue;">{{ total }}</span>条数据</h4>--> |
| | | <!-- </div>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Check" |
| | | :disabled="planned" |
| | | @click="uploadParse" |
| | | >确认上传</el-button> |
| | | type="success" |
| | | plain |
| | | icon="Check" |
| | | :disabled="planned" |
| | | @click="uploadParse" |
| | | >确认上传</el-button |
| | | > |
| | | <el-button @click="dialogCancel">取 消</el-button> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | <!-- 添加或修改标准工序对话框 --> |
| | | <el-dialog :title="title" v-model="open" width="500px" append-to-body> |
| | | <el-form ref="standardProcessRef" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form |
| | | ref="standardProcessRef" |
| | | :model="form" |
| | | :rules="rules" |
| | | label-width="80px" |
| | | > |
| | | <el-form-item label="工序编码" prop="processNumber"> |
| | | <el-input v-model="form.processNumber" placeholder="请输入工序编码" /> |
| | | </el-form-item> |
| | |
| | | <el-input v-model="form.processName" placeholder="请输入工序名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="资源组" prop="resourceGroupName"> |
| | | <el-input v-model="form.resourceGroupName" placeholder="请输入资源组" /> |
| | | <el-input |
| | | v-model="form.resourceGroupName" |
| | | placeholder="请输入资源组" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产能模型" prop="model"> |
| | | <el-input v-model="form.model" placeholder="请输入产能模型: 独占/合批" /> |
| | | <el-input |
| | | v-model="form.model" |
| | | placeholder="请输入产能模型: 独占/合批" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="设计产能" prop="designCapacity"> |
| | | <el-input v-model="form.designCapacity" placeholder="请输入设计产能" /> |
| | | <el-input |
| | | v-model="form.designCapacity" |
| | | placeholder="请输入设计产能" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="工厂" prop="plant"> |
| | | <el-input v-model="form.plant" placeholder="请输入工厂" /> |
| | | <el-select |
| | | clearable |
| | | v-model="form.plant" |
| | | style="width: 100%" |
| | | placeholder="请输入适用工厂" |
| | | > |
| | | <el-option |
| | | v-for="plant in plantList" |
| | | :key="plant.id" |
| | | :label="plant.plantName" |
| | | :value="plant.plantCode" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车间" prop="workShop"> |
| | | <el-input v-model="form.workShop" placeholder="请输入车间" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="日历Id" prop="workCalenderId">--> |
| | | <!-- <el-input v-model="form.workCalenderId" placeholder="请输入日历Id" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="产能模型Id" prop="modelId">--> |
| | | <!-- <el-input v-model="form.modelId" placeholder="请输入产能模型Id" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="日历Id" prop="workCalenderId">--> |
| | | <!-- <el-input v-model="form.workCalenderId" placeholder="请输入日历Id" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="产能模型Id" prop="modelId">--> |
| | | <!-- <el-input v-model="form.modelId" placeholder="请输入产能模型Id" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="日历描述" prop="workCalender"> |
| | | <el-input v-model="form.workCalender" placeholder="请输入日历描述" /> |
| | | </el-form-item> |
| | |
| | | </template> |
| | | |
| | | <script setup name="StandardProcess"> |
| | | import { listStandardProcess, getStandardProcess, delStandardProcess, addStandardProcess, updateStandardProcess } from "@/api/basicData/standardProcess"; |
| | | import { |
| | | listStandardProcess, |
| | | getStandardProcess, |
| | | delStandardProcess, |
| | | addStandardProcess, |
| | | updateStandardProcess, |
| | | } from "@/api/basicData/standardProcess"; |
| | | import { listAll_plant } from "@/api/basicData/plant"; |
| | | import HxlhTable from "@/components/HxlhTable/index.vue"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | import {ref} from "vue"; |
| | | import { ElMessage } from 'element-plus' |
| | | import { ref } from "vue"; |
| | | // import { ElMessage } from "element-plus"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | // 分页属性 |
| | | const page = ref({ |
| | | total: 0, |
| | | current: 1, |
| | | size: 10, |
| | | }); |
| | | const plantList = ref([]); |
| | | const standardProcessList = ref([]); |
| | | const open = ref(false); |
| | | const loading = ref(true); |
| | |
| | | const total = ref(0); |
| | | const title = ref(""); |
| | | //弹窗相关 |
| | | const height = ref(document.documentElement.clientHeight - 260 + "px;") |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;"); |
| | | const isVisible = ref(false); |
| | | const isError = ref(false); |
| | | const planned = ref(true); |
| | |
| | | // 设置上传的请求头部 |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // 上传的地址 |
| | | url: import.meta.env.VITE_APP_BASE_API + "/aps/standardProcess/importData" |
| | | url: import.meta.env.VITE_APP_BASE_API + "/aps/standardProcess/importData", |
| | | }); |
| | | // 表格配置-列表 |
| | | const columns = ref([ |
| | | { type: 'checkbox', width: 60, align:"center"}, |
| | | { type: 'seq', title: '序号', width: 60, align: 'center' }, |
| | | { type: "checkbox", width: 60, align: "center" }, |
| | | { type: "seq", title: "序号", width: 60, align: "center" }, |
| | | { |
| | | title: '工序编码', |
| | | field: 'processNumber', |
| | | title: "工序编码", |
| | | field: "processNumber", |
| | | width: 150, |
| | | align:"center", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: '工序名称', |
| | | field: 'processName', |
| | | title: "工序名称", |
| | | field: "processName", |
| | | width: 200, |
| | | align:"center", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: '资源组', |
| | | field: 'resourceGroupName', |
| | | title: "资源组", |
| | | field: "resourceGroupName", |
| | | width: 150, |
| | | align:"center", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: '产能模型', |
| | | field: 'model', |
| | | title: "产能模型", |
| | | field: "model", |
| | | width: 150, |
| | | align:"center", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: '设计产能', |
| | | field: 'designCapacity', |
| | | title: "设计产能", |
| | | field: "designCapacity", |
| | | width: 150, |
| | | align:"center", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: '工厂', |
| | | field: 'plant', |
| | | title: "工厂", |
| | | field: "plant", |
| | | width: 150, |
| | | align:"center", |
| | | align: "center", |
| | | formatter: ({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | for (let i = 0; i < plantList.value.length; i++) { |
| | | if (cellValue === plantList.value[i].plantCode) { |
| | | return plantList.value[i].plantName; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | title: '车间', |
| | | field: 'workShop', |
| | | title: "车间", |
| | | field: "workShop", |
| | | width: 150, |
| | | align:"center", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: '日历', |
| | | field: 'workCalender', |
| | | title: "日历", |
| | | field: "workCalender", |
| | | width: 150, |
| | | align:"center", |
| | | } |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "专业", |
| | | field: "major", |
| | | width: 150, |
| | | align: "center", |
| | | }, |
| | | ]); |
| | | |
| | | const data = reactive({ |
| | |
| | | workShop: null, |
| | | workCalenderId: null, |
| | | modelId: null, |
| | | workCalender: null |
| | | workCalender: null, |
| | | }, |
| | | rules: { |
| | | } |
| | | rules: {}, |
| | | }); |
| | | |
| | | const { queryParams, form, rules } = toRefs(data); |
| | |
| | | /** 查询标准工序列表 */ |
| | | function getList() { |
| | | loading.value = true; |
| | | listStandardProcess(queryParams.value).then(response => { |
| | | listStandardProcess(queryParams.value).then((response) => { |
| | | standardProcessList.value = response.rows; |
| | | total.value = response.total; |
| | | loading.value = false; |
| | | page.value.total = response.total; |
| | | }); |
| | | } |
| | | function changePageNo(currentPage) { |
| | | queryParams.value.pageNum = currentPage; |
| | | page.value.current = currentPage; |
| | | getList(); |
| | | } |
| | | |
| | | function changePageSize(pageSize) { |
| | | page.value.current = 1; |
| | | queryParams.value.pageNum = 1; |
| | | queryParams.value.pageSize = pageSize; |
| | | getList(); |
| | | } |
| | | // 取消按钮 |
| | | function cancel() { |
| | | open.value = false; |
| | |
| | | updateBy: null, |
| | | updateTime: null, |
| | | modelId: null, |
| | | workCalender: null |
| | | workCalender: null, |
| | | }; |
| | | proxy.resetForm("standardProcessRef"); |
| | | } |
| | |
| | | |
| | | // 多选框选中数据 |
| | | function handleSelectionChange(selection) { |
| | | ids.value = selection.map(item => item.id); |
| | | ids.value = selection.map((item) => item.id); |
| | | single.value = selection.length != 1; |
| | | multiple.value = !selection.length; |
| | | } |
| | |
| | | /** 修改按钮操作 */ |
| | | function handleUpdate(row) { |
| | | reset(); |
| | | const _id = row.id || ids.value |
| | | getStandardProcess(_id).then(response => { |
| | | const _id = row.id || ids.value; |
| | | getStandardProcess(_id).then((response) => { |
| | | form.value = response.data; |
| | | open.value = true; |
| | | title.value = "修改标准工序"; |
| | |
| | | |
| | | /** 提交按钮 */ |
| | | function submitForm() { |
| | | proxy.$refs["standardProcessRef"].validate(valid => { |
| | | proxy.$refs["standardProcessRef"].validate((valid) => { |
| | | if (valid) { |
| | | if (form.value.id != null) { |
| | | updateStandardProcess(form.value).then(response => { |
| | | updateStandardProcess(form.value).then((response) => { |
| | | proxy.$modal.msgSuccess("修改成功"); |
| | | open.value = false; |
| | | getList(); |
| | | }); |
| | | } else { |
| | | addStandardProcess(form.value).then(response => { |
| | | addStandardProcess(form.value).then((response) => { |
| | | proxy.$modal.msgSuccess("新增成功"); |
| | | open.value = false; |
| | | getList(); |
| | |
| | | /** 删除按钮操作 */ |
| | | function handleDelete(row) { |
| | | const _ids = row.id || ids.value; |
| | | proxy.$modal.confirm('是否确认删除标准工序编号为"' + _ids + '"的数据项?').then(function() { |
| | | return delStandardProcess(_ids); |
| | | }).then(() => { |
| | | getList(); |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | proxy.$modal |
| | | .confirm('是否确认删除标准工序编号为"' + _ids + '"的数据项?') |
| | | .then(function () { |
| | | return delStandardProcess(_ids); |
| | | }) |
| | | .then(() => { |
| | | getList(); |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | }) |
| | | .catch(() => {}); |
| | | } |
| | | |
| | | /** 导出按钮操作 */ |
| | | function handleExport() { |
| | | proxy.download('aps/standardProcess/export', { |
| | | ...queryParams.value |
| | | }, `standardProcess_${new Date().getTime()}.xlsx`) |
| | | proxy.download( |
| | | "aps/standardProcess/export", |
| | | { |
| | | ...queryParams.value, |
| | | }, |
| | | `standardProcess_${new Date().getTime()}.xlsx` |
| | | ); |
| | | } |
| | | |
| | | /** 导入按钮操作 */ |
| | |
| | | upload.open = true; |
| | | } |
| | | |
| | | function handleCheckboxChange(){} |
| | | function handleCheckboxChange() {} |
| | | |
| | | /** dialog取消 */ |
| | | function dialogCancel(){ |
| | | function dialogCancel() { |
| | | if (uploadRef.value) { |
| | | uploadRef.value.clearFiles(); |
| | | } |
| | |
| | | upload.open = false; |
| | | requestDate.value = null; |
| | | ElMessage({ |
| | | message: '资源池数据已成功上传和解析', |
| | | type: 'success', |
| | | }) |
| | | message: "资源池数据已成功上传和解析", |
| | | type: "success", |
| | | }); |
| | | getList(); |
| | | } |
| | | |
| | | /** 文件上传成功处理 */ |
| | | 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{ |
| | | } 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; |
| | |
| | | const handleFileUploadProgress = (event, file, fileList) => { |
| | | upload.isUploading = true; |
| | | }; |
| | | |
| | | onMounted(async () => { |
| | | /** 查询工厂列表 */ |
| | | const response = await listAll_plant({}); |
| | | plantList.value = response.data; |
| | | loading.value = false; |
| | | }); |
| | | getList(); |
| | | </script> |