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