fix:工艺路线更改状态
This commit is contained in:
parent
413cc19b96
commit
a63394c147
|
|
@ -446,8 +446,8 @@ export default {
|
|||
},
|
||||
togglestate:{
|
||||
name: "变更工艺路线状态",
|
||||
req: async function (id,data) {
|
||||
return await http.post(`${config.API_URL}/mtm/routepack/${id}/toggle_state/`,data)
|
||||
req: async function (id) {
|
||||
return await http.post(`${config.API_URL}/mtm/routepack/${id}/toggle_state/`)
|
||||
}
|
||||
},
|
||||
item: {
|
||||
|
|
@ -456,6 +456,12 @@ export default {
|
|||
return await http.get(`${config.API_URL}/mtm/routepack/${id}/`);
|
||||
},
|
||||
},
|
||||
dag: {
|
||||
name: "获取详情",
|
||||
req: async function (id) {
|
||||
return await http.get(`${config.API_URL}/mtm/routepack/${id}/dag/`);
|
||||
},
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
>更改状态
|
||||
</el-button>
|
||||
<el-popconfirm
|
||||
v-if="scope.row.state != 30"
|
||||
v-if="scope.row.state == 10"
|
||||
title="确定删除吗?"
|
||||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
|
|
@ -126,34 +126,6 @@
|
|||
</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"
|
||||
|
|
@ -230,8 +202,6 @@ export default {
|
|||
},
|
||||
showrotepack: "",
|
||||
filterType: "all",
|
||||
toggleState:10,
|
||||
visible:false,
|
||||
isSaveing:false,
|
||||
limitedWatch:false,
|
||||
};
|
||||
|
|
@ -294,15 +264,9 @@ export default {
|
|||
});
|
||||
},
|
||||
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.$API.mtm.routepack.togglestate.req(row.id).then((res) => {
|
||||
that.$message.success("更改成功");
|
||||
this.visible = false;
|
||||
that.$refs.table.refresh();
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in New Issue