|
@@ -6,17 +6,11 @@
|
|
|
<el-form class="list-search-container" :model="queryDeptParams" ref="queryRef" :inline="true">
|
|
|
<el-form-item class="section-title" label="车间管理" />
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="Plus" @click="handleAdd">新增</el-button>
|
|
|
+ <el-button v-hasPermi="['business:workshop:add']" type="primary" icon="Plus" @click="handleAdd">新增</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="车间名称:" prop="name">
|
|
|
- <el-input
|
|
|
- v-model.trim="queryParams.name"
|
|
|
- placeholder="请输入车间名称"
|
|
|
- @keydown.enter.prevent
|
|
|
- @keyup.enter="handleSearch"
|
|
|
- clearable
|
|
|
- style="width: 155px"
|
|
|
- />
|
|
|
+ <el-input v-model.trim="queryParams.name" placeholder="请输入车间名称" @keydown.enter.prevent
|
|
|
+ @keyup.enter="handleSearch" clearable style="width: 155px" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="info" icon="Search" @click="handleSearch">搜索</el-button>
|
|
@@ -26,23 +20,16 @@
|
|
|
<div class="el-table-container">
|
|
|
<div class="el-table-inner-container">
|
|
|
<!-- 列表区 -->
|
|
|
- <el-table
|
|
|
- ref="workshopTable"
|
|
|
- v-loading="loading"
|
|
|
- :data="workshopList"
|
|
|
- row-key="id"
|
|
|
- height="100%"
|
|
|
- :indent="20"
|
|
|
- default-expand-all
|
|
|
- highlight-current-row
|
|
|
- @current-change="handleGetDept"
|
|
|
- >
|
|
|
+ <el-table ref="workshopTable" v-loading="loading" :data="workshopList" row-key="id" height="100%" :indent="20"
|
|
|
+ default-expand-all highlight-current-row @current-change="handleGetDept">
|
|
|
<el-table-column label="行号" type="index" width="50" align="center" />
|
|
|
<el-table-column label="车间名称" prop="name" align="center" />
|
|
|
<el-table-column label="操作" width="150" align="center">
|
|
|
<template #default="scope">
|
|
|
- <el-button link type="warning" icon="Edit" @click="handleUpdateWorkshop(scope.row)">编辑</el-button>
|
|
|
- <el-button link type="danger" icon="Delete" @click="handleDeleteWorkshop(scope.row)">删除</el-button>
|
|
|
+ <el-button v-hasPermi="['business:workshop:edit']" link type="warning" icon="Edit"
|
|
|
+ @click="handleUpdateWorkshop(scope.row)">编辑</el-button>
|
|
|
+ <el-button v-hasPermi="['business:workshop:remove']" link type="danger" icon="Delete"
|
|
|
+ @click="handleDeleteWorkshop(scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -58,15 +45,18 @@
|
|
|
<el-form class="list-search-container" :model="queryDeptParams" ref="queryRef" :inline="true">
|
|
|
<el-form-item class="section-title" label="工段" />
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="Plus" :disabled="workshopList.length == 0" @click="handleAddDept">新增</el-button>
|
|
|
- <el-button type="danger" icon="Delete" :disabled="ids.length == 0" @click="handleDeptDelete"> 删除</el-button>
|
|
|
+ <el-button v-hasPermi="['business:workshop:add']" type="primary" icon="Plus"
|
|
|
+ :disabled="workshopList.length == 0" @click="handleAddDept">新增</el-button>
|
|
|
+ <el-button v-hasPermi="['business:workshop:remove']" type="danger" icon="Delete" :disabled="ids.length == 0"
|
|
|
+ @click="handleDeptDelete"> 删除</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
<!-- 列表区 -->
|
|
|
<div class="el-table-container">
|
|
|
<div class="el-table-inner-container">
|
|
|
- <el-table v-loading="deptLoading" :data="deptList" :row-key="getRowKey" height="100%" @selection-change="handleSelectionChange">
|
|
|
+ <el-table v-loading="deptLoading" :data="deptList" :row-key="getRowKey" height="100%"
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="40" align="center" />
|
|
|
<el-table-column type="index" label="行号" width="50" align="center" />
|
|
|
<el-table-column label="工段名称" prop="deptName" align="center" />
|
|
@@ -75,13 +65,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 分页 -->
|
|
|
- <pagination
|
|
|
- v-show="total > 0"
|
|
|
- :total="total"
|
|
|
- v-model:page="queryDeptParams.pageNum"
|
|
|
- v-model:limit="queryDeptParams.pageSize"
|
|
|
- @pagination="getDeptList"
|
|
|
- />
|
|
|
+ <pagination v-show="total > 0" :total="total" v-model:page="queryDeptParams.pageNum"
|
|
|
+ v-model:limit="queryDeptParams.pageSize" @pagination="getDeptList" />
|
|
|
</section>
|
|
|
<!-- 周转区 -->
|
|
|
<section class="list-part-container column-container" style="flex: 1">
|
|
@@ -89,7 +74,8 @@
|
|
|
<el-form class="list-search-container" :model="queryDeptParams" ref="queryRef" :inline="true">
|
|
|
<el-form-item class="section-title" label="周转区" />
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="Plus" @click="handleShowTurnoverFormDialog(null)">新增</el-button>
|
|
|
+ <el-button v-hasPermi="['business:workshop:add']" type="primary" icon="Plus"
|
|
|
+ @click="handleShowTurnoverFormDialog(null)">新增</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
@@ -107,8 +93,11 @@
|
|
|
<el-table-column label="备注" prop="remark" align="center" />
|
|
|
<el-table-column label="操作" width="150" align="center">
|
|
|
<template #default="scope">
|
|
|
- <el-button link type="warning" icon="Edit" @click="handleShowTurnoverFormDialog(scope.row.id)"> 编辑 </el-button>
|
|
|
- <el-button link type="danger" icon="Delete" @click="handleDeleteTurnover(scope.row)"> 删除 </el-button>
|
|
|
+ <el-button v-hasPermi="['business:workshop:edit']" link type="warning" icon="Edit"
|
|
|
+ @click="handleShowTurnoverFormDialog(scope.row.id)"> 编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button v-hasPermi="['business:workshop:remove']" link type="danger" icon="Delete"
|
|
|
+ @click="handleDeleteTurnover(scope.row)"> 删除 </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -217,7 +206,7 @@ function handleDeleteWorkshop(row) {
|
|
|
getList()
|
|
|
proxy.$modal.msgSuccess('删除成功!')
|
|
|
})
|
|
|
- .catch(() => {})
|
|
|
+ .catch(() => { })
|
|
|
}
|
|
|
/*********************** 工段相关事件 ****************************/
|
|
|
//打开添加工段
|
|
@@ -320,7 +309,7 @@ function handleDeleteTurnover(row) {
|
|
|
getTurnovers()
|
|
|
proxy.$modal.msgSuccess('删除成功!')
|
|
|
})
|
|
|
- .catch(() => {})
|
|
|
+ .catch(() => { })
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|