change - 工艺路线已经关联生产工单不能修改和删除

master
yinq 1 year ago
parent 96afc3985f
commit 9a2df9f62f

@ -24,7 +24,8 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['mes:baseRoute:add']" v-hasPermi="['mes:baseRoute:add']"
>新增</el-button> >新增
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -35,7 +36,8 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['mes:baseRoute:edit']" v-hasPermi="['mes:baseRoute:edit']"
>修改</el-button> >修改
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -46,7 +48,8 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['mes:baseRoute:remove']" v-hasPermi="['mes:baseRoute:remove']"
>删除</el-button> >删除
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -56,7 +59,8 @@
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['mes:baseRoute:export']" v-hasPermi="['mes:baseRoute:export']"
>导出</el-button> >导出
</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
@ -99,7 +103,8 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="routeProcessUpdate(scope.row)" @click="routeProcessUpdate(scope.row)"
v-hasPermi="['mes:baseRoute:edit']" v-hasPermi="['mes:baseRoute:edit']"
>工艺步骤</el-button> >工艺步骤
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -127,7 +132,8 @@
v-for="dict in dict.type.active_flag" v-for="dict in dict.type.active_flag"
:key="dict.value" :key="dict.value"
:label="dict.value" :label="dict.value"
>{{dict.label}}</el-radio> >{{ dict.label }}
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
@ -149,13 +155,21 @@
<el-divider content-position="center">工艺路线组成信息</el-divider> <el-divider content-position="center">工艺路线组成信息</el-divider>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddMesBaseRouteProcess"></el-button> <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddMesBaseRouteProcess"
>添加
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteMesBaseRouteProcess"></el-button> <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteMesBaseRouteProcess"
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<span v-show="tagShow">:线</span>
</el-col> </el-col>
</el-row> </el-row>
<el-table :data="mesBaseRouteProcessList" :row-class-name="rowMesBaseRouteProcessIndex" @selection-change="handleMesBaseRouteProcessSelectionChange" ref="mesBaseRouteProcess"> <el-table :data="mesBaseRouteProcessList" :row-class-name="rowMesBaseRouteProcessIndex"
@selection-change="handleMesBaseRouteProcessSelectionChange" ref="mesBaseRouteProcess">
<el-table-column type="selection" width="50" align="center"/> <el-table-column type="selection" width="50" align="center"/>
<el-table-column label="序号" align="center" prop="index" v-if="false"/> <el-table-column label="序号" align="center" prop="index" v-if="false"/>
<el-table-column label="工艺路线顺序" prop="processOrder" width="100"> <el-table-column label="工艺路线顺序" prop="processOrder" width="100">
@ -179,7 +193,7 @@
</el-table> </el-table>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm" v-show="submitShow"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -195,6 +209,7 @@ import {
updateBaseRoute updateBaseRoute
} from "@/api/mes/baseRoute"; } from "@/api/mes/baseRoute";
import {findProcessList} from "@//api/mes/processInfo"; import {findProcessList} from "@//api/mes/processInfo";
import {listProductOrder} from "@//api/mes/productOrder";
export default { export default {
name: "BaseRoute", name: "BaseRoute",
@ -215,6 +230,10 @@ export default {
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
//
submitShow: true,
//
tagShow: true,
// //
total: 0, total: 0,
// 线 // 线
@ -345,6 +364,14 @@ export default {
routeProcessUpdate(row) { routeProcessUpdate(row) {
this.reset(); this.reset();
const routeId = row.routeId || this.ids const routeId = row.routeId || this.ids
this.submitShow = true;
this.tagShow = false;
listProductOrder({dispatchId: row.routeId}).then(res => {
if (res.rows.length > 0) {
this.submitShow = false;
this.tagShow = true;
}
})
getBaseRoute(routeId).then(response => { getBaseRoute(routeId).then(response => {
this.form = response.data; this.form = response.data;
this.mesBaseRouteProcessList = response.data.mesBaseRouteProcessList; this.mesBaseRouteProcessList = response.data.mesBaseRouteProcessList;
@ -383,7 +410,8 @@ export default {
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {
});
}, },
/** 工艺路线组成信息序号 */ /** 工艺路线组成信息序号 */
rowMesBaseRouteProcessIndex({row, rowIndex}) { rowMesBaseRouteProcessIndex({row, rowIndex}) {

Loading…
Cancel
Save