fix:工艺路线可修改
This commit is contained in:
parent
5192fef484
commit
9a250c3788
|
|
@ -435,12 +435,21 @@ export default {
|
|||
create: {
|
||||
name: "创建",
|
||||
req: async function (data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/mtm/routepack/`,
|
||||
data
|
||||
);
|
||||
return await http.post(`${config.API_URL}/mtm/routepack/`,data);
|
||||
},
|
||||
},
|
||||
copy:{
|
||||
name: "复制",
|
||||
req: async function (id,data) {
|
||||
return await http.post(`${config.API_URL}/mtm/routepack/${id}/copy/`,data)
|
||||
}
|
||||
},
|
||||
togglestate:{
|
||||
name: "变更工艺路线状态",
|
||||
req: async function (id,data) {
|
||||
return await http.post(`${config.API_URL}/mtm/routepack/${id}/toggle_state/`,data)
|
||||
}
|
||||
},
|
||||
item: {
|
||||
name: "获取详情",
|
||||
req: async function (id) {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"
|
||||
>新建工艺</el-button
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add">新建工艺</el-button>
|
||||
<el-select
|
||||
v-model="query.state"
|
||||
placeholder="审批状态"
|
||||
|
|
@ -87,7 +85,6 @@
|
|||
@click="table_edit(scope.row, scope.$index)"
|
||||
>继续编辑
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
|
|
@ -95,6 +92,21 @@
|
|||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="success"
|
||||
size="small"
|
||||
v-if="scope.row.state == 30"
|
||||
@click="table_copy(scope.row)"
|
||||
>复制
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="success"
|
||||
size="small"
|
||||
@click="table_state(scope.row)"
|
||||
>更改状态
|
||||
</el-button>
|
||||
<el-popconfirm
|
||||
v-if="scope.row.state != 30"
|
||||
title="确定删除吗?"
|
||||
|
|
@ -111,7 +123,34 @@
|
|||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
<el-dialog
|
||||
title="更改工艺路线状态"
|
||||
v-model="visible"
|
||||
>
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="状态">
|
||||
<el-select
|
||||
v-model="toggleState"
|
||||
placeholder="状态"
|
||||
class="width-100"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stateOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit()">保 存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
|
|
@ -179,6 +218,9 @@ export default {
|
|||
30: "已确认",
|
||||
},
|
||||
filterType: "all",
|
||||
toggleState:10,
|
||||
visible:false,
|
||||
isSaveing:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -220,6 +262,31 @@ export default {
|
|||
this.$refs.table.refresh();
|
||||
this.dialog.save = false;
|
||||
},
|
||||
//复制
|
||||
table_copy(row){
|
||||
this.$API.mtm.routepack.copy.req(row.id).then((res) => {
|
||||
this.$message.success("复制成功");
|
||||
this.$refs.table.refresh();
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
table_state(row){
|
||||
this.toggleState = row.state;
|
||||
this.toggleId = row.id;
|
||||
this.visible = true;
|
||||
},
|
||||
submit(){
|
||||
let that = this;
|
||||
that.$API.mtm.routepack.togglestate.req(that.toggleId,{state:that.toggleState}).then((res) => {
|
||||
that.$message.success("更改成功");
|
||||
this.visible = false;
|
||||
that.$refs.table.refresh();
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
})
|
||||
},
|
||||
//权限设置
|
||||
permission() {
|
||||
this.dialog.permission = true;
|
||||
|
|
|
|||
|
|
@ -747,7 +747,7 @@ export default {
|
|||
that.isSaveing = true;
|
||||
that.$API.wpm.mloguser.create.req(that.muserForm).then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.visible = false;
|
||||
that.saveMuserDialog = false;
|
||||
that.$message.success("操作成功");
|
||||
that.$refs.tableMuser.refresh();
|
||||
}).catch(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue