fix:加工工艺

This commit is contained in:
shijing 2024-07-03 17:45:51 +08:00
parent 4f5098bcdc
commit f2d4b447f3
5 changed files with 1164 additions and 89 deletions

View File

@ -2,27 +2,90 @@
<el-container>
<el-header>
<div class="left-panel">
<el-input style="margin-right: 5px;" v-model="query.search" placeholder="产品名称" clearable></el-input>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
<el-input
style="margin-right: 5px"
v-model="query.search"
placeholder="产品名称"
clearable
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
<div class="right-panel">
<el-button type="primary" icon="el-icon-plus" @click="table_add" v-auth="'material.create'"></el-button>
<el-button
type="primary"
icon="el-icon-plus"
@click="table_add"
v-auth="'material.create'"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange">
<el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column label="名称" prop="name" min-width="100"></el-table-column>
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
@selection-change="selectionChange"
>
<el-table-column
label="#"
type="index"
width="50"
></el-table-column>
<el-table-column
label="名称"
prop="name"
min-width="100"
></el-table-column>
<!-- <el-table-column label="编号" prop="code" min-width="100"></el-table-column> -->
<el-table-column label="大类" prop="cate" min-width="150"></el-table-column>
<el-table-column label="车间" prop="belong_dept_name" min-width="60"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="140">
<el-table-column
label="大类"
prop="cate"
min-width="150"
></el-table-column>
<el-table-column
label="车间"
prop="belong_dept_name"
min-width="60"
></el-table-column>
<el-table-column label="交接到工段" min-width="60">
<template #default="scope">
<el-button link size="small" @click="table_edit(scope.row)" v-auth="'material.update'" type="primary">编辑</el-button>
<el-icon v-if="scope.row.into_wm_mgroup" color="green">
<CircleCheckFilled />
</el-icon>
</template>
</el-table-column>
<el-table-column
label="操作"
fixed="right"
align="center"
width="140"
>
<template #default="scope">
<el-button
link
size="small"
@click="table_edit(scope.row)"
v-auth="'material.update'"
type="primary"
>编辑</el-button
>
<el-divider direction="vertical"></el-divider>
<el-popconfirm title="确定删除吗?" @confirm="roleDel(scope.row, scope.$index)">
<el-popconfirm
title="确定删除吗?"
@confirm="roleDel(scope.row, scope.$index)"
>
<template #reference>
<el-button link size="small" v-auth="'material.delete'" type="danger">删除</el-button>
<el-button
link
size="small"
v-auth="'material.delete'"
type="danger"
>删除</el-button
>
</template>
</el-popconfirm>
</template>
@ -31,85 +94,91 @@
</el-main>
</el-container>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
v-if="dialog.save"
ref="saveDialog"
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
</template>
<script>
import saveDialog from "./process_form.vue";
export default {
name: 'material',
components: {
saveDialog
export default {
name: "material",
components: {
saveDialog,
},
data() {
return {
apiObj: this.$API.mtm.process.list,
search: {
keyword: null,
},
dialog: {
save: false,
},
query: {},
types_: {
0: "电/水/气",
10: "成品",
20: "半成品",
30: "主要原料",
40: "辅助材料",
50: "加工工具",
60: "辅助工装",
},
};
},
methods: {
handleChange(value) {
console.log(value);
console.log(this.form.belong_dept);
},
data() {
return {
apiObj: this.$API.mtm.process.list,
search: {
keyword: null
},
dialog: {
save: false,
},
query: {},
types_:{
0:'电/水/气',
10:'成品',
20:'半成品',
30:'主要原料',
40:'辅助材料',
50:'加工工具',
60:'辅助工装',
},
//
table_add() {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add");
});
},
//
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
});
},
//
async roleDel(row) {
var id = row.id;
var res = await this.$API.mtm.material.delete.req(id);
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
this.$refs.table.refresh();
this.$message.success("删除成功");
}
},
methods: {
handleChange(value) {
console.log(value);
console.log(this.form.belong_dept);
},
//
table_add() {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add");
});
},
//
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
});
},
//
async roleDel(row){
var id = row.id;
var res = await this.$API.mtm.material.delete.req(id);
if(res.err_msg){
this.$message.error(res.err_msg)
}else{
this.$refs.table.refresh();
this.$message.success("删除成功")
}
},
//
selectionChange(selection){
this.selection = selection;
},
//
handleQuery(){
this.$refs.table.queryData(this.query)
},
//
handleSaveSuccess(){
this.$refs.table.refresh()
}
}
}
//
selectionChange(selection) {
this.selection = selection;
},
//
handleQuery() {
this.$refs.table.queryData(this.query);
},
//
handleSaveSuccess() {
this.$refs.table.refresh();
},
},
};
</script>
<style scoped>
.treeMain {width: 100%;height:280px;overflow: auto;border: 1px solid #dcdfe6;margin-bottom: 10px;}
.treeMain {
width: 100%;
height: 280px;
overflow: auto;
border: 1px solid #dcdfe6;
margin-bottom: 10px;
}
</style>

View File

@ -0,0 +1,287 @@
<template>
<el-dialog
:title="titleMap[mode]"
v-model="visible"
:size="1000"
destroy-on-close
@closed="$emit('closed')"
>
<el-container v-loading="loading">
<el-main style="padding: 0 20px 20px 20px">
<el-form
ref="dialogForm"
:model="form"
:rules="rules"
label-position="right"
label-width="100px"
>
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="工序" prop="process">
<el-select
v-model="form.process"
placeholder="工序"
clearable
style="width: 100%"
:disabled="updateDisable"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="出材率" prop="out_rate">
<el-input-number
v-model="form.out_rate"
:max="100"
:precision="1"
:step="0.1"
style="width: 100%"
/>
</el-form-item>
</el-col>
<!-- <el-col :md="12" :sm="24">
<el-form-item label="指定工段">
<el-select
v-model="form.mgroup"
placeholder="物料"
clearable
filterable
style="width: 100%"
>
<el-option
v-for="item in mgroups"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :md="12" :sm="24">
<el-form-item label="主要输入" prop="material_in">
<el-select
v-model="form.material_in"
placeholder="物料"
clearable
filterable
style="width: 100%"
>
<el-option
v-for="item in materials"
:key="item.id"
:label="item.full_name"
:value="item.id"
>
<span style="float: left">{{
item.full_name
}}</span>
<span
style="
float: right;
color: '#E6A23C';
font-size: 13px;
"
v-if="item.is_hidden"
>{{ item.process_name }}-</span
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="主要输出" prop="material_out">
<el-select
v-model="form.material_out"
placeholder="物料"
clearable
filterable
style="width: 100%"
>
<el-option
v-for="item in materials"
:key="item.id"
:label="item.full_name"
:value="item.id"
>
<span style="float: left">{{
item.full_name
}}</span>
<span
style="
float: right;
color: '#E6A23C';
font-size: 13px;
"
v-if="item.is_hidden"
>{{ item.process_name }}-</span
></el-option
>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :md="12" :sm="24">
<el-form-item label="统计工序">
<el-switch v-model="form.is_count_utask" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="自动排产" prop="is_autotask">
<el-switch v-model="form.is_autotask" />
</el-form-item>
</el-col> -->
<el-col :md="12" :sm="24">
<el-form-item label="工时" prop="hour_work">
<el-input-number
v-model="form.hour_work"
:min="1"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="排序">
<el-input-number
v-model="form.sort"
:min="1"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-main>
<el-footer>
<el-button type="primary" :loading="isSaveing" @click="submit"
>提交</el-button
>
<el-button @click="visible = false">取消</el-button>
</el-footer>
</el-container>
</el-dialog>
</template>
<script>
const defaultForm = {
process: null,
sort: 1,
out_rate: 100,
is_autotask: true,
is_count_utask: false,
};
export default {
props: {
routepack: { type: String, default: "" },
},
emits: ["success", "closed"],
data() {
return {
loading: false,
mode: "add",
//
form: defaultForm,
//
rules: {
process: [
{ required: true, message: "请选择工序", trigger: "blur" },
],
},
visible: false,
isSaveing: false,
materials: [],
mgroups: [],
options: [],
titleMap: { add: "新增", edit: "编辑" },
setFiltersVisible: false,
};
},
mounted() {
this.getMgroup();
this.getProcess();
this.getMaterials();
this.form.routepack = this.routepack;
},
methods: {
getMgroup() {
let that = this;
this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => {
this.mgroups = res;
});
},
getMaterials() {
let that = this;
this.$API.mtm.material.list
.req({ page: 0, type__in: "10,20" })
.then((res) => {
this.materials = res;
});
},
getProcess() {
let that = this;
that.$API.mtm.process.list.req({ page: 0 }).then((res) => {
that.options = res;
});
},
//
open(mode = "add") {
this.mode = mode;
this.visible = true;
return this;
},
//
setData(data) {
Object.assign(this.form, data);
},
//
submit() {
let that = this;
that.$refs.dialogForm.validate(async (valid) => {
if (valid) {
that.isSaveing = true;
if (that.mode === "add") {
that.$API.mtm.route.create
.req(that.form)
.then((res) => {
that.isSaveing = false;
that.$emit("success", that.form, that.mode);
that.visible = false;
that.$message.success("操作成功");
})
.catch((res) => {
that.isSaveing = false;
});
} else {
that.$API.mtm.route.update
.req(that.form.id, that.form)
.then((res) => {
that.isSaveing = false;
that.$emit("success", that.form, that.mode);
that.visible = false;
that.$message.success("操作成功");
})
.catch((res) => {
that.isSaveing = false;
});
}
}
});
},
//
setFilters(filters) {
this.selectionFilters = filters;
this.setFiltersVisible = true;
},
},
};
</script>
<style></style>

View File

@ -0,0 +1,95 @@
<template>
<el-drawer
title="查看"
v-model="visible"
:size="1000"
destroy-on-close
@closed="$emit('closed')"
:close-on-click-modal="false"
>
<el-container v-loading="loading">
<el-main>
<el-card shadow="hover">
<el-descriptions :column="3" title="基本信息">
<el-descriptions-item label="工艺名称:">{{
form.name
}}</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card style="margin-top: 8px" shadow="hover">
<scTable
ref="tables"
:data="tableData"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column label="排序" prop="sort" width="50">
</el-table-column>
<el-table-column label="工序" prop="process_name">
</el-table-column>
<el-table-column label="输入" prop="material_in_name">
</el-table-column>
<el-table-column label="输出" prop="material_out_name">
</el-table-column>
<el-table-column label="出材率" prop="out_rate">
</el-table-column>
<el-table-column label="工时" prop="hour_work">
</el-table-column>
</scTable>
</el-card>
</el-main>
</el-container>
</el-drawer>
</template>
<script>
export default {
emits: ["success", "closed"],
data() {
return {
loading: false,
visible: false,
isSaveing: false,
state_: {
10: "创建中",
20: "审批中",
40: "进行中",
50: "已完成",
},
form: {},
tableData: [],
};
},
mounted() {
this.tableData = [];
},
methods: {
//
open() {
this.visible = true;
return this;
},
//
setData(data) {
let that = this;
Object.assign(that.form, data);
that.getRoute(that.form.material);
},
//
getRoute(id) {
this.$API.mtm.route.list
.req({ page: 0, material: id })
.then((res) => {
this.tableData = res;
});
},
},
};
</script>
<style scoped>
.el-transfer {
--el-transfer-panel-width: 345px !important;
}
</style>

View File

@ -1,5 +1,299 @@
<template>
<div>
</div>
</template>
<el-container>
<el-header>
<div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add"
>新建工艺</el-button
>
<el-select
v-model="query.state"
placeholder="审批状态"
@change="handleQuery"
style="margin-left: 2px; width: 150px"
clearable
>
<el-option
v-for="item in stateOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="right-panel">
<div class="right-panel-search">
<el-input
v-model="query.search"
placeholder="名称"
clearable
@keyup.enter="handleQuery"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
:params="params"
row-key="id"
stripe
@resetQuery="resetQuery"
>
<el-table-column
label="#"
type="index"
fixed="left"
width="50"
></el-table-column>
<el-table-column
label="名称"
prop="name"
fixed="left"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column label="产品" prop="material_name">
</el-table-column>
<el-table-column label="状态" prop="state"> </el-table-column>
<el-table-column label="审批状态">
<template #default="scope">
<span
v-if="scope.row.ticket_ && scope.row.ticket_.state_"
style="margin-right: 5px"
>{{ scope.row.ticket_.state_.name }}</span
>
<el-tag
v-if="
scope.row.ticket_ && scope.row.ticket_.act_state
"
:type="
scope.row.ticket_.act_state === 0
? ''
: scope.row.ticket_.act_state === 1
? ''
: scope.row.ticket_.act_state === 2
? 'danger'
: scope.row.ticket_.act_state === 3
? 'danger'
: scope.row.ticket_.act_state === 5
? 'danger'
: scope.row.ticket_.act_state === 4
? 'success'
: ''
"
>
{{ act_states[scope.row.ticket_.act_state] }}
</el-tag>
</template>
</el-table-column>
<el-table-column
label="创建人"
prop="create_by_name"
></el-table-column>
<el-table-column
label="创建时间"
prop="create_time"
></el-table-column>
<el-table-column
label="操作"
fixed="right"
align="center"
width="180"
>
<template #default="scope">
<el-button
link
type="primary"
size="small"
v-if="scope.row.ticket == null"
@click="table_edit(scope.row, scope.$index)"
>继续编辑
</el-button>
<el-button
link
type="primary"
size="small"
@click="table_show(scope.row, scope.$index)"
>查看
</el-button>
<el-popconfirm
v-if="scope.row.state != 30"
title="确定删除吗?"
@confirm="table_del(scope.row, scope.$index)"
>
<template #reference>
<el-button link type="danger" size="small"
>删除</el-button
>
</template>
</el-popconfirm>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
@success="handleSaveSuccess"
@closed="dialog.save = false"
>
</save-dialog>
<show-dialog
v-if="dialog.show"
ref="showDialog"
@closed="dialog.show = false"
></show-dialog>
</template>
<script>
import saveDialog from "./routepack_form.vue";
import showDialog from "./route_show.vue";
export default {
name: "route",
components: {
saveDialog,
showDialog,
},
data() {
return {
dialog: {
save: false,
edit: false,
show: false,
},
adminform: {
username: "",
},
routepack: "",
apiObj: this.$API.mtm.routepack.list,
params: {
need_route: true,
},
query: {},
userId: "",
selection: [],
search: {
search: "",
keyword: null,
},
timeRange: [],
filteType: "all",
stateOptions: [
{
label: "创建中",
value: 10,
},
{
label: "审批中",
value: 20,
},
{
label: "已完成",
value: 30,
},
],
state_: {
10: "创建中",
20: "审批中",
30: "已关闭",
},
filterType: "all",
};
},
mounted() {
let userInfo = this.$TOOL.data.get("USER_INFO");
this.userId = userInfo.id;
},
methods: {
//
add() {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add");
});
},
//
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
});
},
//
table_show(row) {
this.dialog.show = true;
this.$nextTick(() => {
this.$refs.showDialog.open().setData(row);
});
},
//
permission() {
this.dialog.permission = true;
this.$nextTick(() => {
this.$refs.permissionDialog.open();
});
},
//
async table_del(row) {
this.$API.rpm.rpj.delete
.req(row.id)
.then((res) => {
this.$message.success("删除成功");
this.$refs.table.refresh();
return res;
})
.catch((err) => {
return err;
});
},
next_add(row) {
this.$router.push({
name: "",
query: {
rpjid: row.id,
},
});
},
//
handleSaveSuccess(data, mode) {
if (mode == "add") {
this.$refs.table.refresh();
} else if (mode == "edit") {
this.$refs.table.refresh();
}
},
resetQuery() {
this.query = {};
},
//
handleQuery() {
if (this.timeRange) {
this.query.start_come = this.timeRange[0];
this.query.end_come = this.timeRange[1];
} else {
this.query.end_come = null;
this.query.start_come = null;
}
this.$refs.table.queryData(this.query);
},
handleFilterTypeChange(val) {
if (val == "all") {
this.query.create_by = null;
} else if (val == "my") {
this.query.create_by = this.userId;
}
this.$refs.table.queryData(this.query);
},
},
};
</script>

