| | |
| | | <div class="search_form"> |
| | | <el-form :model="searchForm" |
| | | :inline="true"> |
| | | <el-form-item label="工序名称:"> |
| | | <el-form-item label="部件:"> |
| | | <el-input v-model="searchForm.name" |
| | | placeholder="请输入" |
| | | clearable |
| | |
| | | style="width: 200px;" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="工序编号:"> |
| | | <el-form-item label="部件编号:"> |
| | | <el-input v-model="searchForm.no" |
| | | placeholder="请输入" |
| | | clearable |
| | |
| | | <div style="text-align: right" |
| | | class="mb10"> |
| | | <el-button type="primary" |
| | | @click="showNewModal">新增工序</el-button> |
| | | @click="showNewModal">新增部件</el-button> |
| | | <el-button type="info" |
| | | plain |
| | | @click="handleImport">导入</el-button> |
| | | <el-button type="danger" |
| | | @click="handleDelete" |
| | | :disabled="selectedRows.length === 0" |
| | | plain>删除工序</el-button> |
| | | plain>删除部件</el-button> |
| | | </div> |
| | | <PIMTable rowKey="id" |
| | | :column="tableColumn" |
| | |
| | | @completed="getList" /> |
| | | <ImportDialog ref="importDialogRef" |
| | | v-model="importDialogVisible" |
| | | title="导入工序" |
| | | title="导入部件" |
| | | :action="importAction" |
| | | :headers="importHeaders" |
| | | :auto-upload="false" |
| | |
| | | const { searchForm } = toRefs(data); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "工序编号", |
| | | label: "部件编号", |
| | | prop: "no", |
| | | }, |
| | | { |
| | | label: "工序名称", |
| | | label: "部件", |
| | | prop: "name", |
| | | }, |
| | | { |
| | | label: "工序类型", |
| | | label: "部件类型", |
| | | prop: "typeText", |
| | | }, |
| | | { |
| | |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records.map(item => ({ |
| | | ...item, |
| | | typeText: item.type !== undefined ? (item.type === 0 ? "计时" : "计件") : "", |
| | | typeText: item.type !== undefined && item.type !== null ? (item.type === 0 ? "计时" : "计件") : "", |
| | | })); |
| | | page.total = res.data.total; |
| | | }) |
| | |
| | | if (no.length > 2) { |
| | | proxy.$modal |
| | | .confirm( |
| | | '是否确认删除工序编号为"' + |
| | | '是否确认删除部件编号为"' + |
| | | no[0] + |
| | | "、" + |
| | | no[1] + |
| | |
| | | .catch(() => {}); |
| | | } else { |
| | | proxy.$modal |
| | | .confirm('是否确认删除工序编号为"' + no + '"的数据项?') |
| | | .confirm('是否确认删除部件编号为"' + no + '"的数据项?') |
| | | .then(function () { |
| | | return del(ids); |
| | | }) |
| | |
| | | const url = window.URL.createObjectURL(blob); |
| | | const link = document.createElement("a"); |
| | | link.href = url; |
| | | link.download = "工序导入模板.xlsx"; |
| | | link.download = "部件导入模板.xlsx"; |
| | | link.click(); |
| | | window.URL.revokeObjectURL(url); |
| | | proxy.$modal.msgSuccess("模板下载成功"); |
| | |
| | | // type: "warning", |
| | | // }) |
| | | // .then(() => { |
| | | // proxy.download("/salesLedger/scheduling/exportTwo", {}, "工序排产.xlsx"); |
| | | // proxy.download("/salesLedger/scheduling/exportTwo", {}, "部件排产.xlsx"); |
| | | // }) |
| | | // .catch(() => { |
| | | // proxy.$modal.msg("已取消"); |