功能权限更改、支持根据BOM组成直接创建生产工单
This commit is contained in:
parent
0c3b0ecb19
commit
5ebd2f7ea0
@ -78,7 +78,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['md:client:add']"
|
v-hasPermi="['md:md:client:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -89,7 +89,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['md:client:edit']"
|
v-hasPermi="['md:md:client:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -100,7 +100,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['md:client:remove']"
|
v-hasPermi="['md:md:client:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -110,7 +110,7 @@
|
|||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['md:client:export']"
|
v-hasPermi="['md:md:client:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
@ -149,14 +149,14 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['md:client:edit']"
|
v-hasPermi="['md:md:client:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['md:client:remove']"
|
v-hasPermi="['md:md:client:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['md:bom:add']"
|
v-hasPermi="['mes:md:bom:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
<ItemSelect ref="itemSelect" @onSelected="onItemSelected" > </ItemSelect>
|
<ItemSelect ref="itemSelect" @onSelected="onItemSelected" > </ItemSelect>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -20,7 +20,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['md:bom:remove']"
|
v-hasPermi="['mes:md:bom:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
@ -32,9 +32,19 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
|
v-if="scope.row.status == 'PREPARE'"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['mes:pro:workorderbom:edit']"
|
v-hasPermi="['mes:pro:workorderbom:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleAddSubWorkorder(scope.row)"
|
||||||
|
v-if="workorder.status == 'CONFIRMED' && scope.row.itemOrProduct=='PRODUCT'"
|
||||||
|
v-hasPermi="['mes:pro:workorder:edit']"
|
||||||
|
>生成工单</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -133,7 +143,7 @@ export default {
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
optType: undefined,
|
optType: undefined,
|
||||||
workorderId: undefined
|
workorder: undefined
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -142,7 +152,7 @@ export default {
|
|||||||
/** 查询生产工单BOM组成列表 */
|
/** 查询生产工单BOM组成列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.workorderId = this.workorderId;
|
this.queryParams.workorderId = this.workorder.workorderId;
|
||||||
listWorkorderbom(this.queryParams).then(response => {
|
listWorkorderbom(this.queryParams).then(response => {
|
||||||
this.workorderbomList = response.rows;
|
this.workorderbomList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
@ -224,6 +234,19 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleAddSubWorkorder(row){
|
||||||
|
debugger;
|
||||||
|
var temp = JSON.parse(JSON.stringify(this.workorder));
|
||||||
|
temp.workorderCode = null;
|
||||||
|
temp.workorderName = row.itemName + "【"+row.quantity+"】"+row.unitOfMeasure;
|
||||||
|
temp.productId = row.itemId;
|
||||||
|
temp.productCode = row.itemCode;
|
||||||
|
temp.productName = row.itemName;
|
||||||
|
temp.unitOfMeasure = row.unitOfMeasure;
|
||||||
|
temp.quantity = row.quantity;
|
||||||
|
temp.status = 'PREPARE';
|
||||||
|
this.$emit('handleAddSub',temp);
|
||||||
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('mes/pro/workorderbom/export', {
|
this.download('mes/pro/workorderbom/export', {
|
||||||
|
@ -126,7 +126,16 @@
|
|||||||
default-expand-all
|
default-expand-all
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||||
>
|
>
|
||||||
<el-table-column label="工单编码" width="180" prop="workorderCode" />
|
<el-table-column label="工单编码" width="180" prop="workorderCode" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['mes:pro:workorder:query']"
|
||||||
|
>{{scope.row.workorderCode}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="工单名称" width="200" align="center" prop="workorderName" :show-overflow-tooltip="true"/>
|
<el-table-column label="工单名称" width="200" align="center" prop="workorderName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="工单来源" align="center" prop="orderSource" >
|
<el-table-column label="工单来源" align="center" prop="orderSource" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -317,7 +326,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<el-tabs type="border-card" v-if="form.workorderId != null">
|
<el-tabs type="border-card" v-if="form.workorderId != null">
|
||||||
<el-tab-pane label="BOM组成">
|
<el-tab-pane label="BOM组成">
|
||||||
<Workorderbom ref="bomlist" :optType="optType" :workorderId="form.workorderId"></Workorderbom>
|
<Workorderbom ref="bomlist" :optType="optType" :workorder="form" @handleAddSub="handleSubAdd" ></Workorderbom>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="物料需求"></el-tab-pane>
|
<el-tab-pane label="物料需求"></el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@ -499,6 +508,24 @@ export default {
|
|||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
//从BOM行中直接新增
|
||||||
|
handleSubAdd(row){
|
||||||
|
debugger;
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
this.getTreeselect();
|
||||||
|
if (row != null && row.workorderId) {
|
||||||
|
this.form = row;
|
||||||
|
this.form.parentId = row.workorderId;
|
||||||
|
this.form.workorderId = null;
|
||||||
|
this.form.workorderCode = null;
|
||||||
|
} else {
|
||||||
|
this.form.parentId = 0;
|
||||||
|
}
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加生产工单";
|
||||||
|
this.optType="add";
|
||||||
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd(row) {
|
handleAdd(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
@ -517,6 +544,18 @@ export default {
|
|||||||
this.title = "添加生产工单";
|
this.title = "添加生产工单";
|
||||||
this.optType="add";
|
this.optType="add";
|
||||||
},
|
},
|
||||||
|
// 查询明细按钮操作
|
||||||
|
handleView(row){
|
||||||
|
this.reset();
|
||||||
|
this.getTreeselect();
|
||||||
|
const workorderId = row.workorderId || this.ids;
|
||||||
|
getWorkorder(workorderId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "查看工单信息";
|
||||||
|
this.optType = "view";
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
icon="el-icon-s-shop"
|
icon="el-icon-s-shop"
|
||||||
v-if="scope.row.areaFlag =='Y'"
|
v-if="scope.row.areaFlag =='Y'"
|
||||||
@click="handleArea(scope.row.locationId)"
|
@click="handleArea(scope.row.locationId)"
|
||||||
v-hasPermi="['wm:area:edit']"
|
v-hasPermi="['mes:wm:area:edit','mes:wm:area:list']"
|
||||||
>库位</el-button>
|
>库位</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -296,7 +296,7 @@ export default {
|
|||||||
handleView(row){
|
handleView(row){
|
||||||
this.reset();
|
this.reset();
|
||||||
const locationId = row.locationId || this.ids
|
const locationId = row.locationId || this.ids
|
||||||
getWarehouse(locationId).then(response => {
|
getLocation(locationId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "查看库区";
|
this.title = "查看库区";
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['wm:warehouse:add']"
|
v-hasPermi="['mes:wm:warehouse:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -42,7 +42,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['wm:warehouse:edit']"
|
v-hasPermi="['mes:wm:warehouse:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -66,7 +66,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
v-hasPermi="['mes:md:warehouse:query']"
|
v-hasPermi="['mes:wm:warehouse:query']"
|
||||||
>{{scope.row.warehouseCode}}</el-button>
|
>{{scope.row.warehouseCode}}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -86,21 +86,21 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-s-shop"
|
icon="el-icon-s-shop"
|
||||||
@click="handleLocation(scope.row.warehouseId)"
|
@click="handleLocation(scope.row.warehouseId)"
|
||||||
v-hasPermi="['wm:warehouse:edit']"
|
v-hasPermi="['mes:wm:warehouse:edit','mes:wm:warehouse:list']"
|
||||||
>库区</el-button>
|
>库区</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['wm:warehouse:edit']"
|
v-hasPermi="['mes:wm:warehouse:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['wm:warehouse:remove']"
|
v-hasPermi="['mes:wm:warehouse:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
Loading…
Reference in New Issue
Block a user