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