混料新增修改

This commit is contained in:
shijing 2023-12-05 10:23:46 +08:00
parent 1f1d96528a
commit c0ea8b80a9
2 changed files with 43 additions and 18 deletions

View File

@ -43,17 +43,16 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="60">
<!-- <el-table-column label="操作" fixed="right" width="60">
<template #default="scope">
<el-link type="primary" @click="table_submit(scope.row)" v-auth="'mtask.submit'"
v-if="scope.row.state != 40">提交
</el-link>
</template>
</el-table-column>
</el-table-column> -->
</scTable>
</el-main>
</el-container>
</el-aside>
<el-main class="nopadding">
<el-container>

View File

@ -81,7 +81,7 @@
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="left">
<el-table-column label="操作" fixed="right" align="left" width="100">
<template #default="scope">
<el-button link type="primary" @click="handover_edit(scope.row)" v-auth="'handover.update'"
v-if="scope.row.submit_time == null">
@ -152,11 +152,23 @@
<el-button type="primary" @click="submitHandover">提交</el-button>
</el-footer>
</el-dialog>
<save-dialog v-if="dialogSave"
ref="saveDialog" :mtask="mtask"
:brothersList="brothersList"
:activeType="activeName"
@success="handleSaveSuccess"
@closed="dialogSave = false">
</save-dialog>
</template>
<script>
import saveDialog from "./worktask_form.vue";
export default {
components: {
saveDialog,
},
data() {
return {
activeName:'8车间',
currentMgroup: {},
apiObj: null,
params: {},
@ -164,9 +176,11 @@ export default {
paramsHandover: {},
handoverForm: {},
handoverVisible: false,
dialogSave:false,
deptOptions: [],
userList: [],
userList2: []
userList2: [],
mtask:'',
}
},
mounted() {
@ -174,22 +188,34 @@ export default {
this.getDepts()
},
methods: {
add() {
this.dialogSave = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add");
});
},
//
table_edit(row) {
this.dialogSave = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
});
},
async table_del(row) {
this.$confirm(`确定删除吗?`, "提示", {
type: "warning",
})
.then(() => {
this.$API.wpm.mlog.delete
.req(row.id)
.then((res) => {
this.$message.success("删除成功");
return res;
})
.catch((err) => {
return err;
});
})
.catch(() => { });
}).then(() => {
this.$API.wpm.mlog.delete.req(row.id).then((res) => {
this.$message.success("删除成功");
return res;
}).catch((err) => {
return err;
});
}).catch(() => { });
},
handleSaveSuccess(){
this.$refs.table.refresh();
},
getDepts() {
this.$API.system.dept.list.req({ page: 0, name__in: '7车间,10车间' }).then(res => {