View File

@ -0,0 +1,330 @@
<template>
<el-drawer
:title="titleMap[mode]"
v-model="visible"
:size="'90%'"
destroy-on-close
@closed="$emit('closed')"
>
<el-container>
<el-header>
<el-steps
:active="active"
style="width: 100%"
:align-center="true"
finish-status="success"
>
<el-step
v-for="(item, index) of stepes"
:key="index"
:title="item"
style="50%"
@click="handleStep(index)"
>
</el-step>
</el-steps>
</el-header>
<!--基本信息!-->
<el-main class="nopadding" v-if="active === 0">
<el-form
ref="dialogForm"
:model="form"
:rules="rules"
label-width="110px"
style="margin: 40px"
>
<el-row>
<el-col :md="24" :sm="12" :xs="24">
<el-form-item label="名称" prop="name">
<el-input
v-model="form.name"
type="text"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :md="24" :sm="12" :xs="24">
<el-form-item label="产品" prop="type">
<el-select
v-model="form.material"
style="width: 100%"
>
<el-option
v-for="item in materials"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="24" :sm="12" :xs="24">
<el-form-item>
<el-button
style="margin-top: 20px"
type="primary"
:loading="isSaveing"
:disabled="isSaveing"
@click="handleNextStep"
>下一步
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-main>
<!--工序!-->
<el-main class="nopadding" v-if="active === 1">
<div class="left-panel" style="margin: 10px">
<el-button
type="primary"
icon="el-icon-plus"
@click="table_add"
></el-button>
</div>
<scTable
ref="tables"
:apiObj="apiObj"
:query="query"
:params="query"
row-key="id"
hidePagination
hideDo
stripe
style="height: 680px"
>
<el-table-column label="排序" prop="sort" width="50">
</el-table-column>
<el-table-column label="工序" prop="process_name">
</el-table-column>
<el-table-column label="输入" prop="material_in_name">
</el-table-column>
<el-table-column label="输出" prop="material_out_name">
</el-table-column>
<el-table-column label="出材率" prop="out_rate">
</el-table-column>
<el-table-column label="工时" prop="hour_work">
</el-table-column>
<el-table-column
label="操作"
fixed="right"
align="center"
width="200"
>
<template #default="scope">
<el-popconfirm
title="确定删除该工序吗?"
@confirm="delWorker(scope.row)"
>
<template #reference>
<el-button text type="danger" size="small"
>删除</el-button
>
</template>
</el-popconfirm>
</template>
</el-table-column>
</scTable>
<div style="margin-top: 20px; text-align: center">
<el-button @click="handleLastStep" style="margin-right: 4px"
>上一步</el-button
>
<el-button
v-for="item in initForm.transitions"
:key="item.id"
type="primary"
:loading="isSaveing"
:disabled="isSaveing"
@click="submitTicketCreate(item.id)"
style="margin-right: 4px"
>{{ item.name }}</el-button
>
<el-button @click="submitOut" type="warning"
>退出</el-button
>
</div>
</el-main>
</el-container>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
:routepack="routepack"
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
</el-drawer>
</template>
<script>
import saveDialog from "./route_form.vue";
export default {
name: "routepack_form",
components: { saveDialog },
data() {
return {
active: 0,
stepSuc: [0],
stepes: ["基本信息", "工艺步骤"],
titleMap: { add: "新增工艺", edit: "编辑工艺" },
mode: "add",
isSaveing: false, //
search: {
keyword: null,
},
dialogTitle: "新增",
visible: false,
dialog: {
save: false,
},
form: {
name: "",
material: "",
},
apiworkerObj: null,
materials: [],
apiObj: null,
query: {
material: "",
},
rules: {
name: [{ required: true, message: "请输入" }],
},
routepack: "",
};
},
mounted() {
this.isSaveing = false;
this.getInit();
this.getMaterials();
},
methods: {
open(mode) {
this.mode = mode;
this.visible = true;
return this;
},
setData(data) {
Object.assign(this.form, data);
console.log("setData this.form", this.form);
},
getMaterials() {
let that = this;
this.$API.mtm.material.list
.req({ page: 0, type__in: "10,20" })
.then((res) => {
this.materials = res;
});
},
handleStep(val) {
//
if (this.stepSuc.includes(val) === true) {
this.active = val;
}
},
//
handleLastStep() {
this.active = 0;
},
//
handleNextStep() {
let that = this;
let form = {};
form.name = that.form.name;
form.material = that.form.material;
if (that.form.id) {
that.$API.mtm.routepack.update
.req(that.form.id, that.form)
.then((res) => {
that.routepack = res.id;
that.active = 1;
this.query.material = this.form.material;
this.apiObj = this.$API.mtm.route.list;
});
} else {
that.$API.mtm.routepack.create.req(form).then((res) => {
this.active = 1;
that.routepack = res.id;
});
}
},
table_add() {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add");
});
},
table_edit(row) {
this.dialog.save = true;
this.$refs.saveDialog.open("edit").setData(row);
},
productClick(data) {
let materialId = this.selectedProduct.id;
if (data) {
this.selectedProduct = data;
materialId = data.id;
}
this.$API.mtm.route.list
.req({ page: 0, material: materialId })
.then((res) => {
this.currentRoute = res;
});
},
submitOut() {},
//
delWorker(row) {
this.$API.delete
.req(row.id)
.then((res) => {
this.$message.success("工序步骤删除成功");
this.getmemberList();
return res;
})
.catch((err) => {
return err;
});
},
//
getInit() {
let that = this;
that.$API.wf.workflow.initkey.req("routepack").then((res) => {
that.initForm = res;
});
},
//,
submitTicketCreate(id) {
let that = this;
let ticket = {};
that.isSaveing = true;
ticket.title = that.form.name;
ticket.workflow = that.initForm.workflow;
ticket.ticket_data = {
t_id: that.routepack,
};
ticket.transition = id;
that.$API.wf.ticket.create
.req(ticket)
.then((res) => {
that.tLoading = false;
that.$message.success("提交成功");
that.$router.push({
name: "",
query: {},
});
})
.catch((e) => {
that.tLoading = false;
});
},
//
handleSaveSuccess() {
this.$refs.tables.refresh();
},
},
};
</script>